Module: Yt::Actions::Update
- Included in:
- Base
- Defined in:
- lib/yt/actions/update.rb
Instance Method Summary collapse
- #do_update(extra_update_params = {}, options = {}) {|response.body| ... } ⇒ Object
- #update_params ⇒ Object
Instance Method Details
#do_update(extra_update_params = {}, options = {}) {|response.body| ... } ⇒ Object
6 7 8 9 10 11 12 |
# File 'lib/yt/actions/update.rb', line 6 def do_update(extra_update_params = {}, = {}) request = Request.new update_params.deep_merge(extra_update_params) response = request.run expected_response = .fetch :expect, Net::HTTPNoContent raise unless response.is_a? expected_response yield response.body end |
#update_params ⇒ Object
14 15 16 17 18 19 |
# File 'lib/yt/actions/update.rb', line 14 def update_params Request.default_params.tap do |params| params[:method] = :put params[:auth] = @auth end end |