Class: MotdForge::CLI
- Inherits:
-
Object
- Object
- MotdForge::CLI
- Defined in:
- lib/motd_forge/cli.rb
Overview
Parses CLI flags, merges in an optional YAML config, and prints the banner.
Constant Summary collapse
- DEFAULT_CONFIG_PATH =
File.("~/.motd-forge.yml")
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(argv) ⇒ CLI
constructor
A new instance of CLI.
- #run ⇒ Object
Constructor Details
#initialize(argv) ⇒ CLI
Returns a new instance of CLI.
16 17 18 19 20 21 22 23 |
# File 'lib/motd_forge/cli.rb', line 16 def initialize(argv) @argv = argv @title = Socket.gethostname @title_from_cli = false @quote_file = nil @show_quote = true @config_path = DEFAULT_CONFIG_PATH end |
Class Method Details
.run(argv = ARGV) ⇒ Object
12 13 14 |
# File 'lib/motd_forge/cli.rb', line 12 def self.run(argv = ARGV) new(argv).run end |