Skip to content

Instantly share code, notes, and snippets.

@gmoeck
Created July 20, 2012 18:32
Show Gist options
  • Save gmoeck/3152459 to your computer and use it in GitHub Desktop.
Save gmoeck/3152459 to your computer and use it in GitHub Desktop.
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
@steveklabnik
Copy link

There's no way this example is understandable without Foos and Bars.

;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment