Class: SimpleSegment::Operations::Operation
- Inherits:
-
Object
- Object
- SimpleSegment::Operations::Operation
- Includes:
- Utils
- Defined in:
- lib/simple_segment/operations/operation.rb
Constant Summary collapse
- DEFAULT_CONTEXT =
{ library: { name: 'simple_segment', version: SimpleSegment::VERSION } }.freeze
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(client, options = {}) ⇒ Operation
constructor
A new instance of Operation.
Methods included from Utils
included, #isoify_dates, #isoify_dates!, #maybe_datetime_in_iso8601, #symbolize_keys
Constructor Details
#initialize(client, options = {}) ⇒ Operation
Returns a new instance of Operation.
15 16 17 18 19 |
# File 'lib/simple_segment/operations/operation.rb', line 15 def initialize(client, = {}) @options = @context = DEFAULT_CONTEXT.merge([:context].to_h) @request = Request.new(client) end |
Instance Method Details
#call ⇒ Object
21 22 23 |
# File 'lib/simple_segment/operations/operation.rb', line 21 def call raise 'Must be implemented in a subclass' end |