Class: PuzzlyApiPlugin::TablesView
- Inherits:
-
Renderable
- Object
- Hash
- JSONable
- Renderable
- PuzzlyApiPlugin::TablesView
- Defined in:
- lib/puzzly_api_plugin/view/tables.rb
Constant Summary collapse
- API_ENDPOINT =
'tables/home'
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(tables) ⇒ TablesView
constructor
A new instance of TablesView.
Methods inherited from Renderable
#apis, #caches, #contexts, #modules, #path, #queries, #render, #schemas, #tables, #topics
Methods inherited from JSONable
Constructor Details
#initialize(tables) ⇒ TablesView
Returns a new instance of TablesView.
18 19 20 21 |
# File 'lib/puzzly_api_plugin/view/tables.rb', line 18 def initialize(tables) super(API_ENDPOINT) self.tables tables end |
Class Method Details
.create ⇒ Object
8 9 10 11 12 13 14 15 16 |
# File 'lib/puzzly_api_plugin/view/tables.rb', line 8 def self.create tables = [] TablesCollection.instance.each do |id, table| tables.push TableView.create(table) end TablesView.new(tables) end |