Module: JsonApiClient::Helpers::Queryable::ClassMethods
- Defined in:
- lib/json_api_client/helpers/queryable.rb
Instance Method Summary collapse
- #build_connection ⇒ Object
- #connection {|@connection| ... } ⇒ Object
- #connection_class ⇒ Object
- #new_scope ⇒ Object
Instance Method Details
#build_connection ⇒ Object
28 29 30 |
# File 'lib/json_api_client/helpers/queryable.rb', line 28 def build_connection connection_class.new(site) end |
#connection {|@connection| ... } ⇒ Object
18 19 20 21 22 23 24 25 26 |
# File 'lib/json_api_client/helpers/queryable.rb', line 18 def connection @connection ||= begin super rescue build_connection end yield(@connection) if block_given? @connection end |
#connection_class ⇒ Object
32 33 34 |
# File 'lib/json_api_client/helpers/queryable.rb', line 32 def connection_class Connection end |
#new_scope ⇒ Object
14 15 16 |
# File 'lib/json_api_client/helpers/queryable.rb', line 14 def new_scope Scope.new(self) end |