Class: Anki::CardFace
- Inherits:
-
Object
- Object
- Anki::CardFace
- Defined in:
- lib/ankirb/anki/card.rb
Instance Attribute Summary collapse
-
#content ⇒ Object
Returns the value of attribute content.
-
#media ⇒ Object
Returns the value of attribute media.
Instance Method Summary collapse
- #<<(thing) ⇒ Object
-
#initialize(content) ⇒ CardFace
constructor
A new instance of CardFace.
- #to_s ⇒ Object
Constructor Details
#initialize(content) ⇒ CardFace
Returns a new instance of CardFace.
71 72 73 74 |
# File 'lib/ankirb/anki/card.rb', line 71 def initialize content @content = content @media = [] end |
Instance Attribute Details
#content ⇒ Object
Returns the value of attribute content.
69 70 71 |
# File 'lib/ankirb/anki/card.rb', line 69 def content @content end |
#media ⇒ Object
Returns the value of attribute media.
69 70 71 |
# File 'lib/ankirb/anki/card.rb', line 69 def media @media end |
Instance Method Details
#<<(thing) ⇒ Object
76 77 78 79 80 81 82 83 84 |
# File 'lib/ankirb/anki/card.rb', line 76 def << thing return unless thing and not thing.empty? if File.exists?(thing) @media << thing else @content << thing end end |
#to_s ⇒ Object
86 87 88 |
# File 'lib/ankirb/anki/card.rb', line 86 def to_s @content end |