Class: Findyml::Key

Inherits:
Struct
  • Object
show all
Defined in:
lib/findyml.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#alias_pathObject

Returns the value of attribute alias_path

Returns:

  • (Object)

    the current value of alias_path



10
11
12
# File 'lib/findyml.rb', line 10

def alias_path
  @alias_path
end

#fileObject

Returns the value of attribute file

Returns:

  • (Object)

    the current value of file



10
11
12
# File 'lib/findyml.rb', line 10

def file
  @file
end

#nodeObject

Returns the value of attribute node

Returns:

  • (Object)

    the current value of node



10
11
12
# File 'lib/findyml.rb', line 10

def node
  @node
end

#pathObject

Returns the value of attribute path

Returns:

  • (Object)

    the current value of path



10
11
12
# File 'lib/findyml.rb', line 10

def path
  @path
end

#terminalObject

Returns the value of attribute terminal

Returns:

  • (Object)

    the current value of terminal



10
11
12
# File 'lib/findyml.rb', line 10

def terminal
  @terminal
end

Instance Method Details

#colObject



17
18
19
# File 'lib/findyml.rb', line 17

def col
  node.start_column + 1
end

#inspectObject



21
22
23
# File 'lib/findyml.rb', line 21

def inspect
  "#{path.map(&:inspect).join('.')} -> #{self}"
end

#lineObject



13
14
15
# File 'lib/findyml.rb', line 13

def line
  node.start_line + 1
end

#terminal?Boolean

Returns:

  • (Boolean)


11
# File 'lib/findyml.rb', line 11

def terminal? = terminal