Skip to content

Instantly share code, notes, and snippets.

@oriolbcn
Created March 7, 2019 11:33
Show Gist options
  • Save oriolbcn/c7d7355a01f646f928927488bde29f4a to your computer and use it in GitHub Desktop.
Save oriolbcn/c7d7355a01f646f928927488bde29f4a to your computer and use it in GitHub Desktop.
# frozen_string_literal: true
class Candidate::SendTest
Result = Struct.new(:errors, keyword_init: true)
def initialize(candidate:, url:)
@candidate = candidate
@url = url
end
def call # no params
some_private_method
some_more_stuff
Result.new(errors: [])
end
private
def some_private_method
@candidate.something
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment