Method: Tangerine::Base#initialize

Defined in:
lib/tangerine/backlot/base.rb

#initialize(options = {}) ⇒ Base

Returns a new instance of Base.



3
4
5
6
7
8
9
10
11
12
# File 'lib/tangerine/backlot/base.rb', line 3

def initialize(options={})
  options.delete('content_type')
  options.each do |k,v|
    # TODO: Look into using Crack gem for reliably undercoring these
    attr = k.to_s.underscore
    method = :"#{attr}="

    self.send(method, v) if self.class.method_defined?(method)
  end
end