Sha256: 215b8f3b6ce79a92fd07ee580bb78528b156feec82ec6856d7f43e1cd5d38142

Contents?: true

Size: 299 Bytes

Versions: 8

Compression:

Stored size: 299 Bytes

Contents

class YouTrack::Client::Model
  def self.ms_time
    @_ms_time ||= lambda { |v, _|
      begin
        Time.at(*Integer(v).divmod(1000))
      rescue ArgumentError
        v
      end
    }
  end

  def require_admin!
    raise YouTrack::NotAnAdminError unless service.current_user.admin?
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
you_track-0.4.8 lib/you_track/client/model.rb
you_track-0.4.7 lib/you_track/client/model.rb
you_track-0.4.6 lib/you_track/client/model.rb
you_track-0.4.5 lib/you_track/client/model.rb
you_track-0.4.4 lib/you_track/client/model.rb
you_track-0.4.2 lib/you_track/client/model.rb
you_track-0.4.1 lib/you_track/client/model.rb
you_track-0.4.0 lib/you_track/client/model.rb