Class: Infrataster::Resources::ServerResource
- Inherits:
-
Object
- Object
- Infrataster::Resources::ServerResource
- Defined in:
- lib/infrataster/resources/server_resource.rb
Constant Summary collapse
- Error =
Class.new(StandardError)
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(name) ⇒ ServerResource
constructor
A new instance of ServerResource.
- #server ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(name) ⇒ ServerResource
Returns a new instance of ServerResource.
8 9 10 |
# File 'lib/infrataster/resources/server_resource.rb', line 8 def initialize(name) @name = name end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
6 7 8 |
# File 'lib/infrataster/resources/server_resource.rb', line 6 def name @name end |
Instance Method Details
#server ⇒ Object
18 19 20 |
# File 'lib/infrataster/resources/server_resource.rb', line 18 def server Server.find_by_name(@name) end |