Class: CloudBuilder::DontFormatUnderscore
- Inherits:
-
Object
- Object
- CloudBuilder::DontFormatUnderscore
- Defined in:
- lib/cloud_builder/dontformatunderscore.rb
Instance Method Summary collapse
- #[]=(key, value) ⇒ Object
-
#initialize(*p) ⇒ DontFormatUnderscore
constructor
A new instance of DontFormatUnderscore.
- #to_json_data ⇒ Object
Constructor Details
#initialize(*p) ⇒ DontFormatUnderscore
Returns a new instance of DontFormatUnderscore.
6 7 8 9 10 11 12 13 |
# File 'lib/cloud_builder/dontformatunderscore.rb', line 6 def initialize(*p) @vars = ActiveSupport::OrderedHash.new() if p.first p.first.sort.map do |k,v| self[k] = v end end end |
Instance Method Details
#[]=(key, value) ⇒ Object
15 16 17 |
# File 'lib/cloud_builder/dontformatunderscore.rb', line 15 def []=(key, value) @vars[key] = value end |
#to_json_data ⇒ Object
19 20 21 |
# File 'lib/cloud_builder/dontformatunderscore.rb', line 19 def to_json_data() @vars end |