Class: Telapi::Resource

Inherits:
RecursiveOpenStruct
  • Object
show all
Includes:
Network
Defined in:
lib/telapi/resource.rb

Overview

Base class provides basic behavior for Telapi domain objects You don’t typically instantiate this class directly

Instance Method Summary collapse

Methods included from Network

api_uri, default_options, delete, get, post, response_format

Constructor Details

#initialize(attributes = {}) ⇒ Resource

Returns a new instance of Resource.



9
10
11
12
# File 'lib/telapi/resource.rb', line 9

def initialize(attributes={})
  super
  delete_field('subresource_uris') if respond_to?(:subresource_uris)
end

Instance Method Details

#attributesObject



14
15
16
# File 'lib/telapi/resource.rb', line 14

def attributes
  marshal_dump
end