repo stringclasses 235
values | path stringlengths 11 168 | func_name stringlengths 12 143 | original_string stringlengths 83 6.91k | language stringclasses 1
value | code stringlengths 83 6.91k | code_tokens listlengths 15 1.01k | docstring stringlengths 5 25.7k | docstring_tokens listlengths 1 427 | sha stringclasses 235
values | url stringlengths 99 268 | partition stringclasses 1
value | summary stringlengths 7 202 | input_ids listlengths 502 502 | token_type_ids listlengths 502 502 | attention_mask listlengths 502 502 | labels listlengths 502 502 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Azure/azure-sdk-for-ruby | management/azure_mgmt_policy_insights/lib/2018-07-01-preview/generated/azure_mgmt_policy_insights/remediations.rb | Azure::PolicyInsights::Mgmt::V2018_07_01_preview.Remediations.list_for_subscription_next | def list_for_subscription_next(next_page_link, custom_headers:nil)
response = list_for_subscription_next_async(next_page_link, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def list_for_subscription_next(next_page_link, custom_headers:nil)
response = list_for_subscription_next_async(next_page_link, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"list_for_subscription_next",
"(",
"next_page_link",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"list_for_subscription_next_async",
"(",
"next_page_link",
",",
"custom_headers",
":custom_headers",
")",
".",
"value!",
"response",
".",
"body",
"unless... | Gets all remediations for the subscription.
@param next_page_link [String] The NextLink from the previous successful call
to List operation.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request.
@return [RemediationListResult] operation results. | [
"Gets",
"all",
"remediations",
"for",
"the",
"subscription",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_policy_insights/lib/2018-07-01-preview/generated/azure_mgmt_policy_insights/remediations.rb#L2621-L2624 | train | Gets the list of the elastic advisors. | [
30522,
13366,
2862,
1035,
2005,
1035,
15002,
1035,
2279,
1006,
2279,
1035,
3931,
1035,
4957,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
2862,
1035,
2005,
1035,
15002,
1035,
2279,
1035,
2004,
6038,
2278,
1006,
2279,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
boazsegev/combine_pdf | lib/combine_pdf/filter.rb | CombinePDF.PDFFilter.inflate_object | def inflate_object(object = nil)
return false unless object.is_a?(Hash)
filter_array = object[:Filter]
if filter_array.is_a?(Hash) && filter_array[:is_reference_only]
filter_array = filter_array[:referenced_object]
end
filter_array = [filter_array] if filter_array.is_a?(Symbol)
... | ruby | def inflate_object(object = nil)
return false unless object.is_a?(Hash)
filter_array = object[:Filter]
if filter_array.is_a?(Hash) && filter_array[:is_reference_only]
filter_array = filter_array[:referenced_object]
end
filter_array = [filter_array] if filter_array.is_a?(Symbol)
... | [
"def",
"inflate_object",
"(",
"object",
"=",
"nil",
")",
"return",
"false",
"unless",
"object",
".",
"is_a?",
"(",
"Hash",
")",
"filter_array",
"=",
"object",
"[",
":Filter",
"]",
"if",
"filter_array",
".",
"is_a?",
"(",
"Hash",
")",
"&&",
"filter_array",
... | inflate / decompress an object
object:: object to decompress. | [
"inflate",
"/",
"decompress",
"an",
"object"
] | 09054051019c069f551f3e60be789577c0f93900 | https://github.com/boazsegev/combine_pdf/blob/09054051019c069f551f3e60be789577c0f93900/lib/combine_pdf/filter.rb#L34-L88 | train | Inflate the object | [
30522,
13366,
1999,
10258,
3686,
1035,
4874,
1006,
4874,
1027,
9152,
2140,
1007,
2709,
6270,
4983,
4874,
1012,
2003,
1035,
1037,
1029,
1006,
23325,
1007,
11307,
1035,
9140,
1027,
4874,
1031,
1024,
11307,
1033,
2065,
11307,
1035,
9140,
1012,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_recovery_services_backup/lib/2016-12-01/generated/azure_mgmt_recovery_services_backup/protection_containers.rb | Azure::RecoveryServicesBackup::Mgmt::V2016_12_01.ProtectionContainers.unregister | def unregister(vault_name, resource_group_name, fabric_name, container_name, custom_headers:nil)
response = unregister_async(vault_name, resource_group_name, fabric_name, container_name, custom_headers:custom_headers).value!
nil
end | ruby | def unregister(vault_name, resource_group_name, fabric_name, container_name, custom_headers:nil)
response = unregister_async(vault_name, resource_group_name, fabric_name, container_name, custom_headers:custom_headers).value!
nil
end | [
"def",
"unregister",
"(",
"vault_name",
",",
"resource_group_name",
",",
"fabric_name",
",",
"container_name",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"unregister_async",
"(",
"vault_name",
",",
"resource_group_name",
",",
"fabric_name",
",",
"conta... | Unregisters the given container from your Recovery Services Vault. This is an
asynchronous operation. To determine
whether the backend service has finished processing the request, call Get
Container Operation Result API.
@param vault_name [String] The name of the recovery services vault.
@param resource_group_nam... | [
"Unregisters",
"the",
"given",
"container",
"from",
"your",
"Recovery",
"Services",
"Vault",
".",
"This",
"is",
"an",
"asynchronous",
"operation",
".",
"To",
"determine",
"whether",
"the",
"backend",
"service",
"has",
"finished",
"processing",
"the",
"request",
... | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_recovery_services_backup/lib/2016-12-01/generated/azure_mgmt_recovery_services_backup/protection_containers.rb#L276-L279 | train | Unregisters the specified container from the specified vault. | [
30522,
13366,
4895,
2890,
24063,
2121,
1006,
11632,
1035,
2171,
1010,
7692,
1035,
2177,
1035,
2171,
1010,
8313,
1035,
2171,
1010,
11661,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
4895,
2890,
24063,
2121,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
grpc/grpc | src/ruby/lib/grpc/generic/bidi_call.rb | GRPC.BidiCall.run_on_server | def run_on_server(gen_each_reply, requests)
replies = nil
# Pass in the optional call object parameter if possible
if gen_each_reply.arity == 1
replies = gen_each_reply.call(requests)
elsif gen_each_reply.arity == 2
replies = gen_each_reply.call(requests, @req_view)
else
... | ruby | def run_on_server(gen_each_reply, requests)
replies = nil
# Pass in the optional call object parameter if possible
if gen_each_reply.arity == 1
replies = gen_each_reply.call(requests)
elsif gen_each_reply.arity == 2
replies = gen_each_reply.call(requests, @req_view)
else
... | [
"def",
"run_on_server",
"(",
"gen_each_reply",
",",
"requests",
")",
"replies",
"=",
"nil",
"# Pass in the optional call object parameter if possible",
"if",
"gen_each_reply",
".",
"arity",
"==",
"1",
"replies",
"=",
"gen_each_reply",
".",
"call",
"(",
"requests",
")"... | Begins orchestration of the Bidi stream for a server generating replies.
N.B. gen_each_reply is a func(Enumerable<Requests>)
It takes an enumerable of requests as an arg, in case there is a
relationship between the stream of requests and the stream of replies.
This does not mean that must necessarily be one. E.... | [
"Begins",
"orchestration",
"of",
"the",
"Bidi",
"stream",
"for",
"a",
"server",
"generating",
"replies",
"."
] | f3937f0e55227a4ef3a23f895d3b204a947610f8 | https://github.com/grpc/grpc/blob/f3937f0e55227a4ef3a23f895d3b204a947610f8/src/ruby/lib/grpc/generic/bidi_call.rb#L92-L105 | train | Run the reply generator on the server | [
30522,
13366,
2448,
1035,
2006,
1035,
8241,
1006,
8991,
1035,
2169,
1035,
7514,
1010,
11186,
1007,
14054,
1027,
9152,
2140,
1001,
3413,
1999,
1996,
11887,
2655,
4874,
16381,
2065,
2825,
2065,
8991,
1035,
2169,
1035,
7514,
1012,
10488,
3723,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
magnusvk/counter_culture | lib/counter_culture/counter.rb | CounterCulture.Counter.relation_klass | def relation_klass(relation, source: nil, was: false)
reflect = relation_reflect(relation)
if reflect.options.key?(:polymorphic)
raise "Can't work out relation's class without being passed object (relation: #{relation}, reflect: #{reflect})" if source.nil?
raise "Can't work out polymorhpic r... | ruby | def relation_klass(relation, source: nil, was: false)
reflect = relation_reflect(relation)
if reflect.options.key?(:polymorphic)
raise "Can't work out relation's class without being passed object (relation: #{relation}, reflect: #{reflect})" if source.nil?
raise "Can't work out polymorhpic r... | [
"def",
"relation_klass",
"(",
"relation",
",",
"source",
":",
"nil",
",",
"was",
":",
"false",
")",
"reflect",
"=",
"relation_reflect",
"(",
"relation",
")",
"if",
"reflect",
".",
"options",
".",
"key?",
"(",
":polymorphic",
")",
"raise",
"\"Can't work out r... | gets the class of the given relation
relation: a symbol or array of symbols; specifies the relation
that has the counter cache column
source [optional]: the source object,
only needed for polymorphic associations,
probably only works with a single relation (symbol, or array of 1 symbol)
was: boolean
we'... | [
"gets",
"the",
"class",
"of",
"the",
"given",
"relation"
] | 6b5bd4d6e1ee4f10f262ace7cfed5776af9520ba | https://github.com/magnusvk/counter_culture/blob/6b5bd4d6e1ee4f10f262ace7cfed5776af9520ba/lib/counter_culture/counter.rb#L188-L204 | train | Returns the class of the relation that is being used for the relation. | [
30522,
13366,
7189,
1035,
1047,
27102,
1006,
7189,
1010,
3120,
1024,
9152,
2140,
1010,
2001,
1024,
6270,
1007,
8339,
1027,
7189,
1035,
8339,
1006,
7189,
1007,
2065,
8339,
1012,
7047,
1012,
3145,
1029,
1006,
1024,
26572,
18078,
1007,
5333,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
rails/rails | actionview/lib/action_view/routing_url_for.rb | ActionView.RoutingUrlFor.url_for | def url_for(options = nil)
case options
when String
options
when nil
super(only_path: _generate_paths_by_default)
when Hash
options = options.symbolize_keys
ensure_only_path_option(options)
super(options)
when ActionController::Parameters
en... | ruby | def url_for(options = nil)
case options
when String
options
when nil
super(only_path: _generate_paths_by_default)
when Hash
options = options.symbolize_keys
ensure_only_path_option(options)
super(options)
when ActionController::Parameters
en... | [
"def",
"url_for",
"(",
"options",
"=",
"nil",
")",
"case",
"options",
"when",
"String",
"options",
"when",
"nil",
"super",
"(",
"only_path",
":",
"_generate_paths_by_default",
")",
"when",
"Hash",
"options",
"=",
"options",
".",
"symbolize_keys",
"ensure_only_pa... | Returns the URL for the set of +options+ provided. This takes the
same options as +url_for+ in Action Controller (see the
documentation for <tt>ActionController::Base#url_for</tt>). Note that by default
<tt>:only_path</tt> is <tt>true</tt> so you'll get the relative "/controller/action"
instead of the fully qualifi... | [
"Returns",
"the",
"URL",
"for",
"the",
"set",
"of",
"+",
"options",
"+",
"provided",
".",
"This",
"takes",
"the",
"same",
"options",
"as",
"+",
"url_for",
"+",
"in",
"Action",
"Controller",
"(",
"see",
"the",
"documentation",
"for",
"<tt",
">",
"ActionCo... | 85a8bc644be69908f05740a5886ec19cd3679df5 | https://github.com/rails/rails/blob/85a8bc644be69908f05740a5886ec19cd3679df5/actionview/lib/action_view/routing_url_for.rb#L79-L119 | train | Returns the url for the current route | [
30522,
13366,
24471,
2140,
1035,
2005,
1006,
7047,
1027,
9152,
2140,
1007,
2553,
7047,
2043,
5164,
7047,
2043,
9152,
2140,
3565,
1006,
2069,
1035,
4130,
1024,
1035,
9699,
1035,
10425,
1035,
2011,
1035,
12398,
1007,
2043,
23325,
7047,
1027,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_stor_simple8000_series/lib/2017-06-01/generated/azure_mgmt_stor_simple8000_series/devices.rb | Azure::StorSimple8000Series::Mgmt::V2017_06_01.Devices.list_failover_sets | def list_failover_sets(device_name, resource_group_name, manager_name, custom_headers:nil)
response = list_failover_sets_async(device_name, resource_group_name, manager_name, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def list_failover_sets(device_name, resource_group_name, manager_name, custom_headers:nil)
response = list_failover_sets_async(device_name, resource_group_name, manager_name, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"list_failover_sets",
"(",
"device_name",
",",
"resource_group_name",
",",
"manager_name",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"list_failover_sets_async",
"(",
"device_name",
",",
"resource_group_name",
",",
"manager_name",
",",
"custom_heade... | Returns all failover sets for a given device and their eligibility for
participating in a failover. A failover set refers to a set of volume
containers that need to be failed-over as a single unit to maintain data
integrity.
@param device_name [String] The device name
@param resource_group_name [String] The resou... | [
"Returns",
"all",
"failover",
"sets",
"for",
"a",
"given",
"device",
"and",
"their",
"eligibility",
"for",
"participating",
"in",
"a",
"failover",
".",
"A",
"failover",
"set",
"refers",
"to",
"a",
"set",
"of",
"volume",
"containers",
"that",
"need",
"to",
... | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_stor_simple8000_series/lib/2017-06-01/generated/azure_mgmt_stor_simple8000_series/devices.rb#L608-L611 | train | Gets the number of failover sets for the device. | [
30522,
13366,
2862,
1035,
8246,
7840,
1035,
4520,
1006,
5080,
1035,
2171,
1010,
7692,
1035,
2177,
1035,
2171,
1010,
3208,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
2862,
1035,
8246,
7840,
1035,
4520,
1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
etewiah/property_web_builder | app/controllers/pwb/api/v1/translations_controller.rb | Pwb.Api::V1::TranslationsController.delete_translation_values | def delete_translation_values
field_key = FieldKey.find_by_global_key(params[:i18n_key])
field_key.visible = false
# not convinced it makes sense to delete the associated translations
# phrases = I18n::Backend::ActiveRecord::Translation.where(:key => params[:i18n_key])
# phrases.destroy_a... | ruby | def delete_translation_values
field_key = FieldKey.find_by_global_key(params[:i18n_key])
field_key.visible = false
# not convinced it makes sense to delete the associated translations
# phrases = I18n::Backend::ActiveRecord::Translation.where(:key => params[:i18n_key])
# phrases.destroy_a... | [
"def",
"delete_translation_values",
"field_key",
"=",
"FieldKey",
".",
"find_by_global_key",
"(",
"params",
"[",
":i18n_key",
"]",
")",
"field_key",
".",
"visible",
"=",
"false",
"# not convinced it makes sense to delete the associated translations",
"# phrases = I18n::Backend:... | deletes the field_key referencing the translation | [
"deletes",
"the",
"field_key",
"referencing",
"the",
"translation"
] | fba4e6d4ffa7bc1f4d3b50dfa5a6a9fbfee23f21 | https://github.com/etewiah/property_web_builder/blob/fba4e6d4ffa7bc1f4d3b50dfa5a6a9fbfee23f21/app/controllers/pwb/api/v1/translations_controller.rb#L49-L59 | train | delete all translation values | [
30522,
13366,
3972,
12870,
1035,
5449,
1035,
5300,
2492,
1035,
3145,
1027,
2492,
14839,
1012,
2424,
1035,
2011,
1035,
3795,
1035,
3145,
1006,
11498,
5244,
1031,
1024,
1045,
15136,
2078,
1035,
3145,
1033,
1007,
2492,
1035,
3145,
1012,
5710,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
aws/aws-sdk-ruby | gems/aws-sdk-iam/lib/aws-sdk-iam/policy.rb | Aws::IAM.Policy.attached_users | def attached_users(options = {})
batches = Enumerator.new do |y|
options = options.merge(
policy_arn: @arn,
entity_filter: "User"
)
resp = @client.list_entities_for_policy(options)
resp.each_page do |page|
batch = []
page.data.policy_users.ea... | ruby | def attached_users(options = {})
batches = Enumerator.new do |y|
options = options.merge(
policy_arn: @arn,
entity_filter: "User"
)
resp = @client.list_entities_for_policy(options)
resp.each_page do |page|
batch = []
page.data.policy_users.ea... | [
"def",
"attached_users",
"(",
"options",
"=",
"{",
"}",
")",
"batches",
"=",
"Enumerator",
".",
"new",
"do",
"|",
"y",
"|",
"options",
"=",
"options",
".",
"merge",
"(",
"policy_arn",
":",
"@arn",
",",
"entity_filter",
":",
"\"User\"",
")",
"resp",
"="... | @example Request syntax with placeholder values
attached_users = policy.attached_users({
path_prefix: "pathType",
policy_usage_filter: "PermissionsPolicy", # accepts PermissionsPolicy, PermissionsBoundary
})
@param [Hash] options ({})
@option options [String] :path_prefix
The path prefix for filte... | [
"@example",
"Request",
"syntax",
"with",
"placeholder",
"values"
] | e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d | https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-iam/lib/aws-sdk-iam/policy.rb#L624-L644 | train | Returns an array of all users attached to this policy | [
30522,
13366,
4987,
1035,
5198,
1006,
7047,
1027,
1063,
1065,
1007,
14108,
2229,
1027,
4372,
17897,
16259,
1012,
2047,
2079,
1064,
1061,
1064,
7047,
1027,
7047,
1012,
13590,
1006,
3343,
1035,
12098,
2078,
1024,
1030,
12098,
2078,
1010,
9178... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
mongodb/mongo-ruby-driver | lib/mongo/client.rb | Mongo.Client.reconnect | def reconnect
addresses = cluster.addresses.map(&:to_s)
@cluster.disconnect! rescue nil
@cluster = Cluster.new(addresses, monitoring, cluster_options)
true
end | ruby | def reconnect
addresses = cluster.addresses.map(&:to_s)
@cluster.disconnect! rescue nil
@cluster = Cluster.new(addresses, monitoring, cluster_options)
true
end | [
"def",
"reconnect",
"addresses",
"=",
"cluster",
".",
"addresses",
".",
"map",
"(",
":to_s",
")",
"@cluster",
".",
"disconnect!",
"rescue",
"nil",
"@cluster",
"=",
"Cluster",
".",
"new",
"(",
"addresses",
",",
"monitoring",
",",
"cluster_options",
")",
"true... | Reconnect the client.
@example Reconnect the client.
client.reconnect
@return [ true ] Always true.
@since 2.1.0 | [
"Reconnect",
"the",
"client",
"."
] | dca26d0870cb3386fad9ccc1d17228097c1fe1c8 | https://github.com/mongodb/mongo-ruby-driver/blob/dca26d0870cb3386fad9ccc1d17228097c1fe1c8/lib/mongo/client.rb#L575-L582 | train | Reconnects to the cluster | [
30522,
13366,
28667,
18256,
6593,
11596,
1027,
9324,
1012,
11596,
1012,
4949,
1006,
1004,
1024,
2000,
1035,
1055,
1007,
1030,
9324,
1012,
12532,
10087,
6593,
999,
5343,
9152,
2140,
1030,
9324,
1027,
9324,
1012,
2047,
1006,
11596,
1010,
8822... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
sensu/sensu | lib/sensu/daemon.rb | Sensu.Daemon.load_extensions | def load_extensions(options={})
extensions_options = options.merge(:extensions => @settings[:extensions])
@extensions = Extensions.get(extensions_options)
log_notices(@extensions.warnings)
extension_settings = @settings.to_hash.dup
@extensions.all.each do |extension|
extension.logg... | ruby | def load_extensions(options={})
extensions_options = options.merge(:extensions => @settings[:extensions])
@extensions = Extensions.get(extensions_options)
log_notices(@extensions.warnings)
extension_settings = @settings.to_hash.dup
@extensions.all.each do |extension|
extension.logg... | [
"def",
"load_extensions",
"(",
"options",
"=",
"{",
"}",
")",
"extensions_options",
"=",
"options",
".",
"merge",
"(",
":extensions",
"=>",
"@settings",
"[",
":extensions",
"]",
")",
"@extensions",
"=",
"Extensions",
".",
"get",
"(",
"extensions_options",
")",... | Load Sensu extensions and log any notices. Set the logger and
settings for each extension instance. This method creates the
extensions instance variable: `@extensions`.
https://github.com/sensu/sensu-extensions
https://github.com/sensu/sensu-extension
@param options [Hash] | [
"Load",
"Sensu",
"extensions",
"and",
"log",
"any",
"notices",
".",
"Set",
"the",
"logger",
"and",
"settings",
"for",
"each",
"extension",
"instance",
".",
"This",
"method",
"creates",
"the",
"extensions",
"instance",
"variable",
":",
"@extensions",
"."
] | 51319e4b58c8d9986f101ad71ff729aa3e51e951 | https://github.com/sensu/sensu/blob/51319e4b58c8d9986f101ad71ff729aa3e51e951/lib/sensu/daemon.rb#L186-L195 | train | Load all extensions | [
30522,
13366,
7170,
1035,
14305,
1006,
7047,
1027,
1063,
1065,
1007,
14305,
1035,
7047,
1027,
7047,
1012,
13590,
1006,
1024,
14305,
1027,
1028,
1030,
10906,
1031,
1024,
14305,
1033,
1007,
1030,
14305,
1027,
14305,
1012,
2131,
1006,
14305,
1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
boazsegev/combine_pdf | lib/combine_pdf/page_methods.rb | CombinePDF.Page_Methods.orientation | def orientation(force = nil, clockwise = true)
a = page_size
return (a[2] - a[0] > a[3] - a[1]) ? :landscape : :portrait unless force
unless orientation == force || (a[2] - a[0] == a[3] - a[1])
self[:Rotate] = 0
clockwise ? rotate_right : rotate_left
end
self
end | ruby | def orientation(force = nil, clockwise = true)
a = page_size
return (a[2] - a[0] > a[3] - a[1]) ? :landscape : :portrait unless force
unless orientation == force || (a[2] - a[0] == a[3] - a[1])
self[:Rotate] = 0
clockwise ? rotate_right : rotate_left
end
self
end | [
"def",
"orientation",
"(",
"force",
"=",
"nil",
",",
"clockwise",
"=",
"true",
")",
"a",
"=",
"page_size",
"return",
"(",
"a",
"[",
"2",
"]",
"-",
"a",
"[",
"0",
"]",
">",
"a",
"[",
"3",
"]",
"-",
"a",
"[",
"1",
"]",
")",
"?",
":landscape",
... | get or set (by clockwise rotation) the page's data orientation.
note that the data's orientation is the way data is oriented on the page.
The display orientati0n (which might different) is controlled by the `:Rotate` property. see {#fix_orientation} for more details.
accepts one optional parameter:
force:: to get... | [
"get",
"or",
"set",
"(",
"by",
"clockwise",
"rotation",
")",
"the",
"page",
"s",
"data",
"orientation",
"."
] | 09054051019c069f551f3e60be789577c0f93900 | https://github.com/boazsegev/combine_pdf/blob/09054051019c069f551f3e60be789577c0f93900/lib/combine_pdf/page_methods.rb#L525-L533 | train | Returns the orientation of the page. | [
30522,
13366,
10296,
1006,
2486,
1027,
9152,
2140,
1010,
22839,
1027,
2995,
1007,
1037,
1027,
3931,
1035,
2946,
2709,
1006,
1037,
1031,
1016,
1033,
1011,
1037,
1031,
1014,
1033,
1028,
1037,
1031,
1017,
1033,
1011,
1037,
1031,
1015,
1033,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
david942j/one_gadget | lib/one_gadget/cli.rb | OneGadget.CLI.display_gadgets | def display_gadgets(gadgets, raw)
if raw
show(gadgets.map(&:offset).join(' '))
else
show(gadgets.map(&:inspect).join("\n"))
end
end | ruby | def display_gadgets(gadgets, raw)
if raw
show(gadgets.map(&:offset).join(' '))
else
show(gadgets.map(&:inspect).join("\n"))
end
end | [
"def",
"display_gadgets",
"(",
"gadgets",
",",
"raw",
")",
"if",
"raw",
"show",
"(",
"gadgets",
".",
"map",
"(",
":offset",
")",
".",
"join",
"(",
"' '",
")",
")",
"else",
"show",
"(",
"gadgets",
".",
"map",
"(",
":inspect",
")",
".",
"join",
"(",
... | Writes gadgets to stdout.
@param [Array<OneGadget::Gadget::Gadget>] gadgets
@param [Boolean] raw
In raw mode, only the offset of gadgets are printed.
@return [true] | [
"Writes",
"gadgets",
"to",
"stdout",
"."
] | ff6ef04541e83441bfe3c2664a6febd1640f4263 | https://github.com/david942j/one_gadget/blob/ff6ef04541e83441bfe3c2664a6febd1640f4263/lib/one_gadget/cli.rb#L177-L183 | train | displays the gadgets | [
30522,
13366,
4653,
1035,
11721,
28682,
1006,
11721,
28682,
1010,
6315,
1007,
2065,
6315,
2265,
1006,
11721,
28682,
1012,
4949,
1006,
1004,
1024,
16396,
1007,
1012,
3693,
1006,
1005,
1005,
1007,
1007,
2842,
2265,
1006,
11721,
28682,
1012,
4... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
aws/aws-sdk-ruby | gems/aws-sdk-iam/lib/aws-sdk-iam/user.rb | Aws::IAM.User.remove_group | def remove_group(options = {})
options = options.merge(user_name: @name)
resp = @client.remove_user_from_group(options)
resp.data
end | ruby | def remove_group(options = {})
options = options.merge(user_name: @name)
resp = @client.remove_user_from_group(options)
resp.data
end | [
"def",
"remove_group",
"(",
"options",
"=",
"{",
"}",
")",
"options",
"=",
"options",
".",
"merge",
"(",
"user_name",
":",
"@name",
")",
"resp",
"=",
"@client",
".",
"remove_user_from_group",
"(",
"options",
")",
"resp",
".",
"data",
"end"
] | @example Request syntax with placeholder values
user.remove_group({
group_name: "groupNameType", # required
})
@param [Hash] options ({})
@option options [required, String] :group_name
The name of the group to update.
This parameter allows (through its [regex pattern][1]) a string of
characters ... | [
"@example",
"Request",
"syntax",
"with",
"placeholder",
"values"
] | e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d | https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-iam/lib/aws-sdk-iam/user.rb#L616-L620 | train | Remove the user from a group | [
30522,
13366,
6366,
1035,
2177,
1006,
7047,
1027,
1063,
1065,
1007,
7047,
1027,
7047,
1012,
13590,
1006,
5310,
1035,
2171,
1024,
1030,
2171,
1007,
24501,
2361,
1027,
1030,
7396,
1012,
6366,
1035,
5310,
1035,
2013,
1035,
2177,
1006,
7047,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_network/lib/2018-10-01/generated/azure_mgmt_network/connection_monitors.rb | Azure::Network::Mgmt::V2018_10_01.ConnectionMonitors.begin_start | def begin_start(resource_group_name, network_watcher_name, connection_monitor_name, custom_headers:nil)
response = begin_start_async(resource_group_name, network_watcher_name, connection_monitor_name, custom_headers:custom_headers).value!
nil
end | ruby | def begin_start(resource_group_name, network_watcher_name, connection_monitor_name, custom_headers:nil)
response = begin_start_async(resource_group_name, network_watcher_name, connection_monitor_name, custom_headers:custom_headers).value!
nil
end | [
"def",
"begin_start",
"(",
"resource_group_name",
",",
"network_watcher_name",
",",
"connection_monitor_name",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"begin_start_async",
"(",
"resource_group_name",
",",
"network_watcher_name",
",",
"connection_monitor_nam... | Starts the specified connection monitor.
@param resource_group_name [String] The name of the resource group containing
Network Watcher.
@param network_watcher_name [String] The name of the Network Watcher
resource.
@param connection_monitor_name [String] The name of the connection monitor.
@param custom_headers ... | [
"Starts",
"the",
"specified",
"connection",
"monitor",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_network/lib/2018-10-01/generated/azure_mgmt_network/connection_monitors.rb#L778-L781 | train | Starts a connection monitor. | [
30522,
13366,
4088,
1035,
2707,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2897,
1035,
3422,
2121,
1035,
2171,
1010,
4434,
1035,
8080,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
4088,
1035,
2707,
1035,
2... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_recovery_services_site_recovery/lib/2016-08-10/generated/azure_mgmt_recovery_services_site_recovery/recovery_points.rb | Azure::RecoveryServicesSiteRecovery::Mgmt::V2016_08_10.RecoveryPoints.list_by_replication_protected_items_as_lazy | def list_by_replication_protected_items_as_lazy(fabric_name, protection_container_name, replicated_protected_item_name, custom_headers:nil)
response = list_by_replication_protected_items_async(fabric_name, protection_container_name, replicated_protected_item_name, custom_headers:custom_headers).value!
unles... | ruby | def list_by_replication_protected_items_as_lazy(fabric_name, protection_container_name, replicated_protected_item_name, custom_headers:nil)
response = list_by_replication_protected_items_async(fabric_name, protection_container_name, replicated_protected_item_name, custom_headers:custom_headers).value!
unles... | [
"def",
"list_by_replication_protected_items_as_lazy",
"(",
"fabric_name",
",",
"protection_container_name",
",",
"replicated_protected_item_name",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"list_by_replication_protected_items_async",
"(",
"fabric_name",
",",
"pro... | Get recovery points for a replication protected item.
Lists the available recovery points for a replication protected item.
@param fabric_name [String] The fabric name.
@param protection_container_name [String] The protection container name.
@param replicated_protected_item_name [String] The replication protected... | [
"Get",
"recovery",
"points",
"for",
"a",
"replication",
"protected",
"item",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_recovery_services_site_recovery/lib/2016-08-10/generated/azure_mgmt_recovery_services_site_recovery/recovery_points.rb#L351-L360 | train | Gets all the protected items in the specified fabric. | [
30522,
13366,
2862,
1035,
2011,
1035,
21647,
1035,
5123,
1035,
5167,
1035,
2004,
1035,
13971,
1006,
8313,
1035,
2171,
1010,
3860,
1035,
11661,
1035,
2171,
1010,
28024,
2094,
1035,
5123,
1035,
8875,
1035,
2171,
1010,
7661,
1035,
20346,
2015,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_automation/lib/2015-10-31/generated/azure_mgmt_automation/hybrid_runbook_worker_group_operations.rb | Azure::Automation::Mgmt::V2015_10_31.HybridRunbookWorkerGroupOperations.update_with_http_info | def update_with_http_info(resource_group_name, automation_account_name, hybrid_runbook_worker_group_name, parameters, custom_headers:nil)
update_async(resource_group_name, automation_account_name, hybrid_runbook_worker_group_name, parameters, custom_headers:custom_headers).value!
end | ruby | def update_with_http_info(resource_group_name, automation_account_name, hybrid_runbook_worker_group_name, parameters, custom_headers:nil)
update_async(resource_group_name, automation_account_name, hybrid_runbook_worker_group_name, parameters, custom_headers:custom_headers).value!
end | [
"def",
"update_with_http_info",
"(",
"resource_group_name",
",",
"automation_account_name",
",",
"hybrid_runbook_worker_group_name",
",",
"parameters",
",",
"custom_headers",
":",
"nil",
")",
"update_async",
"(",
"resource_group_name",
",",
"automation_account_name",
",",
"... | Update a hybrid runbook worker group.
@param resource_group_name [String] Name of an Azure Resource group.
@param automation_account_name [String] The name of the automation account.
@param hybrid_runbook_worker_group_name [String] The hybrid runbook worker
group name
@param parameters [HybridRunbookWorkerGroupUp... | [
"Update",
"a",
"hybrid",
"runbook",
"worker",
"group",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_automation/lib/2015-10-31/generated/azure_mgmt_automation/hybrid_runbook_worker_group_operations.rb#L250-L252 | train | Updates a hybrid runbook worker group. | [
30522,
13366,
10651,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
19309,
1035,
4070,
1035,
2171,
1010,
8893,
1035,
2448,
8654,
1035,
7309,
1035,
2177,
1035,
2171,
1010,
11709,
1010,
7661,
1035,
20346,
2015,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
square/connect-ruby-sdk | lib/square_connect/api/catalog_api.rb | SquareConnect.CatalogApi.upsert_catalog_object | def upsert_catalog_object(body, opts = {})
data, _status_code, _headers = upsert_catalog_object_with_http_info(body, opts)
return data
end | ruby | def upsert_catalog_object(body, opts = {})
data, _status_code, _headers = upsert_catalog_object_with_http_info(body, opts)
return data
end | [
"def",
"upsert_catalog_object",
"(",
"body",
",",
"opts",
"=",
"{",
"}",
")",
"data",
",",
"_status_code",
",",
"_headers",
"=",
"upsert_catalog_object_with_http_info",
"(",
"body",
",",
"opts",
")",
"return",
"data",
"end"
] | UpsertCatalogObject
Creates or updates the target [CatalogObject](#type-catalogobject).
@param body An object containing the fields to POST for the request. See the corresponding object definition for field details.
@param [Hash] opts the optional parameters
@return [UpsertCatalogObjectResponse] | [
"UpsertCatalogObject",
"Creates",
"or",
"updates",
"the",
"target",
"[",
"CatalogObject",
"]",
"(",
"#type",
"-",
"catalogobject",
")",
"."
] | 798eb9ded716f23b9f1518386f1c311a34bca8bf | https://github.com/square/connect-ruby-sdk/blob/798eb9ded716f23b9f1518386f1c311a34bca8bf/lib/square_connect/api/catalog_api.rb#L576-L579 | train | Upserts a catalog object | [
30522,
13366,
11139,
8743,
1035,
12105,
1035,
4874,
1006,
2303,
1010,
23569,
2015,
1027,
1063,
1065,
1007,
2951,
1010,
1035,
3570,
1035,
3642,
1010,
1035,
20346,
2015,
1027,
11139,
8743,
1035,
12105,
1035,
4874,
1035,
2007,
1035,
8299,
1035... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
mongodb/mongoid | lib/mongoid/criteria.rb | Mongoid.Criteria.where | def where(expression)
if expression.is_a?(::String) && embedded?
raise Errors::UnsupportedJavascript.new(klass, expression)
end
super
end | ruby | def where(expression)
if expression.is_a?(::String) && embedded?
raise Errors::UnsupportedJavascript.new(klass, expression)
end
super
end | [
"def",
"where",
"(",
"expression",
")",
"if",
"expression",
".",
"is_a?",
"(",
"::",
"String",
")",
"&&",
"embedded?",
"raise",
"Errors",
"::",
"UnsupportedJavascript",
".",
"new",
"(",
"klass",
",",
"expression",
")",
"end",
"super",
"end"
] | This is the general entry point for most MongoDB queries. This either
creates a standard field: value selection, and expanded selection with
the use of hash methods, or a $where selection if a string is provided.
@example Add a standard selection.
criteria.where(name: "syd")
@example Add a javascript selection... | [
"This",
"is",
"the",
"general",
"entry",
"point",
"for",
"most",
"MongoDB",
"queries",
".",
"This",
"either",
"creates",
"a",
"standard",
"field",
":",
"value",
"selection",
"and",
"expanded",
"selection",
"with",
"the",
"use",
"of",
"hash",
"methods",
"or",... | 56976e32610f4c2450882b0bfe14da099f0703f4 | https://github.com/mongodb/mongoid/blob/56976e32610f4c2450882b0bfe14da099f0703f4/lib/mongoid/criteria.rb#L402-L407 | train | Returns the result of the where statement. | [
30522,
13366,
2073,
1006,
3670,
1007,
2065,
3670,
1012,
2003,
1035,
1037,
1029,
1006,
1024,
1024,
5164,
1007,
1004,
1004,
11157,
1029,
5333,
10697,
1024,
1024,
4895,
6342,
9397,
15613,
3900,
12044,
23235,
1012,
2047,
1006,
1047,
27102,
1010... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
randym/axlsx | lib/axlsx/workbook/worksheet/worksheet.rb | Axlsx.Worksheet.outline_level_rows | def outline_level_rows(start_index, end_index, level = 1, collapsed = true)
outline rows, (start_index..end_index), level, collapsed
end | ruby | def outline_level_rows(start_index, end_index, level = 1, collapsed = true)
outline rows, (start_index..end_index), level, collapsed
end | [
"def",
"outline_level_rows",
"(",
"start_index",
",",
"end_index",
",",
"level",
"=",
"1",
",",
"collapsed",
"=",
"true",
")",
"outline",
"rows",
",",
"(",
"start_index",
"..",
"end_index",
")",
",",
"level",
",",
"collapsed",
"end"
] | shortcut level to specify the outline level for a series of rows
Oulining is what lets you add collapse and expand to a data set.
@param [Integer] start_index The zero based index of the first row of outlining.
@param [Integer] end_index The zero based index of the last row to be outlined
@param [integer] level Th... | [
"shortcut",
"level",
"to",
"specify",
"the",
"outline",
"level",
"for",
"a",
"series",
"of",
"rows",
"Oulining",
"is",
"what",
"lets",
"you",
"add",
"collapse",
"and",
"expand",
"to",
"a",
"data",
"set",
"."
] | c593a08b2a929dac7aa8dc418b55e26b4c49dc34 | https://github.com/randym/axlsx/blob/c593a08b2a929dac7aa8dc418b55e26b4c49dc34/lib/axlsx/workbook/worksheet/worksheet.rb#L627-L629 | train | Returns the outline rows for the specified range of rows | [
30522,
13366,
12685,
1035,
2504,
1035,
10281,
1006,
2707,
1035,
5950,
1010,
2203,
1035,
5950,
1010,
2504,
1027,
1015,
1010,
7798,
1027,
2995,
1007,
12685,
10281,
1010,
1006,
2707,
1035,
5950,
1012,
1012,
2203,
1035,
5950,
1007,
1010,
2504,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
deivid-rodriguez/byebug | lib/byebug/runner.rb | Byebug.Runner.run | def run
Byebug.mode = :standalone
option_parser.order!($ARGV)
return if non_script_option? || error_in_script?
$PROGRAM_NAME = program
Byebug.run_init_script if init_script
loop do
debug_program
break if quit
ControlProcessor.new(nil, interface).process_... | ruby | def run
Byebug.mode = :standalone
option_parser.order!($ARGV)
return if non_script_option? || error_in_script?
$PROGRAM_NAME = program
Byebug.run_init_script if init_script
loop do
debug_program
break if quit
ControlProcessor.new(nil, interface).process_... | [
"def",
"run",
"Byebug",
".",
"mode",
"=",
":standalone",
"option_parser",
".",
"order!",
"(",
"$ARGV",
")",
"return",
"if",
"non_script_option?",
"||",
"error_in_script?",
"$PROGRAM_NAME",
"=",
"program",
"Byebug",
".",
"run_init_script",
"if",
"init_script",
"loo... | Starts byebug to debug a program. | [
"Starts",
"byebug",
"to",
"debug",
"a",
"program",
"."
] | bf41a63858a648baa7fb621600d6451786d1572a | https://github.com/deivid-rodriguez/byebug/blob/bf41a63858a648baa7fb621600d6451786d1572a/lib/byebug/runner.rb#L92-L109 | train | Run the program | [
30522,
13366,
2448,
9061,
8569,
2290,
1012,
5549,
1027,
1024,
26609,
5724,
1035,
11968,
8043,
1012,
2344,
999,
1006,
1002,
12098,
2290,
2615,
1007,
2709,
2065,
2512,
1035,
5896,
1035,
5724,
1029,
1064,
1064,
7561,
1035,
1999,
1035,
5896,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/product_policy.rb | Azure::ApiManagement::Mgmt::V2018_01_01.ProductPolicy.get_entity_tag_with_http_info | def get_entity_tag_with_http_info(resource_group_name, service_name, product_id, custom_headers:nil)
get_entity_tag_async(resource_group_name, service_name, product_id, custom_headers:custom_headers).value!
end | ruby | def get_entity_tag_with_http_info(resource_group_name, service_name, product_id, custom_headers:nil)
get_entity_tag_async(resource_group_name, service_name, product_id, custom_headers:custom_headers).value!
end | [
"def",
"get_entity_tag_with_http_info",
"(",
"resource_group_name",
",",
"service_name",
",",
"product_id",
",",
"custom_headers",
":",
"nil",
")",
"get_entity_tag_async",
"(",
"resource_group_name",
",",
"service_name",
",",
"product_id",
",",
"custom_headers",
":custom_... | Get the ETag of the policy configuration at the Product level.
@param resource_group_name [String] The name of the resource group.
@param service_name [String] The name of the API Management service.
@param product_id [String] Product identifier. Must be unique in the current
API Management service instance.
@par... | [
"Get",
"the",
"ETag",
"of",
"the",
"policy",
"configuration",
"at",
"the",
"Product",
"level",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/product_policy.rb#L157-L159 | train | Gets the entity tag for the specified product. | [
30522,
13366,
2131,
1035,
9178,
1035,
6415,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2326,
1035,
2171,
1010,
4031,
1035,
8909,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
2131,
1035,
9178,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
hashicorp/vault-ruby | lib/vault/api/approle.rb | Vault.AppRole.role | def role(name)
json = client.get("/v1/auth/approle/role/#{encode_path(name)}")
return Secret.decode(json)
rescue HTTPError => e
return nil if e.code == 404
raise
end | ruby | def role(name)
json = client.get("/v1/auth/approle/role/#{encode_path(name)}")
return Secret.decode(json)
rescue HTTPError => e
return nil if e.code == 404
raise
end | [
"def",
"role",
"(",
"name",
")",
"json",
"=",
"client",
".",
"get",
"(",
"\"/v1/auth/approle/role/#{encode_path(name)}\"",
")",
"return",
"Secret",
".",
"decode",
"(",
"json",
")",
"rescue",
"HTTPError",
"=>",
"e",
"return",
"nil",
"if",
"e",
".",
"code",
... | Gets the AppRole by the given name. If an AppRole does not exist by that
name, +nil+ is returned.
@example
Vault.approle.role("testrole") #=> #<Vault::Secret lease_id="...">
@return [Secret, nil] | [
"Gets",
"the",
"AppRole",
"by",
"the",
"given",
"name",
".",
"If",
"an",
"AppRole",
"does",
"not",
"exist",
"by",
"that",
"name",
"+",
"nil",
"+",
"is",
"returned",
"."
] | 02f0532a802ba1a2a0d8703a4585dab76eb9d864 | https://github.com/hashicorp/vault-ruby/blob/02f0532a802ba1a2a0d8703a4585dab76eb9d864/lib/vault/api/approle.rb#L72-L78 | train | Get the role for the given name. | [
30522,
13366,
2535,
1006,
2171,
1007,
1046,
3385,
1027,
7396,
1012,
2131,
1006,
1000,
1013,
1058,
2487,
1013,
8740,
2705,
1013,
10439,
13153,
2063,
1013,
2535,
1013,
1001,
1063,
4372,
16044,
1035,
4130,
1006,
2171,
1007,
1065,
1000,
1007,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | data/azure_cognitiveservices_videosearch/lib/1.0/generated/azure_cognitiveservices_videosearch/videos_operations.rb | Azure::CognitiveServices::VideoSearch::V1_0.VideosOperations.details_with_http_info | def details_with_http_info(query, accept_language:nil, user_agent:nil, client_id:nil, client_ip:nil, location:nil, country_code:nil, id:nil, modules:nil, market:nil, resolution:nil, safe_search:nil, set_lang:nil, text_decorations:nil, text_format:nil, custom_headers:nil)
details_async(query, accept_language:accep... | ruby | def details_with_http_info(query, accept_language:nil, user_agent:nil, client_id:nil, client_ip:nil, location:nil, country_code:nil, id:nil, modules:nil, market:nil, resolution:nil, safe_search:nil, set_lang:nil, text_decorations:nil, text_format:nil, custom_headers:nil)
details_async(query, accept_language:accep... | [
"def",
"details_with_http_info",
"(",
"query",
",",
"accept_language",
":",
"nil",
",",
"user_agent",
":",
"nil",
",",
"client_id",
":",
"nil",
",",
"client_ip",
":",
"nil",
",",
"location",
":",
"nil",
",",
"country_code",
":",
"nil",
",",
"id",
":",
"n... | The Video Detail Search API lets you search on Bing and get back insights
about a video, such as related videos. This section provides technical
details about the query parameters and headers that you use to request
insights of videos and the JSON response objects that contain them. For
examples that show how to ma... | [
"The",
"Video",
"Detail",
"Search",
"API",
"lets",
"you",
"search",
"on",
"Bing",
"and",
"get",
"back",
"insights",
"about",
"a",
"video",
"such",
"as",
"related",
"videos",
".",
"This",
"section",
"provides",
"technical",
"details",
"about",
"the",
"query",... | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_cognitiveservices_videosearch/lib/1.0/generated/azure_cognitiveservices_videosearch/videos_operations.rb#L1311-L1313 | train | Gets the details of a specific language. | [
30522,
13366,
4751,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
23032,
1010,
5138,
1035,
2653,
1024,
9152,
2140,
1010,
5310,
1035,
4005,
1024,
9152,
2140,
1010,
7396,
1035,
8909,
1024,
9152,
2140,
1010,
7396,
1035,
12997,
1024,
9152,
2140,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_network/lib/2018-10-01/generated/azure_mgmt_network/vpn_sites.rb | Azure::Network::Mgmt::V2018_10_01.VpnSites.create_or_update | def create_or_update(resource_group_name, vpn_site_name, vpn_site_parameters, custom_headers:nil)
response = create_or_update_async(resource_group_name, vpn_site_name, vpn_site_parameters, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def create_or_update(resource_group_name, vpn_site_name, vpn_site_parameters, custom_headers:nil)
response = create_or_update_async(resource_group_name, vpn_site_name, vpn_site_parameters, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"create_or_update",
"(",
"resource_group_name",
",",
"vpn_site_name",
",",
"vpn_site_parameters",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"create_or_update_async",
"(",
"resource_group_name",
",",
"vpn_site_name",
",",
"vpn_site_parameters",
",",
... | Creates a VpnSite resource if it doesn't exist else updates the existing
VpnSite.
@param resource_group_name [String] The resource group name of the VpnSite.
@param vpn_site_name [String] The name of the VpnSite being created or
updated.
@param vpn_site_parameters [VpnSite] Parameters supplied to create or update... | [
"Creates",
"a",
"VpnSite",
"resource",
"if",
"it",
"doesn",
"t",
"exist",
"else",
"updates",
"the",
"existing",
"VpnSite",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_network/lib/2018-10-01/generated/azure_mgmt_network/vpn_sites.rb#L130-L133 | train | Creates or updates a virtual network site. | [
30522,
13366,
3443,
1035,
2030,
1035,
10651,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
21210,
2078,
1035,
2609,
1035,
2171,
1010,
21210,
2078,
1035,
2609,
1035,
11709,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
3443,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_stor_simple8000_series/lib/2017-06-01/generated/azure_mgmt_stor_simple8000_series/devices.rb | Azure::StorSimple8000Series::Mgmt::V2017_06_01.Devices.scan_for_updates | def scan_for_updates(device_name, resource_group_name, manager_name, custom_headers:nil)
response = scan_for_updates_async(device_name, resource_group_name, manager_name, custom_headers:custom_headers).value!
nil
end | ruby | def scan_for_updates(device_name, resource_group_name, manager_name, custom_headers:nil)
response = scan_for_updates_async(device_name, resource_group_name, manager_name, custom_headers:custom_headers).value!
nil
end | [
"def",
"scan_for_updates",
"(",
"device_name",
",",
"resource_group_name",
",",
"manager_name",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"scan_for_updates_async",
"(",
"device_name",
",",
"resource_group_name",
",",
"manager_name",
",",
"custom_headers",... | Scans for updates on the device.
@param device_name [String] The device name
@param resource_group_name [String] The resource group name
@param manager_name [String] The manager name
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request. | [
"Scans",
"for",
"updates",
"on",
"the",
"device",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_stor_simple8000_series/lib/2017-06-01/generated/azure_mgmt_stor_simple8000_series/devices.rb#L911-L914 | train | Scans the device for updates. | [
30522,
13366,
13594,
1035,
2005,
1035,
14409,
1006,
5080,
1035,
2171,
1010,
7692,
1035,
2177,
1035,
2171,
1010,
3208,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
30524,
6038,
2278,
1006,
5080,
1035,
2171,
1010,
7692,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
aws/aws-sdk-ruby | gems/aws-sdk-iam/lib/aws-sdk-iam/policy.rb | Aws::IAM.Policy.detach_user | def detach_user(options = {})
options = options.merge(policy_arn: @arn)
resp = @client.detach_user_policy(options)
resp.data
end | ruby | def detach_user(options = {})
options = options.merge(policy_arn: @arn)
resp = @client.detach_user_policy(options)
resp.data
end | [
"def",
"detach_user",
"(",
"options",
"=",
"{",
"}",
")",
"options",
"=",
"options",
".",
"merge",
"(",
"policy_arn",
":",
"@arn",
")",
"resp",
"=",
"@client",
".",
"detach_user_policy",
"(",
"options",
")",
"resp",
".",
"data",
"end"
] | @example Request syntax with placeholder values
policy.detach_user({
user_name: "userNameType", # required
})
@param [Hash] options ({})
@option options [required, String] :user_name
The name (friendly name, not ARN) of the IAM user to detach the policy
from.
This parameter allows (through its [... | [
"@example",
"Request",
"syntax",
"with",
"placeholder",
"values"
] | e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d | https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-iam/lib/aws-sdk-iam/policy.rb#L473-L477 | train | Detaches the user from the policy | [
30522,
13366,
20010,
6776,
1035,
5310,
1006,
7047,
1027,
1063,
1065,
1007,
7047,
1027,
7047,
1012,
13590,
1006,
3343,
1035,
12098,
2078,
1024,
1030,
12098,
2078,
1007,
24501,
2361,
1027,
1030,
7396,
1012,
20010,
6776,
1035,
5310,
1035,
3343... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_storagesync/lib/2018-07-01/generated/azure_mgmt_storagesync/registered_servers.rb | Azure::StorageSync::Mgmt::V2018_07_01.RegisteredServers.begin_create | def begin_create(resource_group_name, storage_sync_service_name, server_id, parameters, custom_headers:nil)
response = begin_create_async(resource_group_name, storage_sync_service_name, server_id, parameters, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def begin_create(resource_group_name, storage_sync_service_name, server_id, parameters, custom_headers:nil)
response = begin_create_async(resource_group_name, storage_sync_service_name, server_id, parameters, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"begin_create",
"(",
"resource_group_name",
",",
"storage_sync_service_name",
",",
"server_id",
",",
"parameters",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"begin_create_async",
"(",
"resource_group_name",
",",
"storage_sync_service_name",
",",
"s... | Add a new registered server.
@param resource_group_name [String] The name of the resource group. The name
is case insensitive.
@param storage_sync_service_name [String] Name of Storage Sync Service
resource.
@param server_id [String] GUID identifying the on-premises server.
@param parameters [RegisteredServerCre... | [
"Add",
"a",
"new",
"registered",
"server",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_storagesync/lib/2018-07-01/generated/azure_mgmt_storagesync/registered_servers.rb#L391-L394 | train | Creates a new cluster. | [
30522,
13366,
4088,
1035,
3443,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
5527,
1035,
26351,
1035,
2326,
1035,
2171,
1010,
8241,
1035,
8909,
1010,
11709,
1010,
7661,
1035,
20346,
2015,
30524,
1010,
11709,
1010,
7661,
1035,
20346,
2015,
1024... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_compute/lib/2018-04-01/generated/azure_mgmt_compute/snapshots.rb | Azure::Compute::Mgmt::V2018_04_01.Snapshots.begin_revoke_access | def begin_revoke_access(resource_group_name, snapshot_name, custom_headers:nil)
response = begin_revoke_access_async(resource_group_name, snapshot_name, custom_headers:custom_headers).value!
nil
end | ruby | def begin_revoke_access(resource_group_name, snapshot_name, custom_headers:nil)
response = begin_revoke_access_async(resource_group_name, snapshot_name, custom_headers:custom_headers).value!
nil
end | [
"def",
"begin_revoke_access",
"(",
"resource_group_name",
",",
"snapshot_name",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"begin_revoke_access_async",
"(",
"resource_group_name",
",",
"snapshot_name",
",",
"custom_headers",
":custom_headers",
")",
".",
"v... | Revokes access to a snapshot.
@param resource_group_name [String] The name of the resource group.
@param snapshot_name [String] The name of the snapshot that is being created.
The name can't be changed after the snapshot is created. Supported characters
for the name are a-z, A-Z, 0-9 and _. The max name length is ... | [
"Revokes",
"access",
"to",
"a",
"snapshot",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_compute/lib/2018-04-01/generated/azure_mgmt_compute/snapshots.rb#L982-L985 | train | Revokes access to a snapshot. | [
30522,
13366,
4088,
1035,
7065,
11045,
1035,
3229,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
20057,
12326,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
4088,
1035,
7065,
11045,
1035,
3229,
1035,
2004,
6038,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
hashicorp/vagrant | lib/vagrant/box.rb | Vagrant.Box.repackage | def repackage(path)
@logger.debug("Repackaging box '#{@name}' to: #{path}")
Util::SafeChdir.safe_chdir(@directory) do
# Find all the files in our current directory and tar it up!
files = Dir.glob(File.join(".", "**", "*")).select { |f| File.file?(f) }
# Package!
Util::Subpr... | ruby | def repackage(path)
@logger.debug("Repackaging box '#{@name}' to: #{path}")
Util::SafeChdir.safe_chdir(@directory) do
# Find all the files in our current directory and tar it up!
files = Dir.glob(File.join(".", "**", "*")).select { |f| File.file?(f) }
# Package!
Util::Subpr... | [
"def",
"repackage",
"(",
"path",
")",
"@logger",
".",
"debug",
"(",
"\"Repackaging box '#{@name}' to: #{path}\"",
")",
"Util",
"::",
"SafeChdir",
".",
"safe_chdir",
"(",
"@directory",
")",
"do",
"# Find all the files in our current directory and tar it up!",
"files",
"=",... | This repackages this box and outputs it to the given path.
@param [Pathname] path The full path (filename included) of where
to output this box.
@return [Boolean] true if this succeeds. | [
"This",
"repackages",
"this",
"box",
"and",
"outputs",
"it",
"to",
"the",
"given",
"path",
"."
] | c22a145c59790c098f95d50141d9afb48e1ef55f | https://github.com/hashicorp/vagrant/blob/c22a145c59790c098f95d50141d9afb48e1ef55f/lib/vagrant/box.rb#L199-L213 | train | Repack the box | [
30522,
13366,
16360,
8684,
4270,
1006,
4130,
1007,
1030,
8833,
4590,
1012,
2139,
8569,
2290,
1006,
1000,
16360,
8684,
16594,
3482,
1005,
1001,
1063,
1030,
2171,
1065,
1005,
2000,
1024,
1001,
1063,
4130,
1065,
1000,
1007,
21183,
4014,
1024,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
ruby/rake | lib/rake/file_list.rb | Rake.FileList.gsub! | def gsub!(pat, rep)
each_with_index { |fn, i| self[i] = fn.gsub(pat, rep) }
self
end | ruby | def gsub!(pat, rep)
each_with_index { |fn, i| self[i] = fn.gsub(pat, rep) }
self
end | [
"def",
"gsub!",
"(",
"pat",
",",
"rep",
")",
"each_with_index",
"{",
"|",
"fn",
",",
"i",
"|",
"self",
"[",
"i",
"]",
"=",
"fn",
".",
"gsub",
"(",
"pat",
",",
"rep",
")",
"}",
"self",
"end"
] | Same as +gsub+ except that the original file list is modified. | [
"Same",
"as",
"+",
"gsub",
"+",
"except",
"that",
"the",
"original",
"file",
"list",
"is",
"modified",
"."
] | 1c22b490ee6cb8bd614fa8d0d6145f671466206b | https://github.com/ruby/rake/blob/1c22b490ee6cb8bd614fa8d0d6145f671466206b/lib/rake/file_list.rb#L264-L267 | train | Replace all occurrences of a pattern with a replacement. | [
30522,
13366,
28177,
12083,
999,
1006,
6986,
1010,
16360,
1007,
2169,
1035,
2007,
1035,
5950,
1063,
1064,
1042,
2078,
1010,
1045,
1064,
2969,
1031,
1045,
1033,
1027,
1042,
2078,
1012,
28177,
12083,
1006,
6986,
1010,
16360,
1007,
1065,
2969,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
heroku/legacy-cli | lib/heroku/command/addons.rb | Heroku::Command.Addons.create | def create
if current_command == "addons:add"
deprecate("`heroku #{current_command}` has been deprecated. Please use `heroku addons:create` instead.")
end
requires_preauth
service_plan = expand_hpg_shorthand(args.shift)
raise CommandFailed.new("Missing requested service or plan"... | ruby | def create
if current_command == "addons:add"
deprecate("`heroku #{current_command}` has been deprecated. Please use `heroku addons:create` instead.")
end
requires_preauth
service_plan = expand_hpg_shorthand(args.shift)
raise CommandFailed.new("Missing requested service or plan"... | [
"def",
"create",
"if",
"current_command",
"==",
"\"addons:add\"",
"deprecate",
"(",
"\"`heroku #{current_command}` has been deprecated. Please use `heroku addons:create` instead.\"",
")",
"end",
"requires_preauth",
"service_plan",
"=",
"expand_hpg_shorthand",
"(",
"args",
".",
"s... | addons:create SERVICE:PLAN
create an add-on resource
--name ADDON_NAME # (optional) name for the add-on resource
--as ATTACHMENT_NAME # (optional) name for the initial add-on attachment
--confirm APP_NAME # (optional) ovewrite existing config vars or existing add-on attachments | [
"addons",
":",
"create",
"SERVICE",
":",
"PLAN"
] | 6f18521a258394bfb79e6b36f7160ad8559a8e16 | https://github.com/heroku/legacy-cli/blob/6f18521a258394bfb79e6b36f7160ad8559a8e16/lib/heroku/command/addons.rb#L100-L148 | train | Create an addon | [
30522,
13366,
3443,
2065,
2783,
1035,
3094,
1027,
1027,
1000,
5587,
5644,
1024,
5587,
1000,
2139,
28139,
16280,
1006,
1000,
1036,
5394,
5283,
1001,
1063,
2783,
1035,
3094,
1065,
1036,
2038,
2042,
2139,
28139,
12921,
1012,
3531,
2224,
1036,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_service_bus/lib/2017-04-01/generated/azure_mgmt_service_bus/disaster_recovery_configs.rb | Azure::ServiceBus::Mgmt::V2017_04_01.DisasterRecoveryConfigs.break_pairing_with_http_info | def break_pairing_with_http_info(resource_group_name, namespace_name, alias_parameter, custom_headers:nil)
break_pairing_async(resource_group_name, namespace_name, alias_parameter, custom_headers:custom_headers).value!
end | ruby | def break_pairing_with_http_info(resource_group_name, namespace_name, alias_parameter, custom_headers:nil)
break_pairing_async(resource_group_name, namespace_name, alias_parameter, custom_headers:custom_headers).value!
end | [
"def",
"break_pairing_with_http_info",
"(",
"resource_group_name",
",",
"namespace_name",
",",
"alias_parameter",
",",
"custom_headers",
":",
"nil",
")",
"break_pairing_async",
"(",
"resource_group_name",
",",
"namespace_name",
",",
"alias_parameter",
",",
"custom_headers",... | This operation disables the Disaster Recovery and stops replicating changes
from primary to secondary namespaces
@param resource_group_name [String] Name of the Resource group within the
Azure subscription.
@param namespace_name [String] The namespace name
@param alias_parameter [String] The Disaster Recovery con... | [
"This",
"operation",
"disables",
"the",
"Disaster",
"Recovery",
"and",
"stops",
"replicating",
"changes",
"from",
"primary",
"to",
"secondary",
"namespaces"
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_service_bus/lib/2017-04-01/generated/azure_mgmt_service_bus/disaster_recovery_configs.rb#L587-L589 | train | Break a pairing of namespace and alias. | [
30522,
13366,
3338,
1035,
22778,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
3415,
15327,
1035,
2171,
1010,
14593,
1035,
16381,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3338,
1035,
22778,
103... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_labservices/lib/2018-10-15/generated/azure_mgmt_labservices/labs.rb | Azure::Labservices::Mgmt::V2018_10_15.Labs.register_with_http_info | def register_with_http_info(resource_group_name, lab_account_name, lab_name, custom_headers:nil)
register_async(resource_group_name, lab_account_name, lab_name, custom_headers:custom_headers).value!
end | ruby | def register_with_http_info(resource_group_name, lab_account_name, lab_name, custom_headers:nil)
register_async(resource_group_name, lab_account_name, lab_name, custom_headers:custom_headers).value!
end | [
"def",
"register_with_http_info",
"(",
"resource_group_name",
",",
"lab_account_name",
",",
"lab_name",
",",
"custom_headers",
":",
"nil",
")",
"register_async",
"(",
"resource_group_name",
",",
"lab_account_name",
",",
"lab_name",
",",
"custom_headers",
":custom_headers"... | Register to managed lab.
@param resource_group_name [String] The name of the resource group.
@param lab_account_name [String] The name of the lab Account.
@param lab_name [String] The name of the lab.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request.
... | [
"Register",
"to",
"managed",
"lab",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_labservices/lib/2018-10-15/generated/azure_mgmt_labservices/labs.rb#L628-L630 | train | Registers a new lab in the specified resource group. | [
30522,
13366,
4236,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
6845,
1035,
4070,
1035,
2171,
1010,
6845,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
4236,
1035,
2004,
6038,
2278,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_container_registry/lib/2018-09-01/generated/azure_mgmt_container_registry/tasks.rb | Azure::ContainerRegistry::Mgmt::V2018_09_01.Tasks.begin_create | def begin_create(resource_group_name, registry_name, task_name, task_create_parameters, custom_headers:nil)
response = begin_create_async(resource_group_name, registry_name, task_name, task_create_parameters, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def begin_create(resource_group_name, registry_name, task_name, task_create_parameters, custom_headers:nil)
response = begin_create_async(resource_group_name, registry_name, task_name, task_create_parameters, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"begin_create",
"(",
"resource_group_name",
",",
"registry_name",
",",
"task_name",
",",
"task_create_parameters",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"begin_create_async",
"(",
"resource_group_name",
",",
"registry_name",
",",
"task_name",
... | Creates a task for a container registry with the specified parameters.
@param resource_group_name [String] The name of the resource group to which
the container registry belongs.
@param registry_name [String] The name of the container registry.
@param task_name [String] The name of the container registry task.
@p... | [
"Creates",
"a",
"task",
"for",
"a",
"container",
"registry",
"with",
"the",
"specified",
"parameters",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_container_registry/lib/2018-09-01/generated/azure_mgmt_container_registry/tasks.rb#L488-L491 | train | Creates a task in a container registry. | [
30522,
13366,
4088,
1035,
3443,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
15584,
1035,
2171,
1010,
4708,
1035,
2171,
1010,
4708,
1035,
3443,
1035,
11709,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
4088,
1035,
3443,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | data/azure_service_fabric/lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb | Azure::ServiceFabric::V6_2_0_9.ServiceFabricClientAPIs.get_application_health | def get_application_health(application_id, events_health_state_filter:0, deployed_applications_health_state_filter:0, services_health_state_filter:0, exclude_health_statistics:false, timeout:60, custom_headers:nil)
response = get_application_health_async(application_id, events_health_state_filter:events_health_st... | ruby | def get_application_health(application_id, events_health_state_filter:0, deployed_applications_health_state_filter:0, services_health_state_filter:0, exclude_health_statistics:false, timeout:60, custom_headers:nil)
response = get_application_health_async(application_id, events_health_state_filter:events_health_st... | [
"def",
"get_application_health",
"(",
"application_id",
",",
"events_health_state_filter",
":",
"0",
",",
"deployed_applications_health_state_filter",
":",
"0",
",",
"services_health_state_filter",
":",
"0",
",",
"exclude_health_statistics",
":",
"false",
",",
"timeout",
... | Gets the health of the service fabric application.
Returns the heath state of the service fabric application. The response
reports either Ok, Error or Warning health state. If the entity is not found
in the health store, it will return Error.
@param application_id [String] The identity of the application. This is... | [
"Gets",
"the",
"health",
"of",
"the",
"service",
"fabric",
"application",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_service_fabric/lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb#L6882-L6885 | train | Gets the health of the specified application. | [
30522,
13366,
2131,
1035,
4646,
1035,
2740,
1006,
4646,
1035,
8909,
1010,
2824,
1035,
2740,
1035,
2110,
1035,
11307,
1024,
1014,
1010,
7333,
1035,
5097,
1035,
2740,
1035,
2110,
1035,
11307,
1024,
1014,
1010,
2578,
1035,
2740,
1035,
2110,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_web/lib/2018-02-01/generated/azure_mgmt_web/app_service_environments.rb | Azure::Web::Mgmt::V2018_02_01.AppServiceEnvironments.list_worker_pool_skus_as_lazy | def list_worker_pool_skus_as_lazy(resource_group_name, name, worker_pool_name, custom_headers:nil)
response = list_worker_pool_skus_async(resource_group_name, name, worker_pool_name, custom_headers:custom_headers).value!
unless response.nil?
page = response.body
page.next_method = Proc.new d... | ruby | def list_worker_pool_skus_as_lazy(resource_group_name, name, worker_pool_name, custom_headers:nil)
response = list_worker_pool_skus_async(resource_group_name, name, worker_pool_name, custom_headers:custom_headers).value!
unless response.nil?
page = response.body
page.next_method = Proc.new d... | [
"def",
"list_worker_pool_skus_as_lazy",
"(",
"resource_group_name",
",",
"name",
",",
"worker_pool_name",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"list_worker_pool_skus_async",
"(",
"resource_group_name",
",",
"name",
",",
"worker_pool_name",
",",
"cust... | Get available SKUs for scaling a worker pool.
Get available SKUs for scaling a worker pool.
@param resource_group_name [String] Name of the resource group to which the
resource belongs.
@param name [String] Name of the App Service Environment.
@param worker_pool_name [String] Name of the worker pool.
@param cus... | [
"Get",
"available",
"SKUs",
"for",
"scaling",
"a",
"worker",
"pool",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_web/lib/2018-02-01/generated/azure_mgmt_web/app_service_environments.rb#L7976-L7985 | train | Gets the list of skus of a worker pool. | [
30522,
13366,
2862,
1035,
7309,
1035,
4770,
1035,
15315,
2271,
1035,
2004,
1035,
13971,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2171,
1010,
7309,
1035,
4770,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
samvera/hyrax | app/models/concerns/hyrax/ability.rb | Hyrax.Ability.download_users | def download_users(id)
doc = permissions_doc(id)
return [] if doc.nil?
users = Array(doc[self.class.read_user_field]) + Array(doc[self.class.edit_user_field])
Rails.logger.debug("[CANCAN] download_users: #{users.inspect}")
users
end | ruby | def download_users(id)
doc = permissions_doc(id)
return [] if doc.nil?
users = Array(doc[self.class.read_user_field]) + Array(doc[self.class.edit_user_field])
Rails.logger.debug("[CANCAN] download_users: #{users.inspect}")
users
end | [
"def",
"download_users",
"(",
"id",
")",
"doc",
"=",
"permissions_doc",
"(",
"id",
")",
"return",
"[",
"]",
"if",
"doc",
".",
"nil?",
"users",
"=",
"Array",
"(",
"doc",
"[",
"self",
".",
"class",
".",
"read_user_field",
"]",
")",
"+",
"Array",
"(",
... | Grant all users with read or edit access permission to download | [
"Grant",
"all",
"users",
"with",
"read",
"or",
"edit",
"access",
"permission",
"to",
"download"
] | e2b4f56e829a53b1f11296324736e9d5b8c9ee5f | https://github.com/samvera/hyrax/blob/e2b4f56e829a53b1f11296324736e9d5b8c9ee5f/app/models/concerns/hyrax/ability.rb#L47-L53 | train | Get the users that have been read or edit | [
30522,
13366,
8816,
1035,
5198,
1006,
8909,
1007,
9986,
1027,
6656,
2015,
1035,
9986,
1006,
8909,
1007,
2709,
1031,
1033,
2065,
9986,
1012,
9152,
2140,
1029,
5198,
1027,
9140,
1006,
9986,
1031,
2969,
1012,
2465,
1012,
3191,
1035,
5310,
10... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_cdn/lib/2016-04-02/generated/azure_mgmt_cdn/profiles.rb | Azure::CDN::Mgmt::V2016_04_02.Profiles.begin_update_with_http_info | def begin_update_with_http_info(profile_name, profile_properties, resource_group_name, custom_headers:nil)
begin_update_async(profile_name, profile_properties, resource_group_name, custom_headers:custom_headers).value!
end | ruby | def begin_update_with_http_info(profile_name, profile_properties, resource_group_name, custom_headers:nil)
begin_update_async(profile_name, profile_properties, resource_group_name, custom_headers:custom_headers).value!
end | [
"def",
"begin_update_with_http_info",
"(",
"profile_name",
",",
"profile_properties",
",",
"resource_group_name",
",",
"custom_headers",
":",
"nil",
")",
"begin_update_async",
"(",
"profile_name",
",",
"profile_properties",
",",
"resource_group_name",
",",
"custom_headers",... | Updates an existing CDN profile with the specified parameters.
@param profile_name [String] Name of the CDN profile within the resource
group.
@param profile_properties [ProfileUpdateParameters] Profile properties needed
for update.
@param resource_group_name [String] Name of the resource group within the
Azure ... | [
"Updates",
"an",
"existing",
"CDN",
"profile",
"with",
"the",
"specified",
"parameters",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_cdn/lib/2016-04-02/generated/azure_mgmt_cdn/profiles.rb#L716-L718 | train | Updates a profile s covering specification. | [
30522,
13366,
4088,
1035,
10651,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
6337,
1035,
2171,
1010,
6337,
1035,
5144,
1010,
7692,
1035,
2177,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
4088,
1035,
10651,
1035,
2004,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
meew0/discordrb | lib/discordrb/data/server.rb | Discordrb.Server.process_chunk | def process_chunk(members)
process_members(members)
@processed_chunk_members += members.length
LOGGER.debug("Processed one chunk on server #{@id} - length #{members.length}")
# Don't bother with the rest of the method if it's not truly the last packet
return unless @processed_chunk_member... | ruby | def process_chunk(members)
process_members(members)
@processed_chunk_members += members.length
LOGGER.debug("Processed one chunk on server #{@id} - length #{members.length}")
# Don't bother with the rest of the method if it's not truly the last packet
return unless @processed_chunk_member... | [
"def",
"process_chunk",
"(",
"members",
")",
"process_members",
"(",
"members",
")",
"@processed_chunk_members",
"+=",
"members",
".",
"length",
"LOGGER",
".",
"debug",
"(",
"\"Processed one chunk on server #{@id} - length #{members.length}\"",
")",
"# Don't bother with the r... | Processes a GUILD_MEMBERS_CHUNK packet, specifically the members field
@note For internal use only
@!visibility private | [
"Processes",
"a",
"GUILD_MEMBERS_CHUNK",
"packet",
"specifically",
"the",
"members",
"field"
] | 764298a1ff0be69a1853b510d736f21c2b91a2fe | https://github.com/meew0/discordrb/blob/764298a1ff0be69a1853b510d736f21c2b91a2fe/lib/discordrb/data/server.rb#L747-L760 | train | Process a single chunk of members | [
30522,
13366,
2832,
1035,
20000,
1006,
2372,
1007,
2832,
1035,
2372,
1006,
2372,
1007,
1030,
13995,
1035,
20000,
1035,
2372,
1009,
1027,
2372,
1012,
3091,
8833,
4590,
1012,
2139,
8569,
2290,
1006,
1000,
13995,
2028,
20000,
2006,
8241,
1001,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_cdn/lib/2017-04-02/generated/azure_mgmt_cdn/origins.rb | Azure::CDN::Mgmt::V2017_04_02.Origins.update | def update(resource_group_name, profile_name, endpoint_name, origin_name, origin_update_properties, custom_headers:nil)
response = update_async(resource_group_name, profile_name, endpoint_name, origin_name, origin_update_properties, custom_headers:custom_headers).value!
response.body unless response.nil?
... | ruby | def update(resource_group_name, profile_name, endpoint_name, origin_name, origin_update_properties, custom_headers:nil)
response = update_async(resource_group_name, profile_name, endpoint_name, origin_name, origin_update_properties, custom_headers:custom_headers).value!
response.body unless response.nil?
... | [
"def",
"update",
"(",
"resource_group_name",
",",
"profile_name",
",",
"endpoint_name",
",",
"origin_name",
",",
"origin_update_properties",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"update_async",
"(",
"resource_group_name",
",",
"profile_name",
",",
... | Updates an existing origin within an endpoint.
@param resource_group_name [String] Name of the Resource group within the
Azure subscription.
@param profile_name [String] Name of the CDN profile which is unique within
the resource group.
@param endpoint_name [String] Name of the endpoint under the profile which is... | [
"Updates",
"an",
"existing",
"origin",
"within",
"an",
"endpoint",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_cdn/lib/2017-04-02/generated/azure_mgmt_cdn/origins.rb#L266-L269 | train | Updates an existing CDN origin. | [
30522,
13366,
10651,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
6337,
1035,
2171,
1010,
2203,
8400,
1035,
2171,
1010,
30524,
1035,
2177,
1035,
2171,
1010,
6337,
1035,
2171,
1010,
2203,
8400,
1035,
2171,
1010,
4761,
1035,
2171,
1010,
4761,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
meew0/discordrb | lib/discordrb/gateway.rb | Discordrb.Gateway.obtain_socket | def obtain_socket(uri)
socket = TCPSocket.new(uri.host, uri.port || socket_port(uri))
if secure_uri?(uri)
ctx = OpenSSL::SSL::SSLContext.new
if ENV['DISCORDRB_SSL_VERIFY_NONE']
ctx.ssl_version = 'SSLv23'
ctx.verify_mode = OpenSSL::SSL::VERIFY_NONE # use VERIFY_PEER for ... | ruby | def obtain_socket(uri)
socket = TCPSocket.new(uri.host, uri.port || socket_port(uri))
if secure_uri?(uri)
ctx = OpenSSL::SSL::SSLContext.new
if ENV['DISCORDRB_SSL_VERIFY_NONE']
ctx.ssl_version = 'SSLv23'
ctx.verify_mode = OpenSSL::SSL::VERIFY_NONE # use VERIFY_PEER for ... | [
"def",
"obtain_socket",
"(",
"uri",
")",
"socket",
"=",
"TCPSocket",
".",
"new",
"(",
"uri",
".",
"host",
",",
"uri",
".",
"port",
"||",
"socket_port",
"(",
"uri",
")",
")",
"if",
"secure_uri?",
"(",
"uri",
")",
"ctx",
"=",
"OpenSSL",
"::",
"SSL",
... | Create and connect a socket using a URI | [
"Create",
"and",
"connect",
"a",
"socket",
"using",
"a",
"URI"
] | 764298a1ff0be69a1853b510d736f21c2b91a2fe | https://github.com/meew0/discordrb/blob/764298a1ff0be69a1853b510d736f21c2b91a2fe/lib/discordrb/gateway.rb#L489-L511 | train | Returns a TCPSocket object for the given URI. | [
30522,
13366,
6855,
1035,
22278,
1006,
24471,
2072,
1007,
22278,
1027,
22975,
4523,
7432,
3388,
1012,
2047,
1006,
24471,
2072,
1012,
3677,
1010,
24471,
2072,
1012,
3417,
1064,
1064,
22278,
1035,
3417,
1006,
24471,
2072,
1007,
1007,
2065,
58... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
sds/haml-lint | lib/haml_lint/rake_task.rb | HamlLint.RakeTask.run_cli | def run_cli(task_args)
cli_args = parse_args
logger = quiet ? HamlLint::Logger.silent : HamlLint::Logger.new(STDOUT)
result = HamlLint::CLI.new(logger).run(Array(cli_args) + files_to_lint(task_args))
fail "#{HamlLint::APP_NAME} failed with exit code #{result}" unless result == 0
end | ruby | def run_cli(task_args)
cli_args = parse_args
logger = quiet ? HamlLint::Logger.silent : HamlLint::Logger.new(STDOUT)
result = HamlLint::CLI.new(logger).run(Array(cli_args) + files_to_lint(task_args))
fail "#{HamlLint::APP_NAME} failed with exit code #{result}" unless result == 0
end | [
"def",
"run_cli",
"(",
"task_args",
")",
"cli_args",
"=",
"parse_args",
"logger",
"=",
"quiet",
"?",
"HamlLint",
"::",
"Logger",
".",
"silent",
":",
"HamlLint",
"::",
"Logger",
".",
"new",
"(",
"STDOUT",
")",
"result",
"=",
"HamlLint",
"::",
"CLI",
".",
... | Executes the CLI given the specified task arguments.
@param task_args [Rake::TaskArguments] | [
"Executes",
"the",
"CLI",
"given",
"the",
"specified",
"task",
"arguments",
"."
] | 024c773667e54cf88db938c2b368977005d70ee8 | https://github.com/sds/haml-lint/blob/024c773667e54cf88db938c2b368977005d70ee8/lib/haml_lint/rake_task.rb#L105-L111 | train | Run the CLI | [
30522,
13366,
2448,
1035,
18856,
2072,
1006,
4708,
1035,
12098,
5620,
1007,
18856,
2072,
1035,
12098,
5620,
1027,
11968,
3366,
1035,
12098,
5620,
8833,
4590,
1027,
4251,
1029,
10654,
21202,
2102,
1024,
1024,
8833,
4590,
1012,
4333,
1024,
10... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
jch/html-pipeline | lib/html/pipeline.rb | HTML.Pipeline.instrument | def instrument(event, payload = nil)
payload ||= default_payload
return yield(payload) unless instrumentation_service
instrumentation_service.instrument event, payload do |payload|
yield payload
end
end | ruby | def instrument(event, payload = nil)
payload ||= default_payload
return yield(payload) unless instrumentation_service
instrumentation_service.instrument event, payload do |payload|
yield payload
end
end | [
"def",
"instrument",
"(",
"event",
",",
"payload",
"=",
"nil",
")",
"payload",
"||=",
"default_payload",
"return",
"yield",
"(",
"payload",
")",
"unless",
"instrumentation_service",
"instrumentation_service",
".",
"instrument",
"event",
",",
"payload",
"do",
"|",
... | Internal: if the `instrumentation_service` object is set, instruments the
block, otherwise the block is ran without instrumentation.
Returns the result of the provided block. | [
"Internal",
":",
"if",
"the",
"instrumentation_service",
"object",
"is",
"set",
"instruments",
"the",
"block",
"otherwise",
"the",
"block",
"is",
"ran",
"without",
"instrumentation",
"."
] | f1bbce4858876dc2619c61a8b18637b5d3321b1c | https://github.com/jch/html-pipeline/blob/f1bbce4858876dc2619c61a8b18637b5d3321b1c/lib/html/pipeline.rb#L167-L173 | train | Instruments an event with the given payload. | [
30522,
13366,
6602,
1006,
2724,
1010,
18093,
1027,
9152,
2140,
1007,
18093,
1064,
1064,
1027,
12398,
1035,
18093,
2709,
10750,
1006,
18093,
1007,
4983,
16015,
1035,
2326,
16015,
1035,
2326,
1012,
6602,
2724,
1010,
18093,
2079,
1064,
18093,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
commander-rb/commander | lib/commander/user_interaction.rb | Commander.UI.io | def io(input = nil, output = nil, &block)
$stdin = File.new(input) if input
$stdout = File.new(output, 'r+') if output
return unless block
yield
reset_io
end | ruby | def io(input = nil, output = nil, &block)
$stdin = File.new(input) if input
$stdout = File.new(output, 'r+') if output
return unless block
yield
reset_io
end | [
"def",
"io",
"(",
"input",
"=",
"nil",
",",
"output",
"=",
"nil",
",",
"&",
"block",
")",
"$stdin",
"=",
"File",
".",
"new",
"(",
"input",
")",
"if",
"input",
"$stdout",
"=",
"File",
".",
"new",
"(",
"output",
",",
"'r+'",
")",
"if",
"output",
... | Normalize IO streams, allowing for redirection of
+input+ and/or +output+, for example:
$ foo # => read from terminal I/O
$ foo in # => read from 'in' file, output to terminal output stream
$ foo in out # => read from 'in' file, output to 'out' file
$ foo < in > out # => equ... | [
"Normalize",
"IO",
"streams",
"allowing",
"for",
"redirection",
"of",
"+",
"input",
"+",
"and",
"/",
"or",
"+",
"output",
"+",
"for",
"example",
":"
] | 332047c14948225462fe60042eed23adfb996d68 | https://github.com/commander-rb/commander/blob/332047c14948225462fe60042eed23adfb996d68/lib/commander/user_interaction.rb#L220-L226 | train | IO method for reading and writing files | [
30522,
13366,
22834,
1006,
7953,
1027,
9152,
2140,
1010,
6434,
1027,
9152,
2140,
1010,
1004,
3796,
1007,
1002,
2358,
8718,
1027,
5371,
1012,
2047,
1006,
7953,
1007,
2065,
7953,
1002,
2358,
26797,
2102,
1027,
5371,
1012,
2047,
1006,
6434,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_api_management/lib/2019-01-01/generated/azure_mgmt_api_management/group_user.rb | Azure::ApiManagement::Mgmt::V2019_01_01.GroupUser.check_entity_exists_with_http_info | def check_entity_exists_with_http_info(resource_group_name, service_name, group_id, user_id, custom_headers:nil)
check_entity_exists_async(resource_group_name, service_name, group_id, user_id, custom_headers:custom_headers).value!
end | ruby | def check_entity_exists_with_http_info(resource_group_name, service_name, group_id, user_id, custom_headers:nil)
check_entity_exists_async(resource_group_name, service_name, group_id, user_id, custom_headers:custom_headers).value!
end | [
"def",
"check_entity_exists_with_http_info",
"(",
"resource_group_name",
",",
"service_name",
",",
"group_id",
",",
"user_id",
",",
"custom_headers",
":",
"nil",
")",
"check_entity_exists_async",
"(",
"resource_group_name",
",",
"service_name",
",",
"group_id",
",",
"us... | Checks that user entity specified by identifier is associated with the group
entity.
@param resource_group_name [String] The name of the resource group.
@param service_name [String] The name of the API Management service.
@param group_id [String] Group identifier. Must be unique in the current API
Management serv... | [
"Checks",
"that",
"user",
"entity",
"specified",
"by",
"identifier",
"is",
"associated",
"with",
"the",
"group",
"entity",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_api_management/lib/2019-01-01/generated/azure_mgmt_api_management/group_user.rb#L205-L207 | train | Checks if the entity with the specified identifier already exists. | [
30522,
13366,
4638,
1035,
9178,
1035,
6526,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2326,
1035,
2171,
1010,
2177,
1035,
8909,
1010,
5310,
1035,
8909,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_cdn/lib/2017-04-02/generated/azure_mgmt_cdn/custom_domains.rb | Azure::CDN::Mgmt::V2017_04_02.CustomDomains.begin_delete | def begin_delete(resource_group_name, profile_name, endpoint_name, custom_domain_name, custom_headers:nil)
response = begin_delete_async(resource_group_name, profile_name, endpoint_name, custom_domain_name, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def begin_delete(resource_group_name, profile_name, endpoint_name, custom_domain_name, custom_headers:nil)
response = begin_delete_async(resource_group_name, profile_name, endpoint_name, custom_domain_name, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"begin_delete",
"(",
"resource_group_name",
",",
"profile_name",
",",
"endpoint_name",
",",
"custom_domain_name",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"begin_delete_async",
"(",
"resource_group_name",
",",
"profile_name",
",",
"endpoint_name",... | Deletes an existing custom domain within an endpoint.
@param resource_group_name [String] Name of the Resource group within the
Azure subscription.
@param profile_name [String] Name of the CDN profile which is unique within
the resource group.
@param endpoint_name [String] Name of the endpoint under the profile w... | [
"Deletes",
"an",
"existing",
"custom",
"domain",
"within",
"an",
"endpoint",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_cdn/lib/2017-04-02/generated/azure_mgmt_cdn/custom_domains.rb#L756-L759 | train | Deletes a domain in an endpoint. | [
30522,
13366,
4088,
1035,
3972,
12870,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
6337,
1035,
2171,
1010,
2203,
8400,
1035,
2171,
1010,
7661,
1035,
5884,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
4088,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
castwide/solargraph | lib/solargraph/library.rb | Solargraph.Library.read | def read filename
return @current if @current && @current.filename == filename
raise FileNotFoundError, "File not found: #{filename}" unless workspace.has_file?(filename)
workspace.source(filename)
end | ruby | def read filename
return @current if @current && @current.filename == filename
raise FileNotFoundError, "File not found: #{filename}" unless workspace.has_file?(filename)
workspace.source(filename)
end | [
"def",
"read",
"filename",
"return",
"@current",
"if",
"@current",
"&&",
"@current",
".",
"filename",
"==",
"filename",
"raise",
"FileNotFoundError",
",",
"\"File not found: #{filename}\"",
"unless",
"workspace",
".",
"has_file?",
"(",
"filename",
")",
"workspace",
... | Get the source for an open file or create a new source if the file
exists on disk. Sources created from disk are not added to the open
workspace files, i.e., the version on disk remains the authoritative
version.
@raise [FileNotFoundError] if the file does not exist
@param filename [String]
@return [Solargraph::... | [
"Get",
"the",
"source",
"for",
"an",
"open",
"file",
"or",
"create",
"a",
"new",
"source",
"if",
"the",
"file",
"exists",
"on",
"disk",
".",
"Sources",
"created",
"from",
"disk",
"are",
"not",
"added",
"to",
"the",
"open",
"workspace",
"files",
"i",
".... | 47badb5d151aca775ccbe6c470236089eae7839d | https://github.com/castwide/solargraph/blob/47badb5d151aca775ccbe6c470236089eae7839d/lib/solargraph/library.rb#L415-L419 | train | Read the file from the workspace. | [
30522,
13366,
3191,
5371,
18442,
2709,
1030,
2783,
2065,
1030,
2783,
1004,
1004,
1030,
2783,
1012,
5371,
18442,
1027,
1027,
5371,
18442,
5333,
5371,
17048,
14876,
20824,
29165,
1010,
1000,
5371,
2025,
2179,
1024,
1001,
1063,
5371,
18442,
10... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
square/connect-ruby-sdk | lib/square_connect/api/o_auth_api.rb | SquareConnect.OAuthApi.obtain_token | def obtain_token(body, opts = {})
data, _status_code, _headers = obtain_token_with_http_info(body, opts)
return data
end | ruby | def obtain_token(body, opts = {})
data, _status_code, _headers = obtain_token_with_http_info(body, opts)
return data
end | [
"def",
"obtain_token",
"(",
"body",
",",
"opts",
"=",
"{",
"}",
")",
"data",
",",
"_status_code",
",",
"_headers",
"=",
"obtain_token_with_http_info",
"(",
"body",
",",
"opts",
")",
"return",
"data",
"end"
] | ObtainToken
Returns an OAuth access token. The endpoint supports distinct methods of obtaining OAuth access tokens. Applications specify a method by adding the `grant_type` parameter in the request and also provide relevant information. For more information, see [OAuth access token management](/authz/oauth/how-it... | [
"ObtainToken",
"Returns",
"an",
"OAuth",
"access",
"token",
".",
"The",
"endpoint",
"supports",
"distinct",
"methods",
"of",
"obtaining",
"OAuth",
"access",
"tokens",
".",
"Applications",
"specify",
"a",
"method",
"by",
"adding",
"the",
"grant_type",
"parameter",
... | 798eb9ded716f23b9f1518386f1c311a34bca8bf | https://github.com/square/connect-ruby-sdk/blob/798eb9ded716f23b9f1518386f1c311a34bca8bf/lib/square_connect/api/o_auth_api.rb#L25-L28 | train | Returns a token based on the body | [
30522,
13366,
6855,
1035,
19204,
1006,
2303,
1010,
23569,
2015,
1027,
1063,
1065,
1007,
2951,
1010,
1035,
3570,
1035,
3642,
1010,
1035,
20346,
2015,
1027,
6855,
1035,
19204,
1035,
2007,
1035,
30524,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
puppetlabs/puppet | lib/puppet/util/inifile.rb | Puppet::Util::IniConfig.Section.format | def format
if @destroy
text = ""
else
text = "[#{name}]\n"
@entries.each do |entry|
if entry.is_a?(Array)
key, value = entry
text << "#{key}=#{value}\n" unless value.nil?
else
text << entry
end
end
end
... | ruby | def format
if @destroy
text = ""
else
text = "[#{name}]\n"
@entries.each do |entry|
if entry.is_a?(Array)
key, value = entry
text << "#{key}=#{value}\n" unless value.nil?
else
text << entry
end
end
end
... | [
"def",
"format",
"if",
"@destroy",
"text",
"=",
"\"\"",
"else",
"text",
"=",
"\"[#{name}]\\n\"",
"@entries",
".",
"each",
"do",
"|",
"entry",
"|",
"if",
"entry",
".",
"is_a?",
"(",
"Array",
")",
"key",
",",
"value",
"=",
"entry",
"text",
"<<",
"\"#{key... | Format the section as text in the way it should be
written to file | [
"Format",
"the",
"section",
"as",
"text",
"in",
"the",
"way",
"it",
"should",
"be",
"written",
"to",
"file"
] | 4baeed97cbb7571ddc6635f0a24debe2e8b22cd3 | https://github.com/puppetlabs/puppet/blob/4baeed97cbb7571ddc6635f0a24debe2e8b22cd3/lib/puppet/util/inifile.rb#L79-L94 | train | Format the array of entries in the array | [
30522,
13366,
4289,
2065,
1030,
6033,
3793,
1027,
1000,
1000,
2842,
3793,
1027,
1000,
1031,
1001,
1063,
2171,
1065,
1033,
1032,
1050,
1000,
1030,
10445,
1012,
2169,
2079,
1064,
4443,
1064,
2065,
4443,
1012,
2003,
1035,
1037,
1029,
1006,
9... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
mongodb/mongoid | lib/mongoid/config.rb | Mongoid.Config.truncate! | def truncate!
Clients.default.database.collections.each do |collection|
collection.find.delete_many
end and true
end | ruby | def truncate!
Clients.default.database.collections.each do |collection|
collection.find.delete_many
end and true
end | [
"def",
"truncate!",
"Clients",
".",
"default",
".",
"database",
".",
"collections",
".",
"each",
"do",
"|",
"collection",
"|",
"collection",
".",
"find",
".",
"delete_many",
"end",
"and",
"true",
"end"
] | Truncate all data in all collections, but not the indexes.
@example Truncate all collection data.
Mongoid::Config.truncate!
@note This will be slower than purge!
@return [ true ] true.
@since 2.0.2 | [
"Truncate",
"all",
"data",
"in",
"all",
"collections",
"but",
"not",
"the",
"indexes",
"."
] | 56976e32610f4c2450882b0bfe14da099f0703f4 | https://github.com/mongodb/mongoid/blob/56976e32610f4c2450882b0bfe14da099f0703f4/lib/mongoid/config.rb#L202-L206 | train | Truncate the collection | [
30522,
13366,
19817,
4609,
16280,
999,
7846,
1012,
12398,
1012,
7809,
1012,
6407,
1012,
2169,
2079,
1064,
3074,
1064,
3074,
1012,
2424,
1012,
3972,
12870,
1035,
2116,
2203,
1998,
2995,
2203,
102,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_network/lib/2018-01-01/generated/azure_mgmt_network/inbound_nat_rules.rb | Azure::Network::Mgmt::V2018_01_01.InboundNatRules.begin_create_or_update_with_http_info | def begin_create_or_update_with_http_info(resource_group_name, load_balancer_name, inbound_nat_rule_name, inbound_nat_rule_parameters, custom_headers:nil)
begin_create_or_update_async(resource_group_name, load_balancer_name, inbound_nat_rule_name, inbound_nat_rule_parameters, custom_headers:custom_headers).value!... | ruby | def begin_create_or_update_with_http_info(resource_group_name, load_balancer_name, inbound_nat_rule_name, inbound_nat_rule_parameters, custom_headers:nil)
begin_create_or_update_async(resource_group_name, load_balancer_name, inbound_nat_rule_name, inbound_nat_rule_parameters, custom_headers:custom_headers).value!... | [
"def",
"begin_create_or_update_with_http_info",
"(",
"resource_group_name",
",",
"load_balancer_name",
",",
"inbound_nat_rule_name",
",",
"inbound_nat_rule_parameters",
",",
"custom_headers",
":",
"nil",
")",
"begin_create_or_update_async",
"(",
"resource_group_name",
",",
"loa... | Creates or updates a load balancer inbound nat rule.
@param resource_group_name [String] The name of the resource group.
@param load_balancer_name [String] The name of the load balancer.
@param inbound_nat_rule_name [String] The name of the inbound nat rule.
@param inbound_nat_rule_parameters [InboundNatRule] Para... | [
"Creates",
"or",
"updates",
"a",
"load",
"balancer",
"inbound",
"nat",
"rule",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_network/lib/2018-01-01/generated/azure_mgmt_network/inbound_nat_rules.rb#L419-L421 | train | Creates or updates a load balancer inbound nat rule. | [
30522,
13366,
4088,
1035,
3443,
1035,
2030,
1035,
10651,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
7170,
1035,
5703,
2099,
1035,
2171,
1010,
1999,
15494,
1035,
14085,
1035,
3627,
1035,
2171,
1010,
1999,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
sferik/twitter | lib/twitter/configuration.rb | Twitter.Configuration.photo_sizes | def photo_sizes
@attrs.fetch(:photo_sizes, []).each_with_object({}) do |(key, value), object|
object[key] = Size.new(value)
end
end | ruby | def photo_sizes
@attrs.fetch(:photo_sizes, []).each_with_object({}) do |(key, value), object|
object[key] = Size.new(value)
end
end | [
"def",
"photo_sizes",
"@attrs",
".",
"fetch",
"(",
":photo_sizes",
",",
"[",
"]",
")",
".",
"each_with_object",
"(",
"{",
"}",
")",
"do",
"|",
"(",
"key",
",",
"value",
")",
",",
"object",
"|",
"object",
"[",
"key",
"]",
"=",
"Size",
".",
"new",
... | Returns an array of photo sizes
@return [Array<Twitter::Size>] | [
"Returns",
"an",
"array",
"of",
"photo",
"sizes"
] | 844818cad07ce490ccb9d8542ebb6b4fc7a61cb4 | https://github.com/sferik/twitter/blob/844818cad07ce490ccb9d8542ebb6b4fc7a61cb4/lib/twitter/configuration.rb#L20-L24 | train | Returns the array of the image sizes that are used to generate the image. | [
30522,
13366,
6302,
1035,
10826,
1030,
2012,
16344,
2015,
1012,
18584,
1006,
1024,
6302,
1035,
10826,
1010,
1031,
1033,
1007,
1012,
2169,
1035,
2007,
1035,
4874,
1006,
1063,
1065,
1007,
2079,
1064,
1006,
3145,
1010,
3643,
1007,
1010,
4874,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_compute/lib/2018-04-01/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb | Azure::Compute::Mgmt::V2018_04_01.VirtualMachineScaleSets.reimage_all_async | def reimage_all_async(resource_group_name, vm_scale_set_name, vm_instance_ids:nil, custom_headers:nil)
# Send request
promise = begin_reimage_all_async(resource_group_name, vm_scale_set_name, vm_instance_ids:vm_instance_ids, custom_headers:custom_headers)
promise = promise.then do |response|
... | ruby | def reimage_all_async(resource_group_name, vm_scale_set_name, vm_instance_ids:nil, custom_headers:nil)
# Send request
promise = begin_reimage_all_async(resource_group_name, vm_scale_set_name, vm_instance_ids:vm_instance_ids, custom_headers:custom_headers)
promise = promise.then do |response|
... | [
"def",
"reimage_all_async",
"(",
"resource_group_name",
",",
"vm_scale_set_name",
",",
"vm_instance_ids",
":",
"nil",
",",
"custom_headers",
":",
"nil",
")",
"# Send request",
"promise",
"=",
"begin_reimage_all_async",
"(",
"resource_group_name",
",",
"vm_scale_set_name",... | @param resource_group_name [String] The name of the resource group.
@param vm_scale_set_name [String] The name of the VM scale set.
@param vm_instance_ids [VirtualMachineScaleSetVMInstanceIDs] A list of
virtual machine instance IDs from the VM scale set.
@param custom_headers [Hash{String => String}] A hash of cust... | [
"@param",
"resource_group_name",
"[",
"String",
"]",
"The",
"name",
"of",
"the",
"resource",
"group",
".",
"@param",
"vm_scale_set_name",
"[",
"String",
"]",
"The",
"name",
"of",
"the",
"VM",
"scale",
"set",
".",
"@param",
"vm_instance_ids",
"[",
"VirtualMachi... | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_compute/lib/2018-04-01/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb#L1120-L1134 | train | Reimage all virtual machines in a VM scale set. | [
30522,
13366,
24964,
26860,
1035,
2035,
1035,
2004,
6038,
2278,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
1058,
2213,
1035,
4094,
1035,
2275,
1035,
2171,
1010,
1058,
2213,
1035,
6013,
1035,
8909,
2015,
1024,
9152,
2140,
1010,
7661,
1035,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
oauth-xx/oauth2 | spec/spec_helpers/stubbed_env.rb | StubbedEnv.Helpers.add_stubbed_value | def add_stubbed_value(key, value)
allow(ENV).to receive(:[]).with(key).and_return(value)
allow(ENV).to receive(:fetch).with(key).and_return(value)
allow(ENV).to receive(:fetch).with(key, anything) do |_, default_val|
value || default_val
end
end | ruby | def add_stubbed_value(key, value)
allow(ENV).to receive(:[]).with(key).and_return(value)
allow(ENV).to receive(:fetch).with(key).and_return(value)
allow(ENV).to receive(:fetch).with(key, anything) do |_, default_val|
value || default_val
end
end | [
"def",
"add_stubbed_value",
"(",
"key",
",",
"value",
")",
"allow",
"(",
"ENV",
")",
".",
"to",
"receive",
"(",
":[]",
")",
".",
"with",
"(",
"key",
")",
".",
"and_return",
"(",
"value",
")",
"allow",
"(",
"ENV",
")",
".",
"to",
"receive",
"(",
"... | rubocop:disable Metrics/AbcSize | [
"rubocop",
":",
"disable",
"Metrics",
"/",
"AbcSize"
] | f08ff9da169136ab133aa2faab0d74a4407deffb | https://github.com/oauth-xx/oauth2/blob/f08ff9da169136ab133aa2faab0d74a4407deffb/spec/spec_helpers/stubbed_env.rb#L17-L23 | train | Add a stubbed value to the current object. | [
30522,
13366,
5587,
1035,
24646,
15499,
1035,
3643,
1006,
3145,
1010,
3643,
1007,
3499,
1006,
4372,
2615,
1007,
1012,
2000,
4374,
1006,
1024,
1031,
1033,
1007,
1012,
2007,
1006,
3145,
1007,
1012,
1998,
1035,
2709,
1006,
3643,
1007,
3499,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_network/lib/2018-04-01/generated/azure_mgmt_network/express_route_cross_connections.rb | Azure::Network::Mgmt::V2018_04_01.ExpressRouteCrossConnections.begin_update_tags | def begin_update_tags(resource_group_name, cross_connection_name, cross_connection_parameters, custom_headers:nil)
response = begin_update_tags_async(resource_group_name, cross_connection_name, cross_connection_parameters, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def begin_update_tags(resource_group_name, cross_connection_name, cross_connection_parameters, custom_headers:nil)
response = begin_update_tags_async(resource_group_name, cross_connection_name, cross_connection_parameters, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"begin_update_tags",
"(",
"resource_group_name",
",",
"cross_connection_name",
",",
"cross_connection_parameters",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"begin_update_tags_async",
"(",
"resource_group_name",
",",
"cross_connection_name",
",",
"cros... | Updates an express route cross connection tags.
@param resource_group_name [String] The name of the resource group.
@param cross_connection_name [String] The name of the cross connection.
@param cross_connection_parameters [TagsObject] Parameters supplied to update
express route cross connection tags.
@param cust... | [
"Updates",
"an",
"express",
"route",
"cross",
"connection",
"tags",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_network/lib/2018-04-01/generated/azure_mgmt_network/express_route_cross_connections.rb#L657-L660 | train | Updates the tags on the specified ExpressRouteCrossConnection. | [
30522,
13366,
4088,
1035,
10651,
1035,
22073,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2892,
1035,
4434,
1035,
2171,
1010,
2892,
1035,
4434,
1035,
11709,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
4088,
1035,
10651,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
rails/rails | actionpack/lib/action_controller/metal/redirecting.rb | ActionController.Redirecting.redirect_back | def redirect_back(fallback_location:, allow_other_host: true, **args)
referer = request.headers["Referer"]
redirect_to_referer = referer && (allow_other_host || _url_host_allowed?(referer))
redirect_to redirect_to_referer ? referer : fallback_location, **args
end | ruby | def redirect_back(fallback_location:, allow_other_host: true, **args)
referer = request.headers["Referer"]
redirect_to_referer = referer && (allow_other_host || _url_host_allowed?(referer))
redirect_to redirect_to_referer ? referer : fallback_location, **args
end | [
"def",
"redirect_back",
"(",
"fallback_location",
":",
",",
"allow_other_host",
":",
"true",
",",
"**",
"args",
")",
"referer",
"=",
"request",
".",
"headers",
"[",
"\"Referer\"",
"]",
"redirect_to_referer",
"=",
"referer",
"&&",
"(",
"allow_other_host",
"||",
... | Redirects the browser to the page that issued the request (the referrer)
if possible, otherwise redirects to the provided default fallback
location.
The referrer information is pulled from the HTTP +Referer+ (sic) header on
the request. This is an optional header and its presence on the request is
subject to brow... | [
"Redirects",
"the",
"browser",
"to",
"the",
"page",
"that",
"issued",
"the",
"request",
"(",
"the",
"referrer",
")",
"if",
"possible",
"otherwise",
"redirects",
"to",
"the",
"provided",
"default",
"fallback",
"location",
"."
] | 85a8bc644be69908f05740a5886ec19cd3679df5 | https://github.com/rails/rails/blob/85a8bc644be69908f05740a5886ec19cd3679df5/actionpack/lib/action_controller/metal/redirecting.rb#L90-L94 | train | Redirect to the back to the given fallback location | [
30522,
13366,
2417,
7442,
6593,
1035,
2067,
1006,
2991,
5963,
1035,
3295,
1024,
1010,
3499,
1035,
2060,
1035,
3677,
1024,
2995,
1010,
1008,
1008,
12098,
5620,
1007,
6523,
2121,
1027,
5227,
1012,
20346,
2015,
1031,
1000,
6523,
2121,
1000,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
plaid/plaid-ruby | lib/plaid/client.rb | Plaid.Client.post_with_auth | def post_with_auth(path, payload)
@connection.post(
path,
payload.merge(client_id: @client_id, secret: @secret)
).body
end | ruby | def post_with_auth(path, payload)
@connection.post(
path,
payload.merge(client_id: @client_id, secret: @secret)
).body
end | [
"def",
"post_with_auth",
"(",
"path",
",",
"payload",
")",
"@connection",
".",
"post",
"(",
"path",
",",
"payload",
".",
"merge",
"(",
"client_id",
":",
"@client_id",
",",
"secret",
":",
"@secret",
")",
")",
".",
"body",
"end"
] | Public: Make a post request with appended authentication fields
path - Path or URL to make the request to
payload - The payload or data to post
Returns the resulting parsed JSON of the request | [
"Public",
":",
"Make",
"a",
"post",
"request",
"with",
"appended",
"authentication",
"fields"
] | ce3da1c5559c739de88c5f59e54eef875f296673 | https://github.com/plaid/plaid-ruby/blob/ce3da1c5559c739de88c5f59e54eef875f296673/lib/plaid/client.rb#L111-L116 | train | POST with auth | [
30522,
13366,
2695,
1035,
2007,
1035,
8740,
2705,
1006,
4130,
1010,
18093,
30524,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
markdownlint/markdownlint | lib/mdl/doc.rb | MarkdownLint.Doc.list_style | def list_style(item)
if item.type != :li
raise "list_style called with non-list element"
end
line = element_line(item).strip
if line.start_with?('*')
:asterisk
elsif line.start_with?('+')
:plus
elsif line.start_with?('-')
:dash
elsif line.match('... | ruby | def list_style(item)
if item.type != :li
raise "list_style called with non-list element"
end
line = element_line(item).strip
if line.start_with?('*')
:asterisk
elsif line.start_with?('+')
:plus
elsif line.start_with?('-')
:dash
elsif line.match('... | [
"def",
"list_style",
"(",
"item",
")",
"if",
"item",
".",
"type",
"!=",
":li",
"raise",
"\"list_style called with non-list element\"",
"end",
"line",
"=",
"element_line",
"(",
"item",
")",
".",
"strip",
"if",
"line",
".",
"start_with?",
"(",
"'*'",
")",
":as... | Returns the list style for a list: :asterisk, :plus, :dash, :ordered or
:ordered_paren depending on which symbol is used to denote the list
item. You can pass in either the element itself or an options hash here. | [
"Returns",
"the",
"list",
"style",
"for",
"a",
"list",
":",
":",
"asterisk",
":",
"plus",
":",
"dash",
":",
"ordered",
"or",
":",
"ordered_paren",
"depending",
"on",
"which",
"symbol",
"is",
"used",
"to",
"denote",
"the",
"list",
"item",
".",
"You",
"c... | a9e80fcf3989d73b654b00bb2225a00be53983e8 | https://github.com/markdownlint/markdownlint/blob/a9e80fcf3989d73b654b00bb2225a00be53983e8/lib/mdl/doc.rb#L189-L207 | train | Returns the list style for the given item. | [
30522,
13366,
2862,
1035,
2806,
1006,
8875,
1007,
2065,
8875,
1012,
2828,
999,
1027,
1024,
5622,
5333,
1000,
2862,
1035,
2806,
2170,
2007,
2512,
1011,
2862,
5783,
1000,
2203,
2240,
1027,
5783,
1035,
2240,
1006,
8875,
1007,
1012,
6167,
206... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
mongodb/mongoid | lib/mongoid/changeable.rb | Mongoid.Changeable.attribute_was | def attribute_was(attr)
attr = database_field_name(attr)
attribute_changed?(attr) ? changed_attributes[attr] : attributes[attr]
end | ruby | def attribute_was(attr)
attr = database_field_name(attr)
attribute_changed?(attr) ? changed_attributes[attr] : attributes[attr]
end | [
"def",
"attribute_was",
"(",
"attr",
")",
"attr",
"=",
"database_field_name",
"(",
"attr",
")",
"attribute_changed?",
"(",
"attr",
")",
"?",
"changed_attributes",
"[",
"attr",
"]",
":",
"attributes",
"[",
"attr",
"]",
"end"
] | Get the previous value for the attribute.
@example Get the previous value.
model.attribute_was("name")
@param [ String ] attr The attribute name.
@since 2.4.0 | [
"Get",
"the",
"previous",
"value",
"for",
"the",
"attribute",
"."
] | 56976e32610f4c2450882b0bfe14da099f0703f4 | https://github.com/mongodb/mongoid/blob/56976e32610f4c2450882b0bfe14da099f0703f4/lib/mongoid/changeable.rb#L214-L217 | train | Returns the value of the attribute that was changed. | [
30522,
13366,
17961,
1035,
2001,
1006,
2012,
16344,
1007,
2012,
30524,
1024,
12332,
1031,
2012,
16344,
1033,
2203,
102,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
CocoaPods/Xcodeproj | lib/xcodeproj/config.rb | Xcodeproj.Config.extract_hash | def extract_hash(argument)
if argument.respond_to? :read
@filepath = Pathname.new(argument.to_path)
hash_from_file_content(argument.read)
elsif File.readable?(argument.to_s)
@filepath = Pathname.new(argument.to_s)
hash_from_file_content(File.read(argument))
else
... | ruby | def extract_hash(argument)
if argument.respond_to? :read
@filepath = Pathname.new(argument.to_path)
hash_from_file_content(argument.read)
elsif File.readable?(argument.to_s)
@filepath = Pathname.new(argument.to_s)
hash_from_file_content(File.read(argument))
else
... | [
"def",
"extract_hash",
"(",
"argument",
")",
"if",
"argument",
".",
"respond_to?",
":read",
"@filepath",
"=",
"Pathname",
".",
"new",
"(",
"argument",
".",
"to_path",
")",
"hash_from_file_content",
"(",
"argument",
".",
"read",
")",
"elsif",
"File",
".",
"re... | @!group Private Helpers
Returns a hash from the given argument reading it from disk if necessary.
@param [String, Pathname, Hash] argument
The source from where the hash should be extracted.
@return [Hash] | [
"@!group",
"Private",
"Helpers",
"Returns",
"a",
"hash",
"from",
"the",
"given",
"argument",
"reading",
"it",
"from",
"disk",
"if",
"necessary",
"."
] | 3be1684437a6f8e69c7836ad4c85a2b78663272f | https://github.com/CocoaPods/Xcodeproj/blob/3be1684437a6f8e69c7836ad4c85a2b78663272f/lib/xcodeproj/config.rb#L254-L264 | train | Extract the hash from the given argument | [
30522,
13366,
14817,
1035,
23325,
1006,
6685,
1007,
2065,
6685,
1012,
6869,
1035,
2000,
1029,
1024,
3191,
1030,
5371,
15069,
1027,
4130,
18442,
1012,
2047,
1006,
6685,
1012,
2000,
1035,
4130,
1007,
23325,
1035,
2013,
1035,
5371,
1035,
4180,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
square/connect-ruby-sdk | lib/square_connect/models/v1_fee.rb | SquareConnect.V1Fee.adjustment_type= | def adjustment_type=(adjustment_type)
validator = EnumAttributeValidator.new('String', ["TAX"])
unless validator.valid?(adjustment_type)
fail ArgumentError, "invalid value for 'adjustment_type', must be one of #{validator.allowable_values}."
end
@adjustment_type = adjustment_type
end | ruby | def adjustment_type=(adjustment_type)
validator = EnumAttributeValidator.new('String', ["TAX"])
unless validator.valid?(adjustment_type)
fail ArgumentError, "invalid value for 'adjustment_type', must be one of #{validator.allowable_values}."
end
@adjustment_type = adjustment_type
end | [
"def",
"adjustment_type",
"=",
"(",
"adjustment_type",
")",
"validator",
"=",
"EnumAttributeValidator",
".",
"new",
"(",
"'String'",
",",
"[",
"\"TAX\"",
"]",
")",
"unless",
"validator",
".",
"valid?",
"(",
"adjustment_type",
")",
"fail",
"ArgumentError",
",",
... | Custom attribute writer method checking allowed values (enum).
@param [Object] adjustment_type Object to be assigned | [
"Custom",
"attribute",
"writer",
"method",
"checking",
"allowed",
"values",
"(",
"enum",
")",
"."
] | 798eb9ded716f23b9f1518386f1c311a34bca8bf | https://github.com/square/connect-ruby-sdk/blob/798eb9ded716f23b9f1518386f1c311a34bca8bf/lib/square_connect/models/v1_fee.rb#L182-L188 | train | Set the adjustment type of the resource. | [
30522,
13366,
19037,
1035,
2828,
1027,
1006,
19037,
1035,
2828,
1007,
9398,
8844,
1027,
4372,
12248,
4779,
3089,
8569,
2618,
10175,
8524,
4263,
1012,
2047,
1006,
1005,
5164,
1005,
1010,
1031,
1000,
4171,
1000,
1033,
1007,
4983,
9398,
8844,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
fastlane/fastlane | fastlane/lib/fastlane/fast_file.rb | Fastlane.FastFile.say | def say(value)
# Overwrite this, since there is already a 'say' method defined in the Ruby standard library
value ||= yield
value = { text: value } if value.kind_of?(String) || value.kind_of?(Array)
self.runner.trigger_action_by_name(:say, nil, false, value)
end | ruby | def say(value)
# Overwrite this, since there is already a 'say' method defined in the Ruby standard library
value ||= yield
value = { text: value } if value.kind_of?(String) || value.kind_of?(Array)
self.runner.trigger_action_by_name(:say, nil, false, value)
end | [
"def",
"say",
"(",
"value",
")",
"# Overwrite this, since there is already a 'say' method defined in the Ruby standard library",
"value",
"||=",
"yield",
"value",
"=",
"{",
"text",
":",
"value",
"}",
"if",
"value",
".",
"kind_of?",
"(",
"String",
")",
"||",
"value",
... | @!group Overwriting Ruby methods
Speak out loud | [
"@!group",
"Overwriting",
"Ruby",
"methods"
] | 457c5d647c77f0e078dafa5129da616914e002c5 | https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/fastlane/lib/fastlane/fast_file.rb#L314-L320 | train | Called by the runner when a message is sent to the user. | [
30522,
13366,
2360,
1006,
3643,
1007,
1001,
2058,
26373,
2023,
1010,
2144,
2045,
2003,
2525,
1037,
1005,
2360,
1005,
4118,
4225,
1999,
1996,
10090,
3115,
3075,
3643,
1064,
1064,
1027,
10750,
3643,
1027,
1063,
3793,
1024,
3643,
1065,
2065,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
piotrmurach/github | lib/github_api/client/repos/hooks.rb | Github.Client::Repos::Hooks.edit | def edit(*args)
arguments(args, required: [:user, :repo, :id]) do
permit VALID_HOOK_PARAM_NAMES, recursive: false
assert_required REQUIRED_PARAMS
end
patch_request("/repos/#{arguments.user}/#{arguments.repo}/hooks/#{arguments.id}", arguments.params)
end | ruby | def edit(*args)
arguments(args, required: [:user, :repo, :id]) do
permit VALID_HOOK_PARAM_NAMES, recursive: false
assert_required REQUIRED_PARAMS
end
patch_request("/repos/#{arguments.user}/#{arguments.repo}/hooks/#{arguments.id}", arguments.params)
end | [
"def",
"edit",
"(",
"*",
"args",
")",
"arguments",
"(",
"args",
",",
"required",
":",
"[",
":user",
",",
":repo",
",",
":id",
"]",
")",
"do",
"permit",
"VALID_HOOK_PARAM_NAMES",
",",
"recursive",
":",
"false",
"assert_required",
"REQUIRED_PARAMS",
"end",
"... | Edit a hook
@param [Hash] params
@input params [Hash] :config
Required. Key/value pairs to provide settings for this hook.
These settings vary between the services and are defined in
the github-services repository. Booleans are stored internally
as “1” for true, and “0” for false. Any JSON true/false val... | [
"Edit",
"a",
"hook"
] | 8702452c66bea33c9388550aed9e9974f76aaef1 | https://github.com/piotrmurach/github/blob/8702452c66bea33c9388550aed9e9974f76aaef1/lib/github_api/client/repos/hooks.rb#L159-L166 | train | Edit a hook | [
30522,
13366,
10086,
1006,
1008,
12098,
5620,
1007,
9918,
1006,
12098,
5620,
1010,
3223,
1024,
1031,
1024,
5310,
1010,
1024,
16360,
2080,
1010,
1024,
8909,
1033,
1007,
2079,
9146,
9398,
1035,
8103,
1035,
11498,
2213,
1035,
3415,
1010,
28667... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_policy/lib/2017-06-01-preview/generated/azure_mgmt_policy/policy_set_definitions.rb | Azure::Policy::Mgmt::V2017_06_01_preview.PolicySetDefinitions.delete_at_management_group | def delete_at_management_group(policy_set_definition_name, management_group_id, custom_headers:nil)
response = delete_at_management_group_async(policy_set_definition_name, management_group_id, custom_headers:custom_headers).value!
nil
end | ruby | def delete_at_management_group(policy_set_definition_name, management_group_id, custom_headers:nil)
response = delete_at_management_group_async(policy_set_definition_name, management_group_id, custom_headers:custom_headers).value!
nil
end | [
"def",
"delete_at_management_group",
"(",
"policy_set_definition_name",
",",
"management_group_id",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"delete_at_management_group_async",
"(",
"policy_set_definition_name",
",",
"management_group_id",
",",
"custom_headers",... | Deletes a policy set definition at management group level.
@param policy_set_definition_name [String] The name of the policy set
definition to delete.
@param management_group_id [String] The ID of the management group.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to t... | [
"Deletes",
"a",
"policy",
"set",
"definition",
"at",
"management",
"group",
"level",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_policy/lib/2017-06-01-preview/generated/azure_mgmt_policy/policy_set_definitions.rb#L689-L692 | train | Deletes the policy set definition at management group level. | [
30522,
13366,
3972,
12870,
1035,
2012,
1035,
2968,
1035,
2177,
1006,
3343,
1035,
2275,
1035,
6210,
1035,
2171,
1010,
2968,
1035,
2177,
1035,
8909,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
3972,
12870,
1035,
2012,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_compute/lib/2018-04-01/generated/azure_mgmt_compute/virtual_machine_extensions.rb | Azure::Compute::Mgmt::V2018_04_01.VirtualMachineExtensions.update | def update(resource_group_name, vm_name, vm_extension_name, extension_parameters, custom_headers:nil)
response = update_async(resource_group_name, vm_name, vm_extension_name, extension_parameters, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def update(resource_group_name, vm_name, vm_extension_name, extension_parameters, custom_headers:nil)
response = update_async(resource_group_name, vm_name, vm_extension_name, extension_parameters, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"update",
"(",
"resource_group_name",
",",
"vm_name",
",",
"vm_extension_name",
",",
"extension_parameters",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"update_async",
"(",
"resource_group_name",
",",
"vm_name",
",",
"vm_extension_name",
",",
"e... | The operation to update the extension.
@param resource_group_name [String] The name of the resource group.
@param vm_name [String] The name of the virtual machine where the extension
should be updated.
@param vm_extension_name [String] The name of the virtual machine extension.
@param extension_parameters [Virtua... | [
"The",
"operation",
"to",
"update",
"the",
"extension",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_compute/lib/2018-04-01/generated/azure_mgmt_compute/virtual_machine_extensions.rb#L88-L91 | train | Updates an extension. | [
30522,
13366,
10651,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
1058,
2213,
1035,
2171,
1010,
1058,
2213,
1035,
5331,
1035,
2171,
1010,
5331,
1035,
11709,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
10651,
1035,
2004,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
hashicorp/vagrant | lib/vagrant/machine.rb | Vagrant.Machine.reload | def reload
old_id = @id
@id = nil
if @data_dir
# Read the id file from the data directory if it exists as the
# ID for the pre-existing physical representation of this machine.
id_file = @data_dir.join("id")
id_content = id_file.read.strip if id_file.file?
if !... | ruby | def reload
old_id = @id
@id = nil
if @data_dir
# Read the id file from the data directory if it exists as the
# ID for the pre-existing physical representation of this machine.
id_file = @data_dir.join("id")
id_content = id_file.read.strip if id_file.file?
if !... | [
"def",
"reload",
"old_id",
"=",
"@id",
"@id",
"=",
"nil",
"if",
"@data_dir",
"# Read the id file from the data directory if it exists as the",
"# ID for the pre-existing physical representation of this machine.",
"id_file",
"=",
"@data_dir",
".",
"join",
"(",
"\"id\"",
")",
"... | This reloads the ID of the underlying machine. | [
"This",
"reloads",
"the",
"ID",
"of",
"the",
"underlying",
"machine",
"."
] | c22a145c59790c098f95d50141d9afb48e1ef55f | https://github.com/hashicorp/vagrant/blob/c22a145c59790c098f95d50141d9afb48e1ef55f/lib/vagrant/machine.rb#L394-L414 | train | Reload the id file from the data directory if it exists. | [
30522,
13366,
2128,
11066,
2214,
1035,
8909,
1027,
1030,
8909,
1030,
8909,
1027,
9152,
2140,
2065,
1030,
2951,
1035,
30524,
4493,
3558,
6630,
1997,
2023,
3698,
1012,
8909,
1035,
5371,
1027,
1030,
2951,
1035,
16101,
1012,
3693,
1006,
1000,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_web/lib/2018-02-01/generated/azure_mgmt_web/app_service_environments.rb | Azure::Web::Mgmt::V2018_02_01.AppServiceEnvironments.list_metrics_next | def list_metrics_next(next_page_link, custom_headers:nil)
response = list_metrics_next_async(next_page_link, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def list_metrics_next(next_page_link, custom_headers:nil)
response = list_metrics_next_async(next_page_link, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"list_metrics_next",
"(",
"next_page_link",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"list_metrics_next_async",
"(",
"next_page_link",
",",
"custom_headers",
":custom_headers",
")",
".",
"value!",
"response",
".",
"body",
"unless",
"response",
... | Get global metrics of an App Service Environment.
Get global metrics of an App Service Environment.
@param next_page_link [String] The NextLink from the previous successful call
to List operation.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request.
@r... | [
"Get",
"global",
"metrics",
"of",
"an",
"App",
"Service",
"Environment",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_web/lib/2018-02-01/generated/azure_mgmt_web/app_service_environments.rb#L5326-L5329 | train | Gets metrics for a given resource group. | [
30522,
13366,
2862,
1035,
12046,
2015,
1035,
2279,
1006,
2279,
1035,
3931,
1035,
4957,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
2862,
1035,
12046,
2015,
1035,
2279,
1035,
2004,
6038,
2278,
1006,
2279,
1035,
3931,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
decidim/decidim | decidim-core/app/helpers/decidim/amendments_helper.rb | Decidim.AmendmentsHelper.allowed_to_promote? | def allowed_to_promote?(emendation)
return unless emendation.amendment.rejected? && emendation.created_by?(current_user)
return if promoted?(emendation)
true
end | ruby | def allowed_to_promote?(emendation)
return unless emendation.amendment.rejected? && emendation.created_by?(current_user)
return if promoted?(emendation)
true
end | [
"def",
"allowed_to_promote?",
"(",
"emendation",
")",
"return",
"unless",
"emendation",
".",
"amendment",
".",
"rejected?",
"&&",
"emendation",
".",
"created_by?",
"(",
"current_user",
")",
"return",
"if",
"promoted?",
"(",
"emendation",
")",
"true",
"end"
] | Checks if the user can promote the emendation | [
"Checks",
"if",
"the",
"user",
"can",
"promote",
"the",
"emendation"
] | 6e2b14e559a63088669904e3c5c49a5180700cf7 | https://github.com/decidim/decidim/blob/6e2b14e559a63088669904e3c5c49a5180700cf7/decidim-core/app/helpers/decidim/amendments_helper.rb#L90-L95 | train | Returns true if the given emendation is allowed to be promoted to the current user. | [
30522,
13366,
3039,
1035,
2000,
1035,
5326,
1029,
1006,
7861,
10497,
3370,
1007,
2709,
4983,
7861,
10497,
3370,
1012,
7450,
1012,
5837,
1029,
1004,
1004,
7861,
10497,
3370,
1012,
2580,
1035,
2011,
1029,
1006,
2783,
1035,
5310,
1007,
2709,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
github/licensed | lib/licensed/dependency.rb | Licensed.Dependency.license_contents | def license_contents
matched_files.reject { |f| f == package_file }
.group_by(&:content)
.map { |content, files| { "sources" => license_content_sources(files), "text" => content } }
end | ruby | def license_contents
matched_files.reject { |f| f == package_file }
.group_by(&:content)
.map { |content, files| { "sources" => license_content_sources(files), "text" => content } }
end | [
"def",
"license_contents",
"matched_files",
".",
"reject",
"{",
"|",
"f",
"|",
"f",
"==",
"package_file",
"}",
".",
"group_by",
"(",
":content",
")",
".",
"map",
"{",
"|",
"content",
",",
"files",
"|",
"{",
"\"sources\"",
"=>",
"license_content_sources",
"... | Returns the license text content from all matched sources
except the package file, which doesn't contain license text. | [
"Returns",
"the",
"license",
"text",
"content",
"from",
"all",
"matched",
"sources",
"except",
"the",
"package",
"file",
"which",
"doesn",
"t",
"contain",
"license",
"text",
"."
] | afba288df344e001d43e94ad9217635a011b79c2 | https://github.com/github/licensed/blob/afba288df344e001d43e94ad9217635a011b79c2/lib/licensed/dependency.rb#L74-L78 | train | returns an array of the license contents | [
30522,
13366,
6105,
1035,
8417,
10349,
1035,
6764,
1012,
15454,
1063,
1064,
1042,
1064,
1042,
1027,
1027,
7427,
1035,
5371,
1065,
1012,
2177,
1035,
2011,
1006,
1004,
1024,
4180,
1007,
1012,
4949,
1063,
1064,
4180,
1010,
6764,
1064,
1063,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
ruby2d/ruby2d | lib/ruby2d/line.rb | Ruby2D.Line.points_distance | def points_distance(x1, y1, x2, y2)
Math.sqrt((x1 - x2) ** 2 + (y1 - y2) ** 2)
end | ruby | def points_distance(x1, y1, x2, y2)
Math.sqrt((x1 - x2) ** 2 + (y1 - y2) ** 2)
end | [
"def",
"points_distance",
"(",
"x1",
",",
"y1",
",",
"x2",
",",
"y2",
")",
"Math",
".",
"sqrt",
"(",
"(",
"x1",
"-",
"x2",
")",
"**",
"2",
"+",
"(",
"y1",
"-",
"y2",
")",
"**",
"2",
")",
"end"
] | Calculate the distance between two points | [
"Calculate",
"the",
"distance",
"between",
"two",
"points"
] | 43ce9805a7ae8b82b7ab8c50bf6d4c845d395dc4 | https://github.com/ruby2d/ruby2d/blob/43ce9805a7ae8b82b7ab8c50bf6d4c845d395dc4/lib/ruby2d/line.rb#L44-L46 | train | Calculate the distance between two points | [
30522,
13366,
2685,
1035,
3292,
1006,
1060,
2487,
1010,
1061,
2487,
1010,
1060,
2475,
1010,
1061,
2475,
1007,
8785,
1012,
5490,
5339,
1006,
1006,
1060,
2487,
1011,
1060,
2475,
1007,
1008,
1008,
1016,
1009,
1006,
1061,
2487,
1011,
1061,
24... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
lostisland/faraday | lib/faraday/rack_builder.rb | Faraday.RackBuilder.build_env | def build_env(connection, request)
exclusive_url = connection.build_exclusive_url(
request.path, request.params,
request.options.params_encoder
)
Env.new(request.method, request.body, exclusive_url,
request.options, request.headers, connection.ssl,
connecti... | ruby | def build_env(connection, request)
exclusive_url = connection.build_exclusive_url(
request.path, request.params,
request.options.params_encoder
)
Env.new(request.method, request.body, exclusive_url,
request.options, request.headers, connection.ssl,
connecti... | [
"def",
"build_env",
"(",
"connection",
",",
"request",
")",
"exclusive_url",
"=",
"connection",
".",
"build_exclusive_url",
"(",
"request",
".",
"path",
",",
"request",
".",
"params",
",",
"request",
".",
"options",
".",
"params_encoder",
")",
"Env",
".",
"n... | ENV Keys
:method - a symbolized request method (:get, :post)
:body - the request body that will eventually be converted to a string.
:url - URI instance for the current request.
:status - HTTP response status code
:request_headers - hash of HTTP Headers to be sent to the server
:response_headers -... | [
"ENV",
"Keys",
":",
"method",
"-",
"a",
"symbolized",
"request",
"method",
"(",
":",
"get",
":",
"post",
")",
":",
"body",
"-",
"the",
"request",
"body",
"that",
"will",
"eventually",
"be",
"converted",
"to",
"a",
"string",
".",
":",
"url",
"-",
"URI... | 3abe9d1eea4bdf61cdf7b76ff9f1ae7e09482e70 | https://github.com/lostisland/faraday/blob/3abe9d1eea4bdf61cdf7b76ff9f1ae7e09482e70/lib/faraday/rack_builder.rb#L204-L213 | train | Build an environment object from the request | [
30522,
13366,
3857,
1035,
4372,
2615,
1006,
4434,
1010,
30524,
3857,
1035,
7262,
1035,
24471,
2140,
1006,
5227,
1012,
4130,
1010,
5227,
1012,
11498,
5244,
1010,
5227,
1012,
7047,
1012,
11498,
5244,
1035,
4372,
16044,
2099,
1007,
4372,
2615,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_web/lib/2018-02-01/generated/azure_mgmt_web/app_service_environments.rb | Azure::Web::Mgmt::V2018_02_01.AppServiceEnvironments.reboot | def reboot(resource_group_name, name, custom_headers:nil)
response = reboot_async(resource_group_name, name, custom_headers:custom_headers).value!
nil
end | ruby | def reboot(resource_group_name, name, custom_headers:nil)
response = reboot_async(resource_group_name, name, custom_headers:custom_headers).value!
nil
end | [
"def",
"reboot",
"(",
"resource_group_name",
",",
"name",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"reboot_async",
"(",
"resource_group_name",
",",
"name",
",",
"custom_headers",
":custom_headers",
")",
".",
"value!",
"nil",
"end"
] | Reboot all machines in an App Service Environment.
Reboot all machines in an App Service Environment.
@param resource_group_name [String] Name of the resource group to which the
resource belongs.
@param name [String] Name of the App Service Environment.
@param custom_headers [Hash{String => String}] A hash of cu... | [
"Reboot",
"all",
"machines",
"in",
"an",
"App",
"Service",
"Environment",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_web/lib/2018-02-01/generated/azure_mgmt_web/app_service_environments.rb#L2481-L2484 | train | Reboots the specified container group. | [
30522,
13366,
2128,
27927,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
2128,
27927,
1035,
2004,
6038,
2278,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2171,
1010,
7661,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_locks/lib/2015-01-01/generated/azure_mgmt_locks/management_locks.rb | Azure::Locks::Mgmt::V2015_01_01.ManagementLocks.list_at_subscription_level_next | def list_at_subscription_level_next(next_page_link, custom_headers:nil)
response = list_at_subscription_level_next_async(next_page_link, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def list_at_subscription_level_next(next_page_link, custom_headers:nil)
response = list_at_subscription_level_next_async(next_page_link, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"list_at_subscription_level_next",
"(",
"next_page_link",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"list_at_subscription_level_next_async",
"(",
"next_page_link",
",",
"custom_headers",
":custom_headers",
")",
".",
"value!",
"response",
".",
"body",... | Gets all the management locks of a subscription.
@param next_page_link [String] The NextLink from the previous successful call
to List operation.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request.
@return [ManagementLockListResult] operation results. | [
"Gets",
"all",
"the",
"management",
"locks",
"of",
"a",
"subscription",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_locks/lib/2015-01-01/generated/azure_mgmt_locks/management_locks.rb#L1314-L1317 | train | Gets the list of the elastic advisors. | [
30522,
13366,
2862,
1035,
2012,
1035,
15002,
1035,
2504,
1035,
2279,
1006,
2279,
1035,
3931,
1035,
4957,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
2862,
1035,
2012,
1035,
15002,
1035,
2504,
1035,
2279,
1035,
2004,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
daddyz/phonelib | lib/phonelib/phone_analyzer_helper.rb | Phonelib.PhoneAnalyzerHelper.passed_country | def passed_country(country)
code = country_prefix(country)
if Core::PLUS_SIGN == @original[0] && code && !sanitized.start_with?(code)
# in case number passed with + but it doesn't start with passed
# country prefix
country = nil
end
country
end | ruby | def passed_country(country)
code = country_prefix(country)
if Core::PLUS_SIGN == @original[0] && code && !sanitized.start_with?(code)
# in case number passed with + but it doesn't start with passed
# country prefix
country = nil
end
country
end | [
"def",
"passed_country",
"(",
"country",
")",
"code",
"=",
"country_prefix",
"(",
"country",
")",
"if",
"Core",
"::",
"PLUS_SIGN",
"==",
"@original",
"[",
"0",
"]",
"&&",
"code",
"&&",
"!",
"sanitized",
".",
"start_with?",
"(",
"code",
")",
"# in case numb... | defines if to validate against single country or not | [
"defines",
"if",
"to",
"validate",
"against",
"single",
"country",
"or",
"not"
] | aa0023eab7c896b71275bf342bc7f49735cbdbbf | https://github.com/daddyz/phonelib/blob/aa0023eab7c896b71275bf342bc7f49735cbdbbf/lib/phonelib/phone_analyzer_helper.rb#L25-L33 | train | Returns the passed country | [
30522,
13366,
2979,
1035,
2406,
1006,
2406,
1007,
3642,
1027,
2406,
1035,
17576,
1006,
2406,
1007,
2065,
4563,
1024,
1024,
4606,
1035,
3696,
1027,
1027,
1030,
2434,
1031,
1014,
1033,
1004,
1004,
3642,
1004,
1004,
999,
2624,
25090,
5422,
1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_network/lib/2018-07-01/generated/azure_mgmt_network/virtual_wans.rb | Azure::Network::Mgmt::V2018_07_01.VirtualWANs.update_tags_async | def update_tags_async(resource_group_name, virtual_wanname, wanparameters, custom_headers:nil)
# Send request
promise = begin_update_tags_async(resource_group_name, virtual_wanname, wanparameters, custom_headers:custom_headers)
promise = promise.then do |response|
# Defining deserialization m... | ruby | def update_tags_async(resource_group_name, virtual_wanname, wanparameters, custom_headers:nil)
# Send request
promise = begin_update_tags_async(resource_group_name, virtual_wanname, wanparameters, custom_headers:custom_headers)
promise = promise.then do |response|
# Defining deserialization m... | [
"def",
"update_tags_async",
"(",
"resource_group_name",
",",
"virtual_wanname",
",",
"wanparameters",
",",
"custom_headers",
":",
"nil",
")",
"# Send request",
"promise",
"=",
"begin_update_tags_async",
"(",
"resource_group_name",
",",
"virtual_wanname",
",",
"wanparamete... | @param resource_group_name [String] The resource group name of the
VirtualWan.
@param virtual_wanname [String] The name of the VirtualWAN being updated.
@param wanparameters [TagsObject] Parameters supplied to Update VirtualWAN
tags.
@param custom_headers [Hash{String => String}] A hash of custom headers that
wil... | [
"@param",
"resource_group_name",
"[",
"String",
"]",
"The",
"resource",
"group",
"name",
"of",
"the",
"VirtualWan",
".",
"@param",
"virtual_wanname",
"[",
"String",
"]",
"The",
"name",
"of",
"the",
"VirtualWAN",
"being",
"updated",
".",
"@param",
"wanparameters"... | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_network/lib/2018-07-01/generated/azure_mgmt_network/virtual_wans.rb#L200-L216 | train | Updates a virtual wan s tags. | [
30522,
13366,
10651,
1035,
22073,
1035,
2004,
6038,
2278,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
7484,
1035,
10587,
4168,
1010,
14071,
28689,
22828,
2015,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
1001,
4604,
5227,
4872,
102... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | data/azure_service_fabric/lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb | Azure::ServiceFabric::V6_2_0_9.ServiceFabricClientAPIs.delete_name | def delete_name(name_id, timeout:60, custom_headers:nil)
response = delete_name_async(name_id, timeout:timeout, custom_headers:custom_headers).value!
nil
end | ruby | def delete_name(name_id, timeout:60, custom_headers:nil)
response = delete_name_async(name_id, timeout:timeout, custom_headers:custom_headers).value!
nil
end | [
"def",
"delete_name",
"(",
"name_id",
",",
"timeout",
":",
"60",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"delete_name_async",
"(",
"name_id",
",",
"timeout",
":",
"timeout",
",",
"custom_headers",
":custom_headers",
")",
".",
"value!",
"nil",
... | Deletes a Service Fabric name.
Deletes the specified Service Fabric name. A name must be created before it
can be deleted. Deleting a name with child properties will fail.
@param name_id [String] The Service Fabric name, without the 'fabric:' URI
scheme.
@param timeout [Integer] The server timeout for performing... | [
"Deletes",
"a",
"Service",
"Fabric",
"name",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_service_fabric/lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb#L26328-L26331 | train | Deletes a name from the specified HDInsight domain. | [
30522,
13366,
3972,
12870,
1035,
2171,
1006,
2171,
1035,
8909,
1010,
2051,
5833,
1024,
3438,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
3972,
12870,
1035,
2171,
1035,
2004,
6038,
2278,
1006,
2171,
1035,
8909,
1010,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
rubocop-hq/rubocop | lib/rubocop/token.rb | RuboCop.Token.space_before? | def space_before?
position = begin_pos.zero? ? begin_pos : begin_pos - 1
pos.source_buffer.source.match(/\G\s/, position)
end | ruby | def space_before?
position = begin_pos.zero? ? begin_pos : begin_pos - 1
pos.source_buffer.source.match(/\G\s/, position)
end | [
"def",
"space_before?",
"position",
"=",
"begin_pos",
".",
"zero?",
"?",
"begin_pos",
":",
"begin_pos",
"-",
"1",
"pos",
".",
"source_buffer",
".",
"source",
".",
"match",
"(",
"/",
"\\G",
"\\s",
"/",
",",
"position",
")",
"end"
] | Checks if there is whitespace before token | [
"Checks",
"if",
"there",
"is",
"whitespace",
"before",
"token"
] | 2a4f4f0fdac4e1bb25891fc312af2ea60c6aa2f0 | https://github.com/rubocop-hq/rubocop/blob/2a4f4f0fdac4e1bb25891fc312af2ea60c6aa2f0/lib/rubocop/token.rb#L47-L50 | train | Returns true if the position is before the current position. | [
30522,
13366,
2686,
1035,
2077,
1029,
2597,
1027,
4088,
1035,
13433,
2015,
1012,
5717,
1029,
1029,
4088,
1035,
13433,
2015,
1024,
4088,
1035,
13433,
2015,
1011,
1015,
13433,
2015,
1012,
3120,
1035,
17698,
1012,
3120,
1012,
2674,
1006,
1013,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
square/connect-ruby-sdk | lib/square_connect/models/create_order_request_tax.rb | SquareConnect.CreateOrderRequestTax.valid? | def valid?
return false if !@catalog_object_id.nil? && @catalog_object_id.to_s.length > 192
return false if !@name.nil? && @name.to_s.length > 255
type_validator = EnumAttributeValidator.new('String', ["UNKNOWN_TAX", "ADDITIVE", "INCLUSIVE"])
return false unless type_validator.valid?(@type)
... | ruby | def valid?
return false if !@catalog_object_id.nil? && @catalog_object_id.to_s.length > 192
return false if !@name.nil? && @name.to_s.length > 255
type_validator = EnumAttributeValidator.new('String', ["UNKNOWN_TAX", "ADDITIVE", "INCLUSIVE"])
return false unless type_validator.valid?(@type)
... | [
"def",
"valid?",
"return",
"false",
"if",
"!",
"@catalog_object_id",
".",
"nil?",
"&&",
"@catalog_object_id",
".",
"to_s",
".",
"length",
">",
"192",
"return",
"false",
"if",
"!",
"@name",
".",
"nil?",
"&&",
"@name",
".",
"to_s",
".",
"length",
">",
"255... | Check to see if the all the properties in the model are valid
@return true if the model is valid | [
"Check",
"to",
"see",
"if",
"the",
"all",
"the",
"properties",
"in",
"the",
"model",
"are",
"valid"
] | 798eb9ded716f23b9f1518386f1c311a34bca8bf | https://github.com/square/connect-ruby-sdk/blob/798eb9ded716f23b9f1518386f1c311a34bca8bf/lib/square_connect/models/create_order_request_tax.rb#L116-L123 | train | Returns true if the object is valid for the given object ID. | [
30522,
13366,
9398,
1029,
2709,
6270,
2065,
999,
1030,
12105,
1035,
4874,
1035,
8909,
1012,
9152,
2140,
1029,
1004,
1004,
1030,
12105,
1035,
4874,
1035,
8909,
1012,
2000,
1035,
1055,
1012,
3091,
1028,
17613,
2709,
6270,
2065,
999,
1030,
2... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_logic/lib/2016-06-01/generated/azure_mgmt_logic/workflow_triggers.rb | Azure::Logic::Mgmt::V2016_06_01.WorkflowTriggers.list_callback_url_with_http_info | def list_callback_url_with_http_info(resource_group_name, workflow_name, trigger_name, custom_headers:nil)
list_callback_url_async(resource_group_name, workflow_name, trigger_name, custom_headers:custom_headers).value!
end | ruby | def list_callback_url_with_http_info(resource_group_name, workflow_name, trigger_name, custom_headers:nil)
list_callback_url_async(resource_group_name, workflow_name, trigger_name, custom_headers:custom_headers).value!
end | [
"def",
"list_callback_url_with_http_info",
"(",
"resource_group_name",
",",
"workflow_name",
",",
"trigger_name",
",",
"custom_headers",
":",
"nil",
")",
"list_callback_url_async",
"(",
"resource_group_name",
",",
"workflow_name",
",",
"trigger_name",
",",
"custom_headers",... | Get the callback URL for a workflow trigger.
@param resource_group_name [String] The resource group name.
@param workflow_name [String] The workflow name.
@param trigger_name [String] The workflow trigger name.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP ... | [
"Get",
"the",
"callback",
"URL",
"for",
"a",
"workflow",
"trigger",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_logic/lib/2016-06-01/generated/azure_mgmt_logic/workflow_triggers.rb#L611-L613 | train | Gets the callback URL for the specified workflow trigger. | [
30522,
13366,
2862,
1035,
2655,
5963,
1035,
24471,
2140,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2147,
12314,
1035,
2171,
1010,
9495,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | data/azure_cognitiveservices_customvisiontraining/lib/3.0/generated/azure_cognitiveservices_customvisiontraining/customvisiontraining_client.rb | Azure::CognitiveServices::Customvisiontraining::V3_0.CustomvisiontrainingClient.get_image_region_proposals | def get_image_region_proposals(project_id, image_id, custom_headers:nil)
response = get_image_region_proposals_async(project_id, image_id, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def get_image_region_proposals(project_id, image_id, custom_headers:nil)
response = get_image_region_proposals_async(project_id, image_id, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"get_image_region_proposals",
"(",
"project_id",
",",
"image_id",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"get_image_region_proposals_async",
"(",
"project_id",
",",
"image_id",
",",
"custom_headers",
":custom_headers",
")",
".",
"value!",
"res... | Get region proposals for an image. Returns empty array if no proposals are
found.
This API will get region proposals for an image along with confidences for
the region. It returns an empty array if no proposals are found.
@param project_id The project id.
@param image_id The image id.
@param custom_headers [Has... | [
"Get",
"region",
"proposals",
"for",
"an",
"image",
".",
"Returns",
"empty",
"array",
"if",
"no",
"proposals",
"are",
"found",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_cognitiveservices_customvisiontraining/lib/3.0/generated/azure_cognitiveservices_customvisiontraining/customvisiontraining_client.rb#L1919-L1922 | train | Gets region proposals for an image. | [
30522,
13366,
2131,
1035,
3746,
1035,
2555,
1035,
10340,
1006,
2622,
1035,
8909,
1010,
3746,
1035,
8909,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
30524,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
seejohnrun/ice_cube | lib/ice_cube/validations/fixed_value.rb | IceCube.Validations::FixedValue.validate_interval_lock | def validate_interval_lock(time, start_time)
t0 = starting_unit(start_time)
t1 = time.send(type)
t0 >= t1 ? t0 - t1 : INTERVALS[type] - t1 + t0
end | ruby | def validate_interval_lock(time, start_time)
t0 = starting_unit(start_time)
t1 = time.send(type)
t0 >= t1 ? t0 - t1 : INTERVALS[type] - t1 + t0
end | [
"def",
"validate_interval_lock",
"(",
"time",
",",
"start_time",
")",
"t0",
"=",
"starting_unit",
"(",
"start_time",
")",
"t1",
"=",
"time",
".",
"send",
"(",
"type",
")",
"t0",
">=",
"t1",
"?",
"t0",
"-",
"t1",
":",
"INTERVALS",
"[",
"type",
"]",
"-... | Validate if the current time unit matches the same unit from the schedule
start time, returning the difference to the interval | [
"Validate",
"if",
"the",
"current",
"time",
"unit",
"matches",
"the",
"same",
"unit",
"from",
"the",
"schedule",
"start",
"time",
"returning",
"the",
"difference",
"to",
"the",
"interval"
] | fb6c657bdc4f87dfda2bf83f15c5f487b78ccabd | https://github.com/seejohnrun/ice_cube/blob/fb6c657bdc4f87dfda2bf83f15c5f487b78ccabd/lib/ice_cube/validations/fixed_value.rb#L28-L32 | train | Validate the interval lock | [
30522,
13366,
9398,
3686,
1035,
13483,
1035,
5843,
1006,
2051,
1010,
2707,
1035,
2051,
1007,
1056,
2692,
1027,
3225,
1035,
3131,
1006,
2707,
1035,
2051,
1007,
1056,
2487,
1027,
2051,
1012,
4604,
1006,
2828,
1007,
1056,
2692,
1028,
1027,
1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_network/lib/2019-02-01/generated/azure_mgmt_network/nat_gateways.rb | Azure::Network::Mgmt::V2019_02_01.NatGateways.begin_delete | def begin_delete(resource_group_name, nat_gateway_name, custom_headers:nil)
response = begin_delete_async(resource_group_name, nat_gateway_name, custom_headers:custom_headers).value!
nil
end | ruby | def begin_delete(resource_group_name, nat_gateway_name, custom_headers:nil)
response = begin_delete_async(resource_group_name, nat_gateway_name, custom_headers:custom_headers).value!
nil
end | [
"def",
"begin_delete",
"(",
"resource_group_name",
",",
"nat_gateway_name",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"begin_delete_async",
"(",
"resource_group_name",
",",
"nat_gateway_name",
",",
"custom_headers",
":custom_headers",
")",
".",
"value!",
... | Deletes the specified nat gateway.
@param resource_group_name [String] The name of the resource group.
@param nat_gateway_name [String] The name of the nat gateway.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request. | [
"Deletes",
"the",
"specified",
"nat",
"gateway",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_network/lib/2019-02-01/generated/azure_mgmt_network/nat_gateways.rb#L490-L493 | train | Deletes a nat gateway. | [
30522,
13366,
4088,
1035,
3972,
12870,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
14085,
1035,
11909,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
4088,
1035,
3972,
12870,
1035,
2004,
6038,
2278,
1006,
7692,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | data/azure_cognitiveservices_textanalytics/lib/v2.1/generated/azure_cognitiveservices_textanalytics/text_analytics_client.rb | Azure::CognitiveServices::TextAnalytics::V2_1.TextAnalyticsClient.detect_language | def detect_language(show_stats:nil, language_batch_input:nil, custom_headers:nil)
response = detect_language_async(show_stats:show_stats, language_batch_input:language_batch_input, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def detect_language(show_stats:nil, language_batch_input:nil, custom_headers:nil)
response = detect_language_async(show_stats:show_stats, language_batch_input:language_batch_input, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"detect_language",
"(",
"show_stats",
":",
"nil",
",",
"language_batch_input",
":",
"nil",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"detect_language_async",
"(",
"show_stats",
":show_stats",
",",
"language_batch_input",
":language_batch_input",
... | The API returns the detected language and a numeric score between 0 and 1.
Scores close to 1 indicate 100% certainty that the identified language is
true. A total of 120 languages are supported.
@param show_stats [Boolean] (optional) if set to true, response will contain
input and document level statistics.
@par... | [
"The",
"API",
"returns",
"the",
"detected",
"language",
"and",
"a",
"numeric",
"score",
"between",
"0",
"and",
"1",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_cognitiveservices_textanalytics/lib/v2.1/generated/azure_cognitiveservices_textanalytics/text_analytics_client.rb#L131-L134 | train | Detects the language. | [
30522,
13366,
11487,
1035,
2653,
1006,
2265,
1035,
26319,
1024,
9152,
2140,
30524,
1035,
20346,
2015,
1024,
7661,
1035,
20346,
2015,
1007,
1012,
3643,
999,
3433,
1012,
2303,
4983,
3433,
1012,
9152,
2140,
1029,
2203,
102,
0,
0,
0,
0,
0,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
gocardless/hutch | lib/hutch/cli.rb | Hutch.CLI.start_work_loop | def start_work_loop
Hutch.connect
@worker = Hutch::Worker.new(Hutch.broker, Hutch.consumers, Hutch::Config.setup_procs)
@worker.run
:success
rescue ConnectionError, AuthenticationError, WorkerSetupError => ex
Hutch::Config[:error_handlers].each do |backend|
backend.handle_setup... | ruby | def start_work_loop
Hutch.connect
@worker = Hutch::Worker.new(Hutch.broker, Hutch.consumers, Hutch::Config.setup_procs)
@worker.run
:success
rescue ConnectionError, AuthenticationError, WorkerSetupError => ex
Hutch::Config[:error_handlers].each do |backend|
backend.handle_setup... | [
"def",
"start_work_loop",
"Hutch",
".",
"connect",
"@worker",
"=",
"Hutch",
"::",
"Worker",
".",
"new",
"(",
"Hutch",
".",
"broker",
",",
"Hutch",
".",
"consumers",
",",
"Hutch",
"::",
"Config",
".",
"setup_procs",
")",
"@worker",
".",
"run",
":success",
... | Kick off the work loop. This method returns when the worker is shut down
gracefully (with a SIGQUIT, SIGTERM or SIGINT). | [
"Kick",
"off",
"the",
"work",
"loop",
".",
"This",
"method",
"returns",
"when",
"the",
"worker",
"is",
"shut",
"down",
"gracefully",
"(",
"with",
"a",
"SIGQUIT",
"SIGTERM",
"or",
"SIGINT",
")",
"."
] | 9314b3b8c84abeb78170730757f3eb8ccc4f54c5 | https://github.com/gocardless/hutch/blob/9314b3b8c84abeb78170730757f3eb8ccc4f54c5/lib/hutch/cli.rb#L87-L98 | train | Start the work loop | [
30522,
13366,
2707,
1035,
2147,
1035,
7077,
12570,
2818,
1012,
7532,
1030,
7309,
1027,
12570,
2818,
1024,
1024,
7309,
1012,
2047,
1006,
12570,
2818,
1012,
20138,
1010,
12570,
2818,
1012,
10390,
1010,
12570,
2818,
1024,
1024,
9530,
8873,
229... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_machine_learning_services/lib/2018-03-01-preview/generated/azure_mgmt_machine_learning_services/workspaces.rb | Azure::MachineLearningServices::Mgmt::V2018_03_01_preview.Workspaces.create_or_update | def create_or_update(resource_group_name, workspace_name, parameters, custom_headers:nil)
response = create_or_update_async(resource_group_name, workspace_name, parameters, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def create_or_update(resource_group_name, workspace_name, parameters, custom_headers:nil)
response = create_or_update_async(resource_group_name, workspace_name, parameters, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"create_or_update",
"(",
"resource_group_name",
",",
"workspace_name",
",",
"parameters",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"create_or_update_async",
"(",
"resource_group_name",
",",
"workspace_name",
",",
"parameters",
",",
"custom_headers... | Creates or updates a workspace with the specified parameters.
@param resource_group_name [String] Name of the resource group in which
workspace is located.
@param workspace_name [String] Name of Azure Machine Learning workspace.
@param parameters [Workspace] The parameters for creating or updating a
machine learn... | [
"Creates",
"or",
"updates",
"a",
"workspace",
"with",
"the",
"specified",
"parameters",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_machine_learning_services/lib/2018-03-01-preview/generated/azure_mgmt_machine_learning_services/workspaces.rb#L133-L136 | train | Creates or updates a managed cluster. | [
30522,
13366,
3443,
1035,
2030,
1035,
10651,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2573,
15327,
1035,
2171,
1010,
11709,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
3443,
1035,
2030,
1035,
10651,
1035,
2004,
6038,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
github/linguist | lib/linguist/classifier.rb | Linguist.Classifier.debug_dump_all_tokens | def debug_dump_all_tokens(tokens, languages)
maxlen = tokens.map { |tok| tok.size }.max
printf "%#{maxlen}s", ""
puts " #" + languages.map { |lang| sprintf("%10s", lang) }.join
token_map = Hash.new(0)
tokens.each { |tok| token_map[tok] += 1 }
token_map.sort.each { |... | ruby | def debug_dump_all_tokens(tokens, languages)
maxlen = tokens.map { |tok| tok.size }.max
printf "%#{maxlen}s", ""
puts " #" + languages.map { |lang| sprintf("%10s", lang) }.join
token_map = Hash.new(0)
tokens.each { |tok| token_map[tok] += 1 }
token_map.sort.each { |... | [
"def",
"debug_dump_all_tokens",
"(",
"tokens",
",",
"languages",
")",
"maxlen",
"=",
"tokens",
".",
"map",
"{",
"|",
"tok",
"|",
"tok",
".",
"size",
"}",
".",
"max",
"printf",
"\"%#{maxlen}s\"",
",",
"\"\"",
"puts",
"\" #\"",
"+",
"languages",
".",
"m... | Internal: show a table of probabilities for each <token,language> pair.
The number in each table entry is the number of "points" that each
token contributes toward the belief that the file under test is a
particular language. Points are additive.
Points are the number of times a token appears in the file, times
... | [
"Internal",
":",
"show",
"a",
"table",
"of",
"probabilities",
"for",
"each",
"<token",
"language",
">",
"pair",
"."
] | 9116c90fcbb82ac03b4b33c58cfbde1fcf745e99 | https://github.com/github/linguist/blob/9116c90fcbb82ac03b4b33c58cfbde1fcf745e99/lib/linguist/classifier.rb#L169-L190 | train | Dump all tokens and languages | [
30522,
13366,
2139,
8569,
2290,
1035,
15653,
1035,
2035,
1035,
19204,
2015,
1006,
19204,
2015,
1010,
4155,
1007,
4098,
7770,
1027,
19204,
2015,
1012,
4949,
1063,
1064,
2000,
2243,
1064,
2000,
2243,
1012,
2946,
1065,
1012,
4098,
6140,
2546,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/product_apis.rb | Azure::ApiManagement::Mgmt::V2016_07_07.ProductApis.remove | def remove(resource_group_name, service_name, product_id, api_id, custom_headers:nil)
response = remove_async(resource_group_name, service_name, product_id, api_id, custom_headers:custom_headers).value!
nil
end | ruby | def remove(resource_group_name, service_name, product_id, api_id, custom_headers:nil)
response = remove_async(resource_group_name, service_name, product_id, api_id, custom_headers:custom_headers).value!
nil
end | [
"def",
"remove",
"(",
"resource_group_name",
",",
"service_name",
",",
"product_id",
",",
"api_id",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"remove_async",
"(",
"resource_group_name",
",",
"service_name",
",",
"product_id",
",",
"api_id",
",",
"... | Deletes the specified API from the specified product.
@param resource_group_name [String] The name of the resource group.
@param service_name [String] The name of the API Management service.
@param product_id [String] Product identifier. Must be unique in the current
API Management service instance.
@param api_id... | [
"Deletes",
"the",
"specified",
"API",
"from",
"the",
"specified",
"product",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/product_apis.rb#L296-L299 | train | Remove a product from the list of products. | [
30522,
13366,
6366,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2326,
1035,
2171,
1010,
4031,
1035,
8909,
1010,
17928,
1035,
8909,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
6366,
1035,
2004,
6038,
2278,
1006,
7692,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_stor_simple8000_series/lib/2017-06-01/generated/azure_mgmt_stor_simple8000_series/device_settings.rb | Azure::StorSimple8000Series::Mgmt::V2017_06_01.DeviceSettings.update_network_settings_async | def update_network_settings_async(device_name, parameters, resource_group_name, manager_name, custom_headers:nil)
# Send request
promise = begin_update_network_settings_async(device_name, parameters, resource_group_name, manager_name, custom_headers:custom_headers)
promise = promise.then do |response... | ruby | def update_network_settings_async(device_name, parameters, resource_group_name, manager_name, custom_headers:nil)
# Send request
promise = begin_update_network_settings_async(device_name, parameters, resource_group_name, manager_name, custom_headers:custom_headers)
promise = promise.then do |response... | [
"def",
"update_network_settings_async",
"(",
"device_name",
",",
"parameters",
",",
"resource_group_name",
",",
"manager_name",
",",
"custom_headers",
":",
"nil",
")",
"# Send request",
"promise",
"=",
"begin_update_network_settings_async",
"(",
"device_name",
",",
"param... | @param device_name [String] The device name
@param parameters [NetworkSettingsPatch] The network settings to be updated.
@param resource_group_name [String] The resource group name
@param manager_name [String] The manager name
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be add... | [
"@param",
"device_name",
"[",
"String",
"]",
"The",
"device",
"name",
"@param",
"parameters",
"[",
"NetworkSettingsPatch",
"]",
"The",
"network",
"settings",
"to",
"be",
"updated",
".",
"@param",
"resource_group_name",
"[",
"String",
"]",
"The",
"resource",
"gro... | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_stor_simple8000_series/lib/2017-06-01/generated/azure_mgmt_stor_simple8000_series/device_settings.rb#L294-L310 | train | Updates network settings of the specified device. | [
30522,
13366,
10651,
1035,
2897,
1035,
10906,
1035,
2004,
6038,
2278,
1006,
5080,
1035,
2171,
1010,
11709,
1010,
7692,
1035,
2177,
1035,
2171,
1010,
3208,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
1001,
4604,
5227,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
tongueroo/jets | lib/jets/controller/rack/adapter.rb | Jets::Controller::Rack.Adapter.adjust_for_elb | def adjust_for_elb(resp)
return resp unless from_elb?
# ELB requires statusCode to be an Integer whereas API Gateway requires statusCode to be a String
status = resp["statusCode"] = resp["statusCode"].to_i
# ELB also requires statusDescription attribute
status_desc = Rack::Utils::HTTP_ST... | ruby | def adjust_for_elb(resp)
return resp unless from_elb?
# ELB requires statusCode to be an Integer whereas API Gateway requires statusCode to be a String
status = resp["statusCode"] = resp["statusCode"].to_i
# ELB also requires statusDescription attribute
status_desc = Rack::Utils::HTTP_ST... | [
"def",
"adjust_for_elb",
"(",
"resp",
")",
"return",
"resp",
"unless",
"from_elb?",
"# ELB requires statusCode to be an Integer whereas API Gateway requires statusCode to be a String",
"status",
"=",
"resp",
"[",
"\"statusCode\"",
"]",
"=",
"resp",
"[",
"\"statusCode\"",
"]",... | Note: ELB is not officially support. This is just in case users wish to manually
connect ELBs to the functions created by Jets. | [
"Note",
":",
"ELB",
"is",
"not",
"officially",
"support",
".",
"This",
"is",
"just",
"in",
"case",
"users",
"wish",
"to",
"manually",
"connect",
"ELBs",
"to",
"the",
"functions",
"created",
"by",
"Jets",
"."
] | 46943a519224067e58aa3e2d5656e3ca083150f9 | https://github.com/tongueroo/jets/blob/46943a519224067e58aa3e2d5656e3ca083150f9/lib/jets/controller/rack/adapter.rb#L49-L61 | train | Adjust the response object for ELB | [
30522,
13366,
14171,
1035,
2005,
1035,
3449,
2497,
1006,
24501,
2361,
1007,
2709,
24501,
2361,
4983,
2013,
1035,
3449,
2497,
1029,
1001,
3449,
2497,
5942,
3570,
16044,
2000,
2022,
2019,
16109,
6168,
17928,
11909,
5942,
3570,
16044,
2000,
20... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/database_operations.rb | Azure::SQL::Mgmt::V2017_03_01_preview.DatabaseOperations.cancel_with_http_info | def cancel_with_http_info(resource_group_name, server_name, database_name, operation_id, custom_headers:nil)
cancel_async(resource_group_name, server_name, database_name, operation_id, custom_headers:custom_headers).value!
end | ruby | def cancel_with_http_info(resource_group_name, server_name, database_name, operation_id, custom_headers:nil)
cancel_async(resource_group_name, server_name, database_name, operation_id, custom_headers:custom_headers).value!
end | [
"def",
"cancel_with_http_info",
"(",
"resource_group_name",
",",
"server_name",
",",
"database_name",
",",
"operation_id",
",",
"custom_headers",
":",
"nil",
")",
"cancel_async",
"(",
"resource_group_name",
",",
"server_name",
",",
"database_name",
",",
"operation_id",
... | Cancels the asynchronous operation on the database.
@param resource_group_name [String] The name of the resource group that
contains the resource. You can obtain this value from the Azure Resource
Manager API or the portal.
@param server_name [String] The name of the server.
@param database_name [String] The name... | [
"Cancels",
"the",
"asynchronous",
"operation",
"on",
"the",
"database",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/database_operations.rb#L59-L61 | train | Cancels a database operation. | [
30522,
13366,
17542,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
8241,
1035,
2171,
1010,
7809,
1035,
2171,
1010,
3169,
1035,
8909,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
17542,
1035,
2004,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | data/azure_service_fabric/lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb | Azure::ServiceFabric::V6_2_0_9.ServiceFabricClientAPIs.submit_property_batch_with_http_info | def submit_property_batch_with_http_info(name_id, property_batch_description_list, timeout:60, custom_headers:nil)
submit_property_batch_async(name_id, property_batch_description_list, timeout:timeout, custom_headers:custom_headers).value!
end | ruby | def submit_property_batch_with_http_info(name_id, property_batch_description_list, timeout:60, custom_headers:nil)
submit_property_batch_async(name_id, property_batch_description_list, timeout:timeout, custom_headers:custom_headers).value!
end | [
"def",
"submit_property_batch_with_http_info",
"(",
"name_id",
",",
"property_batch_description_list",
",",
"timeout",
":",
"60",
",",
"custom_headers",
":",
"nil",
")",
"submit_property_batch_async",
"(",
"name_id",
",",
"property_batch_description_list",
",",
"timeout",
... | Submits a property batch.
Submits a batch of property operations. Either all or none of the operations
will be committed.
@param name_id [String] The Service Fabric name, without the 'fabric:' URI
scheme.
@param property_batch_description_list [PropertyBatchDescriptionList]
Describes the property batch operatio... | [
"Submits",
"a",
"property",
"batch",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_service_fabric/lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb#L27090-L27092 | train | Submit a property batch of properties to a given resource group. | [
30522,
13366,
12040,
1035,
3200,
1035,
14108,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
2171,
1035,
8909,
1010,
3200,
1035,
14108,
1035,
6412,
1035,
2862,
1010,
2051,
5833,
1024,
3438,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | data/azure_key_vault/lib/2016-10-01/generated/azure_key_vault/key_vault_client.rb | Azure::KeyVault::V2016_10_01.KeyVaultClient.get_deleted_secrets_as_lazy_with_http_info | def get_deleted_secrets_as_lazy_with_http_info(vault_base_url, maxresults:nil, custom_headers:nil)
get_deleted_secrets_as_lazy_async(vault_base_url, maxresults:maxresults, custom_headers:custom_headers).value!
end | ruby | def get_deleted_secrets_as_lazy_with_http_info(vault_base_url, maxresults:nil, custom_headers:nil)
get_deleted_secrets_as_lazy_async(vault_base_url, maxresults:maxresults, custom_headers:custom_headers).value!
end | [
"def",
"get_deleted_secrets_as_lazy_with_http_info",
"(",
"vault_base_url",
",",
"maxresults",
":",
"nil",
",",
"custom_headers",
":",
"nil",
")",
"get_deleted_secrets_as_lazy_async",
"(",
"vault_base_url",
",",
"maxresults",
":",
"maxresults",
",",
"custom_headers",
":cu... | Lists deleted secrets for the specified vault.
The Get Deleted Secrets operation returns the secrets that have been deleted
for a vault enabled for soft-delete. This operation requires the secrets/list
permission.
@param vault_base_url [String] The vault name, for example
https://myvault.vault.azure.net.
@param... | [
"Lists",
"deleted",
"secrets",
"for",
"the",
"specified",
"vault",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_key_vault/lib/2016-10-01/generated/azure_key_vault/key_vault_client.rb#L10038-L10040 | train | Gets the deleted secrets as lazy. | [
30522,
13366,
2131,
1035,
17159,
1035,
7800,
1035,
2004,
1035,
13971,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
11632,
1035,
2918,
1035,
24471,
2140,
1010,
4098,
6072,
11314,
2015,
1024,
9152,
2140,
1010,
7661,
1035,
20346,
2015,
1024,
915... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
resque/resque | lib/resque/worker.rb | Resque.Worker.new_kill_child | def new_kill_child
if @child
unless child_already_exited?
if pre_shutdown_timeout && pre_shutdown_timeout > 0.0
log_with_severity :debug, "Waiting #{pre_shutdown_timeout.to_f}s for child process to exit"
return if wait_for_child_exit(pre_shutdown_timeout)
end
... | ruby | def new_kill_child
if @child
unless child_already_exited?
if pre_shutdown_timeout && pre_shutdown_timeout > 0.0
log_with_severity :debug, "Waiting #{pre_shutdown_timeout.to_f}s for child process to exit"
return if wait_for_child_exit(pre_shutdown_timeout)
end
... | [
"def",
"new_kill_child",
"if",
"@child",
"unless",
"child_already_exited?",
"if",
"pre_shutdown_timeout",
"&&",
"pre_shutdown_timeout",
">",
"0.0",
"log_with_severity",
":debug",
",",
"\"Waiting #{pre_shutdown_timeout.to_f}s for child process to exit\"",
"return",
"if",
"wait_for... | Kills the forked child immediately with minimal remorse. The job it
is processing will not be completed. Send the child a TERM signal,
wait <term_timeout> seconds, and then a KILL signal if it has not quit
If pre_shutdown_timeout has been set to a positive number, it will allow
the child that many seconds before se... | [
"Kills",
"the",
"forked",
"child",
"immediately",
"with",
"minimal",
"remorse",
".",
"The",
"job",
"it",
"is",
"processing",
"will",
"not",
"be",
"completed",
".",
"Send",
"the",
"child",
"a",
"TERM",
"signal",
"wait",
"<term_timeout",
">",
"seconds",
"and",... | adb633a0f6b98b1eb5a5a85bb36ebac9309978fd | https://github.com/resque/resque/blob/adb633a0f6b98b1eb5a5a85bb36ebac9309978fd/lib/resque/worker.rb#L527-L550 | train | This method is called when a child process is being killed. | [
30522,
13366,
2047,
1035,
3102,
1035,
2775,
2065,
1030,
2775,
4983,
2775,
1035,
2525,
1035,
15284,
1029,
2065,
3653,
1035,
3844,
7698,
1035,
2051,
5833,
1004,
1004,
3653,
1035,
3844,
7698,
1035,
2051,
5833,
1028,
1014,
1012,
1014,
8833,
1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
cloudfoundry/bosh | src/bosh-director/lib/bosh/director/agent_client.rb | Bosh::Director.AgentClient.inject_compile_log | def inject_compile_log(response)
if response['value'] && response['value'].is_a?(Hash) &&
response['value']['result'].is_a?(Hash) &&
blob_id = response['value']['result']['compile_log_id']
compile_log = download_and_delete_blob(blob_id)
response['value']['result']['compile_log'] = ... | ruby | def inject_compile_log(response)
if response['value'] && response['value'].is_a?(Hash) &&
response['value']['result'].is_a?(Hash) &&
blob_id = response['value']['result']['compile_log_id']
compile_log = download_and_delete_blob(blob_id)
response['value']['result']['compile_log'] = ... | [
"def",
"inject_compile_log",
"(",
"response",
")",
"if",
"response",
"[",
"'value'",
"]",
"&&",
"response",
"[",
"'value'",
"]",
".",
"is_a?",
"(",
"Hash",
")",
"&&",
"response",
"[",
"'value'",
"]",
"[",
"'result'",
"]",
".",
"is_a?",
"(",
"Hash",
")"... | the blob is removed from the blobstore once we have fetched it,
but if there is a crash before it is injected into the response
and then logged, there is a chance that we lose it | [
"the",
"blob",
"is",
"removed",
"from",
"the",
"blobstore",
"once",
"we",
"have",
"fetched",
"it",
"but",
"if",
"there",
"is",
"a",
"crash",
"before",
"it",
"is",
"injected",
"into",
"the",
"response",
"and",
"then",
"logged",
"there",
"is",
"a",
"chance... | 2eaa7100879ddd20cd909cd698514746195e28b7 | https://github.com/cloudfoundry/bosh/blob/2eaa7100879ddd20cd909cd698514746195e28b7/src/bosh-director/lib/bosh/director/agent_client.rb#L311-L318 | train | injects compile log into the response | [
30522,
13366,
1999,
20614,
1035,
4012,
22090,
1035,
8833,
1006,
3433,
1007,
2065,
3433,
1031,
1005,
3643,
1005,
1033,
1004,
1004,
3433,
1031,
1005,
3643,
1005,
1033,
1012,
2003,
1035,
1037,
1029,
1006,
23325,
1007,
1004,
1004,
3433,
1031,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_network/lib/2019-02-01/generated/azure_mgmt_network/express_route_ports.rb | Azure::Network::Mgmt::V2019_02_01.ExpressRoutePorts.begin_delete | def begin_delete(resource_group_name, express_route_port_name, custom_headers:nil)
response = begin_delete_async(resource_group_name, express_route_port_name, custom_headers:custom_headers).value!
nil
end | ruby | def begin_delete(resource_group_name, express_route_port_name, custom_headers:nil)
response = begin_delete_async(resource_group_name, express_route_port_name, custom_headers:custom_headers).value!
nil
end | [
"def",
"begin_delete",
"(",
"resource_group_name",
",",
"express_route_port_name",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"begin_delete_async",
"(",
"resource_group_name",
",",
"express_route_port_name",
",",
"custom_headers",
":custom_headers",
")",
"."... | Deletes the specified ExpressRoutePort resource.
@param resource_group_name [String] The name of the resource group.
@param express_route_port_name [String] The name of the ExpressRoutePort
resource.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request. | [
"Deletes",
"the",
"specified",
"ExpressRoutePort",
"resource",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_network/lib/2019-02-01/generated/azure_mgmt_network/express_route_ports.rb#L434-L437 | train | Deletes the specified ExpressRoutePort. | [
30522,
13366,
4088,
1035,
3972,
12870,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
4671,
1035,
2799,
1035,
3417,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
4088,
1035,
3972,
12870,
1035,
2004,
6038,
2278,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
watir/watir | lib/watir/window.rb | Watir.Window.resize_to | def resize_to(width, height)
Selenium::WebDriver::Dimension.new(Integer(width), Integer(height)).tap do |dimension|
use { @driver.manage.window.size = dimension }
end
end | ruby | def resize_to(width, height)
Selenium::WebDriver::Dimension.new(Integer(width), Integer(height)).tap do |dimension|
use { @driver.manage.window.size = dimension }
end
end | [
"def",
"resize_to",
"(",
"width",
",",
"height",
")",
"Selenium",
"::",
"WebDriver",
"::",
"Dimension",
".",
"new",
"(",
"Integer",
"(",
"width",
")",
",",
"Integer",
"(",
"height",
")",
")",
".",
"tap",
"do",
"|",
"dimension",
"|",
"use",
"{",
"@dri... | Resizes window to given width and height.
@example
browser.window.resize_to 1600, 1200
@param [Integer] width
@param [Integer] height | [
"Resizes",
"window",
"to",
"given",
"width",
"and",
"height",
"."
] | 2d8db09811c6221ae401b85b2f61f5fa66e463a3 | https://github.com/watir/watir/blob/2d8db09811c6221ae401b85b2f61f5fa66e463a3/lib/watir/window.rb#L63-L67 | train | Resize the current window to the specified width and height. | [
30522,
13366,
24501,
4697,
1035,
2000,
1006,
9381,
1010,
4578,
1007,
7367,
7770,
5007,
1024,
1024,
4773,
23663,
2099,
1024,
1024,
9812,
1012,
2047,
1006,
16109,
1006,
9381,
1007,
30524,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | data/azure_key_vault/lib/2016-10-01/generated/azure_key_vault/key_vault_client.rb | Azure::KeyVault::V2016_10_01.KeyVaultClient.update_certificate_operation | def update_certificate_operation(vault_base_url, certificate_name, cancellation_requested, custom_headers:nil)
response = update_certificate_operation_async(vault_base_url, certificate_name, cancellation_requested, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def update_certificate_operation(vault_base_url, certificate_name, cancellation_requested, custom_headers:nil)
response = update_certificate_operation_async(vault_base_url, certificate_name, cancellation_requested, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"update_certificate_operation",
"(",
"vault_base_url",
",",
"certificate_name",
",",
"cancellation_requested",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"update_certificate_operation_async",
"(",
"vault_base_url",
",",
"certificate_name",
",",
"cancell... | Updates a certificate operation.
Updates a certificate creation operation that is already in progress. This
operation requires the certificates/update permission.
@param vault_base_url [String] The vault name, for example
https://myvault.vault.azure.net.
@param certificate_name [String] The name of the certifica... | [
"Updates",
"a",
"certificate",
"operation",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_key_vault/lib/2016-10-01/generated/azure_key_vault/key_vault_client.rb#L6054-L6057 | train | Updates the certificate operation. | [
30522,
13366,
10651,
1035,
8196,
1035,
3169,
1006,
11632,
1035,
2918,
1035,
24471,
2140,
1010,
8196,
1035,
2171,
1010,
16990,
1035,
7303,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
10651,
1035,
8196,
1035,
3169,
1035... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | data/azure_service_fabric/lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb | Azure::ServiceFabric::V6_2_0_9.ServiceFabricClientAPIs.cancel_repair_task | def cancel_repair_task(repair_task_cancel_description, custom_headers:nil)
response = cancel_repair_task_async(repair_task_cancel_description, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def cancel_repair_task(repair_task_cancel_description, custom_headers:nil)
response = cancel_repair_task_async(repair_task_cancel_description, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"cancel_repair_task",
"(",
"repair_task_cancel_description",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"cancel_repair_task_async",
"(",
"repair_task_cancel_description",
",",
"custom_headers",
":custom_headers",
")",
".",
"value!",
"response",
".",
"... | Requests the cancellation of the given repair task.
This API supports the Service Fabric platform; it is not meant to be used
directly from your code.
@param repair_task_cancel_description [RepairTaskCancelDescription] Describes
the repair task to be cancelled.
@param custom_headers [Hash{String => String}] A ha... | [
"Requests",
"the",
"cancellation",
"of",
"the",
"given",
"repair",
"task",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_service_fabric/lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb#L13776-L13779 | train | Cancels a repair task. | [
30522,
13366,
17542,
1035,
7192,
1035,
4708,
1006,
7192,
1035,
4708,
1035,
17542,
1035,
6412,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
17542,
1035,
7192,
1035,
4708,
1035,
2004,
6038,
2278,
1006,
7192,
1035,
4708,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
watir/watir | lib/watir/legacy_wait.rb | Watir.EventuallyPresent.when_enabled | def when_enabled(timeout = nil)
msg = '#when_enabled'
repl_msg = 'wait_until(&:enabled?)'
Watir.logger.deprecate msg, repl_msg, ids: [:when_enabled]
timeout ||= Watir.default_timeout
message = "waiting for #{selector_string} to become enabled"
if block_given?
Wait.until(tim... | ruby | def when_enabled(timeout = nil)
msg = '#when_enabled'
repl_msg = 'wait_until(&:enabled?)'
Watir.logger.deprecate msg, repl_msg, ids: [:when_enabled]
timeout ||= Watir.default_timeout
message = "waiting for #{selector_string} to become enabled"
if block_given?
Wait.until(tim... | [
"def",
"when_enabled",
"(",
"timeout",
"=",
"nil",
")",
"msg",
"=",
"'#when_enabled'",
"repl_msg",
"=",
"'wait_until(&:enabled?)'",
"Watir",
".",
"logger",
".",
"deprecate",
"msg",
",",
"repl_msg",
",",
"ids",
":",
"[",
":when_enabled",
"]",
"timeout",
"||=",
... | Waits until the element is enabled.
@example
browser.button(name: "new_user_button_2").when_enabled.click
@param [Integer] timeout seconds to wait before timing out
@see Watir::Wait
@see Watir::Element#enabled? | [
"Waits",
"until",
"the",
"element",
"is",
"enabled",
"."
] | 2d8db09811c6221ae401b85b2f61f5fa66e463a3 | https://github.com/watir/watir/blob/2d8db09811c6221ae401b85b2f61f5fa66e463a3/lib/watir/legacy_wait.rb#L107-L121 | train | Returns the result of the when_enabled decorator. | [
30522,
13366,
2043,
1035,
9124,
1006,
2051,
5833,
1027,
9152,
2140,
1007,
5796,
2290,
1027,
1005,
1001,
2043,
1035,
9124,
1005,
16360,
2140,
1035,
5796,
2290,
1027,
1005,
3524,
1035,
2127,
1006,
1004,
1024,
9124,
1029,
1007,
1005,
28194,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.