Module: Rea::AspectType::Classification::ClassMethods
- Defined in:
- lib/rea/aspect_type/classification_aspect.rb
Instance Method Summary collapse
- #category_type(category_type_name, options = {}, &block) ⇒ Object
- #member(name, options = {}) ⇒ Object
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, ={}, &block category_type = ::Rea::CategoryType.find_or_create_by_name category_type_name, 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, ={} = { :name=>name.to_s }.merge rea[name] = ::Rea::AspectType::MemberType.new rea_ast[:classification][[:type]] = name end |