Class: Flattener::Base

Inherits:
Object
  • Object
show all
Extended by:
Flattener
Includes:
ActiveModel::MassAssignmentSecurity, ActiveModel::Validations
Defined in:
lib/flattener/base.rb

Constant Summary

Constants included from Flattener

VERSION

Instance Method Summary collapse

Methods included from Flattener

flat

Constructor Details

#initialize(attributes = {}) ⇒ Base

Returns a new instance of Base.



9
10
11
12
13
# File 'lib/flattener/base.rb', line 9

def initialize attributes = {}
  sanitize_for_mass_assignment(attributes).each do |key, value|
    self.send("#{key}=", value)
  end
end