Type:
Class

Struct serialization/deserialization

A Struct is a convenient way to bundle a number of attributes together, using accessor methods, without having to write an explicit class.

The Struct class is a generator of specific classes, each one of which is defined to hold a set of variables and their accessors. In these examples, we'll call the generated class “CustomerClass,'' and we'll show an example instance of that class as “CustomerInst.''

In the descriptions that follow, the parameter symbol refers to a symbol, which is either a quoted string or a Symbol (such as :name).

hash

struct.hash â fixnum Instance Public methods Return a hash value based on

2015-05-16 05:41:20
pretty_print_cycle

pretty_print_cycle(q) Instance Public methods

2015-05-16 05:51:00
size

struct.size â fixnum Instance Public methods Returns the number of instance

2015-05-16 05:59:01
each

struct.each {|obj| block } â structstruct.each â an_enumerator Instance Public methods

2015-05-16 05:34:10
length

struct.length â fixnum Instance Public methods Returns the number of instance

2015-05-16 05:43:19
json_create

json_create(object) Class Public methods Deserializes

2015-05-16 05:03:42
eql?

struct.eql?(other) â true or false Instance Public methods Two structures

2015-05-16 05:40:21
select

struct.select {|i| block } â arraystruct.select â an_enumerator Instance Public methods

2015-05-16 05:57:29
values

struct.values â array Instance Public methods Returns the values for this

2015-05-16 06:13:17
members

struct.members â array Instance Public methods Returns an array of symbols

2015-05-16 05:46:29