Sha256: 6caa20a38c2fbc9fcfa619c6b60a22394df09c03302b87081649d0eded51f5c1

Contents?: true

Size: 585 Bytes

Versions: 90

Compression:

Stored size: 585 Bytes

Contents

module Hobo

  class Undefined

    def initialize(*args)
      options = args.extract_options!
      @klass = args.first || Object
    end

    def hobo_undefined?
      true
    end

    def class
      @klass
    end

    def is_a?(klass)
      return klass == @klass || klass > @klass
    end

    def to_s
      "<Hobo::Undefined #{@klass}>"
    end

    def inspect
      to_s
    end

    def new_record?
      true
    end

    def method_missing(name, *args)
      raise UndefinedAccessError.new("call to: Hobo::Undefined##{name}")
    end

    undef_method :==

  end

end


Version data entries

90 entries across 90 versions & 1 rubygems

Version Path
hobo-1.1.0.pre0 lib/hobo/undefined.rb
hobo-1.0.2 lib/hobo/undefined.rb
hobo-1.3.0.pre16 lib/hobo/undefined.rb
hobo-1.3.0.pre15 lib/hobo/undefined.rb
hobo-1.3.0.pre14 lib/hobo/undefined.rb
hobo-1.3.0.pre13 lib/hobo/undefined.rb
hobo-1.3.0.pre12 lib/hobo/undefined.rb
hobo-1.3.0.pre11 lib/hobo/undefined.rb
hobo-1.3.0.pre10 lib/hobo/undefined.rb
hobo-1.0.1 lib/hobo/undefined.rb
hobo-1.0.0 lib/hobo/undefined.rb
hobo-0.9.106 lib/hobo/undefined.rb
hobo-0.9.105 lib/hobo/undefined.rb
hobo-0.9.104 lib/hobo/undefined.rb
hobo-0.9.103 lib/hobo/undefined.rb
hobo-0.9.102 lib/hobo/undefined.rb
hobo-0.9.101 lib/hobo/undefined.rb
hobo-0.9.100 lib/hobo/undefined.rb
hobo-0.9.0 lib/hobo/undefined.rb
hobo-0.8.10 lib/hobo/undefined.rb