Class: Lease
Instance Attribute Summary collapse
-
#end ⇒ Object
Returns the value of attribute end.
-
#ip ⇒ Object
Returns the value of attribute ip.
-
#mac ⇒ Object
Returns the value of attribute mac.
-
#name ⇒ Object
Returns the value of attribute name.
-
#start ⇒ Object
Returns the value of attribute start.
Instance Method Summary collapse
- #expired? ⇒ Boolean
-
#initialize(name) ⇒ Lease
constructor
A new instance of Lease.
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
#end ⇒ Object
Returns the value of attribute end.
4 5 6 |
# File 'lib/fission.old/leasesfile.rb', line 4 def end @end end |
#ip ⇒ Object
Returns the value of attribute ip.
4 5 6 |
# File 'lib/fission.old/leasesfile.rb', line 4 def ip @ip end |
#mac ⇒ Object
Returns the value of attribute mac.
4 5 6 |
# File 'lib/fission.old/leasesfile.rb', line 4 def mac @mac end |
#name ⇒ Object
Returns the value of attribute name.
4 5 6 |
# File 'lib/fission.old/leasesfile.rb', line 4 def name @name end |
#start ⇒ Object
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
11 12 13 |
# File 'lib/fission.old/leasesfile.rb', line 11 def expired? @end < DateTime.now end |