Class: Performing

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

Instance Method Summary collapse

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

#callObject



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