Class: Sanford::NoHostError
Instance Attribute Summary collapse
-
#message ⇒ Object
readonly
Returns the value of attribute message.
Instance Method Summary collapse
-
#initialize(host_name) ⇒ NoHostError
constructor
A new instance of NoHostError.
Constructor Details
#initialize(host_name) ⇒ NoHostError
Returns a new instance of NoHostError.
10 11 12 13 14 15 16 17 |
# File 'lib/sanford/exceptions.rb', line 10 def initialize(host_name) = if Sanford.hosts.empty? "No hosts have been defined. Please define a host before trying to run Sanford." else "A host couldn't be found with the name #{host_name.inspect}. " end super end |
Instance Attribute Details
#message ⇒ Object (readonly)
Returns the value of attribute message.
8 9 10 |
# File 'lib/sanford/exceptions.rb', line 8 def @message end |