Class: Hobix::FlickrPlugin
- Inherits:
-
BasePlugin
- Object
- BasePlugin
- Hobix::FlickrPlugin
- Defined in:
- lib/hobix/plugin/flickr.rb
Overview
we just keep parameters from hobix.yaml here
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(weblog, params = {}) ⇒ FlickrPlugin
constructor
A new instance of FlickrPlugin.
Methods inherited from BasePlugin
Constructor Details
#initialize(weblog, params = {}) ⇒ FlickrPlugin
Returns a new instance of FlickrPlugin.
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 |
# File 'lib/hobix/plugin/flickr.rb', line 43 def initialize(weblog, params = {}) raise %{the flickr plugin needs a "userid" parameter. see hobix/plugin/flickr.rb for details} unless params.member? "userid" @@userid = params["userid"] @@num = params["num"] || 5 @@size = case params["size"] when nil, "small" "s" when "thumbnail" "t" when "midsize" "m" else raise %{unknown size value "#{params["size"]}" for flickr plugin. use "small", "thumbnail" or "midsize"} end @@title = params["title"] || "Recent Pictures" @@in_sidebarBox_div = lambda { |x| (x.nil? ? true : x) }[params["in-sidebarBox-div"]] end |
Class Method Details
.in_sidebarBox_div? ⇒ Boolean
66 |
# File 'lib/hobix/plugin/flickr.rb', line 66 def self.; @@in_sidebarBox_div; end |
.num ⇒ Object
63 |
# File 'lib/hobix/plugin/flickr.rb', line 63 def self.num; @@num; end |
.size ⇒ Object
64 |
# File 'lib/hobix/plugin/flickr.rb', line 64 def self.size; @@size; end |
.title ⇒ Object
65 |
# File 'lib/hobix/plugin/flickr.rb', line 65 def self.title; @@title; end |
.userid ⇒ Object
62 |
# File 'lib/hobix/plugin/flickr.rb', line 62 def self.userid; @@userid; end |