Class: GcloudHosts::Options

Inherits:
Object
  • Object
show all
Defined in:
lib/gcloud_hosts/options.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(args) ⇒ Options

Returns a new instance of Options.



8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# File 'lib/gcloud_hosts/options.rb', line 8

def initialize(args)
  @options = {
    gcloud: %x{ which gcloud 2>/dev/null }.to_s.strip,
    project: nil,
    network: nil,
    domain: nil,
    public: nil,
    exclude_public: false,
    file: '/etc/hosts',
    backup: nil,
    dry_run: false,
    delete: false,
    clear: false
  }
  parser.parse!(args)
end

Instance Attribute Details

#optionsObject (readonly)

Returns the value of attribute options.



6
7
8
# File 'lib/gcloud_hosts/options.rb', line 6

def options
  @options
end