Class: Thumbnailer::Parser
- Inherits:
-
Object
- Object
- Thumbnailer::Parser
- Defined in:
- lib/thumbnailer/parser.rb
Instance Attribute Summary collapse
-
#uri ⇒ Object
readonly
Returns the value of attribute uri.
-
#worker ⇒ Object
readonly
Returns the value of attribute worker.
Instance Method Summary collapse
-
#initialize(url) ⇒ Parser
constructor
A new instance of Parser.
Constructor Details
#initialize(url) ⇒ Parser
Returns a new instance of Parser.
5 6 7 8 9 10 11 12 13 |
# File 'lib/thumbnailer/parser.rb', line 5 def initialize(url) @uri = URI.parse(url) SITES.each {|k, w| if url =~ /#{k}/ @worker = w.new(@uri) end } end |
Instance Attribute Details
#uri ⇒ Object (readonly)
Returns the value of attribute uri.
3 4 5 |
# File 'lib/thumbnailer/parser.rb', line 3 def uri @uri end |
#worker ⇒ Object (readonly)
Returns the value of attribute worker.
3 4 5 |
# File 'lib/thumbnailer/parser.rb', line 3 def worker @worker end |