Module: Jets::Stack::Definition

Extended by:
ActiveSupport::Concern
Included in:
Output, Parameter, Resource
Defined in:
lib/jets/stack/definition.rb

Instance Method Summary collapse

Instance Method Details

#camelize(attributes) ⇒ Object



25
26
27
# File 'lib/jets/stack/definition.rb', line 25

def camelize(attributes)
  Jets::Camelizer.transform(attributes)
end

#initialize(subclass, *definition) ⇒ Object

Example of usage that leads here:

Parameter.new(self, *definition).register

Which is defined in parameter/dsl.rb

Example subclass: ExampleStack < Jets::Stack



16
17
18
19
# File 'lib/jets/stack/definition.rb', line 16

def initialize(subclass, *definition)
  @subclass = subclass.to_s # important to use to_s, dont want the object as keys in @definitions
  @definition = definition.flatten
end

#registerObject



21
22
23
# File 'lib/jets/stack/definition.rb', line 21

def register
  self.class.register(@subclass, *@definition)
end