class PowerBI::Array

Public Class Methods

new(tenant) click to toggle source
# File lib/power-bi/array.rb, line 5
def initialize(tenant)
  @fulfilled = false
  @content = nil
  @tenant = tenant
end

Public Instance Methods

reload() click to toggle source
# File lib/power-bi/array.rb, line 11
def reload
  @fulfilled = false
  @content = nil
  self
end

Private Instance Methods

get_content() click to toggle source
# File lib/power-bi/array.rb, line 19
def get_content
  unless @fulfilled
    klass = self.class.get_class
    @content = get_data.map { |d| klass.new(@tenant, d)}
    @fulfilled = true
  end
  @content
end
method_missing(method, *args, &block) click to toggle source
# File lib/power-bi/array.rb, line 28
def method_missing(method, *args, &block)
  get_content.send(method, *args, &block)
end