Class: Amnesie::Host

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

Instance Method Summary collapse

Constructor Details

#initializeHost

Returns a new instance of 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_sObject



12
13
14
# File 'lib/amnesie/host.rb', line 12

def to_s
  "Your hostname will become #{@hostname}"
end