Class: Rudder::DSL::ResourceType

Inherits:
Resource show all
Defined in:
lib/rudder/dsl/resource_type.rb

Overview

Concourse Resource Type

ResourceTypes specify how Concourse Resources operate and may be user or community defined.

DSL Usage:

ResourceType are defined by a name, type, and source.

Examples:

# Name's are set during initialization, and may not be nil.
resource_type :awesome_resource_type # => resource_type.name = :awesome_resource_type
resource_type nil # => Raises ArgumentError
# Type's are typically set during initialization
resource_type :awesome_resource_type, :git # => resource_type.type = :git

# but it may be set in the +resource_type+ block
resource_type :awesome_resource_type do
  type :git
end # => resource_type.type = :git
# this is useful when definining +ResourceTypes+ to be included in multiple pipelines,
# where the type does not change but the name may
# Source is set after construction
resource_type :awesome_resource_type, :docker-image do
  source[:repository] = 'some_docker/repo'
  source[:tag]        = 'latest'
end

Method Summary

Methods inherited from Resource

#_inner_hash, #initialize, #sub_path, #to_h

Methods inherited from Component

#_inner_hash, #method_missing, #respond_to?, #respond_to_missing?, #to_h

Methods included from Util

#_convert_h_val, #_deep_to_h

Constructor Details

This class inherits a constructor from Rudder::DSL::Resource

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Rudder::DSL::Component