Class: IHeartQuotes::Fortune
- Inherits:
-
Object
- Object
- IHeartQuotes::Fortune
- Defined in:
- lib/i_heart_quotes/fortune.rb
Overview
Fortune (Quote) Representation
Instance Attribute Summary collapse
-
#link ⇒ Object
readonly
Link to the ‘I <3 Quotes’ Quote Page.
-
#quote ⇒ Object
readonly
Quote Body.
-
#source ⇒ Object
readonly
Where the quote comes from.
-
#tags ⇒ Object
readonly
Related Tags.
Instance Method Summary collapse
-
#initialize(params = {}) ⇒ Fortune
constructor
A new instance of Fortune.
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 ⇒ Object (readonly)
Link to the ‘I <3 Quotes’ Quote Page
13 14 15 |
# File 'lib/i_heart_quotes/fortune.rb', line 13 def link @link end |
#quote ⇒ Object (readonly)
Quote Body
7 8 9 |
# File 'lib/i_heart_quotes/fortune.rb', line 7 def quote @quote end |
#source ⇒ Object (readonly)
Where the quote comes from
16 17 18 |
# File 'lib/i_heart_quotes/fortune.rb', line 16 def source @source end |
#tags ⇒ Object (readonly)
Related Tags
10 11 12 |
# File 'lib/i_heart_quotes/fortune.rb', line 10 def @tags end |