Class: PowerBI::ReportArray

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

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Array

#reload

Constructor Details

#initialize(tenant, workspace) ⇒ ReportArray

Returns a new instance of ReportArray.



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

def initialize(tenant, workspace)
  super(tenant)
  @workspace = workspace
end

Dynamic Method Handling

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

Class Method Details

.get_classObject



48
49
50
# File 'lib/power-bi/report.rb', line 48

def self.get_class
  Report
end

Instance Method Details

#get_dataObject



52
53
54
55
# File 'lib/power-bi/report.rb', line 52

def get_data
  data = @tenant.get("/groups/#{@workspace.id}/reports")[:value]
  data.each { |d| d[:workspace] = @workspace }
end