class Object
Extends the Object
class to support Rubyverses.
Public Instance Methods
in_rubyverse(rubyverse)
click to toggle source
Return this object’s parallel object in another Rubyverse
.
This is a helper method to obtain the {Rubyverse#rubyversed} object for an intermediate result in a method call chain.
# Three ways to invoke #something on "other" in Rubyverse "rubyverse" # and then invoke #another on the result in Rubyverse "rubyverse": rubyverse.rubyversed(other).something.in_rubyverse(rubyverse).another other.in_rubyverse(rubyverse).something.in_rubyverse(rubyverse).another rubyverse.rubyversed(rubyverse.rubyversed(other).something).another
@param rubyverse [Rubyverse] The desired Rubyverse
.
# File lib/rubyverse.rb, line 115 def in_rubyverse (rubyverse); rubyverse.rubyversed self; end
rubyverse_original()
click to toggle source
Return ourselves, the original Rubyverse
object.
Parallel object classes should override this method.
# File lib/rubyverse.rb, line 101 def rubyverse_original; self; end