-
-
Save paneq/5204376 to your computer and use it in GitHub Desktop.
Dunno what I want to show
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 Post | |
after_create do | |
Twitter.add_to_stream(self.title) | |
end | |
end |
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 Blog | |
def post(post_attributes) | |
post = posts.create!(post_attributes) | |
Twitter.add_to_stream(post.title) | |
end | |
end |
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 Blog | |
def post(post_attributes, twitter_client) | |
post = posts.create!(post_attributes) | |
twitter_client.add_to_stream(post.title) | |
end | |
end |
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 Blogging | |
def initialize(blog, twitter_client) | |
end | |
def post(post_attributes) | |
post = @blog.add_post(post_attributes) | |
@twitter_client.add_to_stream(post.title) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment