Class: Ank3::Card
- Inherits:
-
Object
- Object
- Ank3::Card
- Defined in:
- lib/ank3/card.rb
Instance Attribute Summary collapse
-
#data ⇒ Object
readonly
Returns the value of attribute data.
Instance Method Summary collapse
- #back ⇒ Object
- #convert ⇒ Object
- #front ⇒ Object
-
#initialize(data) ⇒ Card
constructor
A new instance of Card.
- #tags ⇒ Object
Constructor Details
#initialize(data) ⇒ Card
Returns a new instance of Card.
5 6 7 |
# File 'lib/ank3/card.rb', line 5 def initialize(data) @data = data end |
Instance Attribute Details
#data ⇒ Object (readonly)
Returns the value of attribute data.
3 4 5 |
# File 'lib/ank3/card.rb', line 3 def data @data end |
Instance Method Details
#back ⇒ Object
13 14 15 |
# File 'lib/ank3/card.rb', line 13 def back data["back"] end |
#convert ⇒ Object
21 22 23 |
# File 'lib/ank3/card.rb', line 21 def convert "#{front}; #{back}\n" end |
#front ⇒ Object
9 10 11 |
# File 'lib/ank3/card.rb', line 9 def front data["front"] end |
#tags ⇒ Object
17 18 19 |
# File 'lib/ank3/card.rb', line 17 def data["tags"] end |