Class: Amnesie::Options

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(argv) ⇒ Options

Returns a new instance of Options.



7
8
9
10
11
12
13
# File 'lib/amnesie/options.rb', line 7

def initialize(argv)
  @default = Config.new.load
  @mac = @default[:mac]
  @hostname = @default[:hostname]
  @card_match = @default[:card_match]
  parse(argv)
end

Instance Attribute Details

#card_matchObject (readonly)

Returns the value of attribute card_match.



5
6
7
# File 'lib/amnesie/options.rb', line 5

def card_match
  @card_match
end

#hostnameObject (readonly)

Returns the value of attribute hostname.



5
6
7
# File 'lib/amnesie/options.rb', line 5

def hostname
  @hostname
end

#initObject (readonly)

Returns the value of attribute init.



5
6
7
# File 'lib/amnesie/options.rb', line 5

def init
  @init
end

#macObject (readonly)

Returns the value of attribute mac.



5
6
7
# File 'lib/amnesie/options.rb', line 5

def mac
  @mac
end

#net_devObject (readonly)

Returns the value of attribute net_dev.



5
6
7
# File 'lib/amnesie/options.rb', line 5

def net_dev
  @net_dev
end

#persistObject (readonly)

Returns the value of attribute persist.



5
6
7
# File 'lib/amnesie/options.rb', line 5

def persist
  @persist
end