Module: Steppable::InstanceMethods
- Defined in:
- lib/cooklang_rb/steppable.rb
Instance Method Summary collapse
Instance Method Details
#attributes ⇒ Object
22 23 24 |
# File 'lib/cooklang_rb/steppable.rb', line 22 def attributes self.class.attributes end |
#to_step ⇒ Object
10 11 12 13 14 15 16 |
# File 'lib/cooklang_rb/steppable.rb', line 10 def to_step data = {"type" => type} attributes.each do |key| data[key.to_s] = send key end data end |
#type ⇒ Object
18 19 20 |
# File 'lib/cooklang_rb/steppable.rb', line 18 def type self.class.name.to_s.split("::").last.downcase end |