Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

documentation fixes

  • Loading branch information...
commit 22315e87ee15f02f235680cc895648cae7df51e7 1 parent 5aabc39
PJ Davis pjdavis authored
Showing with 14 additions and 14 deletions.
  1. +14 −14 lib/roart/ticket.rb
28 lib/roart/ticket.rb
View
@@ -104,7 +104,7 @@ def find(*args)
protected
- def instantiate(attrs)
+ def instantiate(attrs) #:nodoc:
object = nil
if attrs.is_a?(Array)
array = Array.new
@@ -123,21 +123,21 @@ def instantiate(attrs)
object
end
- def find_initial(options={})
+ def find_initial(options={}) #:nodoc:
options.update(:limit => 1)
find_all(options).first
end
- def find_all(options)
+ def find_all(options) #:nodoc:
uri = construct_search_uri(options)
tickets = get_tickets_from_search_uri(uri)
end
- def find_by_ids(args, options)
+ def find_by_ids(args, options) #:nodoc:
get_ticket_by_id(args.first)
end
- def page_array(uri)
+ def page_array(uri) #:nodoc:
page = self.connection.get(uri)
raise TicketSystemError, "Can't get ticket." unless page
page = page.split("\n")
@@ -150,14 +150,14 @@ def page_array(uri)
end
end
- def get_tickets_from_search_uri(uri)
+ def get_tickets_from_search_uri(uri) #:nodoc:
page = page_array(uri)
page.extend(Roart::TicketPage)
page = page.to_search_array
self.instantiate(page)
end
- def get_ticket_from_uri(uri)
+ def get_ticket_from_uri(uri) #:nodoc:
page = page_array(uri)
page.extend(Roart::TicketPage)
page = page.to_hash
@@ -165,13 +165,13 @@ def get_ticket_from_uri(uri)
self.instantiate(page)
end
- def get_ticket_by_id(id)
+ def get_ticket_by_id(id) #:nodoc:
uri = "#{self.connection.server}/REST/1.0/ticket/"
uri << id.to_s
get_ticket_from_uri(uri)
end
- def construct_search_uri(options)
+ def construct_search_uri(options) #:nodoc:
uri = "#{self.connection.server}/REST/1.0/search/ticket?"
uri << 'orderby=-Created&' if options.delete(:order)
unless options.empty?
@@ -191,7 +191,7 @@ def construct_search_uri(options)
uri
end
- def add_queue!(uri, queue)
+ def add_queue!(uri, queue) #:nodoc:
return false unless queue
if queue.is_a?(Array)
queues = Array.new
@@ -204,7 +204,7 @@ def add_queue!(uri, queue)
end
end
- def add_custom_fields!(uri, options)
+ def add_custom_fields!(uri, options) #:nodoc:
return false unless options
options.each do |field, value|
if value.is_a?(Array)
@@ -219,7 +219,7 @@ def add_custom_fields!(uri, options)
end
end
- def add_status!(uri, options)
+ def add_status!(uri, options) #:nodoc:
return false unless options
parts = Array.new
if options.is_a?(Array)
@@ -234,7 +234,7 @@ def add_status!(uri, options)
uri << parts
end
- def add_searches!(uri, options)
+ def add_searches!(uri, options) #:nodoc:
search_fields = %w( subject content content_type file_name)
options.each do |key, value|
if search_fields.include?(key.to_s)
@@ -252,7 +252,7 @@ def add_searches!(uri, options)
end
end
- def add_dates!(uri, options)
+ def add_dates!(uri, options) #:nodoc:
date_field = %w( created started resolved told last_updated starts due updated )
options.each do |key, value|
if date_field.include?(key.to_s)
Please sign in to comment.
Something went wrong with that request. Please try again.