Class: Channel

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, headlines) ⇒ Channel

Returns a new instance of Channel.



4
5
6
7
# File 'lib/channel.rb', line 4

def initialize(name, headlines)
  @name = name
  @headlines = headlines
end

Instance Attribute Details

#headlinesObject (readonly)

Returns the value of attribute headlines.



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

def headlines
  @headlines
end

#nameObject (readonly)

Returns the value of attribute name.



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

def name
  @name
end

Instance Method Details

#idObject



9
10
11
# File 'lib/channel.rb', line 9

def id
  @name.gsub(/[^0-9a-z]/i, '')
end