class Engine::Card
Public Instance Methods
inspect()
click to toggle source
# File lib/engine/card.rb, line 19 def inspect "<Card #{data.inspect} #{card_state.inspect}>" end
lapsed?()
click to toggle source
# File lib/engine/card.rb, line 15 def lapsed? streak == 0 end
new?()
click to toggle source
# File lib/engine/card.rb, line 6 def new? card_state.empty? end
rate(rating)
click to toggle source
# File lib/engine/card.rb, line 10 def rate(rating) next_card_state = card_state << Rating.new(Time.now, rating) self.class.new(data, next_card_state) end