module ArticleFixtureGen::Config::Builder::Internals
Stateless methods.
Public Class Methods
_defaults_for(keys)
click to toggle source
# File lib/article_fixture_gen/config/builder.rb, line 83 def self._defaults_for(keys) Constants::DEFAULTS.select { |key| keys.include? key } end
_other_hash_keys()
click to toggle source
# File lib/article_fixture_gen/config/builder.rb, line 87 def self._other_hash_keys [:article_count, :para_count_max, :para_count_min, :sent_count_max, :sent_count_min, :pmtp_count, :pmtp_text, :smtp_count, :smtp_text] end
_other_keys_not_in(hash)
click to toggle source
# File lib/article_fixture_gen/config/builder.rb, line 92 def self._other_keys_not_in(hash) _other_hash_keys.reject { |key| hash.key? key } end
defaults_not_in(hash)
click to toggle source
# File lib/article_fixture_gen/config/builder.rb, line 69 def self.defaults_not_in(hash) keys = _other_keys_not_in(hash) _defaults_for(keys) end
other_specified_values(options)
click to toggle source
# File lib/article_fixture_gen/config/builder.rb, line 74 def self.other_specified_values(options) keys = _other_hash_keys options.select { |key, _| keys.include? key } end
string_given?(value)
click to toggle source
# File lib/article_fixture_gen/config/builder.rb, line 79 def self.string_given?(value) !value.to_s.empty? end