Class: Duby::AST::Annotation
Instance Attribute Summary collapse
-
#runtime ⇒ Object
(also: #runtime?)
Returns the value of attribute runtime.
-
#values ⇒ Object
readonly
Returns the value of attribute values.
Attributes inherited from Node
#children, #inferred_type, #newline, #parent, #position
Instance Method Summary collapse
- #[](name) ⇒ Object
- #[]=(name, value) ⇒ Object
-
#initialize(parent, position, klass) ⇒ Annotation
constructor
A new instance of Annotation.
- #name ⇒ Object
- #type ⇒ Object
Methods inherited from Node
#<<, ===, #_set_parent, child, child_name, #each, #empty?, #expr?, #initialize_copy, #insert, #inspect, #line_number, #log, #precompile, #resolve_if, #resolved!, #resolved?, #simple_name, #temp, #to_s
Constructor Details
#initialize(parent, position, klass) ⇒ Annotation
Returns a new instance of Annotation.
378 379 380 381 382 |
# File 'lib/duby/ast.rb', line 378 def initialize(parent, position, klass) super(parent, position) @class = klass @values = {} end |
Instance Attribute Details
#runtime ⇒ Object Also known as: runtime?
Returns the value of attribute runtime.
375 376 377 |
# File 'lib/duby/ast.rb', line 375 def runtime @runtime end |
#values ⇒ Object (readonly)
Returns the value of attribute values.
374 375 376 |
# File 'lib/duby/ast.rb', line 374 def values @values end |
Instance Method Details
#[](name) ⇒ Object
396 397 398 |
# File 'lib/duby/ast.rb', line 396 def [](name) @values[name] end |
#[]=(name, value) ⇒ Object
392 393 394 |
# File 'lib/duby/ast.rb', line 392 def []=(name, value) @values[name] = value end |
#name ⇒ Object
384 385 386 |
# File 'lib/duby/ast.rb', line 384 def name @class.name end |
#type ⇒ Object
388 389 390 |
# File 'lib/duby/ast.rb', line 388 def type @class end |