Class: PowerBI::RefreshArray

Inherits:
Array
  • Object
show all
Defined in:
lib/power-bi/refresh.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Array

#reload

Constructor Details

#initialize(tenant, dataset) ⇒ RefreshArray

Returns a new instance of RefreshArray.



27
28
29
30
31
# File 'lib/power-bi/refresh.rb', line 27

def initialize(tenant, dataset)
  super(tenant, dataset)
  @dataset = dataset
  @entries_to_load = 1
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class PowerBI::Array

Instance Attribute Details

#entries_to_loadObject

Returns the value of attribute entries_to_load.



25
26
27
# File 'lib/power-bi/refresh.rb', line 25

def entries_to_load
  @entries_to_load
end

Class Method Details

.get_classObject



33
34
35
# File 'lib/power-bi/refresh.rb', line 33

def self.get_class
  Refresh
end

Instance Method Details

#get_dataObject



44
45
46
# File 'lib/power-bi/refresh.rb', line 44

def get_data
  @tenant.get("/groups/#{@dataset.workspace.id}/datasets/#{@dataset.id}/refreshes", {'$top': @entries_to_load.to_s})[:value]
end