Sha256: 0ca00d0ad8b1cf675d68724201bc7e954669e2d5aa8cd257f9bcecf5b89ae4b2

Contents?: true

Size: 421 Bytes

Versions: 2

Compression:

Stored size: 421 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

2 entries across 2 versions & 1 rubygems

Version Path
youroom_api-0.1.1 lib/youroom_api/request/mark.rb
youroom_api-0.1.0 lib/youroom_api/request/mark.rb