Class: KindleClippings::Clipping
- Inherits:
-
Object
- Object
- KindleClippings::Clipping
- Defined in:
- lib/clipping.rb
Instance Attribute Summary collapse
-
#added_on ⇒ Object
Returns the value of attribute added_on.
-
#author ⇒ Object
Returns the value of attribute author.
-
#book_title ⇒ Object
Returns the value of attribute book_title.
-
#content ⇒ Object
Returns the value of attribute content.
-
#location ⇒ Object
Returns the value of attribute location.
-
#type ⇒ Object
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(title, author, type, location, added_on, content) ⇒ Clipping
constructor
A new instance of Clipping.
- #to_s ⇒ Object
Constructor Details
#initialize(title, author, type, location, added_on, content) ⇒ Clipping
Returns a new instance of Clipping.
8 9 |
# File 'lib/clipping.rb', line 8 def initialize() end |
Instance Attribute Details
#added_on ⇒ Object
Returns the value of attribute added_on.
6 7 8 |
# File 'lib/clipping.rb', line 6 def added_on @added_on end |
#author ⇒ Object
Returns the value of attribute author.
6 7 8 |
# File 'lib/clipping.rb', line 6 def @author end |
#book_title ⇒ Object
Returns the value of attribute book_title.
6 7 8 |
# File 'lib/clipping.rb', line 6 def book_title @book_title end |
#content ⇒ Object
Returns the value of attribute content.
6 7 8 |
# File 'lib/clipping.rb', line 6 def content @content end |
#location ⇒ Object
Returns the value of attribute location.
6 7 8 |
# File 'lib/clipping.rb', line 6 def location @location end |
#type ⇒ Object
Returns the value of attribute type.
6 7 8 |
# File 'lib/clipping.rb', line 6 def type @type end |
Instance Method Details
#to_s ⇒ Object
20 21 22 23 24 |
# File 'lib/clipping.rb', line 20 def to_s "#{@book_title} (#{})\n" + "- #{@type} Loc. #{@location} | Added on #{@added_on.strftime('%A, %B %d, %Y, %I:%M %p')}\n\n" + "#{@content}" end |