Class: Cody::Dsl::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/cody/dsl/base.rb

Direct Known Subclasses

Project, Role, Schedule

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Base

Returns a new instance of Base.



4
5
6
7
8
9
10
# File 'lib/cody/dsl/base.rb', line 4

def initialize(options={})
  @options = options
  @project_name = options[:project_name]
  @type = options[:type]
  @full_project_name = options[:full_project_name] # includes -development at the end
  @properties = default_properties # defaults make project.rb simpler
end

Instance Attribute Details

#full_project_nameObject (readonly)

Returns the value of attribute full_project_name.



3
4
5
# File 'lib/cody/dsl/base.rb', line 3

def full_project_name
  @full_project_name
end

#optionsObject (readonly)

Returns the value of attribute options.



3
4
5
# File 'lib/cody/dsl/base.rb', line 3

def options
  @options
end

#project_nameObject (readonly)

Returns the value of attribute project_name.



3
4
5
# File 'lib/cody/dsl/base.rb', line 3

def project_name
  @project_name
end

#typeObject (readonly)

Returns the value of attribute type.



3
4
5
# File 'lib/cody/dsl/base.rb', line 3

def type
  @type
end

Instance Method Details

#auto_camelize(data) ⇒ Object

In v1.0.0 defaults to not auto-camelize



13
14
15
16
17
18
19
# File 'lib/cody/dsl/base.rb', line 13

def auto_camelize(data)
  if Cody.settings[:auto_camelize]
    CfnCamelizer.transform(data)
  else
    data.deep_stringify_keys!
  end
end