Class: Superset::Dataset::Refresh

Inherits:
Request
  • Object
show all
Defined in:
lib/superset/dataset/refresh.rb

Constant Summary

Constants inherited from Request

Request::DEFAULT_PAGE_SIZE

Instance Attribute Summary collapse

Attributes inherited from Request

#page_num, #page_size

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Request

#query_params, #result, #superset_host

Methods included from Superset::Display

#ids, #list, #list_attributes, #result, #rows, #table, #title, #to_h

Constructor Details

#initialize(id) ⇒ Refresh

Returns a new instance of Refresh.



15
16
17
# File 'lib/superset/dataset/refresh.rb', line 15

def initialize(id)
  @id = id
end

Instance Attribute Details

#idObject (readonly)

Returns the value of attribute id.



13
14
15
# File 'lib/superset/dataset/refresh.rb', line 13

def id
  @id
end

Class Method Details

.call(id) ⇒ Object



19
20
21
# File 'lib/superset/dataset/refresh.rb', line 19

def self.call(id)
  self.new(id).perform
end

Instance Method Details

#performObject



23
24
25
# File 'lib/superset/dataset/refresh.rb', line 23

def perform
  response
end

#responseObject



27
28
29
# File 'lib/superset/dataset/refresh.rb', line 27

def response
  @response ||= client.put(route)
end