Class: QiitaTrend::Target

Inherits:
Object
  • Object
show all
Defined in:
lib/qiita_trend/target.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(trend_type = TrendType::DAILY, date = nil) ⇒ Target

Returns a new instance of Target.



7
8
9
10
11
12
# File 'lib/qiita_trend/target.rb', line 7

def initialize(trend_type = TrendType::DAILY, date = nil)
  @type = trend_type
  @url = trend_url(trend_type)
   = trend_type != TrendType::DAILY
  @cache = cache_name(trend_type, date)
end

Instance Attribute Details

#cacheObject (readonly)

Returns the value of attribute cache.



5
6
7
# File 'lib/qiita_trend/target.rb', line 5

def cache
  @cache
end

#need_loginObject (readonly)

Returns the value of attribute need_login.



5
6
7
# File 'lib/qiita_trend/target.rb', line 5

def 
  
end

#typeObject (readonly)

Returns the value of attribute type.



5
6
7
# File 'lib/qiita_trend/target.rb', line 5

def type
  @type
end

#urlObject (readonly)

Returns the value of attribute url.



5
6
7
# File 'lib/qiita_trend/target.rb', line 5

def url
  @url
end