Class: Fable::VariableAssignment
- Inherits:
-
RuntimeObject
- Object
- RuntimeObject
- Fable::VariableAssignment
- Defined in:
- lib/fable/variable_assignment.rb
Overview
The value to be assigned is popped off the evaluation stack, so no need to keep it here
Instance Attribute Summary collapse
-
#global ⇒ Object
(also: #global?)
Returns the value of attribute global.
-
#new_declaration ⇒ Object
(also: #new_declaration?)
Returns the value of attribute new_declaration.
-
#variable_name ⇒ Object
Returns the value of attribute variable_name.
Attributes inherited from RuntimeObject
#original_object, #own_debug_metadata, #parent, #path
Instance Method Summary collapse
-
#initialize(variable_name, new_declaration) ⇒ VariableAssignment
constructor
A new instance of VariableAssignment.
- #to_s ⇒ Object
Methods inherited from RuntimeObject
#compact_path_string, #convert_path_to_relative, #copy, #debug_line_number_of_path, #debug_metadata, #indentation_string, #resolve_path, #root_content_container
Constructor Details
#initialize(variable_name, new_declaration) ⇒ VariableAssignment
Returns a new instance of VariableAssignment.
10 11 12 13 14 |
# File 'lib/fable/variable_assignment.rb', line 10 def initialize(variable_name, new_declaration) super() self.variable_name = variable_name self.new_declaration = new_declaration end |
Instance Attribute Details
#global ⇒ Object Also known as: global?
Returns the value of attribute global.
5 6 7 |
# File 'lib/fable/variable_assignment.rb', line 5 def global @global end |
#new_declaration ⇒ Object Also known as: new_declaration?
Returns the value of attribute new_declaration.
5 6 7 |
# File 'lib/fable/variable_assignment.rb', line 5 def new_declaration @new_declaration end |
#variable_name ⇒ Object
Returns the value of attribute variable_name.
5 6 7 |
# File 'lib/fable/variable_assignment.rb', line 5 def variable_name @variable_name end |
Instance Method Details
#to_s ⇒ Object
16 17 18 |
# File 'lib/fable/variable_assignment.rb', line 16 def to_s return "VarAssign to #{variable_name}" end |