Class: Legato::Management::WebProperty
- Inherits:
-
Object
- Object
- Legato::Management::WebProperty
- Extended by:
- Finder
- Defined in:
- lib/legato/management/web_property.rb
Instance Attribute Summary collapse
-
#account_id ⇒ Object
Returns the value of attribute account_id.
-
#attributes ⇒ Object
Returns the value of attribute attributes.
-
#id ⇒ Object
Returns the value of attribute id.
-
#name ⇒ Object
Returns the value of attribute name.
-
#user ⇒ Object
Returns the value of attribute user.
-
#website_url ⇒ Object
Returns the value of attribute website_url.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(attributes, user) ⇒ WebProperty
constructor
A new instance of WebProperty.
- #path ⇒ Object
Methods included from Finder
Constructor Details
#initialize(attributes, user) ⇒ WebProperty
Returns a new instance of WebProperty.
16 17 18 19 20 21 22 23 |
# File 'lib/legato/management/web_property.rb', line 16 def initialize(attributes, user) self.user = user self.id = attributes['id'] self.name = attributes.delete('name') self.website_url = attributes.delete('websiteUrl') self.account_id = attributes.delete('accountId') self.attributes = attributes end |
Instance Attribute Details
#account_id ⇒ Object
Returns the value of attribute account_id.
14 15 16 |
# File 'lib/legato/management/web_property.rb', line 14 def account_id @account_id end |
#attributes ⇒ Object
Returns the value of attribute attributes.
14 15 16 |
# File 'lib/legato/management/web_property.rb', line 14 def attributes @attributes end |
#id ⇒ Object
Returns the value of attribute id.
14 15 16 |
# File 'lib/legato/management/web_property.rb', line 14 def id @id end |
#name ⇒ Object
Returns the value of attribute name.
14 15 16 |
# File 'lib/legato/management/web_property.rb', line 14 def name @name end |
#user ⇒ Object
Returns the value of attribute user.
14 15 16 |
# File 'lib/legato/management/web_property.rb', line 14 def user @user end |
#website_url ⇒ Object
Returns the value of attribute website_url.
14 15 16 |
# File 'lib/legato/management/web_property.rb', line 14 def website_url @website_url end |
Class Method Details
.default_path ⇒ Object
6 7 8 |
# File 'lib/legato/management/web_property.rb', line 6 def self.default_path "/accounts/~all/webproperties" end |
.for_account(account) ⇒ Object
25 26 27 |
# File 'lib/legato/management/web_property.rb', line 25 def self.for_account(account) all(account.user, account.path+'/webproperties') end |
Instance Method Details
#path ⇒ Object
10 11 12 |
# File 'lib/legato/management/web_property.rb', line 10 def path "/accounts/#{account_id}/webproperties/#{id}" end |