Class: Kumi::Core::NAST::InputRef
- Defined in:
- lib/kumi/core/nast.rb
Instance Attribute Summary collapse
-
#element_terminal ⇒ Object
readonly
Returns the value of attribute element_terminal.
-
#fqn ⇒ Object
readonly
Returns the value of attribute fqn.
-
#key_chain ⇒ Object
readonly
Returns the value of attribute key_chain.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
Attributes inherited from Node
Instance Method Summary collapse
- #accept(visitor) ⇒ Object
-
#initialize(path:, fqn: nil, key_chain: [], element_terminal: false, **k) ⇒ InputRef
constructor
A new instance of InputRef.
- #path_fqn ⇒ Object
Constructor Details
#initialize(path:, fqn: nil, key_chain: [], element_terminal: false, **k) ⇒ InputRef
Returns a new instance of InputRef.
45 46 47 48 49 50 51 |
# File 'lib/kumi/core/nast.rb', line 45 def initialize(path:, fqn: nil, key_chain: [], element_terminal: false, **k) super(**k) @path = Array(path).map!(&:to_sym) @fqn = fqn || @path.join(".") @key_chain = Array(key_chain).map!(&:to_sym) @element_terminal = !!element_terminal end |
Instance Attribute Details
#element_terminal ⇒ Object (readonly)
Returns the value of attribute element_terminal.
43 44 45 |
# File 'lib/kumi/core/nast.rb', line 43 def element_terminal @element_terminal end |
#fqn ⇒ Object (readonly)
Returns the value of attribute fqn.
43 44 45 |
# File 'lib/kumi/core/nast.rb', line 43 def fqn @fqn end |
#key_chain ⇒ Object (readonly)
Returns the value of attribute key_chain.
43 44 45 |
# File 'lib/kumi/core/nast.rb', line 43 def key_chain @key_chain end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
43 44 45 |
# File 'lib/kumi/core/nast.rb', line 43 def path @path end |
Instance Method Details
#accept(visitor) ⇒ Object
55 56 57 |
# File 'lib/kumi/core/nast.rb', line 55 def accept(visitor) visitor.visit_input_ref(self) end |
#path_fqn ⇒ Object
53 |
# File 'lib/kumi/core/nast.rb', line 53 def path_fqn = @fqn |