class Yapt::Move
Attributes
target[R]
to_move[R]
Public Class Methods
new(to_move, target)
click to toggle source
# File lib/yapt/move.rb, line 10 def initialize(to_move, target) @to_move, @target = to_move, target end
setup(id, target_id)
click to toggle source
# File lib/yapt/move.rb, line 3 def self.setup(id, target_id) to_move = Story.find(id) target = Story.find(target_id) new(to_move, target) end
Public Instance Methods
description()
click to toggle source
# File lib/yapt/move.rb, line 14 def description "Move #{to_move.id} just above #{target.id}" end
execute!()
click to toggle source
# File lib/yapt/move.rb, line 24 def execute! Request.new("stories/#{to_move.id}", params, :put).result end
params()
click to toggle source
# File lib/yapt/move.rb, line 18 def params { before_id: target.id } end