Class: WhoNeedsWP::TwitterSearch

Inherits:
TwitterSidebar show all
Defined in:
lib/who-needs-wp/sidebar/twitter.rb

Overview

A Sidebar component which displays a twitter search term

Instance Method Summary collapse

Methods inherited from Sidebar

render_all

Constructor Details

#initialize(term) ⇒ TwitterSearch

Create a new Twitter sidebar based on a search of “term”



57
58
59
60
61
# File 'lib/who-needs-wp/sidebar/twitter.rb', line 57

def initialize(term)
  super()
  @term = term
  validate_options
end

Instance Method Details

#renderObject

See Sidebar.render



64
65
66
67
68
69
# File 'lib/who-needs-wp/sidebar/twitter.rb', line 64

def render
  WhoNeedsWP::render_template("twitter", {
    :tweets => tweets,
    :feed_title => "Tweets for \"#{@term}\""
  })
end