Class: Enklawa::Api::Request
- Inherits:
-
Object
- Object
- Enklawa::Api::Request
- Defined in:
- lib/enklawa/api/request.rb
Instance Method Summary collapse
- #get! ⇒ Object
-
#initialize(url) ⇒ Request
constructor
A new instance of Request.
Constructor Details
#initialize(url) ⇒ Request
Returns a new instance of Request.
7 8 9 10 11 12 13 14 15 16 |
# File 'lib/enklawa/api/request.rb', line 7 def initialize(url) @info_xml_url = File.join([url, "info.xml"]) @main_page_url = url @cache_key = url.gsub(/[^a-z]/i,"") + ".yml" @cache = YAML::load_file(@cache_key) if File.exists?(@cache_key) @cache ||= { 'images' => {}, 'durations' => {} } end |