Class: Garb::Step

Inherits:
Object
  • Object
show all
Defined in:
lib/garb/step.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#nameObject (readonly)

Returns the value of attribute name.



3
4
5
# File 'lib/garb/step.rb', line 3

def name
  @name
end

#numberObject (readonly)

Returns the value of attribute number.



3
4
5
# File 'lib/garb/step.rb', line 3

def number
  @number
end

#pathObject (readonly)

Returns the value of attribute path.



3
4
5
# File 'lib/garb/step.rb', line 3

def path
  @path
end