arg) } end end def add_arg(command, arg) command.send(merge_method(arg), arg) end def merge_method(arg) arg.kind_of?(Array) ? :merge! : :<< end ProcΛฦ͢ϝιουΛఆٛ
command << 'images/output.jpg' end def execute MiniMagick::Tool::Convert.new(&build_command) end def args [input_path, rotate_arg, output_path] end def rotate_arg %w[-rotate 90] end ໋໊ʹΑΓ ԿΛ͢Δͷ͔ҰͰΘ͔Δ Before After