Class: Spice::Environment

Inherits:
Base
  • Object
show all
Defined in:
lib/spice/environment.rb

Instance Attribute Summary collapse

Attributes inherited from Base

#attrs

Instance Method Summary collapse

Methods inherited from Base

#[], attr_reader, get, get_or_new, #id, identity_map, #keys, #update

Constructor Details

#initialize(attrs = Mash.new) ⇒ Environment

Returns a new instance of Environment.


8
9
10
11
12
13
14
# File 'lib/spice/environment.rb', line 8

def initialize(attrs=Mash.new)
  super
  @attrs['json_class'] ||= "Chef::Environment"
  @attrs['chef_type'] ||= "environment"
  @attrs['attributes'] ||= Mash.new
  @attrs['cookbook_version'] ||= Mash.new
end

Instance Attribute Details

#attributesObject (readonly)

Returns the value of attribute attributes


5
6
7
# File 'lib/spice/environment.rb', line 5

def attributes
  @attributes
end

#chef_typeObject (readonly)

Returns the value of attribute chef_type


5
6
7
# File 'lib/spice/environment.rb', line 5

def chef_type
  @chef_type
end

#cookbook_versionsObject (readonly)

Returns the value of attribute cookbook_versions


5
6
7
# File 'lib/spice/environment.rb', line 5

def cookbook_versions
  @cookbook_versions
end

#descriptionObject (readonly)

Returns the value of attribute description


5
6
7
# File 'lib/spice/environment.rb', line 5

def description
  @description
end

#json_classObject (readonly)

Returns the value of attribute json_class


5
6
7
# File 'lib/spice/environment.rb', line 5

def json_class
  @json_class
end

#nameObject (readonly)

Returns the value of attribute name


5
6
7
# File 'lib/spice/environment.rb', line 5

def name
  @name
end