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.
8 9 10 11 12 |
# File 'lib/table_beet/step.rb', line 8 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.
6 7 8 |
# File 'lib/table_beet/step.rb', line 6 def file @file end |
#lineno ⇒ Object (readonly)
Returns the value of attribute lineno.
6 7 8 |
# File 'lib/table_beet/step.rb', line 6 def lineno @lineno end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
6 7 8 |
# File 'lib/table_beet/step.rb', line 6 def name @name end |
Instance Method Details
#id ⇒ Object
14 15 16 |
# File 'lib/table_beet/step.rb', line 14 def id @method.hash end |
#location ⇒ Object
22 23 24 |
# File 'lib/table_beet/step.rb', line 22 def location File.(@file) + ":" + @lineno.to_s end |
#source ⇒ Object
18 19 20 |
# File 'lib/table_beet/step.rb', line 18 def source @method.comment + @method.source end |