Method: Sistrix::Monitoring::Folders#call

Defined in:
lib/sistrix/monitoring/folders.rb

#call(options = {}) ⇒ Object



22
23
24
25
26
27
28
29
30
31
32
33
# File 'lib/sistrix/monitoring/folders.rb', line 22

def call(options = {})
  data = fetch(options)

  @credits = data.xpath('/response/credits').first['used'].to_i

  @folders = []
  data.xpath('/response/answer/folder').each do |r|
    @folders << Record.new(r)
  end

  self
end