Created
August 4, 2018 07:57
-
-
Save manojmj92/8a72bfe36fd0b51384ae9a6cc934d3f7 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
# Definition of the PORO | |
class MyInteractor | |
attr_reader :context | |
def initialize(email:, name:) | |
@context = {} | |
context[:email] = email | |
context[:name] = name | |
end | |
def call | |
puts context.email # => [email protected] | |
puts context.id # => 20 | |
end | |
end | |
# Invocation of the PORO | |
result = MyInteractor.new(email: '[email protected]', name: 'my_name').call |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment