Class: HammerCLI::Output::RecordCollection

Inherits:
Array
  • Object
show all
Defined in:
lib/hammer_cli/output/record_collection.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data, options = {}) ⇒ RecordCollection

Returns a new instance of RecordCollection.



30
31
32
33
34
35
36
37
# File 'lib/hammer_cli/output/record_collection.rb', line 30

def initialize(data, options={})
  super [data].flatten(1)
  if options.has_key?(:meta) && options[:meta].class <= MetaData
    @meta = options[:meta]
  else
    @meta = MetaData.new(options)
  end
end

Instance Attribute Details

#metaObject

Returns the value of attribute meta.



28
29
30
# File 'lib/hammer_cli/output/record_collection.rb', line 28

def meta
  @meta
end