Class: ArticleFixtureGen::Exe::Trollop::OptionsAndMods

Inherits:
Object
  • Object
show all
Defined in:
lib/article_fixture_gen/exe/option_parser/trollop/options_and_mods.rb

Overview

Adds modified attributes to lists produced by ‘OptionsWithDefaults`.

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.call(all_specs) ⇒ Object



10
11
12
# File 'lib/article_fixture_gen/exe/option_parser/trollop/options_and_mods.rb', line 10

def self.call(all_specs)
  new(all_specs).call
end

Instance Method Details

#callObject



14
15
16
17
18
# File 'lib/article_fixture_gen/exe/option_parser/trollop/options_and_mods.rb', line 14

def call
  container = OptionsWithDefaults.call(all_specs).to_hash
  container[:modified] = Internals.modified_from(container)
  Result.new container
end