Skip to content

dmdropkick/service_object

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ServiceObject

class SomeService < ServiceObject::Base
  param :arg1
  option :arg2
  
  def call
    arg1 + arg2    
  end
end
SomeService.call(1, arg2: 2)
# => 3
# or
service = SomeService.new(1, arg2: 2)
service.call
# => 3

About

Implementation of the Service Object pattern

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages