Class: DockerCloud::Type
- Inherits:
-
Object
- Object
- DockerCloud::Type
- Defined in:
- lib/docker_cloud/type.rb
Direct Known Subclasses
AvailabilityZone, Container, ExternalRepository, Node, NodeCluster, NodeType, Provider, Region, Registry, Service, Stack
Instance Attribute Summary collapse
-
#info ⇒ Object
readonly
Returns the value of attribute info.
Instance Method Summary collapse
-
#initialize(response, client) ⇒ Type
constructor
A new instance of Type.
- #reload ⇒ Object
- #resource_uri ⇒ Object
- #uuid ⇒ Object
Constructor Details
#initialize(response, client) ⇒ Type
Returns a new instance of Type.
5 6 7 8 9 10 |
# File 'lib/docker_cloud/type.rb', line 5 def initialize(response, client) @info = response @client = client @uuid = info[:uuid] @resource_uri = info[:uuid] end |
Instance Attribute Details
#info ⇒ Object (readonly)
Returns the value of attribute info.
3 4 5 |
# File 'lib/docker_cloud/type.rb', line 3 def info @info end |
Instance Method Details
#reload ⇒ Object
12 13 14 15 |
# File 'lib/docker_cloud/type.rb', line 12 def reload refreshed = api.get_from_uri(resource_uri) @info = refreshed.info end |
#resource_uri ⇒ Object
21 22 23 |
# File 'lib/docker_cloud/type.rb', line 21 def resource_uri info[:resource_uri] end |
#uuid ⇒ Object
17 18 19 |
# File 'lib/docker_cloud/type.rb', line 17 def uuid info[:uuid] end |