Class: Findyml::Key
- Inherits:
-
Struct
- Object
- Struct
- Findyml::Key
- Defined in:
- lib/findyml.rb
Instance Attribute Summary collapse
-
#alias_path ⇒ Object
Returns the value of attribute alias_path.
-
#file ⇒ Object
Returns the value of attribute file.
-
#node ⇒ Object
Returns the value of attribute node.
-
#path ⇒ Object
Returns the value of attribute path.
-
#terminal ⇒ Object
Returns the value of attribute terminal.
Instance Method Summary collapse
Instance Attribute Details
#alias_path ⇒ Object
Returns the value of attribute alias_path
11 12 13 |
# File 'lib/findyml.rb', line 11 def alias_path @alias_path end |
#file ⇒ Object
Returns the value of attribute file
11 12 13 |
# File 'lib/findyml.rb', line 11 def file @file end |
#node ⇒ Object
Returns the value of attribute node
11 12 13 |
# File 'lib/findyml.rb', line 11 def node @node end |
#path ⇒ Object
Returns the value of attribute path
11 12 13 |
# File 'lib/findyml.rb', line 11 def path @path end |
#terminal ⇒ Object
Returns the value of attribute terminal
11 12 13 |
# File 'lib/findyml.rb', line 11 def terminal @terminal end |
Instance Method Details
#col ⇒ Object
18 19 20 |
# File 'lib/findyml.rb', line 18 def col node.start_column + 1 end |
#inspect ⇒ Object
22 23 24 |
# File 'lib/findyml.rb', line 22 def inspect "#{path.map(&:inspect).join('.')} -> #{self}" end |
#line ⇒ Object
14 15 16 |
# File 'lib/findyml.rb', line 14 def line node.start_line + 1 end |
#location ⇒ Object
26 27 28 |
# File 'lib/findyml.rb', line 26 def location [file, line, col].join(':') end |
#terminal? ⇒ Boolean
12 |
# File 'lib/findyml.rb', line 12 def terminal? = terminal |