Class: TwitterUserTimelinePortlet

Inherits:
Portlet
  • Object
show all
Defined in:
app/portlets/twitter_user_timeline_portlet.rb

Instance Method Summary collapse

Instance Method Details

#renderObject

Raises:

  • (ArgumentError)


6
7
8
9
10
11
12
# File 'app/portlets/twitter_user_timeline_portlet.rb', line 6

def render
  raise ArgumentError, "No Twitter Username was given" if self.username.blank?

  @items = Timeline.find_or_create_by_username(self.username).get_timeline(@portlet.limit)

  instance_eval(self.code) unless self.code.blank?
end