Class: Lease

Inherits:
Object show all
Defined in:
lib/fission.old/leasesfile.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name) ⇒ Lease

Returns a new instance of Lease


6
7
8
9
# File 'lib/fission.old/leasesfile.rb', line 6

def initialize(name)
  @name=name
  @ip=name
end

Instance Attribute Details

#endObject

Returns the value of attribute end


4
5
6
# File 'lib/fission.old/leasesfile.rb', line 4

def end
  @end
end

#ipObject

Returns the value of attribute ip


4
5
6
# File 'lib/fission.old/leasesfile.rb', line 4

def ip
  @ip
end

#macObject

Returns the value of attribute mac


4
5
6
# File 'lib/fission.old/leasesfile.rb', line 4

def mac
  @mac
end

#nameObject

Returns the value of attribute name


4
5
6
# File 'lib/fission.old/leasesfile.rb', line 4

def name
  @name
end

#startObject

Returns the value of attribute start


4
5
6
# File 'lib/fission.old/leasesfile.rb', line 4

def start
  @start
end

Instance Method Details

#expired?Boolean

Returns:

  • (Boolean)

11
12
13
# File 'lib/fission.old/leasesfile.rb', line 11

def expired?
  @end < DateTime.now
end