Class: Copy::Client

Inherits:
Object
  • Object
show all
Defined in:
lib/copy/client.rb

Constant Summary collapse

RESOURCES =
[:user, :file, :email, :link]

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(session) ⇒ Client

Creates an client object using the given Copy session. existing account.

Parameters:

  • client (String)

    object to use the copy api.

Raises:



11
12
13
14
15
# File 'lib/copy/client.rb', line 11

def initialize(session)
  raise Copy::AuthenticationError unless session.valid?
  @session = session
  self
end

Instance Attribute Details

#sessionObject (readonly)

Returns the value of attribute session.



5
6
7
# File 'lib/copy/client.rb', line 5

def session
  @session
end