Created
August 8, 2014 15:03
-
-
Save pewniak747/38da560054e95d0a1606 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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