Class: Secret_FS
- Inherits:
-
Object
- Object
- Secret_FS
- Defined in:
- lib/fs.rb
Instance Method Summary collapse
- #[](key) ⇒ Object
- #[]=(key, value) ⇒ Object
-
#initialize(base:) ⇒ Secret_FS
constructor
A new instance of Secret_FS.
Constructor Details
#initialize(base:) ⇒ Secret_FS
Returns a new instance of Secret_FS.
2 3 4 5 |
# File 'lib/fs.rb', line 2 def initialize(base:) @base = base @cache = {} end |
Instance Method Details
#[](key) ⇒ Object
7 8 9 10 |
# File 'lib/fs.rb', line 7 def [](key) return @cache[key] if @cache.include? key return @cache[key] = get_secret(secret: key) end |
#[]=(key, value) ⇒ Object
12 13 14 |
# File 'lib/fs.rb', line 12 def []=(key, value) raise "NOOOOOOOOOO" end |