Add nice inspect results for Environment and Machine
This commit is contained in:
parent
64afd578b3
commit
2e25285297
|
@ -104,6 +104,14 @@ module Vagrant
|
||||||
activate_plugins
|
activate_plugins
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# Return a human-friendly string for pretty printed or inspected
|
||||||
|
# instances.
|
||||||
|
#
|
||||||
|
# @return [String]
|
||||||
|
def inspect
|
||||||
|
"#<#{self.class}: #{@cwd}>"
|
||||||
|
end
|
||||||
|
|
||||||
#---------------------------------------------------------------
|
#---------------------------------------------------------------
|
||||||
# Helpers
|
# Helpers
|
||||||
#---------------------------------------------------------------
|
#---------------------------------------------------------------
|
||||||
|
|
|
@ -151,6 +151,14 @@ module Vagrant
|
||||||
@id = value
|
@id = value
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# This returns a clean inspect value so that printing the value via
|
||||||
|
# a pretty print (`p`) results in a readable value.
|
||||||
|
#
|
||||||
|
# @return [String]
|
||||||
|
def inspect
|
||||||
|
"#<#{self.class}: #{@name} (#{@provider.class})>"
|
||||||
|
end
|
||||||
|
|
||||||
# This returns the SSH info for accessing this machine. This SSH info
|
# This returns the SSH info for accessing this machine. This SSH info
|
||||||
# is queried from the underlying provider. This method returns `nil` if
|
# is queried from the underlying provider. This method returns `nil` if
|
||||||
# the machine is not ready for SSH communication.
|
# the machine is not ready for SSH communication.
|
||||||
|
|
Loading…
Reference in New Issue