class Prototypal::Object

Public Class Methods

new(prototype = nil) click to toggle source
# File lib/prototypal/object.rb, line 5
def initialize(prototype = nil)
  @prototype = prototype
end

Public Instance Methods

inspect() click to toggle source
# File lib/prototypal/object.rb, line 18
def inspect
  "#<Prototypal::Object @prototype=#{@prototype.inspect}>"
end
method_missing(name, *args, &block) click to toggle source
Calls superclass method
# File lib/prototypal/object.rb, line 13
def method_missing(name, *args, &block)
  return @prototype.send(name, *args, &block) if respond_to_missing?(name)
  super
end
respond_to_missing?(name, include_private = false) click to toggle source
Calls superclass method
# File lib/prototypal/object.rb, line 9
def respond_to_missing?(name, include_private = false)
  @prototype.respond_to?(name) || super
end