Class: Rubaiji::ReportSet

Inherits:
Array
  • Object
show all
Defined in:
lib/rubaiji/report.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(array) ⇒ ReportSet

Returns a new instance of ReportSet.



23
24
25
26
27
28
29
30
31
# File 'lib/rubaiji/report.rb', line 23

def initialize(array)
  array.each do |e|
    self << Rubaiji::Report.new(
      :resource_uri => e["resource_uri"],
      :date => DateTime.parse(e["date"]),
      :results_no => e["results_no"]
    )
  end
end

Instance Attribute Details

#limitObject (readonly)

Returns the value of attribute limit.



21
22
23
# File 'lib/rubaiji/report.rb', line 21

def limit
  @limit
end

#next_tokenObject (readonly)

Returns the value of attribute next_token.



21
22
23
# File 'lib/rubaiji/report.rb', line 21

def next_token
  @next_token
end

#offsetObject (readonly)

Returns the value of attribute offset.



21
22
23
# File 'lib/rubaiji/report.rb', line 21

def offset
  @offset
end

#previousObject (readonly)

Returns the value of attribute previous.



21
22
23
# File 'lib/rubaiji/report.rb', line 21

def previous
  @previous
end

#total_countObject (readonly)

Returns the value of attribute total_count.



21
22
23
# File 'lib/rubaiji/report.rb', line 21

def total_count
  @total_count
end

Instance Method Details

#add_meta(meta) ⇒ Object



33
34
35
36
37
38
39
# File 'lib/rubaiji/report.rb', line 33

def add_meta(meta)
  limit = meta["limit"]
  next_token = meta["next"]
  offset = meta["offset"]
  previous = meta["previous"]
  total_count = meta["total_count"]
end