Sha256: 3b00d518ef86fc6aed9f9cd2be8bd61636f0cfbe1e0b0f5a790b4602c202c5cc

Contents?: true

Size: 336 Bytes

Versions: 13

Compression:

Stored size: 336 Bytes

Contents

module Hemlock
  class Flashcard
    def initialize(term, definition)
      @term = term
      @definition = definition
    end

    attr_reader :term, :definition

    alias_method :question, :term
    alias_method :answer, :definition

    def correct?(guess)
      guess.upcase == self.answer.upcase ? true : false
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
hemlock-0.1.8 lib/hemlock/flashcard.rb
hemlock-0.1.7 lib/hemlock/flashcard.rb
hemlock-0.1.6 lib/hemlock/flashcard.rb
hemlock-0.1.5 lib/hemlock/flashcard.rb
hemlock-0.1.4 lib/hemlock/flashcard.rb
hemlock-0.1.3 lib/hemlock/flashcard.rb
hemlock-0.1.2 lib/hemlock/flashcard.rb
hemlock-0.1.1 lib/hemlock/flashcard.rb
hemlock-0.1.0 lib/hemlock/flashcard.rb
hemlock-0.0.9 lib/hemlock/flashcard.rb
hemlock-0.0.8 lib/hemlock/flashcard.rb
hemlock-0.0.7 lib/hemlock/flashcard.rb
hemlock-0.0.6 lib/hemlock/flashcard.rb