Class: MyVk::Registry
- Inherits:
-
Object
- Object
- MyVk::Registry
- Defined in:
- lib/My_Vk.rb
Instance Method Summary collapse
- #get(key) ⇒ Object
-
#initialize ⇒ Registry
constructor
A new instance of Registry.
- #set(key, value) ⇒ Object
Constructor Details
#initialize ⇒ Registry
Returns a new instance of Registry.
7 8 9 |
# File 'lib/My_Vk.rb', line 7 def initialize self.variables = [] end |
Instance Method Details
#get(key) ⇒ Object
11 12 13 |
# File 'lib/My_Vk.rb', line 11 def get(key) self.variables[key] || nil end |
#set(key, value) ⇒ Object
15 16 17 |
# File 'lib/My_Vk.rb', line 15 def set(key, value) self.variables[key] = value end |