Class: Scrobbler::Base
- Inherits:
-
Object
show all
- Defined in:
- lib/scrobbler/base.rb
Constant Summary
collapse
- @@coder =
HTMLEntities.new
Class Method Summary
collapse
Class Method Details
.api_key=(api_key) ⇒ Object
13
14
15
|
# File 'lib/scrobbler/base.rb', line 13
def Base.api_key=(api_key)
@@api_key = api_key
end
|
.fetch_and_parse(resource) ⇒ Object
29
30
31
|
# File 'lib/scrobbler/base.rb', line 29
def fetch_and_parse(resource)
Hpricot::XML(connection.get(resource))
end
|
.sanitize(string) ⇒ Object
Decode HTML Entities so that we have plain strings in out code
20
21
22
|
# File 'lib/scrobbler/base.rb', line 20
def Base.sanitize(string)
@@coder.decode(string)
end
|