Module: Attributary::Initializer

Included in:
All
Defined in:
lib/attributary/initializer.rb

Instance Method Summary collapse

Instance Method Details

#attributary_initialize(options = {}) ⇒ Object



7
8
9
10
11
# File 'lib/attributary/initializer.rb', line 7

def attributary_initialize(options = {})
  options.each do |k, v|
    send("#{k}=", v) if self.class._attributary_attribute_set[k]
  end
end

#initialize(options = {}) ⇒ Object



3
4
5
# File 'lib/attributary/initializer.rb', line 3

def initialize(options = {})
  attributary_initialize(options)
end