Class: SystemNavigation::InstructionStream::Instruction::AttrWriterInstruction
- Inherits:
-
AttrInstruction
show all
- Defined in:
- lib/system_navigation/instruction_stream/instruction/attr_instruction.rb
Overview
Instance Attribute Summary
#method, #visitor
Instance Method Summary
collapse
#accept, attrreaderinstr, attrwriterinstr, parse, #parse
#accessing_cvar?, #accessing_gvar?, #accessing_ivar?, #duparrays?, #dynamically_reads_ivar?, #dynamically_writes_ivar?, #evaling_str, #evals?, #find_message, #parse, parse, #parse_cvar, #parse_gvar, #parse_ivar, #parse_lineno, #parse_op_id, #parse_opcode, #parse_operand, #parse_position, #parse_service_instruction, #parse_var, #putnils?, #putstrings?, #reads_cvar?, #reads_gvar?, #sends_msg?, #vm_operative?, #writes_cvar?, #writes_gvar?
Constructor Details
Returns a new instance of AttrWriterInstruction.
65
66
67
|
# File 'lib/system_navigation/instruction_stream/instruction/attr_instruction.rb', line 65
def initialize(sym)
@sym = sym
end
|
Instance Method Details
#putobjects?(sym) ⇒ Boolean
84
85
86
|
# File 'lib/system_navigation/instruction_stream/instruction/attr_instruction.rb', line 84
def putobjects?(sym)
@sym == sym
end
|
#reads_ivar?(_sym) ⇒ Boolean
76
77
78
|
# File 'lib/system_navigation/instruction_stream/instruction/attr_instruction.rb', line 76
def reads_ivar?(_sym)
false
end
|
#visit(obj) ⇒ Object
69
70
71
72
73
74
|
# File 'lib/system_navigation/instruction_stream/instruction/attr_instruction.rb', line 69
def visit(obj)
name = obj.method.original_name.to_s
matched = (name[-1] == '=') && (name[0..-2] == convert_accessor_to_name(@sym))
obj.visitor = self if matched
matched
end
|
#writes_ivar?(_sym) ⇒ Boolean
80
81
82
|
# File 'lib/system_navigation/instruction_stream/instruction/attr_instruction.rb', line 80
def writes_ivar?(_sym)
true
end
|