Class: Weeblycloud::Group

Inherits:
CloudResource show all
Includes:
Deleteable, Saveable
Defined in:
lib/weeblycloud/group.rb

Overview

Represents a Group resource. cloud-developer.weebly.com/group.html

Instance Attribute Summary

Attributes inherited from CloudResource

#properties

Instance Method Summary collapse

Methods included from Deleteable

#delete

Methods included from Saveable

#[]=, #save, #set_property

Methods inherited from CloudResource

#[], #get, #get_property, #to_s

Constructor Details

#initialize(user_id, site_id, group_id, data = nil) ⇒ Group

Returns a new instance of Group.



13
14
15
16
17
18
19
20
21
# File 'lib/weeblycloud/group.rb', line 13

def initialize(user_id, site_id, group_id, data = nil)
  @user_id = user_id.to_i
  @site_id = site_id.to_i
  @group_id = group_id.to_i

  @endpoint = "user/#{@user_id}/site/#{@site_id}/group/#{@group_id}"

  super(data)
end

Instance Method Details

#idObject

Returns the group_id



24
25
26
# File 'lib/weeblycloud/group.rb', line 24

def id
  @group_id
end