Class: Topic

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

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#idObject

Returns the value of attribute id.



6
7
8
# File 'lib/bbc/topic.rb', line 6

def id
  @id
end

#storiesObject

Returns the value of attribute stories.



6
7
8
# File 'lib/bbc/topic.rb', line 6

def stories
  @stories
end

#titleObject

Returns the value of attribute title.



6
7
8
# File 'lib/bbc/topic.rb', line 6

def title
  @title
end