class MSS::Core::Data::List

Public Class Methods

new(array) click to toggle source

@param [Array] array

# File lib/mss/core/data.rb, line 207
def initialize array
  @data = array
end

Public Instance Methods

empty?() click to toggle source

@api private

# File lib/mss/core/data.rb, line 244
def empty?
  @data.empty?
end
inject(*args) { |cast,cast| ... } click to toggle source

inject works on Core::Data::List in in 1.8.7 and 1.9.3, but not in 1.9.2 unless we define it like so. @api private

# File lib/mss/core/data.rb, line 227
def inject *args, &block
  @data.inject(*args) do |obj,value|
    yield(Data.cast(obj),Data.cast(value))
  end
end
inspect() click to toggle source

@return [String] Returns the inspection string for the

wrapped array.
# File lib/mss/core/data.rb, line 213
def inspect
  @data.inspect
end
is_a?(klass)
Alias for: kind_of?
kind_of?(klass) click to toggle source

@api private

Calls superclass method
# File lib/mss/core/data.rb, line 234
def kind_of? klass
  if klass == Array
    true
  else
    super
  end
end
Also aliased as: is_a?
to_a()
Alias for: to_ary
to_ary() click to toggle source

@return [Array] Returns the contents of this Data::List as

a raw array.
# File lib/mss/core/data.rb, line 219
def to_ary
  @data
end
Also aliased as: to_a