lib/itsf/services/v2/service/base.rb in itsf_services-0.0.1 vs lib/itsf/services/v2/service/base.rb in itsf_services-0.0.2
- old
+ new
@@ -9,36 +9,36 @@
extend Forwardable
def_delegator :@instrumenter, :instrument
attr_accessor :instrumenter
attr_reader :response
-
+
def self.i18n_scope
'activerecord'
end
def self.call(attributes = {}, *args)
new(attributes, *args).send(:do_work)
end
def initialize(attributes = {}, *args)
options = args.extract_options!
- options.reverse_merge!({ :instrumenter => ActiveSupport::Notifications })
+ options.reverse_merge!(instrumenter: ActiveSupport::Notifications)
- @errors = ActiveModel::Errors.new(self)
+ @errors = ActiveModel::Errors.new(self)
initialize_instrumenter(options[:instrumenter])
instrument('initialize.export_to_sap.payment.dzb') do
initialize_attributes if respond_to?(:initialize_attributes)
- set_attributes(attributes)
+ send_attributes(attributes)
initialize_response
end
end
private
- def set_attributes(attributes)
+ def send_attributes(attributes)
attributes.each do |name, value|
send("#{name}=", value)
end
end
@@ -68,6 +68,6 @@
end
end
end
end
end
-end
\ No newline at end of file
+end