Class: IHeartQuotes::Fortune

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

Overview

Fortune (Quote) Representation

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(params = {}) ⇒ Fortune

Returns a new instance of Fortune.



18
19
20
21
22
23
# File 'lib/i_heart_quotes/fortune.rb', line 18

def initialize(params={})
  @tags   = params['tags']
  @quote  = params['quote']
  @link   = params['link']
  @source = params['source']
end

Instance Attribute Details

Link to the ‘I <3 Quotes’ Quote Page



13
14
15
# File 'lib/i_heart_quotes/fortune.rb', line 13

def link
  @link
end

#quoteObject (readonly)

Quote Body



7
8
9
# File 'lib/i_heart_quotes/fortune.rb', line 7

def quote
  @quote
end

#sourceObject (readonly)

Where the quote comes from



16
17
18
# File 'lib/i_heart_quotes/fortune.rb', line 16

def source
  @source
end

#tagsObject (readonly)

Related Tags



10
11
12
# File 'lib/i_heart_quotes/fortune.rb', line 10

def tags
  @tags
end