Class: Hyperdrive::DSL::Main

Inherits:
Object
  • Object
show all
Includes:
Singleton
Defined in:
lib/hyperdrive/dsl/main.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(&block) ⇒ Main



10
11
12
# File 'lib/hyperdrive/dsl/main.rb', line 10

def initialize(&block)
  @resources = {}
end

Instance Attribute Details

#resourcesObject (readonly)

Returns the value of attribute resources.



8
9
10
# File 'lib/hyperdrive/dsl/main.rb', line 8

def resources
  @resources
end

Instance Method Details

#resource(name, &block) ⇒ Object



14
15
16
# File 'lib/hyperdrive/dsl/main.rb', line 14

def resource(name, &block)
  @resources[name] = Resource.new(name, &block).resource
end