Class: CodeMiner::BeginExpression
Instance Attribute Summary collapse
Attributes inherited from Expression
#args, #block, #delimiter, #src, #token
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 BeginExpression.
7
8
9
10
|
# File 'lib/codeminer/expressions/begin_expression.rb', line 7
def initialize(bodystmt, src)
@bodystmt = bodystmt
@src = src
end
|
Instance Attribute Details
#bodystmt ⇒ Object
Returns the value of attribute bodystmt.
5
6
7
|
# File 'lib/codeminer/expressions/begin_expression.rb', line 5
def bodystmt
@bodystmt
end
|
#value ⇒ Object
Returns the value of attribute value.
5
6
7
|
# File 'lib/codeminer/expressions/begin_expression.rb', line 5
def value
@value
end
|
Instance Method Details
#body ⇒ Object
16
17
18
|
# File 'lib/codeminer/expressions/begin_expression.rb', line 16
def body
@bodystmt.body
end
|
#each ⇒ Object
32
33
34
|
# File 'lib/codeminer/expressions/begin_expression.rb', line 32
def each
body.each
end
|
#else ⇒ Object
28
29
30
|
# File 'lib/codeminer/expressions/begin_expression.rb', line 28
def else
@bodystmt.else
end
|
#ensure ⇒ Object
20
21
22
|
# File 'lib/codeminer/expressions/begin_expression.rb', line 20
def ensure
@bodystmt.ensure
end
|
#rescue ⇒ Object
24
25
26
|
# File 'lib/codeminer/expressions/begin_expression.rb', line 24
def rescue
@bodystmt.rescue
end
|
#type ⇒ Object
12
13
14
|
# File 'lib/codeminer/expressions/begin_expression.rb', line 12
def type
:begin
end
|