Class: Frepl::Declaration
- Inherits:
-
SinglelineStatement
- Object
- Statement
- SinglelineStatement
- Frepl::Declaration
- Defined in:
- lib/frepl/statements/declaration.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#assigned_value ⇒ Object
readonly
Returns the value of attribute assigned_value.
-
#kind ⇒ Object
readonly
Returns the value of attribute kind.
-
#len ⇒ Object
readonly
Returns the value of attribute len.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
-
#variable_name ⇒ Object
readonly
Returns the value of attribute variable_name.
Attributes inherited from SinglelineStatement
Instance Method Summary collapse
Methods inherited from SinglelineStatement
#incomplete?, #initialize, #output
Methods inherited from Statement
Constructor Details
This class inherits a constructor from Frepl::SinglelineStatement
Instance Attribute Details
#assigned_value ⇒ Object (readonly)
Returns the value of attribute assigned_value.
3 4 5 |
# File 'lib/frepl/statements/declaration.rb', line 3 def assigned_value @assigned_value end |
#kind ⇒ Object (readonly)
Returns the value of attribute kind.
3 4 5 |
# File 'lib/frepl/statements/declaration.rb', line 3 def kind @kind end |
#len ⇒ Object (readonly)
Returns the value of attribute len.
3 4 5 |
# File 'lib/frepl/statements/declaration.rb', line 3 def len @len end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
3 4 5 |
# File 'lib/frepl/statements/declaration.rb', line 3 def type @type end |
#variable_name ⇒ Object (readonly)
Returns the value of attribute variable_name.
3 4 5 |
# File 'lib/frepl/statements/declaration.rb', line 3 def variable_name @variable_name end |
Instance Method Details
#==(other) ⇒ Object
9 10 11 12 13 14 15 |
# File 'lib/frepl/statements/declaration.rb', line 9 def ==(other) if other.is_a?(Declaration) self.variable_name == other.variable_name else super(other) end end |
#accept(visitor) ⇒ Object
5 6 7 |
# File 'lib/frepl/statements/declaration.rb', line 5 def accept(visitor) visitor.visit_declaration(self) end |
#pointer? ⇒ Boolean
21 22 23 |
# File 'lib/frepl/statements/declaration.rb', line 21 def pointer? @pointer != nil end |
#target? ⇒ Boolean
17 18 19 |
# File 'lib/frepl/statements/declaration.rb', line 17 def target? @target != nil end |