Class: FlashCard
- Inherits:
-
Object
- Object
- FlashCard
- Defined in:
- lib/model.rb
Overview
MODEL=========================
Instance Attribute Summary collapse
-
#answer ⇒ Object
readonly
Models our flashcard objects.
-
#answered ⇒ Object
Returns the value of attribute answered.
-
#category ⇒ Object
readonly
Models our flashcard objects.
-
#question ⇒ Object
readonly
Models our flashcard objects.
Instance Method Summary collapse
-
#initialize(args = {}) ⇒ FlashCard
constructor
A new instance of FlashCard.
Constructor Details
#initialize(args = {}) ⇒ FlashCard
Returns a new instance of FlashCard.
25 26 27 28 29 30 |
# File 'lib/model.rb', line 25 def initialize(args = {}) # generates flashcard objects based on hash keys (csv fields) @category = args[:category] @question = args[:question] @answer = args[:answer] end |
Instance Attribute Details
#answer ⇒ Object (readonly)
Models our flashcard objects
22 23 24 |
# File 'lib/model.rb', line 22 def answer @answer end |
#answered ⇒ Object
Returns the value of attribute answered.
23 24 25 |
# File 'lib/model.rb', line 23 def answered @answered end |
#category ⇒ Object (readonly)
Models our flashcard objects
22 23 24 |
# File 'lib/model.rb', line 22 def category @category end |
#question ⇒ Object (readonly)
Models our flashcard objects
22 23 24 |
# File 'lib/model.rb', line 22 def question @question end |