Created
July 20, 2012 18:32
-
-
Save gmoeck/3152459 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
class SomeService | |
def initialize(some_dependency) | |
@some_dependency = some_dependency | |
end | |
def some_event(value) | |
@some_dependency.another_event(value.increase_value) | |
end | |
end | |
class SomeValue | |
attr_accessor :counter | |
def initialize(counter) | |
@counter = counter | |
end | |
def increase_value | |
SomeValue.new(@counter + 1) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
There's no way this example is understandable without
Foo
s andBar
s.;)