Convert and array into a tuple.

Methods
Public Class methods
cast_from(object, options={})
# File lib/facets/more/typecast.rb, line 124
    def cast_from(object, options={})
      retval = super
      return retval unless retval == nil
      return object.to_a if object.respond_to? :to_a
    end
mutable_methods()
# File lib/facets/more/syncarray.rb, line 32
  def self.mutable_methods
    @mutable ||= %w{ << []= abbrev clear collect! compact! concat
      delete delete_at delete_if fill flatten insert map! pop push
      reject! replace reverse! shift slice! sort! transpose uniq!
      unshift
    }
  end
Public Instance methods
every()
# File lib/facets/more/elementor.rb, line 75
  def every
    Elementor.new( self, :array )
  end
every!()
# File lib/facets/more/elementor.rb, line 79
  def every!
    Elementor.new( self, :inplace_array )
  end
restore_snapshot(snap)
# File lib/facets/more/snapshot.rb, line 140
  def restore_snapshot(snap) replace(snap) end
take_snapshot()
# File lib/facets/more/snapshot.rb, line 139
  def take_snapshot() dup end
to_elementor()
# File lib/facets/more/elementor.rb, line 67
  def to_elementor
    Elementor.new( self )
  end
to_elementor!()
# File lib/facets/more/elementor.rb, line 71
  def to_elementor!
    Elementor.new( self, :inplace )
  end
to_json(state = nil, depth = 0)

Returns a JSON string containing a JSON array, that is unparsed from this Array instance. state is a JSON::State object, that can also be used to configure the produced JSON string output further. depth is used to find out nesting depth, to indent accordingly.

# File lib/facets/more/json.rb, line 545
  def to_json(state = nil, depth = 0)
    state = JSON::State.from_state(state)
    json_check_circular(state) { json_transform(state, depth) }
  end
to_t()
# File lib/facets/more/tuple.rb, line 260
  def to_t
    Tuple.cast_from_array( self )
  end
Private Instance methods
json_check_circular(state) {|| ...}
# File lib/facets/more/json.rb, line 552
  def json_check_circular(state)
    if state
      state.seen?(self) and raise JSON::CircularDatastructure,
        "circular data structures not supported!"
      state.remember self
    end
    yield
  ensure
    state and state.forget self
  end
json_shift(state, depth)
# File lib/facets/more/json.rb, line 563
  def json_shift(state, depth)
    state and not state.array_nl.empty? or return ''
    state.indent * depth
  end
json_transform(state, depth)
# File lib/facets/more/json.rb, line 568
  def json_transform(state, depth)
    delim = ','
    delim << state.array_nl if state
    result = '['
    result << state.array_nl if state
    result << map { |value|
      json_shift(state, depth + 1) << value.to_json(state, depth + 1)
    }.join(delim)
    result << state.array_nl if state
    result << json_shift(state, depth) 
    result << ']'
    result
  end