Class: DNSimple::Commands::AddService
- Inherits:
-
DNSimple::Command
- Object
- DNSimple::Command
- DNSimple::Commands::AddService
- Defined in:
- lib/dnsimple/commands/add_service.rb
Instance Method Summary collapse
Methods inherited from DNSimple::Command
Constructor Details
This class inherits a constructor from DNSimple::Command
Instance Method Details
#execute(args, options = {}) ⇒ Object
6 7 8 9 10 11 12 13 |
# File 'lib/dnsimple/commands/add_service.rb', line 6 def execute(args, ={}) domain_name = args.shift domain = Domain.find(domain_name) short_name = args.shift service = Service.find(short_name) domain.add_service(short_name) say "Added #{service.name} to #{domain_name}" end |