Class: Dip::CLI::DNS
- Inherits:
-
Thor
- Object
- Thor
- Dip::CLI::DNS
- Defined in:
- lib/dip/cli/dns.rb
Overview
See more github.com/aacebedo/dnsdock
Instance Method Summary collapse
- #down ⇒ Object
- #ip ⇒ Object
- #restart(*args) ⇒ Object
-
#up ⇒ Object
rubocop:disable Metrics/AbcSize, Metrics/MethodLength.
Instance Method Details
#down ⇒ Object
47 48 49 50 51 52 53 54 55 |
# File 'lib/dip/cli/dns.rb', line 47 def down if [:help] invoke :help, ['down'] else Dip::Commands::DNS::Down.new( name: .fetch(:name) ).execute end end |
#ip ⇒ Object
77 78 79 80 81 82 83 84 85 86 |
# File 'lib/dip/cli/dns.rb', line 77 def ip if [:help] invoke :help, ['status'] else Dip::Commands::DNS::IP.new( name: .fetch(:name), net: .fetch(:net) ).execute end end |
#restart(*args) ⇒ Object
60 61 62 63 64 65 66 67 68 |
# File 'lib/dip/cli/dns.rb', line 60 def restart(*args) if [:help] invoke :help, ['restart'] else Dip::CLI::DNS.start(["down"] + args) sleep 1 Dip::CLI::DNS.start(["up"] + args) end end |
#up ⇒ Object
rubocop:disable Metrics/AbcSize, Metrics/MethodLength
26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/dip/cli/dns.rb', line 26 def up if [:help] invoke :help, ['up'] else Dip::Commands::DNS::Up.new( name: .fetch(:name), socket: .fetch(:socket), net: .fetch(:net), publish: .fetch(:publish), image: .fetch(:image), domain: .fetch(:domain) ).execute end end |