Class: Layer::Resources::User

Inherits:
Layer::Resource show all
Defined in:
lib/layer/resources/user.rb

Instance Attribute Summary

Attributes inherited from Layer::Resource

#attributes, #client

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Layer::Resource

class_name, create, #destroy, #initialize, #inspect, list, #method_missing, pluralized_name, #respond_to_missing?, #update, url, #uuid

Constructor Details

This class inherits a constructor from Layer::Resource

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Layer::Resource

Class Method Details

.find(client, url, id) ⇒ Object



4
5
6
# File 'lib/layer/resources/user.rb', line 4

def self.find(client, url, id)
  new({"id" => id, "url" => "users/#{id}"}, client)
end

Instance Method Details

#blocksObject



8
9
10
# File 'lib/layer/resources/user.rb', line 8

def blocks
  Layer::ResourceProxy.new(client, self, Layer::Resources::Block)
end

#conversationsObject



12
13
14
# File 'lib/layer/resources/user.rb', line 12

def conversations
  Layer::ResourceProxy.new(client, self, Layer::Resources::Conversation)
end

#messagesObject



16
17
18
# File 'lib/layer/resources/user.rb', line 16

def messages
  Layer::ResourceProxy.new(client, self, Layer::Resources::Message)
end