Class: SimpleFeatureFlags::Cli::Command::Generate
- Inherits:
-
Object
- Object
- SimpleFeatureFlags::Cli::Command::Generate
- Extended by:
- T::Sig
- Defined in:
- lib/simple_feature_flags/cli/command/generate.rb
Overview
Implements the ‘generate` CLI command
Constant Summary collapse
- CONFIG_FILE =
: String
'simple_feature_flags.yml'
Instance Attribute Summary collapse
-
#options ⇒ Object
readonly
: Options.
Instance Method Summary collapse
-
#initialize(options) ⇒ Generate
constructor
: (Options options) -> void.
-
#run ⇒ Object
: -> void.
Constructor Details
#initialize(options) ⇒ Generate
: (Options options) -> void
19 20 21 |
# File 'lib/simple_feature_flags/cli/command/generate.rb', line 19 def initialize() = end |
Instance Attribute Details
#options ⇒ Object (readonly)
: Options
16 17 18 |
# File 'lib/simple_feature_flags/cli/command/generate.rb', line 16 def end |
Instance Method Details
#run ⇒ Object
: -> void
24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/simple_feature_flags/cli/command/generate.rb', line 24 def run if .rails generate_for_rails return end ::FileUtils.cp example_config_file, destination_file puts 'Generated:' puts '----------' puts "* #{destination_file}" end |