Sha256: ed8860cfc06317990e2cb9979c65d0e8c6e010452d99d1f1c08cfef105e500ee

Contents?: true

Size: 367 Bytes

Versions: 2

Compression:

Stored size: 367 Bytes

Contents

module Jiralicious
  class SearchResult
    attr_reader :offset, :num_results

    def initialize(search_data)
      @issues      = search_data["issues"]
      @offset      = search_data["startAt"]
      @num_results = search_data["total"]
    end

    def issues
      @issues.map do |issue|
        Jiralicious::Issue.find(issue["key"])
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
jiralicious-0.1.0 lib/jiralicious/search_result.rb
jiralicious-0.0.6 lib/jiralicious/search_result.rb