Class: Parser::Source::Map::Definition

Inherits:
Parser::Source::Map show all
Defined in:
lib/parser/source/map/definition.rb

Instance Attribute Summary collapse

Attributes inherited from Parser::Source::Map

#expression, #node

Instance Method Summary collapse

Methods inherited from Parser::Source::Map

#==, #column, #initialize_copy, #last_column, #last_line, #line, #to_hash, #with_expression

Constructor Details

#initialize(keyword_l, operator_l, name_l, end_l) ⇒ Definition

Returns a new instance of Definition.



12
13
14
15
16
17
18
19
# File 'lib/parser/source/map/definition.rb', line 12

def initialize(keyword_l, operator_l, name_l, end_l)
  @keyword  = keyword_l
  @operator = operator_l
  @name     = name_l
  @end      = end_l

  super(@keyword.join(@end))
end

Instance Attribute Details

#endObject (readonly)



10
11
12
# File 'lib/parser/source/map/definition.rb', line 10

def end
  @end
end

#keywordObject (readonly)



7
8
9
# File 'lib/parser/source/map/definition.rb', line 7

def keyword
  @keyword
end

#nameObject (readonly)



9
10
11
# File 'lib/parser/source/map/definition.rb', line 9

def name
  @name
end

#operatorObject (readonly)



8
9
10
# File 'lib/parser/source/map/definition.rb', line 8

def operator
  @operator
end