Class: Weeblycloud::Member

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

Overview

Represents a Member resource. cloud-developer.weebly.com/member.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, member_id, data = nil) ⇒ Member

Returns a new instance of Member.



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

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

  @endpoint = "user/#{@user_id}/site/#{@site_id}/member/#{@member_id}"

  super(data)
end

Instance Method Details

#idObject

Returns the member_id



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

def id
  @member_id
end