Sha256: 300aaadcd60a90e331a1a188ff2ca4bcf65a7b98ff8bfc41141bd6cf43acdbff

Contents?: true

Size: 1.76 KB

Versions: 1

Compression:

Stored size: 1.76 KB

Contents

require 'pathname'
require 'time'

class ::Long      < ::Integer ; end
class ::Double    < ::Float   ; end
class ::Binary    < ::String  ; end

class ::Guid      < ::String  ; end
class ::IpAddress < ::String  ; end
class ::Hostname  < ::String  ; end

# 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

1 entries across 1 versions & 1 rubygems

Version Path
gorillib-0.4.1pre lib/gorillib/type/extended.rb