Class: PowerBI::DatasetArray

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

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Array

#reload

Constructor Details

#initialize(tenant, workspace) ⇒ DatasetArray

Returns a new instance of DatasetArray.



67
68
69
70
# File 'lib/power-bi/dataset.rb', line 67

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



72
73
74
# File 'lib/power-bi/dataset.rb', line 72

def self.get_class
  Dataset
end

Instance Method Details

#get_dataObject



76
77
78
79
# File 'lib/power-bi/dataset.rb', line 76

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