Class: Patterns::Service
- Inherits:
-
Object
- Object
- Patterns::Service
- Defined in:
- lib/patterns/service.rb
Instance Attribute Summary collapse
-
#result ⇒ Object
readonly
Returns the value of attribute result.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#result ⇒ Object (readonly)
Returns the value of attribute result.
3 4 5 |
# File 'lib/patterns/service.rb', line 3 def result @result end |
Class Method Details
.call(*args) ⇒ Object
5 6 7 8 9 10 11 12 |
# File 'lib/patterns/service.rb', line 5 def self.call(*args) new(*args).tap do |service| service.instance_variable_set( "@result", service.call ) end end |
Instance Method Details
#call ⇒ Object
14 15 16 |
# File 'lib/patterns/service.rb', line 14 def call raise NotImplementedError end |