Class: ECFS::DailyReleasesQuery
- Inherits:
-
Object
- Object
- ECFS::DailyReleasesQuery
- Defined in:
- lib/ecfs/daily_releases_query.rb
Instance Attribute Summary collapse
-
#day ⇒ Object
Returns the value of attribute day.
-
#month ⇒ Object
Returns the value of attribute month.
-
#year ⇒ Object
Returns the value of attribute year.
Instance Method Summary collapse
- #get ⇒ Object
-
#initialize ⇒ DailyReleasesQuery
constructor
A new instance of DailyReleasesQuery.
Constructor Details
#initialize ⇒ DailyReleasesQuery
Returns a new instance of DailyReleasesQuery.
13 14 |
# File 'lib/ecfs/daily_releases_query.rb', line 13 def initialize end |
Instance Attribute Details
#day ⇒ Object
Returns the value of attribute day.
9 10 11 |
# File 'lib/ecfs/daily_releases_query.rb', line 9 def day @day end |
#month ⇒ Object
Returns the value of attribute month.
10 11 12 |
# File 'lib/ecfs/daily_releases_query.rb', line 10 def month @month end |
#year ⇒ Object
Returns the value of attribute year.
11 12 13 |
# File 'lib/ecfs/daily_releases_query.rb', line 11 def year @year end |
Instance Method Details
#get ⇒ Object
16 17 18 19 20 21 22 23 24 25 |
# File 'lib/ecfs/daily_releases_query.rb', line 16 def get url = "http://transition.fcc.gov/Daily_Releases/Daily_Business/#{@year}/db#{@month}#{@day}/" agent = Mechanize.new page = agent.get(url) links = page.search('a') links.shift ECFS::DailyRelease.new(links, url) end |