Sha256: fe402bf2b4a130994f567de4316dcf0c59824a367e18a20df920da14a9fba4f0

Contents?: true

Size: 501 Bytes

Versions: 15

Compression:

Stored size: 501 Bytes

Contents

require 'date'
require 'myrrha/with_core_ext'
require 'myrrha/to_ruby_literal'

require 'date'
require 'myrrha/with_core_ext'
require 'myrrha/to_ruby_literal'

1.to_ruby_literal                       # => "1"      
Date.today.to_ruby_literal              # => "Marshal.load('...')"
["hello", Date.today].to_ruby_literal   # => "['hello', Marshal.load('...')]"

(1..10).to_ruby_literal                 # => "1..10"

today = Date.today
(today..today+1).to_ruby_literal        # => "Marshal.load('...')"

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
myrrha-3.1.0 examples/to_ruby_literal.rb
myrrha-3.0.0 examples/to_ruby_literal.rb
myrrha-3.0.0.rc7 examples/to_ruby_literal.rb
myrrha-3.0.0.rc6 examples/to_ruby_literal.rb
myrrha-3.0.0.rc5 examples/to_ruby_literal.rb
myrrha-3.0.0.rc4 examples/to_ruby_literal.rb
myrrha-3.0.0.rc3 examples/to_ruby_literal.rb
myrrha-3.0.0.rc2 examples/to_ruby_literal.rb
myrrha-3.0.0.rc1 examples/to_ruby_literal.rb
myrrha-2.0.0 examples/to_ruby_literal.rb
myrrha-1.2.2 examples/to_ruby_literal.rb
myrrha-1.2.1 examples/to_ruby_literal.rb
myrrha-1.2.0 examples/to_ruby_literal.rb
myrrha-1.1.0 examples/to_ruby_literal.rb
myrrha-1.0.0 examples/to_ruby_literal.rb