class ActionConductor::Definition

Attributes

class_name[R]
handle[R]

Public Class Methods

new(configs={}) click to toggle source
# File lib/action_conductor/definition.rb, line 5
def initialize(configs={})
  @handle     = configs.fetch(:handle)
  @actions    = configs.fetch(:actions, [])
  @class_name = configs.fetch(:class_name, @handle)
end

Public Instance Methods

actions() click to toggle source
# File lib/action_conductor/definition.rb, line 15
def actions
  @actions ||= Set.new(@actions)
end
klass() click to toggle source
# File lib/action_conductor/definition.rb, line 11
def klass
  @conductor_klass ||= conductor_klass
end

Private Instance Methods

conductor_klass() click to toggle source
# File lib/action_conductor/definition.rb, line 21
def conductor_klass
  Object.const_get(conductor_klass_name)
rescue NameError
  raise UndefinedConductor.new(conductor_klass_name)
end
conductor_klass_name() click to toggle source
# File lib/action_conductor/definition.rb, line 27
def conductor_klass_name
  "#{class_name.to_s.camelize}Conductor"
end