Class: RubyDetective::AST::Nodes::ValueNode
- Inherits:
-
GenericNode
- Object
- GenericNode
- RubyDetective::AST::Nodes::ValueNode
- Defined in:
- lib/ruby_detective/ast/nodes/value_node.rb
Instance Attribute Summary collapse
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Attributes inherited from GenericNode
#ast_node, #children, #file_path, #parent_node
Instance Method Summary collapse
- #first_line ⇒ Object
-
#initialize(value, *args) ⇒ ValueNode
constructor
A new instance of ValueNode.
- #last_line ⇒ Object
- #raw_children ⇒ Object
- #type ⇒ Object
Methods inherited from GenericNode
#absolute_path_sign_node?, #class_declaration_node?, #constant_reference_node?, #declared_namespace, #generic_node?, #module_declaration_node?, #namespace, #query, #short_namespace, #value_node?
Constructor Details
#initialize(value, *args) ⇒ ValueNode
Returns a new instance of ValueNode.
7 8 9 10 |
# File 'lib/ruby_detective/ast/nodes/value_node.rb', line 7 def initialize(value, *args) super(value, *args) @value = value end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
5 6 7 |
# File 'lib/ruby_detective/ast/nodes/value_node.rb', line 5 def value @value end |
Instance Method Details
#first_line ⇒ Object
16 17 18 |
# File 'lib/ruby_detective/ast/nodes/value_node.rb', line 16 def first_line parent_node.first_line end |
#last_line ⇒ Object
20 21 22 |
# File 'lib/ruby_detective/ast/nodes/value_node.rb', line 20 def last_line parent_node.last_line end |
#raw_children ⇒ Object
24 25 26 |
# File 'lib/ruby_detective/ast/nodes/value_node.rb', line 24 def raw_children [] end |
#type ⇒ Object
12 13 14 |
# File 'lib/ruby_detective/ast/nodes/value_node.rb', line 12 def type :value end |