Class: NFAgent::Info

Inherits:
Object show all
Defined in:
lib/nfagent/info.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#last_proxy_connectionObject

Returns the value of attribute last_proxy_connection.



3
4
5
# File 'lib/nfagent/info.rb', line 3

def last_proxy_connection
  @last_proxy_connection
end

Instance Method Details

#host_stringObject



13
14
15
# File 'lib/nfagent/info.rb', line 13

def host_string
  RBConfig::CONFIG['host']
end

#hostnameObject



5
6
7
# File 'lib/nfagent/info.rb', line 5

def hostname
  Socket.gethostname
end

#to_hashObject



17
18
19
20
21
22
23
24
# File 'lib/nfagent/info.rb', line 17

def to_hash
  {
    :hostname => hostname,
    :version => version,
    :host_string => host_string,
    :last_proxy_connection => last_proxy_connection
  }
end

#versionObject



9
10
11
# File 'lib/nfagent/info.rb', line 9

def version
  NFAgent::VERSION
end