Class: Itsf::Services::V2::Service::Base
- Inherits:
-
Object
- Object
- Itsf::Services::V2::Service::Base
- Extended by:
- Forwardable
- Includes:
- ActiveModel::Validations
- Defined in:
- lib/itsf/services/v2/service/base.rb
Instance Attribute Summary collapse
-
#instrumenter ⇒ Object
Returns the value of attribute instrumenter.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(attributes = {}, *args) ⇒ Base
constructor
A new instance of Base.
Constructor Details
#initialize(attributes = {}, *args) ⇒ Base
Returns a new instance of Base.
23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/itsf/services/v2/service/base.rb', line 23 def initialize(attributes = {}, *args) = args. .reverse_merge!({ :instrumenter => ActiveSupport::Notifications }) @errors = ActiveModel::Errors.new(self) initialize_instrumenter([:instrumenter]) instrument('initialize.export_to_sap.payment.dzb') do initialize_attributes if respond_to?(:initialize_attributes) set_attributes(attributes) initialize_response end end |
Instance Attribute Details
#instrumenter ⇒ Object
Returns the value of attribute instrumenter.
12 13 14 |
# File 'lib/itsf/services/v2/service/base.rb', line 12 def instrumenter @instrumenter end |
Class Method Details
.call(attributes = {}, *args) ⇒ Object
19 20 21 |
# File 'lib/itsf/services/v2/service/base.rb', line 19 def self.call(attributes = {}, *args) new(attributes, *args).send(:do_work) end |
.i18n_scope ⇒ Object
15 16 17 |
# File 'lib/itsf/services/v2/service/base.rb', line 15 def self.i18n_scope 'activerecord' end |