Class: KindleClippings::Clipping

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

Instance Attribute Summary collapse

Instance Method Summary collapse

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_onObject

Returns the value of attribute added_on.



6
7
8
# File 'lib/clipping.rb', line 6

def added_on
  @added_on
end

#authorObject

Returns the value of attribute author.



6
7
8
# File 'lib/clipping.rb', line 6

def author
  @author
end

#book_titleObject

Returns the value of attribute book_title.



6
7
8
# File 'lib/clipping.rb', line 6

def book_title
  @book_title
end

#contentObject

Returns the value of attribute content.



6
7
8
# File 'lib/clipping.rb', line 6

def content
  @content
end

#locationObject

Returns the value of attribute location.



6
7
8
# File 'lib/clipping.rb', line 6

def location
  @location
end

#typeObject

Returns the value of attribute type.



6
7
8
# File 'lib/clipping.rb', line 6

def type
  @type
end

Instance Method Details

#to_sObject



20
21
22
23
24
# File 'lib/clipping.rb', line 20

def to_s
  "#{@book_title} (#{author})\n" +
  "- #{@type} Loc. #{@location} | Added on #{@added_on.strftime('%A, %B %d, %Y, %I:%M %p')}\n\n" +
  "#{@content}"
end