Class: CodeMiner::GlobalVariableAssignExpression

Inherits:
Expression
  • Object
show all
Defined in:
lib/codeminer/expressions/global_variable_assign_expression.rb

Instance Attribute Summary collapse

Attributes inherited from Expression

#args, #block, #delimiter, #src, #token

Instance Method Summary collapse

Methods inherited from Expression

not_implemented

Methods included from SourceExtract::Usage

#adjust_src, #column, #column=, #end_column, #end_column=, #end_line, #end_line=, #line, #line=, #src, #src_extract

Constructor Details

#initialize(token, body, src) ⇒ GlobalVariableAssignExpression

Returns a new instance of GlobalVariableAssignExpression.



7
8
9
10
11
# File 'lib/codeminer/expressions/global_variable_assign_expression.rb', line 7

def initialize(token, body, src)
  @token = token
  @body = body
  @src = src
end

Instance Attribute Details

#bodyObject (readonly)

Returns the value of attribute body.



5
6
7
# File 'lib/codeminer/expressions/global_variable_assign_expression.rb', line 5

def body
  @body
end

Instance Method Details

#eachObject



21
22
23
# File 'lib/codeminer/expressions/global_variable_assign_expression.rb', line 21

def each
  [@body]
end

#typeObject



13
14
15
# File 'lib/codeminer/expressions/global_variable_assign_expression.rb', line 13

def type
  :global_variable_assign
end

#valueObject



17
18
19
# File 'lib/codeminer/expressions/global_variable_assign_expression.rb', line 17

def value
  @token.value
end