Sha256: e904b2a99e023b1327bf5a152e26fadb51be4263cf8863f807dc617074253858

Contents?: true

Size: 533 Bytes

Versions: 31

Compression:

Stored size: 533 Bytes

Contents

module Capricorn
  class System
    module Helper
      
      def use(actor)
        actor_klass  = (Capricorn::Actors.const_get(actor) rescue nil)
        raise "Actor not found! (#{actor})" unless actor_klass
        
        actor_helper = (actor_klass.const_get('Helper') rescue nil)
        extend actor_helper if actor_helper
        
        actor_config = (actor_klass.const_get('Config') rescue nil)
        extend actor_config if actor_config
        
        @actors.push(actor_klass)
      end
      
    end
  end
end

Version data entries

31 entries across 31 versions & 2 rubygems

Version Path
simonmenke-capricorn-0.2.00 lib/capricorn/system/helper.rb
simonmenke-capricorn-0.2.03 lib/capricorn/system/helper.rb
simonmenke-capricorn-0.2.07 lib/capricorn/system/helper.rb
simonmenke-capricorn-0.2.25 lib/capricorn/system/helper.rb
simonmenke-capricorn-0.2.26 lib/capricorn/system/helper.rb
capricorn-0.2.25 lib/capricorn/system/helper.rb
capricorn-0.2.24 lib/capricorn/system/helper.rb
capricorn-0.2.23 lib/capricorn/system/helper.rb
capricorn-0.2.22 lib/capricorn/system/helper.rb
capricorn-0.2.21 lib/capricorn/system/helper.rb
capricorn-0.2.20 lib/capricorn/system/helper.rb
capricorn-0.2.19 lib/capricorn/system/helper.rb
capricorn-0.2.18 lib/capricorn/system/helper.rb
capricorn-0.2.17 lib/capricorn/system/helper.rb
capricorn-0.2.16 lib/capricorn/system/helper.rb
capricorn-0.2.15 lib/capricorn/system/helper.rb
capricorn-0.2.14 lib/capricorn/system/helper.rb
capricorn-0.2.13 lib/capricorn/system/helper.rb
capricorn-0.2.12 lib/capricorn/system/helper.rb
capricorn-0.2.11 lib/capricorn/system/helper.rb