Class: Localer::Service
- Inherits:
-
Object
- Object
- Localer::Service
- Extended by:
- Dry::Initializer
- Defined in:
- lib/localer/service.rb
Overview
Core service object
Direct Known Subclasses
Class Method Summary collapse
-
.call(*args, &block) ⇒ Object
Instantiates and calls the service at once.
-
.new(*args) ⇒ Object
Accepts both symbolized and stringified attributes.
Class Method Details
.call(*args, &block) ⇒ Object
Instantiates and calls the service at once
11 12 13 |
# File 'lib/localer/service.rb', line 11 def call(*args, &block) new(*args).call(&block) end |
.new(*args) ⇒ Object
Accepts both symbolized and stringified attributes
16 17 18 19 |
# File 'lib/localer/service.rb', line 16 def new(*args) args << args.pop.symbolize_keys if args.last.is_a?(Hash) super(*args) end |