Class: Quote
- Inherits:
-
Object
- Object
- Quote
- Defined in:
- lib/quote.rb
Instance Attribute Summary collapse
-
#author ⇒ Object
Returns the value of attribute author.
-
#category ⇒ Object
Returns the value of attribute category.
-
#date ⇒ Object
Returns the value of attribute date.
-
#length ⇒ Object
Returns the value of attribute length.
-
#quote ⇒ Object
Returns the value of attribute quote.
-
#tags ⇒ Object
Returns the value of attribute tags.
Instance Method Summary collapse
-
#initialize(quote_hash) ⇒ Quote
constructor
A new instance of Quote.
Constructor Details
#initialize(quote_hash) ⇒ Quote
Returns a new instance of Quote.
5 6 7 8 9 10 11 12 |
# File 'lib/quote.rb', line 5 def initialize(quote_hash) @author = quote_hash[:author] @quote = quote_hash[:quote] @length = quote_hash[:length] @tags = quote_hash[:tags] @category = quote_hash[:category] @date = quote_hash[:date] end |
Instance Attribute Details
#author ⇒ Object
Returns the value of attribute author.
3 4 5 |
# File 'lib/quote.rb', line 3 def @author end |
#category ⇒ Object
Returns the value of attribute category.
3 4 5 |
# File 'lib/quote.rb', line 3 def category @category end |
#date ⇒ Object
Returns the value of attribute date.
3 4 5 |
# File 'lib/quote.rb', line 3 def date @date end |
#length ⇒ Object
Returns the value of attribute length.
3 4 5 |
# File 'lib/quote.rb', line 3 def length @length end |
#quote ⇒ Object
Returns the value of attribute quote.
3 4 5 |
# File 'lib/quote.rb', line 3 def quote @quote end |
#tags ⇒ Object
Returns the value of attribute tags.
3 4 5 |
# File 'lib/quote.rb', line 3 def @tags end |