Module: Halogen::ClassMethods

Defined in:
lib/halogen.rb

Overview

:nodoc:

Instance Method Summary collapse

Instance Method Details

#collection(name) ⇒ Module

Returns self.

Parameters:

  • name (Symbol, String)

    of the collection

Returns:

  • (Module)

    self


52
53
54
55
56
# File 'lib/halogen.rb', line 52

def collection(name)
  include Collection

  define_collection(name)
end

#definitionsHalogen::Definitions

Returns the definitions container instance.

Returns:


34
35
36
# File 'lib/halogen.rb', line 34

def definitions
  @definitions ||= Definitions.new
end

#resource(name) ⇒ Module

Returns self.

Parameters:

  • name (Symbol, String)

    of the resource

Returns:

  • (Module)

    self


42
43
44
45
46
# File 'lib/halogen.rb', line 42

def resource(name)
  include Resource

  define_resource(name)
end