Class: DataGuru::Client
- Inherits:
-
Object
show all
- Defined in:
- lib/data_guru/client.rb
Instance Method Summary
collapse
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(name) ⇒ Object
6
7
8
9
10
|
# File 'lib/data_guru/client.rb', line 6
def method_missing(name)
create_model_class(name) if should_create_class?(name)
value = DataGuru::Collection.new(collection_name: name, model: model(name))
get_variable(name) || set_variable(name, value)
end
|
Instance Method Details
#refresh ⇒ Object
12
13
14
15
|
# File 'lib/data_guru/client.rb', line 12
def refresh
HTTParty.get(refresh_data_url)
wipe_collections_cache
end
|