Class: Prof::PushedTestApp
- Inherits:
-
Object
- Object
- Prof::PushedTestApp
- Defined in:
- lib/prof/pushed_test_app.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
Instance Method Summary collapse
-
#initialize(opts = {}) ⇒ PushedTestApp
constructor
A new instance of PushedTestApp.
- #read(key) ⇒ Object
- #write(key, value) ⇒ Object
Constructor Details
#initialize(opts = {}) ⇒ PushedTestApp
Returns a new instance of PushedTestApp.
16 17 18 19 |
# File 'lib/prof/pushed_test_app.rb', line 16 def initialize(opts = {}) @name = opts.fetch(:name) @url = opts.fetch(:url) end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
21 22 23 |
# File 'lib/prof/pushed_test_app.rb', line 21 def name @name end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
21 22 23 |
# File 'lib/prof/pushed_test_app.rb', line 21 def url @url end |
Instance Method Details
#read(key) ⇒ Object
27 28 29 |
# File 'lib/prof/pushed_test_app.rb', line 27 def read(key) app_connection.get("/testdata/key/#{key}").body end |
#write(key, value) ⇒ Object
23 24 25 |
# File 'lib/prof/pushed_test_app.rb', line 23 def write(key, value) app_connection.put("/testdata/key/#{key}/value/#{value}") end |