Class: Beaker::Options::OptionsHash
- Inherits:
-
StringifyHash
- Object
- StringifyHash
- Beaker::Options::OptionsHash
- Defined in:
- lib/beaker/options/options_hash.rb
Overview
A hash that treats Symbol and String keys interchangeably and recursively merges hashes
Instance Method Summary collapse
-
#get_type ⇒ Symbol
Determine the puppet type of the ObjectHash.
-
#is_pe? ⇒ Boolean
Determine if type of ObjectHash is pe, defaults to true.
Instance Method Details
#get_type ⇒ Symbol
Determine the puppet type of the ObjectHash
Default is FOSS
30 31 32 33 34 35 36 37 38 39 |
# File 'lib/beaker/options/options_hash.rb', line 30 def get_type case self[:type] when /pe/ :pe when /foss/ :foss else :foss end end |
#is_pe? ⇒ Boolean
Determine if type of ObjectHash is pe, defaults to true
17 18 19 |
# File 'lib/beaker/options/options_hash.rb', line 17 def is_pe? self[:type] ? self[:type] =~ /pe/ : true end |