class SmoothOperator::ArrayWithMetaData

Attributes

internal_array[R]
meta_data[R]

Public Class Methods

new(attributes, object_class) click to toggle source
Calls superclass method
# File lib/smooth_operator/array_with_meta_data.rb, line 6
def initialize(attributes, object_class)
  resources_name = object_class.resources_name

  @internal_array = [*attributes[resources_name]].map do |array_entry|
    object_class.new(array_entry)
  end

  attributes.delete(resources_name)

  @meta_data = attributes

  define_metada_methods

  super(@internal_array)
end