Class: Object

Inherits:
BasicObject
Defined in:
lib/myrrha/to_ruby_literal.rb,
lib/myrrha/coerce.rb

Overview

module Myrrha

Instance Method Summary collapse

Instance Method Details

#to_ruby_literalString

Converts self to a ruby literal

Returns:

  • (String)

    a representation ‘s` of self such that Kernel.eval(s) == value is true



72
73
74
# File 'lib/myrrha/to_ruby_literal.rb', line 72

def to_ruby_literal
  block_given? ? yield : Myrrha.to_ruby_literal(self)
end