Class: CNN

Inherits:
Object
  • Object
show all
Defined in:
lib/buzzwords/cnn.rb

Constant Summary collapse

CNN_US_HEADLINES_URL =
"https://www.cnn.com/us"

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeCNN

Returns a new instance of CNN.



6
7
8
# File 'lib/buzzwords/cnn.rb', line 6

def initialize
  @webpage = Buzzwords::MECH.get(CNN_US_HEADLINES_URL)
end

Instance Attribute Details

#headlinesObject (readonly)

Returns the value of attribute headlines.



2
3
4
# File 'lib/buzzwords/cnn.rb', line 2

def headlines
  @headlines
end

#webpageObject (readonly)

Returns the value of attribute webpage.



2
3
4
# File 'lib/buzzwords/cnn.rb', line 2

def webpage
  @webpage
end