Class: WhoNeedsWP::TwitterFeed
- Inherits:
-
TwitterSidebar
- Object
- Sidebar
- TwitterSidebar
- WhoNeedsWP::TwitterFeed
- Defined in:
- lib/who-needs-wp/sidebar/twitter.rb
Overview
A Sidebar component which displays a list of a user’s tweets
Instance Method Summary collapse
-
#initialize(username) ⇒ TwitterFeed
constructor
Create a new Twitter sidebar based on “username”‘s tweets.
-
#render ⇒ Object
See Sidebar.render.
Methods inherited from Sidebar
Constructor Details
#initialize(username) ⇒ TwitterFeed
Create a new Twitter sidebar based on “username”‘s tweets
25 26 27 28 29 |
# File 'lib/who-needs-wp/sidebar/twitter.rb', line 25 def initialize(username) super() @username = username end |
Instance Method Details
#render ⇒ Object
See Sidebar.render
32 33 34 35 36 37 |
# File 'lib/who-needs-wp/sidebar/twitter.rb', line 32 def render WhoNeedsWP::render_template("twitter", { :tweets => tweets, :feed_title => "@#{@username}" }) end |