Class: Topic
- Inherits:
-
Object
- Object
- Topic
- Defined in:
- lib/bbc/topic.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
Returns the value of attribute id.
-
#stories ⇒ Object
Returns the value of attribute stories.
-
#title ⇒ Object
Returns the value of attribute title.
Instance Method Summary collapse
-
#initialize(id = nil, title = nil) ⇒ Topic
constructor
A new instance of Topic.
Constructor Details
#initialize(id = nil, title = nil) ⇒ Topic
Returns a new instance of Topic.
8 9 10 11 |
# File 'lib/bbc/topic.rb', line 8 def initialize(id = nil,title = nil) @id = id[:id] @title = title end |
Instance Attribute Details
#id ⇒ Object
Returns the value of attribute id.
6 7 8 |
# File 'lib/bbc/topic.rb', line 6 def id @id end |
#stories ⇒ Object
Returns the value of attribute stories.
6 7 8 |
# File 'lib/bbc/topic.rb', line 6 def stories @stories end |
#title ⇒ Object
Returns the value of attribute title.
6 7 8 |
# File 'lib/bbc/topic.rb', line 6 def title @title end |