Sha256: 13f2d7f5fd244d30eca093d1dbf3e53c923f66105da40289204c67138eabd890

Contents?: true

Size: 470 Bytes

Versions: 3

Compression:

Stored size: 470 Bytes

Contents

require 'active_resource'

require_relative 'collections/tracker'

module RedmineRest
  module Models
    #
    # Tracker  model
    #
    class Tracker < ActiveResource::Base
      self.format = :xml
      self.collection_parser = Collections::Tracker

      def self.find(*args)
        fail('Trackers can be loaded as :all only') unless args.size == 1 && args.first == :all

        return @trackers if @trackers
        @trackers = super
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
redmine_rest-0.5.2 lib/redmine_rest/models/tracker.rb
redmine_rest-0.5.1 lib/redmine_rest/models/tracker.rb
redmine_rest-0.5.0 lib/redmine_rest/models/tracker.rb