Sha256: ebd84f88cb9ecf904c30ad9d04ee76cff4e68ce5f998f39deb767b00751f983c

Contents?: true

Size: 1.01 KB

Versions: 7

Compression:

Stored size: 1.01 KB

Contents

# format related hackery
# allows both true.is_a?(Fog::Boolean) and false.is_a?(Fog::Boolean)
# allows both nil.is_a?(Fog::Nullable::String) and ''.is_a?(Fog::Nullable::String)
module Fog
  module Boolean; end
  module Nullable
    module Boolean; end
    module Integer; end
    module String; end
    module Time; end
    module Float; end
    module Hash; end
    module Array; end
  end
end
[FalseClass, TrueClass].each {|klass| klass.send(:include, Fog::Boolean)}
[FalseClass, TrueClass, NilClass, Fog::Boolean].each {|klass| klass.send(:include, Fog::Nullable::Boolean)}
[NilClass, String].each {|klass| klass.send(:include, Fog::Nullable::String)}
[NilClass, Time].each {|klass| klass.send(:include, Fog::Nullable::Time)}
[Integer, NilClass].each {|klass| klass.send(:include, Fog::Nullable::Integer)}
[Float, NilClass].each {|klass| klass.send(:include, Fog::Nullable::Float)}
[Hash, NilClass].each {|klass| klass.send(:include, Fog::Nullable::Hash)}
[Array, NilClass].each {|klass| klass.send(:include, Fog::Nullable::Array)}

Version data entries

7 entries across 7 versions & 2 rubygems

Version Path
fog-profitbricks-2.0.1 tests/helpers/formats_helper.rb
vagrant-cloudstack-1.2.0 vendor/bundle/gems/fog-profitbricks-0.0.5/tests/helpers/formats_helper.rb
fog-profitbricks-0.0.5 tests/helpers/formats_helper.rb
fog-profitbricks-0.0.4 tests/helpers/formats_helper.rb
fog-profitbricks-0.0.3 tests/helpers/formats_helper.rb
fog-profitbricks-0.0.2 tests/helpers/formats_helper.rb
fog-profitbricks-0.0.1 tests/helpers/formats_helper.rb