Class: Bnm::Init
- Inherits:
-
Object
- Object
- Bnm::Init
- Defined in:
- lib/bnm/init.rb
Constant Summary collapse
- @@url =
"http://pitchfork.com/reviews/best/albums/"
Instance Attribute Summary collapse
-
#artists ⇒ Object
Returns the value of attribute artists.
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize ⇒ Init
constructor
A new instance of Init.
Constructor Details
#initialize ⇒ Init
Returns a new instance of Init.
7 8 9 |
# File 'lib/bnm/init.rb', line 7 def initialize @artists = Array.new end |
Instance Attribute Details
#artists ⇒ Object
Returns the value of attribute artists.
4 5 6 |
# File 'lib/bnm/init.rb', line 4 def artists @artists end |
Instance Method Details
#call ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/bnm/init.rb', line 11 def call # INITIATES SPINNER thr = Thread.new do while true Bnm::Spinner.loading end end # SCRAPING URIS AND ARTISTS @artists = Bnm::Scrape.init_scrape(@@url) Bnm::Scrape.deep_scrape(@artists) Bnm::API.itunes(@artists) # KILLS SPINNER AND CLEARS FROM SCREEN Thread.kill(thr) print "\r" # PRINTS OUT DYNAMIC CLI Bnm::CLI.launch(@artists) end |