Class: StudyTube::StudyTube
- Inherits:
-
Object
- Object
- StudyTube::StudyTube
- Defined in:
- lib/StudyTube.rb
Instance Attribute Summary collapse
-
#type ⇒ Object
Returns the value of attribute type.
Instance Method Summary collapse
- #create(key, value) ⇒ Object
- #delete(key) ⇒ Object
-
#initialize(type, file = nil) ⇒ StudyTube
constructor
A new instance of StudyTube.
- #list ⇒ Object
- #show(key) ⇒ Object
- #update(key, value) ⇒ Object
Constructor Details
#initialize(type, file = nil) ⇒ StudyTube
Returns a new instance of StudyTube.
15 16 17 18 |
# File 'lib/StudyTube.rb', line 15 def initialize type, file = nil @type = study_type(type) $FILE = file end |
Instance Attribute Details
#type ⇒ Object
Returns the value of attribute type.
13 14 15 |
# File 'lib/StudyTube.rb', line 13 def type @type end |
Instance Method Details
#create(key, value) ⇒ Object
20 21 22 |
# File 'lib/StudyTube.rb', line 20 def create key, value type.create(key,value) end |
#delete(key) ⇒ Object
28 29 30 |
# File 'lib/StudyTube.rb', line 28 def delete key type.delete(key) end |
#list ⇒ Object
36 37 38 |
# File 'lib/StudyTube.rb', line 36 def list type.list end |
#show(key) ⇒ Object
32 33 34 |
# File 'lib/StudyTube.rb', line 32 def show key type.show(key) end |
#update(key, value) ⇒ Object
24 25 26 |
# File 'lib/StudyTube.rb', line 24 def update key, value type.update(key,value) end |