Class: LMC::Preferences
- Inherits:
-
Object
- Object
- LMC::Preferences
- Defined in:
- lib/lmc/preferences/preferences.rb
Instance Method Summary collapse
- #get(path) ⇒ Object
-
#initialize(cloud:, section:) ⇒ Preferences
constructor
A new instance of Preferences.
- #put(path, payload) ⇒ Object
Constructor Details
#initialize(cloud:, section:) ⇒ Preferences
Returns a new instance of Preferences.
4 5 6 7 |
# File 'lib/lmc/preferences/preferences.rb', line 4 def initialize(cloud:, section:) @cloud = cloud @section = section end |
Instance Method Details
#get(path) ⇒ Object
9 10 11 12 |
# File 'lib/lmc/preferences/preferences.rb', line 9 def get(path) response = @cloud.get build_url, { path: path } response.body end |
#put(path, payload) ⇒ Object
14 15 16 |
# File 'lib/lmc/preferences/preferences.rb', line 14 def put(path, payload) @cloud.put build_url, payload, { path: path } end |