Module: D12n::ModelSupport::ClassMethods

Defined in:
lib/d12n/model_support.rb

Instance Method Summary collapse

Instance Method Details

#d12n_attribute(*args) ⇒ Object



4
5
6
7
8
9
10
11
# File 'lib/d12n/model_support.rb', line 4

def d12n_attribute(*args)
  options = args.extract_options!
  options.reverse_merge! prefix: 'local'
  args.each do |name|
    define_reader name, options
    define_writer name, options
  end
end