Class: Story

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(story) ⇒ Story

Returns a new instance of Story.



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

def initialize(story)
  @story = story
end

Instance Attribute Details

#storyObject

Returns the value of attribute story.



7
8
9
# File 'lib/bbc/story.rb', line 7

def story
  @story
end

Instance Method Details

#descriptionObject



17
18
19
# File 'lib/bbc/story.rb', line 17

def description
  @story["description"]
end

#imageObject



25
26
27
# File 'lib/bbc/story.rb', line 25

def image
  @story["thumbnail"]
end


21
22
23
# File 'lib/bbc/story.rb', line 21

def link
  @story["link"]
end

#titleObject



13
14
15
# File 'lib/bbc/story.rb', line 13

def title
  @story["title"]
end