module Ame::Types::Boolean

Public Class Methods

parse(argument) click to toggle source
# File lib/ame-1.0/types/boolean.rb, line 5
def self.parse(argument)
  case argument
  when 'true', 'yes', 'on' then true
  when 'false', 'no', 'off' then false
  else raise Ame::MalformedArgument, 'not a boolean: %s' % argument
  end
end