Method: Beaker::Options::OptionsHash#get_type

Defined in:
lib/beaker/options/options_hash.rb

#get_typeSymbol

Determine the puppet type of the ObjectHash

Default is FOSS

Examples:

Use this method to test if the :type setting is pe

a['type'] = 'pe'
a.get_type == :pe

Returns:

  • (Symbol)

    the type given in the options



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