Class: Quote

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

Constant Summary collapse

@@curr_pg =
1

Instance Attribute Summary collapse

Instance Method Summary collapse

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,author_name,author=nil)
	@content=cont
	@likes=likes
	@author_name=author_name
	@scripture_it_belongs_to=book
	@author=author

end

Instance Attribute Details

#authorObject

Returns the value of attribute author.



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

def author
  @author
end

Returns the value of attribute author_link.



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

def author_link
  @author_link
end

#author_nameObject

Returns the value of attribute author_name.



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

def author_name
  @author_name
end

#contentObject

Returns the value of attribute content.



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

def content
  @content
end

#likesObject

Returns the value of attribute likes.



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

def likes
  @likes
end

#scripture_it_belongs_toObject

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

#displayObject



16
17
18
19
20
# File 'lib/quote_box/quote.rb', line 16

def display
	puts "\n#{self.content}"
	puts "\n-#{self.author_name}#{self.scripture_it_belongs_to }"
	puts "\nIt has #{self.likes}"
end