Module: Rea::AspectType::Classification::ClassMethods

Defined in:
lib/rea/aspect_type/classification_aspect.rb

Instance Method Summary collapse

Instance Method Details

#category_type(category_type_name, options = {}, &block) ⇒ Object



49
50
51
52
# File 'lib/rea/aspect_type/classification_aspect.rb', line 49

def category_type category_type_name, options={}, &block
  category_type = ::Rea::CategoryType.find_or_create_by_name category_type_name, options
  block.call(category_type) if block_given?
end

#member(name, options = {}) ⇒ Object



55
56
57
58
59
# File 'lib/rea/aspect_type/classification_aspect.rb', line 55

def member name, options={}
  options = { :name=>name.to_s }.merge options
  rea[name] = ::Rea::AspectType::MemberType.new options
  rea_ast[:classification][options[:type]] = name
end