Class: Legato::Management::WebProperty

Inherits:
Object
  • Object
show all
Extended by:
Finder
Defined in:
lib/legato/management/web_property.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Finder

all, base_uri

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. = attributes.delete('accountId')
  self.attributes = attributes
end

Instance Attribute Details

#account_idObject

Returns the value of attribute account_id.



14
15
16
# File 'lib/legato/management/web_property.rb', line 14

def 
  @account_id
end

#attributesObject

Returns the value of attribute attributes.



14
15
16
# File 'lib/legato/management/web_property.rb', line 14

def attributes
  @attributes
end

#idObject

Returns the value of attribute id.



14
15
16
# File 'lib/legato/management/web_property.rb', line 14

def id
  @id
end

#nameObject

Returns the value of attribute name.



14
15
16
# File 'lib/legato/management/web_property.rb', line 14

def name
  @name
end

#userObject

Returns the value of attribute user.



14
15
16
# File 'lib/legato/management/web_property.rb', line 14

def user
  @user
end

#website_urlObject

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_pathObject



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.()
  all(.user, .path+'/webproperties')
end

Instance Method Details

#pathObject



10
11
12
# File 'lib/legato/management/web_property.rb', line 10

def path
  "/accounts/#{}/webproperties/#{id}"
end