class Clubhouse::Member
Public Class Methods
api_url()
click to toggle source
# File lib/clubhouse2/member.rb, line 17 def self.api_url 'members' end
new(client:, object:)
click to toggle source
Calls superclass method
Clubhouse::ClubhouseResource::new
# File lib/clubhouse2/member.rb, line 7 def initialize(client:, object:) super @profile = Profile.new(client: client, object: @profile) # Create accessors for profile properties Profile.properties.each do |property| self.class.send(:define_method, (property.to_sym)) { @profile.send(property) } end end
properties()
click to toggle source
# File lib/clubhouse2/member.rb, line 3 def self.properties [ :created_at, :disabled, :id, :profile, :role, :updated_at ] end
Public Instance Methods
stories_following()
click to toggle source
# File lib/clubhouse2/member.rb, line 25 def stories_following @client.projects.collect(&:stories).reduce(:+).select { |s| s.follower_ids.include? @id } end
stories_requested()
click to toggle source
# File lib/clubhouse2/member.rb, line 21 def stories_requested @client.projects.collect(&:stories).reduce(:+).select { |s| s.requested_by_id == @id } end