Module: Ripple::AttributeMethods::ClassMethods

Defined in:
lib/ripple/attribute_methods.rb

Instance Method Summary collapse

Instance Method Details

#define_attribute_methodsObject

Generates all the attribute-related methods for properties defined on the document, including accessors, mutators and query methods.



39
40
41
# File 'lib/ripple/attribute_methods.rb', line 39

def define_attribute_methods
  super(properties.keys)
end

#property(key, type, options = {}) ⇒ Object



30
31
32
33
34
35
# File 'lib/ripple/attribute_methods.rb', line 30

def property(key, type, options={})
  super.tap do
    undefine_attribute_methods
    define_attribute_methods
  end
end