Class: Amnesie::Host
- Inherits:
-
Object
- Object
- Amnesie::Host
- Defined in:
- lib/amnesie/host.rb
Instance Method Summary collapse
-
#initialize ⇒ Host
constructor
A new instance of Host.
- #to_s ⇒ Object
Constructor Details
#initialize ⇒ Host
5 6 7 8 9 10 |
# File 'lib/amnesie/host.rb', line 5 def initialize @nb = rand(8..25) @hostname = SecureRandom.alphanumeric(@ng) Nito::Hostname.new(@hostname) puts to_s end |
Instance Method Details
#to_s ⇒ Object
12 13 14 |
# File 'lib/amnesie/host.rb', line 12 def to_s "Your hostname will become #{@hostname}" end |