Class: Quote

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

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#authorObject

Returns the value of attribute author.



3
4
5
# File 'lib/quote.rb', line 3

def author
  @author
end

#categoryObject

Returns the value of attribute category.



3
4
5
# File 'lib/quote.rb', line 3

def category
  @category
end

#dateObject

Returns the value of attribute date.



3
4
5
# File 'lib/quote.rb', line 3

def date
  @date
end

#lengthObject

Returns the value of attribute length.



3
4
5
# File 'lib/quote.rb', line 3

def length
  @length
end

#quoteObject

Returns the value of attribute quote.



3
4
5
# File 'lib/quote.rb', line 3

def quote
  @quote
end

#tagsObject

Returns the value of attribute tags.



3
4
5
# File 'lib/quote.rb', line 3

def tags
  @tags
end