Module: Rea::MetaType::Event::ClassMethods

Defined in:
lib/rea/meta_type/event.rb

Instance Method Summary collapse

Instance Method Details

#provider(klass_or_symbol, options = {}) ⇒ Object



12
13
14
# File 'lib/rea/meta_type/event.rb', line 12

def provider klass_or_symbol, options={}
  define_belongs_to_relation :provider, klass_or_symbol, options
end

#recipient(klass_or_symbol, options = {}) ⇒ Object



16
17
18
# File 'lib/rea/meta_type/event.rb', line 16

def recipient klass_or_symbol, options={}
  define_belongs_to_relation :recipient, klass_or_symbol, options
end

#resource(klass_or_symbol, options = {}) ⇒ Object



20
21
22
# File 'lib/rea/meta_type/event.rb', line 20

def resource klass_or_symbol, options={}
  define_belongs_to_relation :resource, klass_or_symbol, options
end

#setup(options) ⇒ Object



24
25
26
# File 'lib/rea/meta_type/event.rb', line 24

def setup options
  class_option_set :type, options
end