class CTioga2::MetaBuilder::Types::BooleanParameter

A boolean parameter

Public Instance Methods

boolean?() click to toggle source

Yes, this really is a boolean !

# File lib/ctioga2/metabuilder/types/lists.rb, line 46
def boolean?
  return true
end
option_parser_long_option(name, biniou = nil) click to toggle source

Booleans are a special case for option parser, as they are handled completely differently

# File lib/ctioga2/metabuilder/types/lists.rb, line 68
def option_parser_long_option(name, biniou = nil)
  return "--[no-]#{name}"
end
string_to_type_internal(str) click to toggle source
# File lib/ctioga2/metabuilder/types/lists.rb, line 50
def string_to_type_internal(str)
  if str == true or str =~ TRUE_RE
    return true
  else
    return false
  end
end
type_name() click to toggle source
# File lib/ctioga2/metabuilder/types/lists.rb, line 41
def type_name
  return 'bool'
end
type_to_string_internal(val) click to toggle source
# File lib/ctioga2/metabuilder/types/lists.rb, line 58
def type_to_string_internal(val)
  if val
    return "true"
  else
    return "false"
  end
end