Class: TravisCheckRubies::Fetcher

Inherits:
Object
  • Object
show all
Defined in:
lib/travis_check_rubies/fetcher.rb

Constant Summary collapse

CACHE_TIME =
24 * 60 * 60

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(url) ⇒ Fetcher

Returns a new instance of Fetcher.



12
13
14
# File 'lib/travis_check_rubies/fetcher.rb', line 12

def initialize(url)
  @url = url
end

Instance Attribute Details

#urlObject (readonly)

Returns the value of attribute url.



10
11
12
# File 'lib/travis_check_rubies/fetcher.rb', line 10

def url
  @url
end

Instance Method Details

#dataObject



16
17
18
# File 'lib/travis_check_rubies/fetcher.rb', line 16

def data
  cached_data || fetch_data
end