Class: CloudFile::OuterService

Inherits:
Object
  • Object
show all
Includes:
FromHash
Defined in:
lib/cloud_file/outer_service.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#serviceObject

Returns the value of attribute service.



4
5
6
# File 'lib/cloud_file/outer_service.rb', line 4

def service
  @service
end

Instance Method Details

#parse_loc(loc) ⇒ Object



6
7
8
9
10
11
# File 'lib/cloud_file/outer_service.rb', line 6

def parse_loc(loc)
  if loc.kind_of?(String)
    loc = service.class.uri_parser.parse(loc)
  end
  loc
end

#read(loc) ⇒ Object



13
14
15
16
# File 'lib/cloud_file/outer_service.rb', line 13

def read(loc)
  raise 'foo'
  service.read parse_loc(loc)
end

#write(loc, val) ⇒ Object



18
19
20
# File 'lib/cloud_file/outer_service.rb', line 18

def write(loc,val)
  service.write parse_loc(loc),val
end