Class: E621ExportDownloader::Client::Options::Builder
- Inherits:
-
Object
- Object
- E621ExportDownloader::Client::Options::Builder
- Extended by:
- T::Sig
- Defined in:
- lib/e621_export_downloader/client/options/builder.rb,
lib/e621_export_downloader/client/options/builder/parsers.rb
Defined Under Namespace
Classes: Parsers
Instance Attribute Summary collapse
-
#cache ⇒ Object
Returns the value of attribute cache.
- #parsers(&block) ⇒ Object
-
#rewind_on_not_found ⇒ Object
Returns the value of attribute rewind_on_not_found.
Instance Method Summary collapse
-
#initialize(defaults = Options.new) ⇒ Builder
constructor
A new instance of Builder.
Constructor Details
#initialize(defaults = Options.new) ⇒ Builder
Returns a new instance of Builder.
20 21 22 23 24 |
# File 'lib/e621_export_downloader/client/options/builder.rb', line 20 def initialize(defaults = Options.new) @cache = T.let(defaults.cache, T::Boolean) @rewind_on_not_found = T.let(defaults.rewind_on_not_found, T.any(T::Boolean, Integer)) @parsers = T.let(defaults.parsers, Options::Parsers) end |
Instance Attribute Details
#cache ⇒ Object
Returns the value of attribute cache.
11 12 13 |
# File 'lib/e621_export_downloader/client/options/builder.rb', line 11 def cache @cache end |
#parsers(&block) ⇒ Object
27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/e621_export_downloader/client/options/builder.rb', line 27 def parsers(&block) return @parsers if block.nil? parsers = Builder::Parsers.new(@parsers) block.call(parsers) @parsers = Options::Parsers.new( pools: parsers.pools, posts: parsers.posts, tag_aliases: parsers.tag_aliases, tag_implications: parsers.tag_implications, tags: parsers., wiki_pages: parsers.wiki_pages, ) end |
#rewind_on_not_found ⇒ Object
Returns the value of attribute rewind_on_not_found.
14 15 16 |
# File 'lib/e621_export_downloader/client/options/builder.rb', line 14 def rewind_on_not_found @rewind_on_not_found end |