Class: Channel
- Inherits:
-
Object
- Object
- Channel
- Defined in:
- lib/channel.rb
Instance Attribute Summary collapse
-
#headlines ⇒ Object
readonly
Returns the value of attribute headlines.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
- #id ⇒ Object
-
#initialize(name, headlines) ⇒ Channel
constructor
A new instance of Channel.
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
#headlines ⇒ Object (readonly)
Returns the value of attribute headlines.
2 3 4 |
# File 'lib/channel.rb', line 2 def headlines @headlines end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
2 3 4 |
# File 'lib/channel.rb', line 2 def name @name end |
Instance Method Details
#id ⇒ Object
9 10 11 |
# File 'lib/channel.rb', line 9 def id @name.gsub(/[^0-9a-z]/i, '') end |