class Hobo::Undefined

Public Instance Methods

class() click to toggle source
# File lib/hobo/undefined.rb, line 14
def class
  @klass
end
hobo_undefined?() click to toggle source
# File lib/hobo/undefined.rb, line 10
def hobo_undefined?
  true
end
inspect() click to toggle source
# File lib/hobo/undefined.rb, line 26
def inspect
  to_s
end
is_a?(klass) click to toggle source
# File lib/hobo/undefined.rb, line 18
def is_a?(klass)
  return klass == @klass || klass > @klass
end
method_missing(name, *args) click to toggle source
# File lib/hobo/undefined.rb, line 34
def method_missing(name, *args)
  raise UndefinedAccessError.new("call to: Hobo::Undefined##{name}")
end
new_record?() click to toggle source
# File lib/hobo/undefined.rb, line 30
def new_record?
  true
end
to_s() click to toggle source
# File lib/hobo/undefined.rb, line 22
def to_s
  "<Hobo::Undefined #{@klass}>"
end

Public Class Methods

new(*args) click to toggle source
# File lib/hobo/undefined.rb, line 5
def initialize(*args)
  options = args.extract_options!
  @klass = args.first || Object
end