Created
March 7, 2019 11:33
-
-
Save oriolbcn/c7d7355a01f646f928927488bde29f4a 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
# 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