Sha256: 0e83c30051ec121b9d684ea0a4b5f7df211d93b666c4bb519fef06224b2c9009

Contents?: true

Size: 726 Bytes

Versions: 1

Compression:

Stored size: 726 Bytes

Contents

require 'itamae'
require 'itamae/resources/base'
require 'itamae/resources/file'
require 'itamae/resources/package'
require 'itamae/resources/remote_file'
require 'itamae/resources/directory'
require 'itamae/resources/template'

module Itamae
  module Resources
    Error = Class.new(StandardError)
    CommandExecutionError = Class.new(StandardError)
    OptionMissingError = Class.new(StandardError)
    InvalidTypeError = Class.new(StandardError)
    NotSupportedOsError = Class.new(StandardError)

    def self.get_resource_class_name(method)
      method.to_s.split('_').map {|part| part.capitalize}.join
    end

    def self.get_resource_class(method)
      const_get(get_resource_class_name(method))
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
itamae-1.0.0.beta1 lib/itamae/resources.rb