Class: CodeMiner::AttributeAssignExpression
- Inherits:
-
Expression
- Object
- Expression
- CodeMiner::AttributeAssignExpression
show all
- Defined in:
- lib/codeminer/expressions/attribute_assign_expression.rb
Instance Attribute Summary collapse
Attributes inherited from Expression
#args, #block, #delimiter, #src
Instance Method Summary
collapse
Methods inherited from Expression
not_implemented
#adjust_src, #column, #column=, #end_column, #end_column=, #end_line, #end_line=, #line, #line=, #src, #src_extract
Constructor Details
Returns a new instance of AttributeAssignExpression.
7
8
9
10
11
|
# File 'lib/codeminer/expressions/attribute_assign_expression.rb', line 7
def initialize(field, body, src)
@field = field
@body = body
@src = src
end
|
Instance Attribute Details
#body ⇒ Object
Returns the value of attribute body.
5
6
7
|
# File 'lib/codeminer/expressions/attribute_assign_expression.rb', line 5
def body
@body
end
|
Instance Method Details
#each ⇒ Object
25
26
27
|
# File 'lib/codeminer/expressions/attribute_assign_expression.rb', line 25
def each
[receiver, @body]
end
|
#receiver ⇒ Object
29
30
31
|
# File 'lib/codeminer/expressions/attribute_assign_expression.rb', line 29
def receiver
@field.receiver
end
|
#token ⇒ Object
17
18
19
|
# File 'lib/codeminer/expressions/attribute_assign_expression.rb', line 17
def token
@field.token
end
|
#type ⇒ Object
13
14
15
|
# File 'lib/codeminer/expressions/attribute_assign_expression.rb', line 13
def type
:attribute_assign
end
|
#value ⇒ Object
21
22
23
|
# File 'lib/codeminer/expressions/attribute_assign_expression.rb', line 21
def value
token.value
end
|