Module: Consumerable::Creatable::ClassMethods
- Defined in:
- lib/consumerable/creatable.rb
Instance Method Summary collapse
Instance Method Details
#create(attributes = {}) ⇒ Object
6 7 8 |
# File 'lib/consumerable/creatable.rb', line 6 def create(attributes = {}) new(attributes).tap(&:save) end |
#create!(attributes = {}) ⇒ Object
10 11 12 |
# File 'lib/consumerable/creatable.rb', line 10 def create!(attributes = {}) new(attributes).tap(&:save!) end |