Module: Lucid::Shopify::Resource::Base
- Defined in:
- lib/lucid/shopify/resource/base.rb
Defined Under Namespace
Modules: ClassMethods
Class Method Summary collapse
Instance Method Summary collapse
- #client ⇒ Client
- #client=(new_client) ⇒ Object
- #logger ⇒ Logger
- #logger=(new_logger) ⇒ Object
- #resource ⇒ String abstract
Class Method Details
.included(base) ⇒ Object
29 30 31 |
# File 'lib/lucid/shopify/resource/base.rb', line 29 def self.included(base) base.extend(ClassMethods) end |
Instance Method Details
#client ⇒ Client
41 42 43 |
# File 'lib/lucid/shopify/resource/base.rb', line 41 def client @client ||= Container[:client] end |
#client=(new_client) ⇒ Object
46 47 48 |
# File 'lib/lucid/shopify/resource/base.rb', line 46 def client=(new_client) @client = new_client end |
#logger ⇒ Logger
51 52 53 |
# File 'lib/lucid/shopify/resource/base.rb', line 51 def logger @logger ||= Logger.new(IO::NULL) end |
#logger=(new_logger) ⇒ Object
56 57 58 |
# File 'lib/lucid/shopify/resource/base.rb', line 56 def logger=(new_logger) @logger = new_logger end |
#resource ⇒ String
This method is abstract.
Use Lucid::Shopify::Resource::Base::ClassMethods#resource to implement (required)
36 37 38 |
# File 'lib/lucid/shopify/resource/base.rb', line 36 def resource raise NotImplementedError end |