Sha256: c32c28514d6b2c070c5d02578e4927bc49e2fe661e19a8bb78aa3e99ab40c87f

Contents?: true

Size: 382 Bytes

Versions: 44

Compression:

Stored size: 382 Bytes

Contents

require 'itamae/handler/base'

module Itamae
  module Handler
    def self.from_type(type)
      first_time = true

      class_name = type.split('_').map(&:capitalize).join
      self.const_get(class_name)
    rescue NameError
      require "itamae/handler/#{type}"

      if first_time
        first_time = false
        retry
      else
        raise
      end
    end
  end
end

Version data entries

44 entries across 44 versions & 2 rubygems

Version Path
itamae-1.10.4 lib/itamae/handler.rb
itamae-1.10.3 lib/itamae/handler.rb
itamae-1.10.2 lib/itamae/handler.rb
itamae-1.10.1 lib/itamae/handler.rb
itamae-1.10.0 lib/itamae/handler.rb
itamae-1.9.13 lib/itamae/handler.rb
itamae-1.9.12 lib/itamae/handler.rb
itamae-1.9.11 lib/itamae/handler.rb
itamae-1.9.10 lib/itamae/handler.rb
itamae-1.9.9 lib/itamae/handler.rb
itamae-1.9.8 lib/itamae/handler.rb
itamae-1.9.7.pre lib/itamae/handler.rb
itamae-1.9.6 lib/itamae/handler.rb
itamae-1.9.6.pre lib/itamae/handler.rb
itamae-1.9.5 lib/itamae/handler.rb
itamae-1.9.4 lib/itamae/handler.rb
itamae-mitsurin-0.4 lib/itamae/handler.rb
itamae-mitsurin-0.3 lib/itamae/handler.rb
itamae-mitsurin-0.2 lib/itamae/handler.rb
itamae-mitsurin-0.1 lib/itamae/handler.rb