Module: BitmaskAttribute

Defined in:
lib/bitmask_attribute.rb,
lib/bitmask_attribute/attribute.rb,
lib/bitmask_attribute/value_proxy.rb

Defined Under Namespace

Modules: Attribute, ClassMethods Classes: Definition, ValueProxy

Class Method Summary collapse

Class Method Details

.included(model) ⇒ Object



132
133
134
135
136
137
# File 'lib/bitmask_attribute.rb', line 132

def self.included(model)
  model.extend ClassMethods
  # Include basic attributes support for clean class
  # TODO improve attributes detection
  model.send(:include, BitmaskAttribute::Attribute) unless model.included_modules.detect{|m| m.to_s.include? 'AttributeMethods'}
end