Code Monkey home page Code Monkey logo

amarshal's Introduction

= amarshal - marshal a Ruby object as Ruby code

AMarshal is a library for marshaling a Ruby object as a Ruby code. It can
marshal objects which have cyclic reference.

== Author
Tanaka Akira <[email protected]>

== Home Page
http://www.a-k-r.org/amarshal/

== Usage

AMarshal is similar to Marshal.

  % ruby -ramarshal -e 'AMarshal.dump([1,2,3], STDOUT)'
  v = []
  v[0] = Array.allocate()
  v[0] << 1
  v[0] << 2
  v[0] << 3
  v[0]

Highly experimental pretty printing version also exists:

  % ruby -ramarshal-pretty -e '
    o = [1,2]
    o << [[3], [[4]], [[[o]]]]
    o = [5, o, [[[o]]], o]
    AMarshal.dump_pretty(o, STDOUT)'
  v = []
  v[0] = Array.allocate
  v[0] << 1
  v[0] << 2
  v[0] << [[3], [[4]], [[[v[0]]]]]
  [5, v[0], [[[v[0]]]], v[0]]

== Requirements

* ruby 1.8.0 (2003-04-10) (older version doesn't work.)

== Download

* latest release: http://www.a-k-r.org/amarshal/amarshal-0.4.tar.gz

* development version: https://github.com/akr/amarshal

amarshal's People

Contributors

akr avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.