Class: PowerBI::DatasourceArray

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

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Array

#reload

Constructor Details

#initialize(tenant, dataset) ⇒ DatasourceArray

Returns a new instance of DatasourceArray.



23
24
25
26
# File 'lib/power-bi/datasource.rb', line 23

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

Dynamic Method Handling

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

Class Method Details

.get_classObject



28
29
30
# File 'lib/power-bi/datasource.rb', line 28

def self.get_class
  Datasource
end

Instance Method Details

#get_dataObject



32
33
34
# File 'lib/power-bi/datasource.rb', line 32

def get_data
  @tenant.get("/groups/#{@dataset.workspace.id}/datasets/#{@dataset.id}/datasources")[:value]
end