Class: Quote
- Inherits:
-
Object
- Object
- Quote
- Defined in:
- lib/quote_box/quote.rb
Constant Summary collapse
- @@curr_pg =
1
Instance Attribute Summary collapse
-
#author ⇒ Object
Returns the value of attribute author.
-
#author_link ⇒ Object
Returns the value of attribute author_link.
-
#author_name ⇒ Object
Returns the value of attribute author_name.
-
#content ⇒ Object
Returns the value of attribute content.
-
#likes ⇒ Object
Returns the value of attribute likes.
-
#scripture_it_belongs_to ⇒ Object
Returns the value of attribute scripture_it_belongs_to.
Instance Method Summary collapse
- #display ⇒ Object
-
#initialize(cont, likes, book, author_name, author = nil) ⇒ Quote
constructor
A new instance of Quote.
Constructor Details
#initialize(cont, likes, book, author_name, author = nil) ⇒ Quote
Returns a new instance of Quote.
7 8 9 10 11 12 13 14 |
# File 'lib/quote_box/quote.rb', line 7 def initialize(cont,likes,book,,=nil) @content=cont @likes=likes @author_name= @scripture_it_belongs_to=book @author= end |
Instance Attribute Details
#author ⇒ Object
Returns the value of attribute author.
3 4 5 |
# File 'lib/quote_box/quote.rb', line 3 def @author end |
#author_link ⇒ Object
Returns the value of attribute author_link.
3 4 5 |
# File 'lib/quote_box/quote.rb', line 3 def @author_link end |
#author_name ⇒ Object
Returns the value of attribute author_name.
3 4 5 |
# File 'lib/quote_box/quote.rb', line 3 def @author_name end |
#content ⇒ Object
Returns the value of attribute content.
3 4 5 |
# File 'lib/quote_box/quote.rb', line 3 def content @content end |
#likes ⇒ Object
Returns the value of attribute likes.
3 4 5 |
# File 'lib/quote_box/quote.rb', line 3 def likes @likes end |
#scripture_it_belongs_to ⇒ Object
Returns the value of attribute scripture_it_belongs_to.
3 4 5 |
# File 'lib/quote_box/quote.rb', line 3 def scripture_it_belongs_to @scripture_it_belongs_to end |
Instance Method Details
#display ⇒ Object
16 17 18 19 20 |
# File 'lib/quote_box/quote.rb', line 16 def display puts "\n#{self.content}" puts "\n-#{self.}#{self.scripture_it_belongs_to }" puts "\nIt has #{self.likes}" end |