class Mutest::Mutator::Node::NamedValue::Access::Ivar

Named value access emitter for instance variables

Constants

NAME_RANGE

Public Instance Methods

dispatch() click to toggle source

Emit mutations

@return [undefined]

# File lib/mutest/mutator/node/named_value/access.rb, line 29
def dispatch
  emit_attribute_read
  super()
end

Private Instance Methods

attribute_name() click to toggle source

Variable name without leading '@'

@return [Symbol]

# File lib/mutest/mutator/node/named_value/access.rb, line 46
def attribute_name
  name.slice(NAME_RANGE).to_sym
end
emit_attribute_read() click to toggle source

Emit instance variable as attribute send

@return [undefined]

# File lib/mutest/mutator/node/named_value/access.rb, line 39
def emit_attribute_read
  emit(s(:send, nil, attribute_name))
end