Sha256: 6883ce7d4c7059beaf73c2293a74bd275e5cf2e873965a04b4b0f0860fa19ab3

Contents?: true

Size: 1.52 KB

Versions: 5

Compression:

Stored size: 1.52 KB

Contents

# require 'gorillib/metaprogramming/delegation'
#
# class ::Boolean < ::Object
#   attr_accessor :val
#   def initialize(val=nil)
#     self.val = val
#   end
#
#   delegate :!,  :to_s, :blank?, :frozen?, :nil?, :present?, :to => :val
#   delegate :!=, :&, :<=>, :=~, :^, :|, :to => :val
#
#   def inspect()
#     "<Boolean #{val.inspect}>"
#   end
#   def try_dup()
#     ::Boolean.new(val)
#   end
#
#   def self.true  ; self.new(true)  ; end
#   def self.false ; self.new(false) ; end
#
#   def is_a?(klass)        val.is_a?(klass)        || super ; end
#   def kind_of?(klass)     val.kind_of?(klass)     || super ; end
#   def instance_of?(klass) val.instance_of?(klass) || super ; end
#
#   def     !=(other_val) other_val = other_val.val if other_val.is_a?(::Boolean) ; (val     != other_val) ; end
#   def     ==(other_val) other_val = other_val.val if other_val.is_a?(::Boolean) ; (val     == other_val) ; end
#   def    ===(other_val) other_val = other_val.val if other_val.is_a?(::Boolean) ; (val    === other_val) ; end
#   def    <=>(other_val) other_val = other_val.val if other_val.is_a?(::Boolean) ; (val    <=> other_val) ; end
#   def   eql?(other_val) other_val = other_val.val if other_val.is_a?(::Boolean) ; (val.eql?   other_val) ; end
#   def equal?(other_val) other_val = other_val.val if other_val.is_a?(::Boolean) ; (val.equal? other_val) ; end
#
# end

# Datamapper also defines:
#
#  Apikey BCryptHash Decimal URI UUID Slug CommaSeparatedList Csv IpAddress Json Yaml Enum Flag Discriminator
#
# maybe someday we will too...

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
gorillib-0.6.0 lib/gorillib/type/boolean.rb
gorillib-0.5.2 lib/gorillib/type/boolean.rb
gorillib-0.5.0 lib/gorillib/type/boolean.rb
gorillib-0.4.2 lib/gorillib/type/boolean.rb
gorillib-0.4.2pre lib/gorillib/type/boolean.rb