Class: TableBeet::Step
- Inherits:
-
Object
- Object
- TableBeet::Step
- Defined in:
- lib/table_beet/step.rb
Instance Attribute Summary collapse
-
#file ⇒ Object
readonly
Returns the value of attribute file.
-
#lineno ⇒ Object
readonly
Returns the value of attribute lineno.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
- #id ⇒ Object
-
#initialize(method) ⇒ Step
constructor
A new instance of Step.
- #location ⇒ Object
- #source ⇒ Object
Constructor Details
#initialize(method) ⇒ Step
Returns a new instance of Step.
9 10 11 12 13 |
# File 'lib/table_beet/step.rb', line 9 def initialize(method) @method = method @name = method.name.to_s @file, @lineno = method.source_location end |
Instance Attribute Details
#file ⇒ Object (readonly)
Returns the value of attribute file.
7 8 9 |
# File 'lib/table_beet/step.rb', line 7 def file @file end |
#lineno ⇒ Object (readonly)
Returns the value of attribute lineno.
7 8 9 |
# File 'lib/table_beet/step.rb', line 7 def lineno @lineno end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
7 8 9 |
# File 'lib/table_beet/step.rb', line 7 def name @name end |
Instance Method Details
#id ⇒ Object
15 16 17 |
# File 'lib/table_beet/step.rb', line 15 def id @method.hash end |
#location ⇒ Object
23 24 25 |
# File 'lib/table_beet/step.rb', line 23 def location File.(@file) + ':' + @lineno.to_s end |
#source ⇒ Object
19 20 21 |
# File 'lib/table_beet/step.rb', line 19 def source @method.comment + @method.source end |