Class: Karenina::Reader
- Inherits:
-
Object
- Object
- Karenina::Reader
- Defined in:
- lib/karenina/reader.rb
Instance Attribute Summary collapse
-
#book ⇒ Object
readonly
Returns the value of attribute book.
Instance Method Summary collapse
- #down ⇒ Object
-
#initialize ⇒ Reader
constructor
A new instance of Reader.
- #to_str ⇒ Object
- #up ⇒ Object
Constructor Details
Instance Attribute Details
#book ⇒ Object (readonly)
Returns the value of attribute book.
4 5 6 |
# File 'lib/karenina/reader.rb', line 4 def book @book end |
Instance Method Details
#down ⇒ Object
14 15 16 |
# File 'lib/karenina/reader.rb', line 14 def down @book.mark.increment end |
#to_str ⇒ Object
18 19 20 |
# File 'lib/karenina/reader.rb', line 18 def to_str @book.to_str end |
#up ⇒ Object
10 11 12 |
# File 'lib/karenina/reader.rb', line 10 def up @book.mark.decrement end |