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
Methods inherited from Node
Constructor Details
#initialize(path:, fqn: nil, key_chain: [], element_terminal: false, **k) ⇒ InputRef
Returns a new instance of InputRef.
49 50 51 52 53 54 55 |
# File 'lib/kumi/core/nast.rb', line 49 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.
47 48 49 |
# File 'lib/kumi/core/nast.rb', line 47 def element_terminal @element_terminal end |
#fqn ⇒ Object (readonly)
Returns the value of attribute fqn.
47 48 49 |
# File 'lib/kumi/core/nast.rb', line 47 def fqn @fqn end |
#key_chain ⇒ Object (readonly)
Returns the value of attribute key_chain.
47 48 49 |
# File 'lib/kumi/core/nast.rb', line 47 def key_chain @key_chain end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
47 48 49 |
# File 'lib/kumi/core/nast.rb', line 47 def path @path end |
Instance Method Details
#accept(visitor) ⇒ Object
59 60 61 |
# File 'lib/kumi/core/nast.rb', line 59 def accept(visitor) visitor.visit_input_ref(self) end |
#path_fqn ⇒ Object
57 |
# File 'lib/kumi/core/nast.rb', line 57 def path_fqn = @fqn |