Skip to content

Instantly share code, notes, and snippets.

@pjc
Created September 21, 2013 07:06
Show Gist options
  • Save pjc/6648024 to your computer and use it in GitHub Desktop.
Save pjc/6648024 to your computer and use it in GitHub Desktop.
module Tutorials
def the_best_one_out_there
"PJ Celis' tutorial on getting to know a code base"
end
end
class RecommendationsController < ApplicationController
def tweet_out_the_best
recommended_tutorial = Tutorials.the_best_one_out_there
Tweeter.send(tweet(recommended_tutorial))
end
private
def tweet(recommendation)
"After careful research I can really recommend #{recommendation}!"[0...140]
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment