Class: SoapyCake::AdminBatched
- Inherits:
-
Object
- Object
- SoapyCake::AdminBatched
- Defined in:
- lib/soapy_cake/admin_batched.rb
Defined Under Namespace
Classes: BatchedRequest
Constant Summary collapse
- ALLOWED_METHODS =
%i[ advertisers affiliates campaigns offers creatives clicks conversions events caps exchange_rates ].freeze
Instance Method Summary collapse
-
#initialize(opts = {}) ⇒ AdminBatched
constructor
A new instance of AdminBatched.
- #method_missing(name, method_opts = {}, limit = nil) ⇒ Object
- #respond_to_missing?(name) ⇒ Boolean
Constructor Details
#initialize(opts = {}) ⇒ AdminBatched
Returns a new instance of AdminBatched.
10 11 12 |
# File 'lib/soapy_cake/admin_batched.rb', line 10 def initialize(opts = {}) @opts = opts end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(name, method_opts = {}, limit = nil) ⇒ Object
68 69 70 71 72 73 74 |
# File 'lib/soapy_cake/admin_batched.rb', line 68 def method_missing(name, method_opts = {}, limit = nil) if respond_to_missing?(name) BatchedRequest.new(admin, name, method_opts, limit).to_enum else super end end |
Instance Method Details
#respond_to_missing?(name) ⇒ Boolean
64 65 66 |
# File 'lib/soapy_cake/admin_batched.rb', line 64 def respond_to_missing?(name) ALLOWED_METHODS.include?(name) end |