Class: Specinfra::HostInventory::Hostname
- Defined in:
- lib/specinfra/host_inventory/hostname.rb
Instance Method Summary collapse
Methods inherited from Base
Constructor Details
This class inherits a constructor from Specinfra::HostInventory::Base
Instance Method Details
#get ⇒ Object
4 5 6 7 8 9 10 11 12 13 |
# File 'lib/specinfra/host_inventory/hostname.rb', line 4 def get cmd = backend.command.get(:get_inventory_hostname) result = backend.run_command(cmd) if result.exit_status == 0 result.stdout.strip else nil end end |