Class: Shared::Security
- Inherits:
-
Object
- Object
- Shared::Security
- Defined in:
- lib/vas/shared/security.rb
Overview
The security configuration for a resource
Instance Attribute Summary collapse
-
#group ⇒ String
readonly
The group of the resource.
- #location ⇒ Object readonly
-
#owner ⇒ String
readonly
The owner of the resource.
-
#permissions ⇒ Hash
readonly
The permissions of the resource.
Instance Method Summary collapse
-
#reload ⇒ Object
Reloads the security configuration from server.
-
#to_s ⇒ String
A string representation of this security object.
Instance Attribute Details
#group ⇒ String (readonly)
Returns the group of the resource.
29 30 31 |
# File 'lib/vas/shared/security.rb', line 29 def group @group end |
#location ⇒ Object (readonly)
32 33 34 |
# File 'lib/vas/shared/security.rb', line 32 def location @location end |
#owner ⇒ String (readonly)
Returns the owner of the resource.
26 27 28 |
# File 'lib/vas/shared/security.rb', line 26 def owner @owner end |
#permissions ⇒ Hash (readonly)
Returns The permissions of the resource.
23 24 25 |
# File 'lib/vas/shared/security.rb', line 23 def @permissions end |
Instance Method Details
#reload ⇒ Object
Reloads the security configuration from server
48 49 50 51 52 53 |
# File 'lib/vas/shared/security.rb', line 48 def reload json = @client.get(location) @owner = json["owner"] @group = json["group"] @permissions = json["permissions"] end |
#to_s ⇒ String
Returns a string representation of this security object.
56 57 58 |
# File 'lib/vas/shared/security.rb', line 56 def to_s "#<#{self.class} owner='#@owner' group='#@group' permissions='#@permissions'>" end |