Class: AnkiRecord::DeckOptionsGroup
- Inherits:
-
Object
- Object
- AnkiRecord::DeckOptionsGroup
- Defined in:
- lib/anki_record/deck_options_group/deck_options_group.rb
Overview
DeckOptionsGroup represents a set of options that can be applied to an Anki deck. The interface to this has not been explored much so using the gem with these directly may involve breaking encapsulation.
Instance Attribute Summary
Attributes included from DeckOptionsGroupAttributes
#anki21_database, #id, #last_modified_timestamp, #name
Instance Method Summary collapse
-
#initialize(anki21_database:, name: nil, args: nil) ⇒ DeckOptionsGroup
constructor
Instantiates a new deck options group belonging to
anki21_database
with namename
.
Methods included from Helpers::TimeHelper
#milliseconds_since_epoch, #seconds_since_epoch
Constructor Details
#initialize(anki21_database:, name: nil, args: nil) ⇒ DeckOptionsGroup
Instantiates a new deck options group belonging to anki21_database
with name name
.
19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/anki_record/deck_options_group/deck_options_group.rb', line 19 def initialize(anki21_database:, name: nil, args: nil) raise ArgumentError unless (name && args.nil?) || (args && args["name"]) @anki21_database = anki21_database if args (args:) else (name:) end @anki21_database. self end |