Class: Layer::Block

Inherits:
Resource show all
Extended by:
Operations::Delete::ClassMethods
Includes:
Operations::Delete
Defined in:
lib/layer/block.rb

Overview

Note:

This is only available via the Platform API.

Managing block lists is also possible:

Examples:

user = Layer::User.find('user_id')
user.blocks.all # Returns a list of blocks
user.blocks.create({ user_id: 'other_user' }) # Adds the other user to the block list
user.blocks.delete('other_user') # Removes the other user from the block list
user.blocks.all.first.delete # Removes the first entry from the block list

See Also:

Instance Attribute Summary

Attributes inherited from Resource

#attributes, #client

Method Summary

Methods included from Operations::Delete::ClassMethods

delete

Methods included from Operations::Delete

#delete

Methods inherited from Resource

class_name, from_response, #id, #initialize, #respond_to_missing?, url, #url

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