Skip to content

Instantly share code, notes, and snippets.

@manojmj92
Created August 4, 2018 07:57
Show Gist options
  • Save manojmj92/8a72bfe36fd0b51384ae9a6cc934d3f7 to your computer and use it in GitHub Desktop.
Save manojmj92/8a72bfe36fd0b51384ae9a6cc934d3f7 to your computer and use it in GitHub Desktop.
# 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 # => myemail@reflektive.com
puts context.id # => 20
end
end
# Invocation of the PORO
result = MyInteractor.new(email: 'my_email@reflektive.com', name: 'my_name').call
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment