zendesk_api 0.3.14 → 0.4.0.rc1
Sign up to get free protection for your applications and to get access to all the features.
- data/.yardopts +6 -2
- data/Gemfile +3 -2
- data/Gemfile.lock +4 -4
- data/Readme.md +3 -268
- data/lib/zendesk_api/actions.rb +51 -46
- data/lib/zendesk_api/association.rb +1 -1
- data/lib/zendesk_api/associations.rb +2 -6
- data/lib/zendesk_api/client.rb +8 -9
- data/lib/zendesk_api/collection.rb +84 -50
- data/lib/zendesk_api/configuration.rb +4 -0
- data/lib/zendesk_api/error.rb +22 -0
- data/lib/zendesk_api/middleware/request/etag_cache.rb +1 -7
- data/lib/zendesk_api/middleware/request/upload.rb +1 -2
- data/lib/zendesk_api/middleware/response/raise_error.rb +20 -0
- data/lib/zendesk_api/resource.rb +33 -5
- data/lib/zendesk_api/resources.rb +36 -11
- data/lib/zendesk_api/server/base.rb +1 -1
- data/lib/zendesk_api/server/helper.rb +3 -3
- data/lib/zendesk_api/server/models/zlib_json.rb +1 -1
- data/lib/zendesk_api/server/public/doc/ZendeskAPI.html +7 -7
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Ability.html +415 -13
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Activity.html +414 -51
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Attachment.html +321 -25
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Automation.html +413 -46
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Bookmark.html +389 -26
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/CRMData.html +415 -13
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/CRMDataStatus.html +415 -13
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Category.html +410 -47
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Client.html +98 -362
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Collection.html +457 -676
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Configuration.html +110 -20
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Create.html +264 -6
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Create/ClassMethods.html +43 -82
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/CreateResource.html +671 -15
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/CustomRole.html +415 -13
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Data.html +207 -233
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/DataResource.html +499 -24
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/DeleteResource.html +614 -15
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Destroy.html +73 -23
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Destroy/ClassMethod.html +68 -18
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/{FormatError.html → Error.html} +19 -27
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Error/ClientError.html +127 -0
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/{Server/UserRequest.html → Error/NetworkError.html} +18 -16
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Error/RecordInvalid.html +371 -0
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Error/RecordNotFound.html +127 -0
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Forum.html +426 -63
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/ForumSubscription.html +414 -51
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Group.html +389 -26
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/GroupMembership.html +414 -51
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/JobStatus.html +405 -16
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Locale.html +405 -16
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Macro.html +413 -46
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/MobileDevice.html +404 -41
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/OAuthClient.html +606 -0
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/OAuthToken.html +810 -0
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Organization.html +422 -59
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/OrganizationField.html +606 -0
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Read.html +75 -12
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/ReadResource.html +593 -16
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Request.html +418 -55
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Request/Comment.html +420 -31
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Resource.html +1025 -20
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Role.html +415 -13
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Rule.html +610 -0
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/RuleExecution.html +317 -21
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/SatisfactionRating.html +428 -39
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Save.html +63 -79
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Search.html +34 -26
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Search/Result.html +305 -9
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Setting.html +433 -41
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/SharingAgreement.html +405 -16
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/SingularResource.html +389 -26
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/SuspendedTicket.html +600 -31
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Ticket.html +464 -101
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Ticket/Audit.html +427 -25
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Ticket/Comment.html +435 -32
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Ticket/Tag.html +389 -26
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/TicketField.html +389 -26
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/TicketMetric.html +592 -15
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Topic.html +427 -64
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Topic/TopicComment.html +907 -17
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Topic/TopicVote.html +414 -55
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/TopicComment.html +325 -29
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/TopicSubscription.html +414 -51
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Trigger.html +413 -46
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Update.html +258 -6
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Update/ClassMethod.html +62 -12
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/UpdateResource.html +671 -15
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Upload.html +800 -28
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/User.html +505 -142
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/User/Identity.html +412 -49
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/User/TopicComment.html +475 -13
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/UserField.html +606 -0
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Verbs.html +9 -15
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/View.html +433 -66
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/ViewCount.html +415 -13
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/ViewRow.html +451 -49
- data/lib/zendesk_api/server/public/doc/_index.html +72 -72
- data/lib/zendesk_api/server/public/doc/class_list.html +1 -1
- data/lib/zendesk_api/server/public/doc/css/style.css +10 -0
- data/lib/zendesk_api/server/public/doc/file.Readme.html +20 -260
- data/lib/zendesk_api/server/public/doc/file_list.html +1 -1
- data/lib/zendesk_api/server/public/doc/frames.html +1 -1
- data/lib/zendesk_api/server/public/doc/index.html +20 -260
- data/lib/zendesk_api/server/public/doc/method_list.html +309 -517
- data/lib/zendesk_api/server/public/doc/top-level-namespace.html +3 -35
- data/lib/zendesk_api/verbs.rb +0 -4
- data/lib/zendesk_api/version.rb +1 -1
- data/spec/core/client_spec.rb +53 -13
- data/spec/core/collection_spec.rb +32 -4
- data/spec/core/create_resource_spec.rb +1 -1
- data/spec/core/data_resource_spec.rb +2 -2
- data/spec/core/middleware/request/etag_cache_spec.rb +6 -7
- data/spec/core/middleware/request/upload_spec.rb +2 -10
- data/spec/core/middleware/response/callback_spec.rb +1 -1
- data/spec/core/middleware/response/raise_error_spec.rb +40 -0
- data/spec/core/read_resource_spec.rb +0 -2
- data/spec/core/resource_spec.rb +13 -5
- data/spec/core/search_spec.rb +1 -1
- data/spec/core/spec_helper.rb +3 -3
- data/spec/live/automation_spec.rb +23 -0
- data/spec/live/organization_field_spec.rb +12 -0
- data/spec/live/ticket_spec.rb +8 -2
- data/spec/live/trigger_spec.rb +23 -0
- data/spec/live/user_field_spec.rb +12 -0
- data/spec/live/user_spec.rb +0 -2
- data/spec/live/view_spec.rb +17 -1
- data/spec/server/spec_helper.rb +2 -2
- data/zendesk_api.gemspec +1 -1
- metadata +88 -51
- checksums.yaml +0 -7
- data/lib/zendesk_api/rescue.rb +0 -63
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Console.html +0 -860
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Console/Eval.html +0 -190
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Server.html +0 -131
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Server/App.html +0 -523
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Server/Helper.html +0 -684
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Server/HtmlRenderer.html +0 -303
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Server/HtmlRenderer/RedcarpetRenderer.html +0 -508
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Server/ZlibJSON.html +0 -244
- data/spec/core/rescue_spec.rb +0 -151
checksums.yaml
DELETED
@@ -1,7 +0,0 @@
|
|
1
|
-
---
|
2
|
-
SHA1:
|
3
|
-
metadata.gz: 3df6204f705806ba35d7d3451bba45e49f4fb2a2
|
4
|
-
data.tar.gz: 073424301ccf21fc222609f3781cf52f839bfbb1
|
5
|
-
SHA512:
|
6
|
-
metadata.gz: fbf6ddb8cece3d90b54d9d76c6bc9c2473464e3eb3f79fc1ae28130e6a6c559ccbe4c5e6a307696817d2c714fe6ca1332fca80f1f1389c19f85ee1a3b3dd3a02
|
7
|
-
data.tar.gz: c009ed313a58a4586a3cd140a6bc7c783e6ac701d4a99d5ff6d21d1551c7bb632bf5ab8c78812798513ce7b25a1cd03d8433f8ad96cc065ba6029090c17ae3e4
|
data/lib/zendesk_api/rescue.rb
DELETED
@@ -1,63 +0,0 @@
|
|
1
|
-
module ZendeskAPI
|
2
|
-
# @private
|
3
|
-
module Rescue
|
4
|
-
def self.included(klass)
|
5
|
-
klass.extend(Methods)
|
6
|
-
klass.send(:include, Methods)
|
7
|
-
end
|
8
|
-
|
9
|
-
# @private
|
10
|
-
module Methods
|
11
|
-
def log_error(e, method = false)
|
12
|
-
if logger = (@client ? @client.config.logger : Kernel)
|
13
|
-
logger.warn "#{self} - #{method}" if method
|
14
|
-
logger.warn e.message
|
15
|
-
logger.warn e.backtrace.join("\n")
|
16
|
-
logger.warn "\t#{e.response[:body].inspect}" if e.response
|
17
|
-
end
|
18
|
-
end
|
19
|
-
|
20
|
-
def attach_error(e)
|
21
|
-
return unless e.response
|
22
|
-
|
23
|
-
if respond_to?("error_message=")
|
24
|
-
self.error_message = nil
|
25
|
-
|
26
|
-
if (error = e.response[:body]) && error.is_a?(Hash)
|
27
|
-
error = Hashie::Mash.new(error)
|
28
|
-
self.error_message = (error.error || error.description)
|
29
|
-
end
|
30
|
-
end
|
31
|
-
|
32
|
-
self.error = e if respond_to?("error=")
|
33
|
-
end
|
34
|
-
|
35
|
-
def rescue_client_error(*args)
|
36
|
-
opts = args.last.is_a?(Hash) ? args.pop : {}
|
37
|
-
|
38
|
-
if args.any?
|
39
|
-
args.each do |method|
|
40
|
-
class_eval("alias :orig_#{method} :#{method}")
|
41
|
-
define_method method do |*args|
|
42
|
-
begin
|
43
|
-
send("orig_#{method}", *args)
|
44
|
-
rescue Faraday::Error::ClientError => e
|
45
|
-
log_error(e, method)
|
46
|
-
attach_error(e)
|
47
|
-
opts[:with].respond_to?(:call) ? opts[:with].call : opts[:with]
|
48
|
-
end
|
49
|
-
end
|
50
|
-
end
|
51
|
-
elsif block_given?
|
52
|
-
begin
|
53
|
-
yield
|
54
|
-
rescue Faraday::Error::ClientError => e
|
55
|
-
log_error(e)
|
56
|
-
attach_error(e)
|
57
|
-
opts[:with].respond_to?(:call) ? opts[:with].call : opts[:with]
|
58
|
-
end
|
59
|
-
end
|
60
|
-
end
|
61
|
-
end
|
62
|
-
end
|
63
|
-
end
|
@@ -1,860 +0,0 @@
|
|
1
|
-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
2
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
3
|
-
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
4
|
-
<head>
|
5
|
-
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
6
|
-
<title>
|
7
|
-
Module: ZendeskAPI::Console
|
8
|
-
|
9
|
-
— Documentation by YARD 0.8.4.1
|
10
|
-
|
11
|
-
</title>
|
12
|
-
|
13
|
-
<link rel="stylesheet" href="../css/style.css" type="text/css" media="screen" charset="utf-8" />
|
14
|
-
|
15
|
-
<link rel="stylesheet" href="../css/common.css" type="text/css" media="screen" charset="utf-8" />
|
16
|
-
|
17
|
-
<script type="text/javascript" charset="utf-8">
|
18
|
-
hasFrames = window.top.frames.main ? true : false;
|
19
|
-
relpath = '../';
|
20
|
-
framesUrl = "../frames.html#!" + escape(window.location.href);
|
21
|
-
</script>
|
22
|
-
|
23
|
-
|
24
|
-
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
|
25
|
-
|
26
|
-
<script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
|
27
|
-
|
28
|
-
|
29
|
-
</head>
|
30
|
-
<body>
|
31
|
-
<div id="header">
|
32
|
-
<div id="menu">
|
33
|
-
|
34
|
-
<a href="../_index.html">Index (C)</a> »
|
35
|
-
<span class='title'><span class='object_link'><a href="../ZendeskAPI.html" title="ZendeskAPI (module)">ZendeskAPI</a></span></span>
|
36
|
-
»
|
37
|
-
<span class="title">Console</span>
|
38
|
-
|
39
|
-
|
40
|
-
<div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
|
41
|
-
</div>
|
42
|
-
|
43
|
-
<div id="search">
|
44
|
-
|
45
|
-
<a class="full_list_link" id="class_list_link"
|
46
|
-
href="../class_list.html">
|
47
|
-
Class List
|
48
|
-
</a>
|
49
|
-
|
50
|
-
<a class="full_list_link" id="method_list_link"
|
51
|
-
href="../method_list.html">
|
52
|
-
Method List
|
53
|
-
</a>
|
54
|
-
|
55
|
-
<a class="full_list_link" id="file_list_link"
|
56
|
-
href="../file_list.html">
|
57
|
-
File List
|
58
|
-
</a>
|
59
|
-
|
60
|
-
</div>
|
61
|
-
<div class="clear"></div>
|
62
|
-
</div>
|
63
|
-
|
64
|
-
<iframe id="search_frame"></iframe>
|
65
|
-
|
66
|
-
<div id="content"><h1>Module: ZendeskAPI::Console
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
</h1>
|
71
|
-
|
72
|
-
<dl class="box">
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
<dt class="r1 last">Defined in:</dt>
|
82
|
-
<dd class="r1 last">lib/zendesk_api/console/console.rb</dd>
|
83
|
-
|
84
|
-
</dl>
|
85
|
-
<div class="clear"></div>
|
86
|
-
|
87
|
-
<h2>Defined Under Namespace</h2>
|
88
|
-
<p class="children">
|
89
|
-
|
90
|
-
|
91
|
-
<strong class="modules">Modules:</strong> <span class='object_link'><a href="Console/Eval.html" title="ZendeskAPI::Console::Eval (module)">Eval</a></span>
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
</p>
|
97
|
-
|
98
|
-
<h2>Constant Summary</h2>
|
99
|
-
|
100
|
-
<dl class="constants">
|
101
|
-
|
102
|
-
<dt id="ZD_DIRUP-constant" class="">ZD_DIRUP =
|
103
|
-
|
104
|
-
</dt>
|
105
|
-
<dd><pre class="code"><span class='const'>Object</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='period'>.</span><span class='id identifier rubyid_tap'>tap</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_dir'>dir</span><span class='op'>|</span>
|
106
|
-
<span class='id identifier rubyid_dir'>dir</span><span class='period'>.</span><span class='id identifier rubyid_instance_eval'>instance_eval</span> <span class='kw'>do</span>
|
107
|
-
<span class='kw'>def</span> <span class='op'>/</span><span class='lparen'>(</span><span class='id identifier rubyid_stuff'>stuff</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span>
|
108
|
-
<span class='id identifier rubyid_puts'>puts</span> <span class='id identifier rubyid_stuff'>stuff</span>
|
109
|
-
<span class='kw'>end</span>
|
110
|
-
<span class='kw'>end</span>
|
111
|
-
<span class='kw'>end</span></pre></dd>
|
112
|
-
|
113
|
-
</dl>
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
<h2>
|
124
|
-
Instance Method Summary
|
125
|
-
<small>(<a href="#" class="summary_toggle">collapse</a>)</small>
|
126
|
-
</h2>
|
127
|
-
|
128
|
-
<ul class="summary">
|
129
|
-
|
130
|
-
<li class="public ">
|
131
|
-
<span class="summary_signature">
|
132
|
-
|
133
|
-
<a href="#basic_auth-instance_method" title="#basic_auth (instance method)">- (Object) <strong>basic_auth</strong>(username, password) </a>
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
</span>
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
<span class="summary_desc"><div class='inline'></div></span>
|
148
|
-
|
149
|
-
</li>
|
150
|
-
|
151
|
-
|
152
|
-
<li class="public ">
|
153
|
-
<span class="summary_signature">
|
154
|
-
|
155
|
-
<a href="#cd-instance_method" title="#cd (instance method)">- (Object) <strong>cd</strong>(new_path = nil) </a>
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
</span>
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
<span class="summary_desc"><div class='inline'></div></span>
|
170
|
-
|
171
|
-
</li>
|
172
|
-
|
173
|
-
|
174
|
-
<li class="public ">
|
175
|
-
<span class="summary_signature">
|
176
|
-
|
177
|
-
<a href="#client-instance_method" title="#client (instance method)">- (Object) <strong>client</strong>(&blk) </a>
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
</span>
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
<span class="summary_desc"><div class='inline'></div></span>
|
192
|
-
|
193
|
-
</li>
|
194
|
-
|
195
|
-
|
196
|
-
<li class="public ">
|
197
|
-
<span class="summary_signature">
|
198
|
-
|
199
|
-
<a href="#config-instance_method" title="#config (instance method)">- (Object) <strong>config</strong> </a>
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
</span>
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
<span class="summary_desc"><div class='inline'></div></span>
|
214
|
-
|
215
|
-
</li>
|
216
|
-
|
217
|
-
|
218
|
-
<li class="public ">
|
219
|
-
<span class="summary_signature">
|
220
|
-
|
221
|
-
<a href="#cwd-instance_method" title="#cwd (instance method)">- (Object) <strong>cwd</strong> </a>
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
</span>
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
<span class="summary_desc"><div class='inline'></div></span>
|
236
|
-
|
237
|
-
</li>
|
238
|
-
|
239
|
-
|
240
|
-
<li class="public ">
|
241
|
-
<span class="summary_signature">
|
242
|
-
|
243
|
-
<a href="#help-instance_method" title="#help (instance method)">- (Object) <strong>help</strong> </a>
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
</span>
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
<span class="summary_desc"><div class='inline'></div></span>
|
258
|
-
|
259
|
-
</li>
|
260
|
-
|
261
|
-
|
262
|
-
<li class="public ">
|
263
|
-
<span class="summary_signature">
|
264
|
-
|
265
|
-
<a href="#ls-instance_method" title="#ls (instance method)">- (Object) <strong>ls</strong>(*args) </a>
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
</span>
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
<span class="summary_desc"><div class='inline'></div></span>
|
280
|
-
|
281
|
-
</li>
|
282
|
-
|
283
|
-
|
284
|
-
<li class="public ">
|
285
|
-
<span class="summary_signature">
|
286
|
-
|
287
|
-
<a href="#method_missing-instance_method" title="#method_missing (instance method)">- (Object) <strong>method_missing</strong>(*args) </a>
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
</span>
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
<span class="summary_desc"><div class='inline'></div></span>
|
302
|
-
|
303
|
-
</li>
|
304
|
-
|
305
|
-
|
306
|
-
<li class="public ">
|
307
|
-
<span class="summary_signature">
|
308
|
-
|
309
|
-
<a href="#password-instance_method" title="#password (instance method)">- (Object) <strong>password</strong>(password) </a>
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
</span>
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
<span class="summary_desc"><div class='inline'></div></span>
|
324
|
-
|
325
|
-
</li>
|
326
|
-
|
327
|
-
|
328
|
-
<li class="public ">
|
329
|
-
<span class="summary_signature">
|
330
|
-
|
331
|
-
<a href="#url-instance_method" title="#url (instance method)">- (Object) <strong>url</strong>(url) </a>
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
</span>
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
<span class="summary_desc"><div class='inline'></div></span>
|
346
|
-
|
347
|
-
</li>
|
348
|
-
|
349
|
-
|
350
|
-
<li class="public ">
|
351
|
-
<span class="summary_signature">
|
352
|
-
|
353
|
-
<a href="#username-instance_method" title="#username (instance method)">- (Object) <strong>username</strong>(username) </a>
|
354
|
-
|
355
|
-
|
356
|
-
|
357
|
-
</span>
|
358
|
-
|
359
|
-
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
<span class="summary_desc"><div class='inline'></div></span>
|
368
|
-
|
369
|
-
</li>
|
370
|
-
|
371
|
-
|
372
|
-
</ul>
|
373
|
-
|
374
|
-
|
375
|
-
<div id="method_missing_details" class="method_details_list">
|
376
|
-
<h2>Dynamic Method Handling</h2>
|
377
|
-
<p class="notice this">
|
378
|
-
This class handles dynamic methods through the <tt>method_missing</tt> method
|
379
|
-
|
380
|
-
</p>
|
381
|
-
|
382
|
-
<div class="method_details first">
|
383
|
-
<h3 class="signature first" id="method_missing-instance_method">
|
384
|
-
|
385
|
-
- (<tt>Object</tt>) <strong>method_missing</strong>(*args)
|
386
|
-
|
387
|
-
|
388
|
-
|
389
|
-
|
390
|
-
|
391
|
-
</h3><table class="source_code">
|
392
|
-
<tr>
|
393
|
-
<td>
|
394
|
-
<pre class="lines">
|
395
|
-
|
396
|
-
|
397
|
-
131
|
398
|
-
132
|
399
|
-
133</pre>
|
400
|
-
</td>
|
401
|
-
<td>
|
402
|
-
<pre class="code"><span class="info file"># File 'lib/zendesk_api/console/console.rb', line 131</span>
|
403
|
-
|
404
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_method_missing'>method_missing</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span>
|
405
|
-
<span class='id identifier rubyid_path'>path</span><span class='period'>.</span><span class='id identifier rubyid_send'>send</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span>
|
406
|
-
<span class='kw'>end</span></pre>
|
407
|
-
</td>
|
408
|
-
</tr>
|
409
|
-
</table>
|
410
|
-
</div>
|
411
|
-
|
412
|
-
</div>
|
413
|
-
|
414
|
-
|
415
|
-
<div id="instance_method_details" class="method_details_list">
|
416
|
-
<h2>Instance Method Details</h2>
|
417
|
-
|
418
|
-
|
419
|
-
<div class="method_details first">
|
420
|
-
<h3 class="signature first" id="basic_auth-instance_method">
|
421
|
-
|
422
|
-
- (<tt>Object</tt>) <strong>basic_auth</strong>(username, password)
|
423
|
-
|
424
|
-
|
425
|
-
|
426
|
-
|
427
|
-
|
428
|
-
</h3><table class="source_code">
|
429
|
-
<tr>
|
430
|
-
<td>
|
431
|
-
<pre class="lines">
|
432
|
-
|
433
|
-
|
434
|
-
49
|
435
|
-
50
|
436
|
-
51
|
437
|
-
52
|
438
|
-
53</pre>
|
439
|
-
</td>
|
440
|
-
<td>
|
441
|
-
<pre class="code"><span class="info file"># File 'lib/zendesk_api/console/console.rb', line 49</span>
|
442
|
-
|
443
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_basic_auth'>basic_auth</span><span class='lparen'>(</span><span class='id identifier rubyid_username'>username</span><span class='comma'>,</span> <span class='id identifier rubyid_password'>password</span><span class='rparen'>)</span>
|
444
|
-
<span class='id identifier rubyid_username'>username</span><span class='lparen'>(</span><span class='id identifier rubyid_username'>username</span><span class='rparen'>)</span>
|
445
|
-
<span class='id identifier rubyid_password'>password</span><span class='lparen'>(</span><span class='id identifier rubyid_password'>password</span><span class='rparen'>)</span>
|
446
|
-
<span class='kw'>true</span>
|
447
|
-
<span class='kw'>end</span></pre>
|
448
|
-
</td>
|
449
|
-
</tr>
|
450
|
-
</table>
|
451
|
-
</div>
|
452
|
-
|
453
|
-
<div class="method_details ">
|
454
|
-
<h3 class="signature " id="cd-instance_method">
|
455
|
-
|
456
|
-
- (<tt>Object</tt>) <strong>cd</strong>(new_path = nil)
|
457
|
-
|
458
|
-
|
459
|
-
|
460
|
-
|
461
|
-
|
462
|
-
</h3><table class="source_code">
|
463
|
-
<tr>
|
464
|
-
<td>
|
465
|
-
<pre class="lines">
|
466
|
-
|
467
|
-
|
468
|
-
65
|
469
|
-
66
|
470
|
-
67
|
471
|
-
68
|
472
|
-
69
|
473
|
-
70
|
474
|
-
71
|
475
|
-
72
|
476
|
-
73
|
477
|
-
74
|
478
|
-
75</pre>
|
479
|
-
</td>
|
480
|
-
<td>
|
481
|
-
<pre class="code"><span class="info file"># File 'lib/zendesk_api/console/console.rb', line 65</span>
|
482
|
-
|
483
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_cd'>cd</span><span class='lparen'>(</span><span class='id identifier rubyid_new_path'>new_path</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span>
|
484
|
-
<span class='kw'>if</span> <span class='id identifier rubyid_new_path'>new_path</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span> <span class='op'>=~</span> <span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>^Zendesk</span><span class='regexp_end'>/</span></span>
|
485
|
-
<span class='ivar'>@path</span> <span class='op'>=</span> <span class='id identifier rubyid_new_path'>new_path</span>
|
486
|
-
<span class='kw'>elsif</span> <span class='id identifier rubyid_new_path'>new_path</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>Fixnum</span><span class='rparen'>)</span> <span class='op'>&&</span> <span class='ivar'>@path</span>
|
487
|
-
<span class='ivar'>@path</span> <span class='op'>/=</span> <span class='id identifier rubyid_new_path'>new_path</span>
|
488
|
-
<span class='kw'>else</span>
|
489
|
-
<span class='ivar'>@path</span> <span class='op'>=</span> <span class='kw'>nil</span>
|
490
|
-
<span class='kw'>end</span>
|
491
|
-
|
492
|
-
<span class='ivar'>@path</span>
|
493
|
-
<span class='kw'>end</span></pre>
|
494
|
-
</td>
|
495
|
-
</tr>
|
496
|
-
</table>
|
497
|
-
</div>
|
498
|
-
|
499
|
-
<div class="method_details ">
|
500
|
-
<h3 class="signature " id="client-instance_method">
|
501
|
-
|
502
|
-
- (<tt>Object</tt>) <strong>client</strong>(&blk)
|
503
|
-
|
504
|
-
|
505
|
-
|
506
|
-
|
507
|
-
|
508
|
-
</h3><table class="source_code">
|
509
|
-
<tr>
|
510
|
-
<td>
|
511
|
-
<pre class="lines">
|
512
|
-
|
513
|
-
|
514
|
-
24
|
515
|
-
25
|
516
|
-
26
|
517
|
-
27
|
518
|
-
28
|
519
|
-
29
|
520
|
-
30
|
521
|
-
31
|
522
|
-
32
|
523
|
-
33</pre>
|
524
|
-
</td>
|
525
|
-
<td>
|
526
|
-
<pre class="code"><span class="info file"># File 'lib/zendesk_api/console/console.rb', line 24</span>
|
527
|
-
|
528
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_client'>client</span><span class='lparen'>(</span><span class='op'>&</span><span class='id identifier rubyid_blk'>blk</span><span class='rparen'>)</span>
|
529
|
-
<span class='kw'>return</span> <span class='ivar'>@client</span> <span class='kw'>if</span> <span class='ivar'>@client</span> <span class='op'>&&</span> <span class='id identifier rubyid_blk'>blk</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
|
530
|
-
|
531
|
-
<span class='ivar'>@client</span> <span class='op'>=</span> <span class='const'>ZendeskAPI</span><span class='op'>::</span><span class='const'>Client</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_cfg'>cfg</span><span class='op'>|</span>
|
532
|
-
<span class='id identifier rubyid_config'>config</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_k'>k</span><span class='comma'>,</span><span class='id identifier rubyid_v'>v</span><span class='op'>|</span>
|
533
|
-
<span class='id identifier rubyid_cfg'>cfg</span><span class='period'>.</span><span class='id identifier rubyid_send'>send</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_k'>k</span><span class='rbrace'>}</span><span class='tstring_content'>=</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='id identifier rubyid_v'>v</span><span class='rparen'>)</span>
|
534
|
-
<span class='kw'>end</span> <span class='kw'>if</span> <span class='id identifier rubyid_config'>config</span><span class='period'>.</span><span class='id identifier rubyid_keys'>keys</span><span class='period'>.</span><span class='id identifier rubyid_any?'>any?</span>
|
535
|
-
<span class='id identifier rubyid_blk'>blk</span><span class='period'>.</span><span class='id identifier rubyid_call'>call</span><span class='lparen'>(</span><span class='id identifier rubyid_cfg'>cfg</span><span class='rparen'>)</span> <span class='kw'>unless</span> <span class='id identifier rubyid_blk'>blk</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
|
536
|
-
<span class='kw'>end</span>
|
537
|
-
<span class='kw'>end</span></pre>
|
538
|
-
</td>
|
539
|
-
</tr>
|
540
|
-
</table>
|
541
|
-
</div>
|
542
|
-
|
543
|
-
<div class="method_details ">
|
544
|
-
<h3 class="signature " id="config-instance_method">
|
545
|
-
|
546
|
-
- (<tt>Object</tt>) <strong>config</strong>
|
547
|
-
|
548
|
-
|
549
|
-
|
550
|
-
|
551
|
-
|
552
|
-
</h3><table class="source_code">
|
553
|
-
<tr>
|
554
|
-
<td>
|
555
|
-
<pre class="lines">
|
556
|
-
|
557
|
-
|
558
|
-
135
|
559
|
-
136
|
560
|
-
137</pre>
|
561
|
-
</td>
|
562
|
-
<td>
|
563
|
-
<pre class="code"><span class="info file"># File 'lib/zendesk_api/console/console.rb', line 135</span>
|
564
|
-
|
565
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_config'>config</span>
|
566
|
-
<span class='ivar'>@options</span> <span class='op'>||=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
|
567
|
-
<span class='kw'>end</span></pre>
|
568
|
-
</td>
|
569
|
-
</tr>
|
570
|
-
</table>
|
571
|
-
</div>
|
572
|
-
|
573
|
-
<div class="method_details ">
|
574
|
-
<h3 class="signature " id="cwd-instance_method">
|
575
|
-
|
576
|
-
- (<tt>Object</tt>) <strong>cwd</strong>
|
577
|
-
|
578
|
-
|
579
|
-
|
580
|
-
|
581
|
-
|
582
|
-
</h3><table class="source_code">
|
583
|
-
<tr>
|
584
|
-
<td>
|
585
|
-
<pre class="lines">
|
586
|
-
|
587
|
-
|
588
|
-
77
|
589
|
-
78
|
590
|
-
79
|
591
|
-
80
|
592
|
-
81
|
593
|
-
82
|
594
|
-
83</pre>
|
595
|
-
</td>
|
596
|
-
<td>
|
597
|
-
<pre class="code"><span class="info file"># File 'lib/zendesk_api/console/console.rb', line 77</span>
|
598
|
-
|
599
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_cwd'>cwd</span>
|
600
|
-
<span class='kw'>begin</span>
|
601
|
-
<span class='id identifier rubyid_path'>path</span>
|
602
|
-
<span class='kw'>rescue</span> <span class='const'>ArgumentError</span>
|
603
|
-
<span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>unconfigured</span><span class='tstring_end'>"</span></span>
|
604
|
-
<span class='kw'>end</span>
|
605
|
-
<span class='kw'>end</span></pre>
|
606
|
-
</td>
|
607
|
-
</tr>
|
608
|
-
</table>
|
609
|
-
</div>
|
610
|
-
|
611
|
-
<div class="method_details ">
|
612
|
-
<h3 class="signature " id="help-instance_method">
|
613
|
-
|
614
|
-
- (<tt>Object</tt>) <strong>help</strong>
|
615
|
-
|
616
|
-
|
617
|
-
|
618
|
-
|
619
|
-
|
620
|
-
</h3><table class="source_code">
|
621
|
-
<tr>
|
622
|
-
<td>
|
623
|
-
<pre class="lines">
|
624
|
-
|
625
|
-
|
626
|
-
35
|
627
|
-
36
|
628
|
-
37
|
629
|
-
38
|
630
|
-
39</pre>
|
631
|
-
</td>
|
632
|
-
<td>
|
633
|
-
<pre class="code"><span class="info file"># File 'lib/zendesk_api/console/console.rb', line 35</span>
|
634
|
-
|
635
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_help'>help</span>
|
636
|
-
<span class='heredoc_beg'><<-END</span>
|
637
|
-
<span class='tstring_content'>This is help.
|
638
|
-
</span><span class='heredoc_end'> END
|
639
|
-
</span><span class='kw'>end</span></pre>
|
640
|
-
</td>
|
641
|
-
</tr>
|
642
|
-
</table>
|
643
|
-
</div>
|
644
|
-
|
645
|
-
<div class="method_details ">
|
646
|
-
<h3 class="signature " id="ls-instance_method">
|
647
|
-
|
648
|
-
- (<tt>Object</tt>) <strong>ls</strong>(*args)
|
649
|
-
|
650
|
-
|
651
|
-
|
652
|
-
|
653
|
-
|
654
|
-
</h3><table class="source_code">
|
655
|
-
<tr>
|
656
|
-
<td>
|
657
|
-
<pre class="lines">
|
658
|
-
|
659
|
-
|
660
|
-
85
|
661
|
-
86
|
662
|
-
87
|
663
|
-
88
|
664
|
-
89
|
665
|
-
90
|
666
|
-
91
|
667
|
-
92
|
668
|
-
93
|
669
|
-
94
|
670
|
-
95
|
671
|
-
96
|
672
|
-
97
|
673
|
-
98
|
674
|
-
99
|
675
|
-
100
|
676
|
-
101
|
677
|
-
102
|
678
|
-
103
|
679
|
-
104
|
680
|
-
105
|
681
|
-
106
|
682
|
-
107
|
683
|
-
108
|
684
|
-
109
|
685
|
-
110
|
686
|
-
111
|
687
|
-
112
|
688
|
-
113
|
689
|
-
114
|
690
|
-
115
|
691
|
-
116
|
692
|
-
117
|
693
|
-
118
|
694
|
-
119
|
695
|
-
120
|
696
|
-
121
|
697
|
-
122
|
698
|
-
123
|
699
|
-
124
|
700
|
-
125
|
701
|
-
126
|
702
|
-
127
|
703
|
-
128
|
704
|
-
129</pre>
|
705
|
-
</td>
|
706
|
-
<td>
|
707
|
-
<pre class="code"><span class="info file"># File 'lib/zendesk_api/console/console.rb', line 85</span>
|
708
|
-
|
709
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_ls'>ls</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span>
|
710
|
-
<span class='kw'>if</span> <span class='id identifier rubyid_args'>args</span><span class='period'>.</span><span class='id identifier rubyid_any?'>any?</span>
|
711
|
-
<span class='id identifier rubyid_args'>args</span><span class='period'>.</span><span class='id identifier rubyid_inject'>inject</span><span class='lparen'>(</span><span class='id identifier rubyid_path'>path</span><span class='rparen'>)</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_obj'>obj</span><span class='comma'>,</span> <span class='id identifier rubyid_arg'>arg</span><span class='op'>|</span>
|
712
|
-
<span class='id identifier rubyid_obj'>obj</span><span class='period'>.</span><span class='id identifier rubyid_send'>send</span><span class='lparen'>(</span><span class='symbol'>:/</span><span class='comma'>,</span> <span class='id identifier rubyid_arg'>arg</span><span class='rparen'>)</span>
|
713
|
-
<span class='kw'>end</span>
|
714
|
-
<span class='kw'>elsif</span> <span class='id identifier rubyid_path'>path</span><span class='period'>.</span><span class='id identifier rubyid_respond_to?'>respond_to?</span><span class='lparen'>(</span><span class='symbol'>:to_a</span><span class='rparen'>)</span>
|
715
|
-
<span class='id identifier rubyid_format'>format</span> <span class='op'>=</span> <span class='id identifier rubyid_to_a'>to_a</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_elem'>elem</span><span class='op'>|</span>
|
716
|
-
<span class='kw'>if</span> <span class='id identifier rubyid_elem'>elem</span><span class='period'>.</span><span class='id identifier rubyid_method'>method</span><span class='lparen'>(</span><span class='symbol'>:format</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_arity'>arity</span> <span class='op'>==</span> <span class='int'>1</span>
|
717
|
-
<span class='id identifier rubyid_elem'>elem</span><span class='period'>.</span><span class='id identifier rubyid_format'>format</span><span class='lparen'>(</span><span class='id identifier rubyid_client'>client</span><span class='rparen'>)</span>
|
718
|
-
<span class='kw'>else</span>
|
719
|
-
<span class='id identifier rubyid_elem'>elem</span><span class='period'>.</span><span class='id identifier rubyid_format'>format</span>
|
720
|
-
<span class='kw'>end</span>
|
721
|
-
<span class='kw'>end</span>
|
722
|
-
|
723
|
-
<span class='id identifier rubyid_lengths'>lengths</span> <span class='op'>=</span> <span class='id identifier rubyid_format'>format</span><span class='period'>.</span><span class='id identifier rubyid_inject'>inject</span><span class='lparen'>(</span><span class='lbracket'>[</span><span class='rbracket'>]</span><span class='rparen'>)</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_lengths'>lengths</span><span class='comma'>,</span> <span class='id identifier rubyid_object'>object</span><span class='op'>|</span>
|
724
|
-
<span class='id identifier rubyid_object'>object</span><span class='period'>.</span><span class='id identifier rubyid_each_with_index'>each_with_index</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_field'>field</span><span class='comma'>,</span> <span class='id identifier rubyid_i'>i</span><span class='op'>|</span>
|
725
|
-
<span class='id identifier rubyid_lengths'>lengths</span><span class='lbracket'>[</span><span class='id identifier rubyid_i'>i</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='id identifier rubyid_field'>field</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='period'>.</span><span class='id identifier rubyid_length'>length</span><span class='comma'>,</span> <span class='id identifier rubyid_lengths'>lengths</span><span class='lbracket'>[</span><span class='id identifier rubyid_i'>i</span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='int'>0</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_max'>max</span>
|
726
|
-
<span class='kw'>end</span>
|
727
|
-
|
728
|
-
<span class='id identifier rubyid_lengths'>lengths</span>
|
729
|
-
<span class='kw'>end</span>
|
730
|
-
|
731
|
-
<span class='id identifier rubyid_format_headers'>format_headers</span><span class='period'>.</span><span class='id identifier rubyid_each_with_index'>each_with_index</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_header'>header</span><span class='comma'>,</span> <span class='id identifier rubyid_i'>i</span><span class='op'>|</span>
|
732
|
-
<span class='id identifier rubyid_printf'>printf</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>%-</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_lengths'>lengths</span><span class='lbracket'>[</span><span class='id identifier rubyid_i'>i</span><span class='rbracket'>]</span> <span class='op'>+</span> <span class='int'>2</span><span class='rbrace'>}</span><span class='tstring_content'>s</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='id identifier rubyid_header'>header</span><span class='rparen'>)</span>
|
733
|
-
<span class='kw'>end</span>
|
734
|
-
|
735
|
-
<span class='id identifier rubyid_puts'>puts</span>
|
736
|
-
<span class='id identifier rubyid_puts'>puts</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>---</span><span class='tstring_end'>"</span></span>
|
737
|
-
|
738
|
-
<span class='id identifier rubyid_format'>format</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_object'>object</span><span class='op'>|</span>
|
739
|
-
<span class='id identifier rubyid_object'>object</span><span class='period'>.</span><span class='id identifier rubyid_each_with_index'>each_with_index</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_field'>field</span><span class='comma'>,</span> <span class='id identifier rubyid_i'>i</span><span class='op'>|</span>
|
740
|
-
<span class='id identifier rubyid_printf'>printf</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>%-</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_lengths'>lengths</span><span class='lbracket'>[</span><span class='id identifier rubyid_i'>i</span><span class='rbracket'>]</span> <span class='op'>+</span> <span class='int'>2</span><span class='rbrace'>}</span><span class='tstring_content'>s</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='id identifier rubyid_field'>field</span><span class='rparen'>)</span>
|
741
|
-
<span class='kw'>end</span>
|
742
|
-
|
743
|
-
<span class='id identifier rubyid_puts'>puts</span>
|
744
|
-
<span class='kw'>end</span>
|
745
|
-
|
746
|
-
<span class='kw'>nil</span>
|
747
|
-
<span class='kw'>else</span>
|
748
|
-
<span class='id identifier rubyid_methods'>methods</span> <span class='op'>=</span> <span class='id identifier rubyid_path'>path</span><span class='period'>.</span><span class='id identifier rubyid_public_methods'>public_methods</span><span class='period'>.</span><span class='id identifier rubyid_reject'>reject</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_method'>method</span><span class='op'>|</span>
|
749
|
-
<span class='id identifier rubyid_method'>method</span> <span class='op'>=~</span> <span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>^orig_</span><span class='regexp_end'>/</span></span> <span class='op'>||</span> <span class='id identifier rubyid_method'>method</span><span class='period'>.</span><span class='id identifier rubyid_to_sym'>to_sym</span> <span class='op'>==</span> <span class='symbol'>:method_missing</span> <span class='op'>||</span>
|
750
|
-
<span class='const'>Object</span><span class='period'>.</span><span class='id identifier rubyid_public_methods'>public_methods</span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span><span class='lparen'>(</span><span class='id identifier rubyid_method'>method</span><span class='rparen'>)</span>
|
751
|
-
<span class='kw'>end</span>
|
752
|
-
<span class='kw'>end</span>
|
753
|
-
<span class='kw'>end</span></pre>
|
754
|
-
</td>
|
755
|
-
</tr>
|
756
|
-
</table>
|
757
|
-
</div>
|
758
|
-
|
759
|
-
<div class="method_details ">
|
760
|
-
<h3 class="signature " id="password-instance_method">
|
761
|
-
|
762
|
-
- (<tt>Object</tt>) <strong>password</strong>(password)
|
763
|
-
|
764
|
-
|
765
|
-
|
766
|
-
|
767
|
-
|
768
|
-
</h3><table class="source_code">
|
769
|
-
<tr>
|
770
|
-
<td>
|
771
|
-
<pre class="lines">
|
772
|
-
|
773
|
-
|
774
|
-
45
|
775
|
-
46
|
776
|
-
47</pre>
|
777
|
-
</td>
|
778
|
-
<td>
|
779
|
-
<pre class="code"><span class="info file"># File 'lib/zendesk_api/console/console.rb', line 45</span>
|
780
|
-
|
781
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_password'>password</span><span class='lparen'>(</span><span class='id identifier rubyid_password'>password</span><span class='rparen'>)</span>
|
782
|
-
<span class='id identifier rubyid_client'>client</span><span class='period'>.</span><span class='id identifier rubyid_config'>config</span><span class='period'>.</span><span class='id identifier rubyid_password'>password</span> <span class='op'>=</span> <span class='id identifier rubyid_password'>password</span>
|
783
|
-
<span class='kw'>end</span></pre>
|
784
|
-
</td>
|
785
|
-
</tr>
|
786
|
-
</table>
|
787
|
-
</div>
|
788
|
-
|
789
|
-
<div class="method_details ">
|
790
|
-
<h3 class="signature " id="url-instance_method">
|
791
|
-
|
792
|
-
- (<tt>Object</tt>) <strong>url</strong>(url)
|
793
|
-
|
794
|
-
|
795
|
-
|
796
|
-
|
797
|
-
|
798
|
-
</h3><table class="source_code">
|
799
|
-
<tr>
|
800
|
-
<td>
|
801
|
-
<pre class="lines">
|
802
|
-
|
803
|
-
|
804
|
-
55
|
805
|
-
56
|
806
|
-
57</pre>
|
807
|
-
</td>
|
808
|
-
<td>
|
809
|
-
<pre class="code"><span class="info file"># File 'lib/zendesk_api/console/console.rb', line 55</span>
|
810
|
-
|
811
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_url'>url</span><span class='lparen'>(</span><span class='id identifier rubyid_url'>url</span><span class='rparen'>)</span>
|
812
|
-
<span class='id identifier rubyid_client'>client</span><span class='period'>.</span><span class='id identifier rubyid_config'>config</span><span class='period'>.</span><span class='id identifier rubyid_url'>url</span> <span class='op'>=</span> <span class='id identifier rubyid_url'>url</span>
|
813
|
-
<span class='kw'>end</span></pre>
|
814
|
-
</td>
|
815
|
-
</tr>
|
816
|
-
</table>
|
817
|
-
</div>
|
818
|
-
|
819
|
-
<div class="method_details ">
|
820
|
-
<h3 class="signature " id="username-instance_method">
|
821
|
-
|
822
|
-
- (<tt>Object</tt>) <strong>username</strong>(username)
|
823
|
-
|
824
|
-
|
825
|
-
|
826
|
-
|
827
|
-
|
828
|
-
</h3><table class="source_code">
|
829
|
-
<tr>
|
830
|
-
<td>
|
831
|
-
<pre class="lines">
|
832
|
-
|
833
|
-
|
834
|
-
41
|
835
|
-
42
|
836
|
-
43</pre>
|
837
|
-
</td>
|
838
|
-
<td>
|
839
|
-
<pre class="code"><span class="info file"># File 'lib/zendesk_api/console/console.rb', line 41</span>
|
840
|
-
|
841
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_username'>username</span><span class='lparen'>(</span><span class='id identifier rubyid_username'>username</span><span class='rparen'>)</span>
|
842
|
-
<span class='id identifier rubyid_client'>client</span><span class='period'>.</span><span class='id identifier rubyid_config'>config</span><span class='period'>.</span><span class='id identifier rubyid_username'>username</span> <span class='op'>=</span> <span class='id identifier rubyid_username'>username</span>
|
843
|
-
<span class='kw'>end</span></pre>
|
844
|
-
</td>
|
845
|
-
</tr>
|
846
|
-
</table>
|
847
|
-
</div>
|
848
|
-
|
849
|
-
</div>
|
850
|
-
|
851
|
-
</div>
|
852
|
-
|
853
|
-
<div id="footer">
|
854
|
-
Generated on Mon Feb 11 17:45:36 2013 by
|
855
|
-
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
856
|
-
0.8.4.1 (ruby-1.9.3).
|
857
|
-
</div>
|
858
|
-
|
859
|
-
</body>
|
860
|
-
</html>
|