Revision f2248acc
Added by Ohad Levy over 12 years ago
- ID f2248accb505ab1736b67c656971656a72c3d93e
lib/proxy/dhcp/record/reservation.rb | ||
---|---|---|
module Proxy::DHCP
|
||
# represent a DHCP Record
|
||
class Reservation < Record
|
||
attr_reader :name
|
||
|
||
def initialize options = {}
|
||
@name = options[:name] || options[:hostname] || raise("Must define a name: #{@options.inspect}")
|
||
super options
|
||
end
|
||
|
||
def to_s
|
||
"#{name} (#{ip} / #{mac})"
|
||
end
|
||
|
||
def method_missing arg
|
||
@options[arg]
|
Also available in: Unified diff
clean up code passing, and removed duplicate code between dhcp server implementations