Class: Snippet
- Inherits:
-
Object
- Object
- Snippet
- Defined in:
- lib/snippet.rb
Defined Under Namespace
Instance Method Summary collapse
-
#get_meta ⇒ Object
the only method we need returns hash with content, image image can be null.
-
#initialize(uri) ⇒ Snippet
constructor
A new instance of Snippet.
Constructor Details
#initialize(uri) ⇒ Snippet
Returns a new instance of Snippet.
5 6 7 8 9 10 11 |
# File 'lib/snippet.rb', line 5 def initialize(uri) @uri = uri @agent = Mechanize.new @agent.user_agent_alias = 'Mac Safari' @agent.agent.http.verify_mode = OpenSSL::SSL::VERIFY_NONE @agent.agent.http.retry_change_requests = true end |