Class: Slnky::CLI::Main
- Inherits:
-
Thor
- Object
- Thor
- Slnky::CLI::Main
- Defined in:
- lib/slnky/cli.rb
Instance Method Summary collapse
Instance Method Details
#__print_version ⇒ Object
17 18 19 |
# File 'lib/slnky/cli.rb', line 17 def __print_version puts "Slnky version: #{Slnky::VERSION}" end |
#init ⇒ Object
22 23 24 25 26 27 28 29 30 31 |
# File 'lib/slnky/cli.rb', line 22 def init dir = "#{ENV['HOME']}/.slnky" FileUtils.mkdir_p(dir) defaults = { slnky: { url: 'http://localhost:3000' } }.deep_stringify_keys File.open("#{dir}/config.yaml", "w+") {|f| f.write(defaults.to_yaml)} end |