Skip to content

Instantly share code, notes, and snippets.

@pewniak747
Created August 8, 2014 15:03
Show Gist options
  • Save pewniak747/38da560054e95d0a1606 to your computer and use it in GitHub Desktop.
Save pewniak747/38da560054e95d0a1606 to your computer and use it in GitHub Desktop.
class ServiceObject
attr_reader :input
# ...
private
def private_method_with_input
input.field # access input as method
end
end
ServiceObject.new(user, dependency, input).call
# Other ways:
ServiceObject.new(user, dependency).call(input)
ServiceObject.call(user, dependency, input)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment