Module: Determinator::Context::Helpers::ClassMethods

Defined in:
lib/determinator/context/helpers.rb

Instance Method Summary collapse

Instance Method Details

#determinator_actor(name, &block) ⇒ Object



13
14
15
16
# File 'lib/determinator/context/helpers.rb', line 13

def determinator_actor(name, &block)
  @determinator_actors ||= {}
  @determinator_actors[name] = block
end

#determinator_actorsObject



5
6
7
8
9
10
11
# File 'lib/determinator/context/helpers.rb', line 5

def determinator_actors
  if superclass.respond_to?(:determinator_actors)
    superclass.determinator_actors.merge(@determinator_actors || {})
  else
    @determinator_actors
  end
end