Class: Cadbury::Request
- Inherits:
-
Thor
- Object
- Thor
- Cadbury::Request
- Defined in:
- lib/cadbury/request.rb
Instance Method Summary collapse
Instance Method Details
#delete(name) ⇒ Object
25 26 27 |
# File 'lib/cadbury/request.rb', line 25 def delete(name) # EnvironmentBuilder.delete_environment(name) end |
#get(name = nil) ⇒ Object
16 17 18 19 20 21 22 |
# File 'lib/cadbury/request.rb', line 16 def get(name = nil) if name.nil? puts JSON.pretty_generate RequestBuilder.new(env: [:env]).get_all else puts JSON.pretty_generate RequestBuilder.new(name: name).get_by_name name end end |
#set(name) ⇒ Object
8 9 10 11 12 13 |
# File 'lib/cadbury/request.rb', line 8 def set(name) RequestBuilder .new(name: name, env: [:env]) .create_request .save end |