class StudyTube::StudyTube
Attributes
type[RW]
Public Class Methods
new(type, file = nil)
click to toggle source
# File lib/StudyTube.rb, line 15 def initialize type, file = nil @type = study_type(type) $FILE = file end
Public Instance Methods
create(key, value)
click to toggle source
# File lib/StudyTube.rb, line 20 def create key, value type.create(key,value) end
delete(key)
click to toggle source
# File lib/StudyTube.rb, line 28 def delete key type.delete(key) end
list()
click to toggle source
# File lib/StudyTube.rb, line 36 def list type.list end
show(key)
click to toggle source
# File lib/StudyTube.rb, line 32 def show key type.show(key) end
update(key, value)
click to toggle source
# File lib/StudyTube.rb, line 24 def update key, value type.update(key,value) end
Private Instance Methods
study_type(type)
click to toggle source
# File lib/StudyTube.rb, line 43 def study_type(type) case type when 'REST' Rest.new when 'FILES' Files.new when 'RestFiles' RestFile.new else Rest.new end end