Sha256: 43fc7f1dada917a7941cdcc3471f814bf7cec3f98af9d98f57f4c674b3e1440a

Contents?: true

Size: 424 Bytes

Versions: 3

Compression:

Stored size: 424 Bytes

Contents

# coding: utf-8

module Youroom
  class Mark < Request
    attr_reader :ids

    def initialize(access_token, ids, url=BASE_URL)
      required_structure(ids, Array, String, Fixnum)
      @ids = if ids.is_a?(Array)
               ids.map { |id| id.to_s }
             else
               [ids.to_s]
             end
      super(access_token, url)
    end

    def params
      { 'ids[]' => ids.join(",") }
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
youroom_api-0.1.4 lib/youroom_api/request/mark.rb
youroom_api-0.1.3 lib/youroom_api/request/mark.rb
youroom_api-0.1.2 lib/youroom_api/request/mark.rb