Class: Karenina::Reader

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeReader

Returns a new instance of Reader.



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

def initialize()
  @book = Book.new
end

Instance Attribute Details

#bookObject (readonly)

Returns the value of attribute book.



4
5
6
# File 'lib/karenina/reader.rb', line 4

def book
  @book
end

Instance Method Details

#downObject



14
15
16
# File 'lib/karenina/reader.rb', line 14

def down
  @book.mark.increment
end

#to_strObject



18
19
20
# File 'lib/karenina/reader.rb', line 18

def to_str
  @book.to_str
end

#upObject



10
11
12
# File 'lib/karenina/reader.rb', line 10

def up
  @book.mark.decrement
end