Module: Elos::Index::Model::Assignable

Extended by:
ActiveSupport::Concern
Defined in:
lib/elos/index/model/assignable.rb

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method, *args) ⇒ Object



14
15
16
17
18
# File 'lib/elos/index/model/assignable.rb', line 14

def method_missing(method, *args)
  @_data.send(method, *args)
rescue NoMethodError
  super
end

Instance Method Details

#assign_attributes(attrs) ⇒ Object



8
9
10
11
12
# File 'lib/elos/index/model/assignable.rb', line 8

def assign_attributes(attrs)
  attrs.each do |key, value|
    @_data.send("#{key}=", value)
  end
end