Class: CodeMiner::FieldExpression
- Inherits:
-
Expression
- Object
- Expression
- CodeMiner::FieldExpression
- Defined in:
- lib/codeminer/expressions/field_expression.rb
Instance Attribute Summary collapse
-
#body ⇒ Object
readonly
Returns the value of attribute body.
-
#receiver ⇒ Object
readonly
Returns the value of attribute receiver.
Attributes inherited from Expression
#args, #block, #delimiter, #src, #token
Instance Method Summary collapse
- #each ⇒ Object
-
#initialize(receiver, token, src) ⇒ FieldExpression
constructor
A new instance of FieldExpression.
- #type ⇒ Object
- #value ⇒ Object
Methods inherited from Expression
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(receiver, token, src) ⇒ FieldExpression
Returns a new instance of FieldExpression.
7 8 9 10 11 |
# File 'lib/codeminer/expressions/field_expression.rb', line 7 def initialize(receiver, token, src) @receiver = receiver @token = token @src = src end |
Instance Attribute Details
#body ⇒ Object (readonly)
Returns the value of attribute body.
5 6 7 |
# File 'lib/codeminer/expressions/field_expression.rb', line 5 def body @body end |
#receiver ⇒ Object (readonly)
Returns the value of attribute receiver.
5 6 7 |
# File 'lib/codeminer/expressions/field_expression.rb', line 5 def receiver @receiver end |
Instance Method Details
#each ⇒ Object
21 22 23 |
# File 'lib/codeminer/expressions/field_expression.rb', line 21 def each [@receiver] end |
#type ⇒ Object
13 14 15 |
# File 'lib/codeminer/expressions/field_expression.rb', line 13 def type :field end |
#value ⇒ Object
17 18 19 |
# File 'lib/codeminer/expressions/field_expression.rb', line 17 def value @token.value end |