Class: Breadbox::Client

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

Direct Known Subclasses

DropboxClient, S3Client

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(configuration = nil) ⇒ Client

Returns a new instance of Client.



7
8
9
10
# File 'lib/breadbox/client.rb', line 7

def initialize(configuration = nil)
  @configuration = configuration || NullConfiguration.new
  post_initialize
end

Instance Attribute Details

#configurationObject (readonly)

Returns the value of attribute configuration.



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

def configuration
  @configuration
end

Instance Method Details

#clientObject



12
13
14
# File 'lib/breadbox/client.rb', line 12

def client
  @client ||= new_client_from_configuration
end

#root_pathObject



16
17
18
# File 'lib/breadbox/client.rb', line 16

def root_path
  configuration.root_path
end

#uploadObject



20
21
22
# File 'lib/breadbox/client.rb', line 20

def upload(*)
  not_implemented
end