lib/capitate/plugins/utils.rb in capitate-0.3.2 vs lib/capitate/plugins/utils.rb in capitate-0.3.3
- old
+ new
@@ -114,13 +114,14 @@
#
# ==== Example
# utils.hostname => "localhost.localdomain"
#
def hostname
+ hostname = nil
run "hostname" do |channel, stream, data|
- return data.chomp
+ hostname = data.chomp
end
- nil
+ hostname
end
# Append data to a file.
# Optionally check that it exists before adding.
#
\ No newline at end of file