Module: Rea::Dsl::Structural::ClassMethods

Defined in:
lib/rea/dsl/structural.rb

Instance Method Summary collapse

Instance Method Details

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


39
40
41
42
# File 'lib/rea/dsl/structural.rb', line 39

def acts_as_agent options={}, &block
  include ::Rea::MetaType::Agent
  yield if block_given?
end

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


29
30
31
32
# File 'lib/rea/dsl/structural.rb', line 29

def acts_as_commitment options={}, &block
  include ::Rea::MetaType::Commitment
  yield
end

#acts_as_contract(options = {}) ⇒ Object


44
45
46
47
# File 'lib/rea/dsl/structural.rb', line 44

def acts_as_contract options={}
  include ::Rea::MetaType::Contract
  yield if block_given?
end

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


34
35
36
37
# File 'lib/rea/dsl/structural.rb', line 34

def acts_as_event options={}, &block
  include ::Rea::MetaType::Event
  block.call if block_given?
end

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


23
24
25
26
# File 'lib/rea/dsl/structural.rb', line 23

def acts_as_resource options={}, &block
  include ::Rea::MetaType::Resource
  block.call if block_given?
end