Class: Garb::Step
- Inherits:
-
Object
- Object
- Garb::Step
- Defined in:
- lib/garb/step.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#number ⇒ Object
readonly
Returns the value of attribute number.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
Instance Method Summary collapse
-
#initialize(attributes) ⇒ Step
constructor
A new instance of Step.
Constructor Details
#initialize(attributes) ⇒ Step
Returns a new instance of Step.
5 6 7 8 9 10 11 |
# File 'lib/garb/step.rb', line 5 def initialize(attributes) return unless attributes.is_a?(Hash) @name = attributes['name'] @number = attributes['number'].to_i @path = attributes['path'] end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
3 4 5 |
# File 'lib/garb/step.rb', line 3 def name @name end |
#number ⇒ Object (readonly)
Returns the value of attribute number.
3 4 5 |
# File 'lib/garb/step.rb', line 3 def number @number end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
3 4 5 |
# File 'lib/garb/step.rb', line 3 def path @path end |