Class: Static::CLI
- Inherits:
-
VMC::CLI
- Object
- VMC::CLI
- Static::CLI
- Defined in:
- lib/static/cli.rb
Instance Method Summary collapse
- #default_action ⇒ Object
-
#initialize(command = nil, input = nil) ⇒ CLI
constructor
A new instance of CLI.
Constructor Details
#initialize(command = nil, input = nil) ⇒ CLI
Returns a new instance of CLI.
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/static/cli.rb', line 7 def initialize(command = nil, input = nil) config = File.(VMC::CONFIG_DIR) if not File.exist? config target = sane_target_url("http://api.static.me") ensure_config_dir File.open(File.(VMC::TARGET_FILE), "w") do |f| f.write(sane_target_url(target)) end info = target_info(client_target) save_target_info(info) end super @@commands.delete(:register) end |
Instance Method Details
#default_action ⇒ Object
24 25 26 27 28 29 30 |
# File 'lib/static/cli.rb', line 24 def default_action if input[:version] line "static #{Static::Cmd::VERSION}" else super end end |