Class: Metallum::Agent
- Inherits:
-
Object
- Object
- Metallum::Agent
- Defined in:
- lib/metallum/metallum.rb
Overview
DISCOGRAPHY_URL = “www.metal-archives.com/band/discography/id/3/tab/all”
Instance Method Summary collapse
- #extract_band_id ⇒ Object
- #fetch_album ⇒ Object
- #fetch_band ⇒ Object
-
#initialize(url) ⇒ Agent
constructor
A new instance of Agent.
Constructor Details
#initialize(url) ⇒ Agent
Returns a new instance of Agent.
7 8 9 10 11 |
# File 'lib/metallum/metallum.rb', line 7 def initialize(url) @agent = Mechanize.new @page = @agent.get(url) @discography = @agent.get("http://www.metal-archives.com/band/discography/id/#{extract_band_id}/tab/all") end |