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