module Extant::Attributes::ClassMethods

Public Instance Methods

attribute(name, type=nil, **opts) click to toggle source
# File lib/extant/attributes.rb, line 15
def attribute(name, type=nil, **opts)
  opts[:type] = type
  attribute_definitions[name] = AttributeDefinition.new(self, name, opts)
end
attribute_definitions() click to toggle source
# File lib/extant/attributes.rb, line 11
def attribute_definitions
  @attributes ||= {}
end