Class: ArticleFixtureGen::Config::Builder
- Inherits:
-
Object
- Object
- ArticleFixtureGen::Config::Builder
- Defined in:
- lib/article_fixture_gen/config/builder.rb
Overview
Builds hash with correct keys based on input. What’s the value of this, you ask? Two things:
-
It defines ‘*_given` entries which are `true` if their corresponding entries are specified, whether those other entries are truthy or not;
-
It confirms filtering of the input hash, offering a guarantee that any entry accepted is one supported elsehwere in our code.
And yes, this class is awfully procedural. Got ideas for a fix? We’d appreciate your PR!
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.call(options_hash) ⇒ Object
21 22 23 |
# File 'lib/article_fixture_gen/config/builder.rb', line 21 def self.call() new.call end |
Instance Method Details
#call(options) ⇒ Object
25 26 27 28 |
# File 'lib/article_fixture_gen/config/builder.rb', line 25 def call() @options = hashes end |