Class: PayPal::SDK::Core::API::DataTypes::SimpleTypes::Boolean

Inherits:
Object
  • Object
show all
Defined in:
lib/paypal-sdk/core/api/data_types/simple_types.rb

Class Method Summary collapse

Class Method Details

.new(boolean) ⇒ Object



31
32
33
# File 'lib/paypal-sdk/core/api/data_types/simple_types.rb', line 31

def self.new(boolean)
  ( boolean == 0 || boolean == "" || boolean =~ /^(false|f|no|n|0)$/i ) ? false : !!boolean
end