Class: Reference
Overview
:title: Reference
TODO
Synopsis
a = "Hello"
b = ref(a)
b.upcase #=> "HELLO"
Class Method Summary collapse
Instance Method Summary collapse
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(*args, &block) ⇒ Object
45 46 47 |
# File 'lib/mega/reference.rb', line 45 def method_missing(*args, &block) @ref.__send__(*args, &block) end |
Class Method Details
.new(obj) ⇒ Object
39 40 41 42 43 |
# File 'lib/mega/reference.rb', line 39 def self.new(obj) ref = allocate ref.become obj ref end |