Class: Performing
- Inherits:
-
Object
- Object
- Performing
- Defined in:
- lib/performing.rb
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(model, attrs) ⇒ Performing
constructor
A new instance of Performing.
Constructor Details
#initialize(model, attrs) ⇒ Performing
Returns a new instance of Performing.
2 3 4 5 6 |
# File 'lib/performing.rb', line 2 def initialize(model, attrs) @attrs = attrs @model = model @object = model.new end |
Instance Method Details
#call ⇒ Object
8 9 10 11 12 13 |
# File 'lib/performing.rb', line 8 def call set_default_values set_custom_values if attrs.any? object.save! end |