Module: HasProperties::SingletonMethods

Defined in:
lib/has_properties.rb

Instance Method Summary collapse

Instance Method Details

#has_properties(options = {}) ⇒ Object



3
4
5
6
7
8
9
10
11
12
13
14
# File 'lib/has_properties.rb', line 3

def has_properties(options = {})
  default_options = { :in => :data }
  options = default_options.merge(options)

  cattr_accessor :property_field
  self.property_field = options[:in]

  serialize self.property_field, Hash

  extend  ClassMethods
  include InstanceMethods
end