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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
appium/ruby_lib | lib/appium_lib/ios/common/helper.rb | Appium.Ios.ele_index | def ele_index(class_name, index)
raise 'Index must be >= 1' unless index == 'last()' || (index.is_a?(Integer) && index >= 1)
elements = tags(class_name)
if index == 'last()'
result = elements.last
else
# elements array is 0 indexed
index -= 1
result = elements[i... | ruby | def ele_index(class_name, index)
raise 'Index must be >= 1' unless index == 'last()' || (index.is_a?(Integer) && index >= 1)
elements = tags(class_name)
if index == 'last()'
result = elements.last
else
# elements array is 0 indexed
index -= 1
result = elements[i... | [
"def",
"ele_index",
"(",
"class_name",
",",
"index",
")",
"raise",
"'Index must be >= 1'",
"unless",
"index",
"==",
"'last()'",
"||",
"(",
"index",
".",
"is_a?",
"(",
"Integer",
")",
"&&",
"index",
">=",
"1",
")",
"elements",
"=",
"tags",
"(",
"class_name"... | Get the element of type class_name at matching index.
@param class_name [String] the class name to find
@param index [Integer] the index
@return [Element] | [
"Get",
"the",
"element",
"of",
"type",
"class_name",
"at",
"matching",
"index",
"."
] | 1f5898400dd1928bfe42ddd5f842d1f8738f2f76 | https://github.com/appium/ruby_lib/blob/1f5898400dd1928bfe42ddd5f842d1f8738f2f76/lib/appium_lib/ios/common/helper.rb#L108-L124 | train | Returns the element with the specified class_name at the given index. | [
30522,
13366,
3449,
2063,
1035,
5950,
1006,
2465,
1035,
2171,
1010,
5950,
1007,
5333,
1005,
5950,
2442,
2022,
1028,
1027,
1015,
1005,
4983,
5950,
1027,
1027,
1005,
2197,
1006,
1007,
1005,
1064,
1064,
1006,
5950,
1012,
2003,
1035,
1037,
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_policy_insights/lib/2018-04-04/generated/azure_mgmt_policy_insights/policy_states.rb | Azure::PolicyInsights::Mgmt::V2018_04_04.PolicyStates.list_query_results_for_policy_definition | def list_query_results_for_policy_definition(policy_states_resource, subscription_id, policy_definition_name, query_options:nil, custom_headers:nil)
response = list_query_results_for_policy_definition_async(policy_states_resource, subscription_id, policy_definition_name, query_options:query_options, custom_header... | ruby | def list_query_results_for_policy_definition(policy_states_resource, subscription_id, policy_definition_name, query_options:nil, custom_headers:nil)
response = list_query_results_for_policy_definition_async(policy_states_resource, subscription_id, policy_definition_name, query_options:query_options, custom_header... | [
"def",
"list_query_results_for_policy_definition",
"(",
"policy_states_resource",
",",
"subscription_id",
",",
"policy_definition_name",
",",
"query_options",
":",
"nil",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"list_query_results_for_policy_definition_async",
... | Queries policy states for the subscription level policy definition.
@param policy_states_resource [PolicyStatesResource] The virtual resource
under PolicyStates resource type. In a given time range, 'latest' represents
the latest policy state(s), whereas 'default' represents all policy state(s).
Possible values in... | [
"Queries",
"policy",
"states",
"for",
"the",
"subscription",
"level",
"policy",
"definition",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_policy_insights/lib/2018-04-04/generated/azure_mgmt_policy_insights/policy_states.rb#L1251-L1254 | train | Gets the policy states for the subscription. | [
30522,
13366,
2862,
1035,
23032,
1035,
3463,
1035,
2005,
1035,
3343,
1035,
6210,
1006,
3343,
1035,
2163,
1035,
7692,
1010,
15002,
1035,
8909,
1010,
3343,
1035,
6210,
1035,
2171,
1010,
23032,
1035,
7047,
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... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_compute/lib/2016-04-30-preview/generated/azure_mgmt_compute/virtual_machines.rb | Azure::Compute::Mgmt::V2016_04_30_preview.VirtualMachines.start | def start(resource_group_name, vm_name, custom_headers:nil)
response = start_async(resource_group_name, vm_name, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def start(resource_group_name, vm_name, custom_headers:nil)
response = start_async(resource_group_name, vm_name, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"start",
"(",
"resource_group_name",
",",
"vm_name",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"start_async",
"(",
"resource_group_name",
",",
"vm_name",
",",
"custom_headers",
":custom_headers",
")",
".",
"value!",
"response",
".",
"body",
... | The operation to start a virtual machine.
@param resource_group_name [String] The name of the resource group.
@param vm_name [String] The name of the virtual machine.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request.
@return [OperationStatusResponse] ... | [
"The",
"operation",
"to",
"start",
"a",
"virtual",
"machine",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_compute/lib/2016-04-30-preview/generated/azure_mgmt_compute/virtual_machines.rb#L905-L908 | train | Starts a virtual machine in a resource group. | [
30522,
13366,
2707,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
1058,
2213,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
2707,
1035,
2004,
6038,
2278,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
1058,
2213,
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 | data/azure_cognitiveservices_customvisiontraining/lib/3.0/generated/azure_cognitiveservices_customvisiontraining/customvisiontraining_client.rb | Azure::CognitiveServices::Customvisiontraining::V3_0.CustomvisiontrainingClient.get_tagged_images_with_http_info | def get_tagged_images_with_http_info(project_id, iteration_id:nil, tag_ids:nil, order_by:nil, take:50, skip:0, custom_headers:nil)
get_tagged_images_async(project_id, iteration_id:iteration_id, tag_ids:tag_ids, order_by:order_by, take:take, skip:skip, custom_headers:custom_headers).value!
end | ruby | def get_tagged_images_with_http_info(project_id, iteration_id:nil, tag_ids:nil, order_by:nil, take:50, skip:0, custom_headers:nil)
get_tagged_images_async(project_id, iteration_id:iteration_id, tag_ids:tag_ids, order_by:order_by, take:take, skip:skip, custom_headers:custom_headers).value!
end | [
"def",
"get_tagged_images_with_http_info",
"(",
"project_id",
",",
"iteration_id",
":",
"nil",
",",
"tag_ids",
":",
"nil",
",",
"order_by",
":",
"nil",
",",
"take",
":",
"50",
",",
"skip",
":",
"0",
",",
"custom_headers",
":",
"nil",
")",
"get_tagged_images_... | Get tagged images for a given project iteration.
This API supports batching and range selection. By default it will only
return first 50 images matching images.
Use the {take} and {skip} parameters to control how many images to return in
a given batch.
The filtering is on an and/or relationship. For example, if t... | [
"Get",
"tagged",
"images",
"for",
"a",
"given",
"project",
"iteration",
"."
] | 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#L987-L989 | train | Gets the list of images tagged in a project. | [
30522,
13366,
2131,
1035,
26610,
1035,
4871,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
2622,
1035,
8909,
1010,
27758,
1035,
8909,
1024,
9152,
2140,
1010,
6415,
1035,
8909,
2015,
1024,
9152,
2140,
1010,
2344,
1035,
2011,
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... |
twitter/secure_headers | lib/secure_headers/headers/content_security_policy.rb | SecureHeaders.ContentSecurityPolicy.build_value | def build_value
directives.map do |directive_name|
case DIRECTIVE_VALUE_TYPES[directive_name]
when :source_list, :require_sri_for_list # require_sri is a simple set of strings that don't need to deal with symbol casing
build_source_list_directive(directive_name)
when :boolean
... | ruby | def build_value
directives.map do |directive_name|
case DIRECTIVE_VALUE_TYPES[directive_name]
when :source_list, :require_sri_for_list # require_sri is a simple set of strings that don't need to deal with symbol casing
build_source_list_directive(directive_name)
when :boolean
... | [
"def",
"build_value",
"directives",
".",
"map",
"do",
"|",
"directive_name",
"|",
"case",
"DIRECTIVE_VALUE_TYPES",
"[",
"directive_name",
"]",
"when",
":source_list",
",",
":require_sri_for_list",
"# require_sri is a simple set of strings that don't need to deal with symbol casin... | Private: converts the config object into a string representing a policy.
Places default-src at the first directive and report-uri as the last. All
others are presented in alphabetical order.
Returns a content security policy header value. | [
"Private",
":",
"converts",
"the",
"config",
"object",
"into",
"a",
"string",
"representing",
"a",
"policy",
".",
"Places",
"default",
"-",
"src",
"at",
"the",
"first",
"directive",
"and",
"report",
"-",
"uri",
"as",
"the",
"last",
".",
"All",
"others",
... | 543e6712aadae08f1653ed973e6b6204f7eac26a | https://github.com/twitter/secure_headers/blob/543e6712aadae08f1653ed973e6b6204f7eac26a/lib/secure_headers/headers/content_security_policy.rb#L51-L64 | train | Build the value of the directive | [
30522,
13366,
3857,
1035,
3643,
16449,
2015,
1012,
4949,
2079,
1064,
16449,
1035,
2171,
1064,
2553,
16449,
1035,
3643,
1035,
4127,
1031,
16449,
1035,
2171,
1033,
2043,
1024,
3120,
1035,
2862,
1010,
1024,
5478,
1035,
5185,
1035,
2005,
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... |
aws/aws-sdk-ruby | gems/aws-sdk-s3/lib/aws-sdk-s3/bucket_tagging.rb | Aws::S3.BucketTagging.delete | def delete(options = {})
options = options.merge(bucket: @bucket_name)
resp = @client.delete_bucket_tagging(options)
resp.data
end | ruby | def delete(options = {})
options = options.merge(bucket: @bucket_name)
resp = @client.delete_bucket_tagging(options)
resp.data
end | [
"def",
"delete",
"(",
"options",
"=",
"{",
"}",
")",
"options",
"=",
"options",
".",
"merge",
"(",
"bucket",
":",
"@bucket_name",
")",
"resp",
"=",
"@client",
".",
"delete_bucket_tagging",
"(",
"options",
")",
"resp",
".",
"data",
"end"
] | @!group Actions
@example Request syntax with placeholder values
bucket_tagging.delete()
@param [Hash] options ({})
@return [EmptyStructure] | [
"@!group",
"Actions",
"@example",
"Request",
"syntax",
"with",
"placeholder",
"values"
] | e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d | https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-s3/lib/aws-sdk-s3/bucket_tagging.rb#L176-L180 | train | Delete the tagging from the bucket | [
30522,
13366,
3972,
12870,
1006,
7047,
1027,
1063,
1065,
1007,
7047,
1027,
7047,
1012,
13590,
1006,
13610,
1024,
1030,
13610,
1035,
2171,
1007,
24501,
2361,
1027,
1030,
7396,
1012,
3972,
12870,
1035,
13610,
1035,
6415,
4726,
1006,
7047,
100... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
sinatra/sinatra | lib/sinatra/base.rb | Sinatra.Request.accept | def accept
@env['sinatra.accept'] ||= begin
if @env.include? 'HTTP_ACCEPT' and @env['HTTP_ACCEPT'].to_s != ''
@env['HTTP_ACCEPT'].to_s.scan(HEADER_VALUE_WITH_PARAMS).
map! { |e| AcceptEntry.new(e) }.sort
else
[AcceptEntry.new('*/*')]
end
end
end | ruby | def accept
@env['sinatra.accept'] ||= begin
if @env.include? 'HTTP_ACCEPT' and @env['HTTP_ACCEPT'].to_s != ''
@env['HTTP_ACCEPT'].to_s.scan(HEADER_VALUE_WITH_PARAMS).
map! { |e| AcceptEntry.new(e) }.sort
else
[AcceptEntry.new('*/*')]
end
end
end | [
"def",
"accept",
"@env",
"[",
"'sinatra.accept'",
"]",
"||=",
"begin",
"if",
"@env",
".",
"include?",
"'HTTP_ACCEPT'",
"and",
"@env",
"[",
"'HTTP_ACCEPT'",
"]",
".",
"to_s",
"!=",
"''",
"@env",
"[",
"'HTTP_ACCEPT'",
"]",
".",
"to_s",
".",
"scan",
"(",
"H... | Returns an array of acceptable media types for the response | [
"Returns",
"an",
"array",
"of",
"acceptable",
"media",
"types",
"for",
"the",
"response"
] | 1aa64f9858edc3f93cc8d46e26f724c1ae103b1c | https://github.com/sinatra/sinatra/blob/1aa64f9858edc3f93cc8d46e26f724c1ae103b1c/lib/sinatra/base.rb#L30-L39 | train | Returns the HTTP_ACCEPT header. | [
30522,
13366,
5138,
1030,
4372,
2615,
1031,
1005,
19643,
1012,
5138,
1005,
1033,
1064,
1064,
1027,
4088,
2065,
1030,
4372,
2615,
1012,
2421,
1029,
1005,
8299,
1035,
5138,
1005,
1998,
1030,
4372,
2615,
1031,
1005,
8299,
1035,
5138,
1005,
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_logic/lib/2016-06-01/generated/azure_mgmt_logic/partners.rb | Azure::Logic::Mgmt::V2016_06_01.Partners.get_with_http_info | def get_with_http_info(resource_group_name, integration_account_name, partner_name, custom_headers:nil)
get_async(resource_group_name, integration_account_name, partner_name, custom_headers:custom_headers).value!
end | ruby | def get_with_http_info(resource_group_name, integration_account_name, partner_name, custom_headers:nil)
get_async(resource_group_name, integration_account_name, partner_name, custom_headers:custom_headers).value!
end | [
"def",
"get_with_http_info",
"(",
"resource_group_name",
",",
"integration_account_name",
",",
"partner_name",
",",
"custom_headers",
":",
"nil",
")",
"get_async",
"(",
"resource_group_name",
",",
"integration_account_name",
",",
"partner_name",
",",
"custom_headers",
":c... | Gets an integration account partner.
@param resource_group_name [String] The resource group name.
@param integration_account_name [String] The integration account name.
@param partner_name [String] The integration account partner name.
@param custom_headers [Hash{String => String}] A hash of custom headers that
w... | [
"Gets",
"an",
"integration",
"account",
"partner",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_logic/lib/2016-06-01/generated/azure_mgmt_logic/partners.rb#L152-L154 | train | Gets the integration account partner s segmentation. | [
30522,
13366,
2131,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
8346,
1035,
4070,
1035,
2171,
1010,
4256,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
2131,
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... |
david942j/one_gadget | lib/one_gadget/cli.rb | OneGadget.CLI.handle_near | def handle_near(libc_file, gadgets, near)
return error('Libc file must be given when using --near option') unless libc_file
functions = if File.file?(near) && OneGadget::Helper.valid_elf_file?(near)
OneGadget::Helper.got_functions(near)
else
near.sp... | ruby | def handle_near(libc_file, gadgets, near)
return error('Libc file must be given when using --near option') unless libc_file
functions = if File.file?(near) && OneGadget::Helper.valid_elf_file?(near)
OneGadget::Helper.got_functions(near)
else
near.sp... | [
"def",
"handle_near",
"(",
"libc_file",
",",
"gadgets",
",",
"near",
")",
"return",
"error",
"(",
"'Libc file must be given when using --near option'",
")",
"unless",
"libc_file",
"functions",
"=",
"if",
"File",
".",
"file?",
"(",
"near",
")",
"&&",
"OneGadget",
... | Implements the --near feature.
@param [String] libc_file
@param [Array<OneGadget::Gadget::Gadget>] gadgets
@param [String] near
This can be name of functions or an ELF file.
- Use one comma without spaces to specify a list of functions: +printf,scanf,free+.
- Path to an ELF file and take its GOT functions t... | [
"Implements",
"the",
"--",
"near",
"feature",
"."
] | ff6ef04541e83441bfe3c2664a6febd1640f4263 | https://github.com/david942j/one_gadget/blob/ff6ef04541e83441bfe3c2664a6febd1640f4263/lib/one_gadget/cli.rb#L200-L218 | train | Handles the near option. | [
30522,
13366,
5047,
1035,
2379,
1006,
5622,
9818,
1035,
5371,
1010,
11721,
28682,
1010,
2379,
1007,
2709,
7561,
1006,
1005,
5622,
9818,
5371,
2442,
2022,
2445,
2043,
2478,
1011,
1011,
2379,
5724,
1005,
1007,
4983,
5622,
9818,
1035,
5371,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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.start_chaos_with_http_info | def start_chaos_with_http_info(chaos_parameters, timeout:60, custom_headers:nil)
start_chaos_async(chaos_parameters, timeout:timeout, custom_headers:custom_headers).value!
end | ruby | def start_chaos_with_http_info(chaos_parameters, timeout:60, custom_headers:nil)
start_chaos_async(chaos_parameters, timeout:timeout, custom_headers:custom_headers).value!
end | [
"def",
"start_chaos_with_http_info",
"(",
"chaos_parameters",
",",
"timeout",
":",
"60",
",",
"custom_headers",
":",
"nil",
")",
"start_chaos_async",
"(",
"chaos_parameters",
",",
"timeout",
":",
"timeout",
",",
"custom_headers",
":custom_headers",
")",
".",
"value!... | Starts Chaos in the cluster.
If Chaos is not already running in the cluster, it starts Chaos with the
passed in Chaos parameters.
If Chaos is already running when this call is made, the call fails with the
error code FABRIC_E_CHAOS_ALREADY_RUNNING.
Please refer to the article [Induce controlled Chaos in Service F... | [
"Starts",
"Chaos",
"in",
"the",
"cluster",
"."
] | 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#L18561-L18563 | train | Starts a Chaos based on the specified parameters. | [
30522,
13366,
2707,
1035,
8488,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
8488,
1035,
11709,
1010,
2051,
5833,
1024,
3438,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
2707,
1035,
8488,
1035,
2004,
6038,
2278,
1006,
8488,
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 | management/azure_mgmt_stor_simple8000_series/lib/2017-06-01/generated/azure_mgmt_stor_simple8000_series/jobs.rb | Azure::StorSimple8000Series::Mgmt::V2017_06_01.Jobs.list_by_manager_next | def list_by_manager_next(next_page_link, custom_headers:nil)
response = list_by_manager_next_async(next_page_link, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def list_by_manager_next(next_page_link, custom_headers:nil)
response = list_by_manager_next_async(next_page_link, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"list_by_manager_next",
"(",
"next_page_link",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"list_by_manager_next_async",
"(",
"next_page_link",
",",
"custom_headers",
":custom_headers",
")",
".",
"value!",
"response",
".",
"body",
"unless",
"respon... | Gets all the jobs for the specified manager. With optional OData query
parameters, a filtered set of jobs is returned.
@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 ... | [
"Gets",
"all",
"the",
"jobs",
"for",
"the",
"specified",
"manager",
".",
"With",
"optional",
"OData",
"query",
"parameters",
"a",
"filtered",
"set",
"of",
"jobs",
"is",
"returned",
"."
] | 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/jobs.rb#L567-L570 | train | Gets the list of all the available advisor terms. | [
30522,
13366,
2862,
1035,
2011,
1035,
3208,
1035,
2279,
1006,
2279,
1035,
3931,
1035,
4957,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
2862,
1035,
2011,
1035,
3208,
1035,
2279,
1035,
2004,
6038,
2278,
1006,
2279,
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 | data/azure_cognitiveservices_computervision/lib/2.0/generated/azure_cognitiveservices_computervision/computer_vision_client.rb | Azure::CognitiveServices::ComputerVision::V2_0.ComputerVisionClient.analyze_image_in_stream | def analyze_image_in_stream(image, visual_features:nil, details:nil, language:nil, custom_headers:nil)
response = analyze_image_in_stream_async(image, visual_features:visual_features, details:details, language:language, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def analyze_image_in_stream(image, visual_features:nil, details:nil, language:nil, custom_headers:nil)
response = analyze_image_in_stream_async(image, visual_features:visual_features, details:details, language:language, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"analyze_image_in_stream",
"(",
"image",
",",
"visual_features",
":",
"nil",
",",
"details",
":",
"nil",
",",
"language",
":",
"nil",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"analyze_image_in_stream_async",
"(",
"image",
",",
"visual_feat... | This operation extracts a rich set of visual features based on the image
content.
Two input methods are supported -- (1) Uploading an image or (2) specifying
an image URL. Within your request, there is an optional parameter to allow
you to choose which features to return. By default, image categories are
returned ... | [
"This",
"operation",
"extracts",
"a",
"rich",
"set",
"of",
"visual",
"features",
"based",
"on",
"the",
"image",
"content",
".",
"Two",
"input",
"methods",
"are",
"supported",
"--",
"(",
"1",
")",
"Uploading",
"an",
"image",
"or",
"(",
"2",
")",
"specifyi... | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_cognitiveservices_computervision/lib/2.0/generated/azure_cognitiveservices_computervision/computer_vision_client.rb#L1821-L1824 | train | Analyze an image in an image stream. | [
30522,
13366,
17908,
1035,
3746,
1035,
1999,
1035,
5460,
1006,
3746,
1010,
5107,
1035,
2838,
1024,
9152,
2140,
1010,
4751,
1024,
9152,
2140,
1010,
2653,
1024,
9152,
2140,
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... |
Azure/azure-sdk-for-ruby | data/azure_service_fabric/lib/6.4.0.36/generated/azure_service_fabric/mesh_secret_value.rb | Azure::ServiceFabric::V6_4_0_36.MeshSecretValue.show | def show(secret_resource_name, secret_value_resource_name, custom_headers:nil)
response = show_async(secret_resource_name, secret_value_resource_name, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def show(secret_resource_name, secret_value_resource_name, custom_headers:nil)
response = show_async(secret_resource_name, secret_value_resource_name, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"show",
"(",
"secret_resource_name",
",",
"secret_value_resource_name",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"show_async",
"(",
"secret_resource_name",
",",
"secret_value_resource_name",
",",
"custom_headers",
":custom_headers",
")",
".",
"val... | Lists the specified value of the secret resource.
Lists the decrypted value of the specified named value of the secret
resource. This is a privileged operation.
@param secret_resource_name [String] The name of the secret resource.
@param secret_value_resource_name [String] The name of the secret resource
value w... | [
"Lists",
"the",
"specified",
"value",
"of",
"the",
"secret",
"resource",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_service_fabric/lib/6.4.0.36/generated/azure_service_fabric/mesh_secret_value.rb#L466-L469 | train | Gets the information about the specified secret resource. | [
30522,
13366,
2265,
1006,
3595,
1035,
7692,
1035,
2171,
1010,
3595,
1035,
3643,
1035,
7692,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
2265,
1035,
2004,
6038,
2278,
1006,
3595,
1035,
7692,
1035,
2171,
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... |
kmuto/review | lib/epubmaker/producer.rb | EPUBMaker.Producer.titlepage | def titlepage(wobj)
s = @epub.titlepage
if !s.nil? && !wobj.nil?
wobj.puts s
end
end | ruby | def titlepage(wobj)
s = @epub.titlepage
if !s.nil? && !wobj.nil?
wobj.puts s
end
end | [
"def",
"titlepage",
"(",
"wobj",
")",
"s",
"=",
"@epub",
".",
"titlepage",
"if",
"!",
"s",
".",
"nil?",
"&&",
"!",
"wobj",
".",
"nil?",
"wobj",
".",
"puts",
"s",
"end",
"end"
] | Write title file (copying) to IO object +wobj+. | [
"Write",
"title",
"file",
"(",
"copying",
")",
"to",
"IO",
"object",
"+",
"wobj",
"+",
"."
] | 77d1273e671663f05db2992281fd891b776badf0 | https://github.com/kmuto/review/blob/77d1273e671663f05db2992281fd891b776badf0/lib/epubmaker/producer.rb#L142-L147 | train | Returns the titlepage of the page | [
30522,
13366,
2516,
13704,
1006,
24185,
2497,
3501,
1007,
1055,
1027,
1030,
4958,
12083,
1012,
2516,
13704,
2065,
999,
1055,
1012,
9152,
2140,
1029,
1004,
1004,
999,
24185,
2497,
3501,
1012,
9152,
2140,
1029,
24185,
2497,
3501,
1012,
8509,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
mhenrixon/sidekiq-unique-jobs | lib/sidekiq_unique_jobs/unlockable.rb | SidekiqUniqueJobs.Unlockable.delete | def delete(item)
SidekiqUniqueJobs::UniqueArgs.digest(item)
SidekiqUniqueJobs::Locksmith.new(item).delete!
end | ruby | def delete(item)
SidekiqUniqueJobs::UniqueArgs.digest(item)
SidekiqUniqueJobs::Locksmith.new(item).delete!
end | [
"def",
"delete",
"(",
"item",
")",
"SidekiqUniqueJobs",
"::",
"UniqueArgs",
".",
"digest",
"(",
"item",
")",
"SidekiqUniqueJobs",
"::",
"Locksmith",
".",
"new",
"(",
"item",
")",
".",
"delete!",
"end"
] | Deletes a lock regardless of if it was locked or not.
This is good for situations when a job is locked by another item
@param [Hash] item a Sidekiq job hash | [
"Deletes",
"a",
"lock",
"regardless",
"of",
"if",
"it",
"was",
"locked",
"or",
"not",
"."
] | 2944b97c720528f53962ccfd17d43ac939a77f46 | https://github.com/mhenrixon/sidekiq-unique-jobs/blob/2944b97c720528f53962ccfd17d43ac939a77f46/lib/sidekiq_unique_jobs/unlockable.rb#L22-L25 | train | Delete the item from the database | [
30522,
13366,
3972,
12870,
1006,
8875,
1007,
2217,
3211,
28940,
3490,
4226,
5558,
5910,
1024,
1024,
4310,
2906,
5620,
1012,
17886,
1006,
8875,
1007,
2217,
3211,
28940,
3490,
4226,
5558,
5910,
1024,
1024,
11223,
19864,
1012,
2047,
1006,
8875... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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/2018-06-01-preview/generated/azure_mgmt_sql/database_tables.rb | Azure::SQL::Mgmt::V2018_06_01_preview.DatabaseTables.list_by_schema_next | def list_by_schema_next(next_page_link, custom_headers:nil)
response = list_by_schema_next_async(next_page_link, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def list_by_schema_next(next_page_link, custom_headers:nil)
response = list_by_schema_next_async(next_page_link, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"list_by_schema_next",
"(",
"next_page_link",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"list_by_schema_next_async",
"(",
"next_page_link",
",",
"custom_headers",
":custom_headers",
")",
".",
"value!",
"response",
".",
"body",
"unless",
"response... | List database tables
@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 [DatabaseTableListResult] operation results. | [
"List",
"database",
"tables"
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_sql/lib/2018-06-01-preview/generated/azure_mgmt_sql/database_tables.rb#L259-L262 | train | Gets the list of all the managed database schema versions. | [
30522,
13366,
2862,
1035,
2011,
1035,
8040,
28433,
1035,
2279,
1006,
2279,
1035,
3931,
1035,
4957,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
2862,
1035,
2011,
1035,
8040,
28433,
1035,
2279,
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... |
jhund/filterrific | lib/filterrific/param_set.rb | Filterrific.ParamSet.to_hash | def to_hash
{}.tap { |h|
model_class.filterrific_available_filters.each do |filter_name|
param_value = self.send(filter_name)
case
when param_value.blank?
# do nothing
when param_value.is_a?(Proc)
# evaluate Proc so it can be serialized
... | ruby | def to_hash
{}.tap { |h|
model_class.filterrific_available_filters.each do |filter_name|
param_value = self.send(filter_name)
case
when param_value.blank?
# do nothing
when param_value.is_a?(Proc)
# evaluate Proc so it can be serialized
... | [
"def",
"to_hash",
"{",
"}",
".",
"tap",
"{",
"|",
"h",
"|",
"model_class",
".",
"filterrific_available_filters",
".",
"each",
"do",
"|",
"filter_name",
"|",
"param_value",
"=",
"self",
".",
"send",
"(",
"filter_name",
")",
"case",
"when",
"param_value",
".... | Returns Filterrific::ParamSet as hash (used for URL params and serialization)
@return [Hash] with stringified keys | [
"Returns",
"Filterrific",
"::",
"ParamSet",
"as",
"hash",
"(",
"used",
"for",
"URL",
"params",
"and",
"serialization",
")"
] | 811edc57d3e2a3e538c1f0e9554e0909be052881 | https://github.com/jhund/filterrific/blob/811edc57d3e2a3e538c1f0e9554e0909be052881/lib/filterrific/param_set.rb#L60-L78 | train | Convert the object to a hash of the object s attributes. | [
30522,
13366,
2000,
1035,
23325,
1063,
1065,
30524,
2553,
2043,
11498,
2213,
1035,
3643,
1012,
8744,
1029,
1001,
2079,
2498,
2043,
11498,
2213,
1035,
3643,
1012,
2003,
1035,
1037,
1029,
1006,
4013,
2278,
1007,
1001,
16157,
4013,
2278,
2061,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 | samples/Ruby/sinatra.rb | Sinatra.Helpers.etag | def etag(value, options = {})
# Before touching this code, please double check RFC 2616 14.24 and 14.26.
options = {:kind => options} unless Hash === options
kind = options[:kind] || :strong
new_resource = options.fetch(:new_resource) { request.post? }
unless [:strong, :weak]... | ruby | def etag(value, options = {})
# Before touching this code, please double check RFC 2616 14.24 and 14.26.
options = {:kind => options} unless Hash === options
kind = options[:kind] || :strong
new_resource = options.fetch(:new_resource) { request.post? }
unless [:strong, :weak]... | [
"def",
"etag",
"(",
"value",
",",
"options",
"=",
"{",
"}",
")",
"# Before touching this code, please double check RFC 2616 14.24 and 14.26.",
"options",
"=",
"{",
":kind",
"=>",
"options",
"}",
"unless",
"Hash",
"===",
"options",
"kind",
"=",
"options",
"[",
":ki... | Set the response entity tag (HTTP 'ETag' header) and halt if conditional
GET matches. The +value+ argument is an identifier that uniquely
identifies the current version of the resource. The +kind+ argument
indicates whether the etag should be used as a :strong (default) or :weak
cache validator.
When the current ... | [
"Set",
"the",
"response",
"entity",
"tag",
"(",
"HTTP",
"ETag",
"header",
")",
"and",
"halt",
"if",
"conditional",
"GET",
"matches",
".",
"The",
"+",
"value",
"+",
"argument",
"is",
"an",
"identifier",
"that",
"uniquely",
"identifies",
"the",
"current",
"v... | 9116c90fcbb82ac03b4b33c58cfbde1fcf745e99 | https://github.com/github/linguist/blob/9116c90fcbb82ac03b4b33c58cfbde1fcf745e99/samples/Ruby/sinatra.rb#L440-L463 | train | Returns the ETag of the response. | [
30522,
13366,
27859,
2290,
1006,
3643,
1010,
7047,
1027,
1063,
1065,
1007,
1001,
2077,
7244,
2023,
3642,
1010,
3531,
3313,
4638,
14645,
24441,
2575,
2403,
1012,
2484,
1998,
2403,
1012,
2656,
1012,
7047,
1027,
1063,
1024,
2785,
30524,
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... |
cheezy/page-object | lib/page-object/accessors.rb | PageObject.Accessors.page_section | def page_section(name, section_class, identifier)
define_method(name) do
platform.page_for(identifier, section_class)
end
end | ruby | def page_section(name, section_class, identifier)
define_method(name) do
platform.page_for(identifier, section_class)
end
end | [
"def",
"page_section",
"(",
"name",
",",
"section_class",
",",
"identifier",
")",
"define_method",
"(",
"name",
")",
"do",
"platform",
".",
"page_for",
"(",
"identifier",
",",
"section_class",
")",
"end",
"end"
] | adds a method to return a page object rooted at an element
@example
page_section(:navigation_bar, NavigationBar, :id => 'nav-bar')
# will generate 'navigation_bar'
@param [Symbol] the name used for the generated methods
@param [Class] the class to instantiate for the element
@param [Hash] identifier how we ... | [
"adds",
"a",
"method",
"to",
"return",
"a",
"page",
"object",
"rooted",
"at",
"an",
"element"
] | 850d775bf63768fbb1551a34480195785fe8e193 | https://github.com/cheezy/page-object/blob/850d775bf63768fbb1551a34480195785fe8e193/lib/page-object/accessors.rb#L1057-L1061 | train | Define a method to return a page section | [
30522,
13366,
3931,
1035,
2930,
1006,
2171,
1010,
2930,
1035,
2465,
1010,
8909,
4765,
18095,
1007,
9375,
1035,
4118,
1006,
2171,
1007,
2079,
4132,
1012,
3931,
1035,
2005,
1006,
8909,
4765,
18095,
1010,
2930,
1035,
2465,
1007,
2203,
2203,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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/public_ipprefixes.rb | Azure::Network::Mgmt::V2018_07_01.PublicIPPrefixes.begin_update_tags_with_http_info | def begin_update_tags_with_http_info(resource_group_name, public_ip_prefix_name, parameters, custom_headers:nil)
begin_update_tags_async(resource_group_name, public_ip_prefix_name, parameters, custom_headers:custom_headers).value!
end | ruby | def begin_update_tags_with_http_info(resource_group_name, public_ip_prefix_name, parameters, custom_headers:nil)
begin_update_tags_async(resource_group_name, public_ip_prefix_name, parameters, custom_headers:custom_headers).value!
end | [
"def",
"begin_update_tags_with_http_info",
"(",
"resource_group_name",
",",
"public_ip_prefix_name",
",",
"parameters",
",",
"custom_headers",
":",
"nil",
")",
"begin_update_tags_async",
"(",
"resource_group_name",
",",
"public_ip_prefix_name",
",",
"parameters",
",",
"cust... | Updates public IP prefix tags.
@param resource_group_name [String] The name of the resource group.
@param public_ip_prefix_name [String] The name of the public IP prefix.
@param parameters [TagsObject] Parameters supplied to update public IP prefix
tags.
@param custom_headers [Hash{String => String}] A hash of cu... | [
"Updates",
"public",
"IP",
"prefix",
"tags",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_network/lib/2018-07-01/generated/azure_mgmt_network/public_ipprefixes.rb#L647-L649 | train | Updates the tags on an existing public IP prefix. | [
30522,
13366,
4088,
1035,
10651,
1035,
22073,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2270,
1035,
12997,
1035,
17576,
1035,
2171,
1010,
11709,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
408... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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/2017-03-30/generated/azure_mgmt_network/network_interfaces.rb | Azure::Network::Mgmt::V2017_03_30.NetworkInterfaces.list_virtual_machine_scale_set_ip_configurations_with_http_info | def list_virtual_machine_scale_set_ip_configurations_with_http_info(resource_group_name, virtual_machine_scale_set_name, virtualmachine_index, network_interface_name, expand:nil, custom_headers:nil)
list_virtual_machine_scale_set_ip_configurations_async(resource_group_name, virtual_machine_scale_set_name, virtual... | ruby | def list_virtual_machine_scale_set_ip_configurations_with_http_info(resource_group_name, virtual_machine_scale_set_name, virtualmachine_index, network_interface_name, expand:nil, custom_headers:nil)
list_virtual_machine_scale_set_ip_configurations_async(resource_group_name, virtual_machine_scale_set_name, virtual... | [
"def",
"list_virtual_machine_scale_set_ip_configurations_with_http_info",
"(",
"resource_group_name",
",",
"virtual_machine_scale_set_name",
",",
"virtualmachine_index",
",",
"network_interface_name",
",",
"expand",
":",
"nil",
",",
"custom_headers",
":",
"nil",
")",
"list_virt... | Get the specified network interface ip configuration in a virtual machine
scale set.
@param resource_group_name [String] The name of the resource group.
@param virtual_machine_scale_set_name [String] The name of the virtual
machine scale set.
@param virtualmachine_index [String] The virtual machine index.
@param... | [
"Get",
"the",
"specified",
"network",
"interface",
"ip",
"configuration",
"in",
"a",
"virtual",
"machine",
"scale",
"set",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_network/lib/2017-03-30/generated/azure_mgmt_network/network_interfaces.rb#L365-L367 | train | Gets the specified network interface ip configurations. | [
30522,
13366,
2862,
1035,
7484,
1035,
3698,
1035,
4094,
1035,
2275,
1035,
12997,
1035,
22354,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
7484,
1035,
3698,
1035,
4094,
1035,
2275,
1035,
2171,
1010,
7484,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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/2017-03-30/generated/azure_mgmt_network/public_ipaddresses.rb | Azure::Network::Mgmt::V2017_03_30.PublicIPAddresses.get_virtual_machine_scale_set_public_ipaddress | def get_virtual_machine_scale_set_public_ipaddress(resource_group_name, virtual_machine_scale_set_name, virtualmachine_index, network_interface_name, ip_configuration_name, public_ip_address_name, expand:nil, custom_headers:nil)
response = get_virtual_machine_scale_set_public_ipaddress_async(resource_group_name, ... | ruby | def get_virtual_machine_scale_set_public_ipaddress(resource_group_name, virtual_machine_scale_set_name, virtualmachine_index, network_interface_name, ip_configuration_name, public_ip_address_name, expand:nil, custom_headers:nil)
response = get_virtual_machine_scale_set_public_ipaddress_async(resource_group_name, ... | [
"def",
"get_virtual_machine_scale_set_public_ipaddress",
"(",
"resource_group_name",
",",
"virtual_machine_scale_set_name",
",",
"virtualmachine_index",
",",
"network_interface_name",
",",
"ip_configuration_name",
",",
"public_ip_address_name",
",",
"expand",
":",
"nil",
",",
"... | Get the specified public IP address in a virtual machine scale set.
@param resource_group_name [String] The name of the resource group.
@param virtual_machine_scale_set_name [String] The name of the virtual
machine scale set.
@param virtualmachine_index [String] The virtual machine index.
@param network_interface... | [
"Get",
"the",
"specified",
"public",
"IP",
"address",
"in",
"a",
"virtual",
"machine",
"scale",
"set",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_network/lib/2017-03-30/generated/azure_mgmt_network/public_ipaddresses.rb#L251-L254 | train | Gets the specified virtual machine s public IP address. | [
30522,
13366,
2131,
1035,
7484,
1035,
3698,
1035,
4094,
1035,
2275,
1035,
2270,
1035,
25249,
16200,
4757,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
7484,
1035,
3698,
1035,
4094,
1035,
2275,
1035,
2171,
1010,
7484,
22911,
14014,
1035,
5950,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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/2016-04-30-preview/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb | Azure::Compute::Mgmt::V2016_04_30_preview.VirtualMachineScaleSets.update_instances | def update_instances(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers:nil)
response = update_instances_async(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def update_instances(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers:nil)
response = update_instances_async(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"update_instances",
"(",
"resource_group_name",
",",
"vm_scale_set_name",
",",
"vm_instance_ids",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"update_instances_async",
"(",
"resource_group_name",
",",
"vm_scale_set_name",
",",
"vm_instance_ids",
",",
... | Upgrades one or more virtual machines to the latest SKU set in the VM scale
set model.
@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 [VirtualMachineScaleSetVMInstanceRequiredIDs] A list
of virtual machine ... | [
"Upgrades",
"one",
"or",
"more",
"virtual",
"machines",
"to",
"the",
"latest",
"SKU",
"set",
"in",
"the",
"VM",
"scale",
"set",
"model",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_compute/lib/2016-04-30-preview/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb#L817-L820 | train | Updates a set of virtual machines in a VM scale set. | [
30522,
13366,
10651,
1035,
12107,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
1058,
2213,
1035,
4094,
1035,
2275,
1035,
2171,
1010,
1058,
2213,
1035,
6013,
1035,
8909,
2015,
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... |
rails/rails | railties/lib/rails/engine.rb | Rails.Engine.app | def app
@app || @app_build_lock.synchronize {
@app ||= begin
stack = default_middleware_stack
config.middleware = build_middleware.merge_into(stack)
config.middleware.build(endpoint)
end
}
end | ruby | def app
@app || @app_build_lock.synchronize {
@app ||= begin
stack = default_middleware_stack
config.middleware = build_middleware.merge_into(stack)
config.middleware.build(endpoint)
end
}
end | [
"def",
"app",
"@app",
"||",
"@app_build_lock",
".",
"synchronize",
"{",
"@app",
"||=",
"begin",
"stack",
"=",
"default_middleware_stack",
"config",
".",
"middleware",
"=",
"build_middleware",
".",
"merge_into",
"(",
"stack",
")",
"config",
".",
"middleware",
"."... | Returns the underlying Rack application for this engine. | [
"Returns",
"the",
"underlying",
"Rack",
"application",
"for",
"this",
"engine",
"."
] | 85a8bc644be69908f05740a5886ec19cd3679df5 | https://github.com/rails/rails/blob/85a8bc644be69908f05740a5886ec19cd3679df5/railties/lib/rails/engine.rb#L507-L515 | train | Returns the app object for this route | [
30522,
13366,
10439,
1030,
10439,
1064,
1064,
1030,
10439,
1035,
3857,
1035,
5843,
1012,
26351,
8093,
10698,
4371,
1063,
1030,
10439,
1064,
1064,
1027,
4088,
9991,
1027,
12398,
1035,
2690,
8059,
1035,
9991,
9530,
8873,
2290,
1012,
2690,
805... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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-ec2/lib/aws-sdk-ec2/resource.rb | Aws::EC2.Resource.network_interfaces | def network_interfaces(options = {})
batches = Enumerator.new do |y|
resp = @client.describe_network_interfaces(options)
resp.each_page do |page|
batch = []
page.data.network_interfaces.each do |n|
batch << NetworkInterface.new(
id: n.network_interface... | ruby | def network_interfaces(options = {})
batches = Enumerator.new do |y|
resp = @client.describe_network_interfaces(options)
resp.each_page do |page|
batch = []
page.data.network_interfaces.each do |n|
batch << NetworkInterface.new(
id: n.network_interface... | [
"def",
"network_interfaces",
"(",
"options",
"=",
"{",
"}",
")",
"batches",
"=",
"Enumerator",
".",
"new",
"do",
"|",
"y",
"|",
"resp",
"=",
"@client",
".",
"describe_network_interfaces",
"(",
"options",
")",
"resp",
".",
"each_page",
"do",
"|",
"page",
... | @example Request syntax with placeholder values
network_interfaces = ec2.network_interfaces({
filters: [
{
name: "String",
values: ["String"],
},
],
dry_run: false,
network_interface_ids: ["String"],
})
@param [Hash] options ({})
@option options [Array<Types:... | [
"@example",
"Request",
"syntax",
"with",
"placeholder",
"values"
] | e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d | https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-ec2/lib/aws-sdk-ec2/resource.rb#L2180-L2196 | train | Returns an array of NetworkInterface objects | [
30522,
13366,
2897,
1035,
19706,
1006,
7047,
1027,
1063,
1065,
1007,
14108,
2229,
1027,
4372,
17897,
16259,
1012,
2047,
2079,
1064,
1061,
1064,
24501,
2361,
1027,
1030,
7396,
1012,
6235,
1035,
2897,
1035,
19706,
1006,
7047,
1007,
24501,
236... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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_monitor/lib/2016-03-01/generated/azure_mgmt_monitor/log_profiles.rb | Azure::Monitor::Mgmt::V2016_03_01.LogProfiles.update | def update(log_profile_name, log_profiles_resource, custom_headers:nil)
response = update_async(log_profile_name, log_profiles_resource, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def update(log_profile_name, log_profiles_resource, custom_headers:nil)
response = update_async(log_profile_name, log_profiles_resource, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"update",
"(",
"log_profile_name",
",",
"log_profiles_resource",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"update_async",
"(",
"log_profile_name",
",",
"log_profiles_resource",
",",
"custom_headers",
":custom_headers",
")",
".",
"value!",
"respo... | Updates an existing LogProfilesResource. To update other fields use the
CreateOrUpdate method.
@param log_profile_name [String] The name of the log profile.
@param log_profiles_resource [LogProfileResourcePatch] Parameters supplied to
the operation.
@param custom_headers [Hash{String => String}] A hash of custom ... | [
"Updates",
"an",
"existing",
"LogProfilesResource",
".",
"To",
"update",
"other",
"fields",
"use",
"the",
"CreateOrUpdate",
"method",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_monitor/lib/2016-03-01/generated/azure_mgmt_monitor/log_profiles.rb#L300-L303 | train | Updates the log profile. | [
30522,
13366,
10651,
1006,
8833,
1035,
6337,
1035,
2171,
1010,
8833,
1035,
17879,
1035,
7692,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
10651,
1035,
2004,
6038,
2278,
1006,
8833,
1035,
6337,
1035,
2171,
1010,
8833,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Dynamoid/dynamoid | lib/dynamoid/adapter.rb | Dynamoid.Adapter.scan | def scan(table, query = {}, opts = {})
benchmark('Scan', table, query) { adapter.scan(table, query, opts) }
end | ruby | def scan(table, query = {}, opts = {})
benchmark('Scan', table, query) { adapter.scan(table, query, opts) }
end | [
"def",
"scan",
"(",
"table",
",",
"query",
"=",
"{",
"}",
",",
"opts",
"=",
"{",
"}",
")",
"benchmark",
"(",
"'Scan'",
",",
"table",
",",
"query",
")",
"{",
"adapter",
".",
"scan",
"(",
"table",
",",
"query",
",",
"opts",
")",
"}",
"end"
] | Scans a table. Generally quite slow; try to avoid using scan if at all possible.
@param [String] table the name of the table to write the object to
@param [Hash] scan_hash a hash of attributes: matching records will be returned by the scan
@since 0.2.0 | [
"Scans",
"a",
"table",
".",
"Generally",
"quite",
"slow",
";",
"try",
"to",
"avoid",
"using",
"scan",
"if",
"at",
"all",
"possible",
"."
] | 9e3d006b039e45877b003564ded65509b10b6354 | https://github.com/Dynamoid/dynamoid/blob/9e3d006b039e45877b003564ded65509b10b6354/lib/dynamoid/adapter.rb#L120-L122 | train | Scan the table | [
30522,
13366,
13594,
1006,
2795,
1010,
23032,
1027,
1063,
1065,
1010,
23569,
30524,
13594,
1005,
1010,
2795,
1010,
23032,
1007,
1063,
15581,
2121,
1012,
13594,
1006,
2795,
1010,
23032,
1010,
23569,
2015,
1007,
1065,
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... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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/voice/network.rb | Discordrb::Voice.VoiceUDP.connect | def connect(endpoint, port, ssrc)
@endpoint = endpoint
@endpoint = @endpoint[6..-1] if @endpoint.start_with? 'wss://'
@endpoint = @endpoint.gsub(':80', '') # The endpoint may contain a port, we don't want that
@endpoint = Resolv.getaddress @endpoint
@port = port
@ssrc = ssrc
end | ruby | def connect(endpoint, port, ssrc)
@endpoint = endpoint
@endpoint = @endpoint[6..-1] if @endpoint.start_with? 'wss://'
@endpoint = @endpoint.gsub(':80', '') # The endpoint may contain a port, we don't want that
@endpoint = Resolv.getaddress @endpoint
@port = port
@ssrc = ssrc
end | [
"def",
"connect",
"(",
"endpoint",
",",
"port",
",",
"ssrc",
")",
"@endpoint",
"=",
"endpoint",
"@endpoint",
"=",
"@endpoint",
"[",
"6",
"..",
"-",
"1",
"]",
"if",
"@endpoint",
".",
"start_with?",
"'wss://'",
"@endpoint",
"=",
"@endpoint",
".",
"gsub",
"... | Creates a new UDP connection. Only creates a socket as the discovery reply may come before the data is
initialized.
Initializes the UDP socket with data obtained from opcode 2.
@param endpoint [String] The voice endpoint to connect to.
@param port [Integer] The port to connect to.
@param ssrc [Integer] The Super S... | [
"Creates",
"a",
"new",
"UDP",
"connection",
".",
"Only",
"creates",
"a",
"socket",
"as",
"the",
"discovery",
"reply",
"may",
"come",
"before",
"the",
"data",
"is",
"initialized",
".",
"Initializes",
"the",
"UDP",
"socket",
"with",
"data",
"obtained",
"from",... | 764298a1ff0be69a1853b510d736f21c2b91a2fe | https://github.com/meew0/discordrb/blob/764298a1ff0be69a1853b510d736f21c2b91a2fe/lib/discordrb/voice/network.rb#L50-L58 | train | Connect to the server | [
30522,
13366,
7532,
1006,
2203,
8400,
1010,
3417,
1010,
20896,
2278,
1007,
1030,
2203,
8400,
1027,
2203,
8400,
30524,
28177,
12083,
1006,
1005,
1024,
3770,
1005,
1010,
1005,
1005,
1007,
1001,
1996,
2203,
8400,
2089,
5383,
1037,
3417,
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... |
appsignal/rdkafka-ruby | lib/rdkafka/config.rb | Rdkafka.Config.native_config | def native_config(opaque=nil)
Rdkafka::Bindings.rd_kafka_conf_new.tap do |config|
# Create config
@config_hash.merge(REQUIRED_CONFIG).each do |key, value|
error_buffer = FFI::MemoryPointer.from_string(" " * 256)
result = Rdkafka::Bindings.rd_kafka_conf_set(
config,
... | ruby | def native_config(opaque=nil)
Rdkafka::Bindings.rd_kafka_conf_new.tap do |config|
# Create config
@config_hash.merge(REQUIRED_CONFIG).each do |key, value|
error_buffer = FFI::MemoryPointer.from_string(" " * 256)
result = Rdkafka::Bindings.rd_kafka_conf_set(
config,
... | [
"def",
"native_config",
"(",
"opaque",
"=",
"nil",
")",
"Rdkafka",
"::",
"Bindings",
".",
"rd_kafka_conf_new",
".",
"tap",
"do",
"|",
"config",
"|",
"# Create config",
"@config_hash",
".",
"merge",
"(",
"REQUIRED_CONFIG",
")",
".",
"each",
"do",
"|",
"key",
... | This method is only intented to be used to create a client,
using it in another way will leak memory. | [
"This",
"method",
"is",
"only",
"intented",
"to",
"be",
"used",
"to",
"create",
"a",
"client",
"using",
"it",
"in",
"another",
"way",
"will",
"leak",
"memory",
"."
] | 87b3e0ddae5ea576847cb67228fcea06ec2a24d6 | https://github.com/appsignal/rdkafka-ruby/blob/87b3e0ddae5ea576847cb67228fcea06ec2a24d6/lib/rdkafka/config.rb#L160-L194 | train | Create a new Rdkafka configuration object | [
30522,
13366,
3128,
1035,
9530,
8873,
2290,
1006,
28670,
1027,
9152,
2140,
1007,
16428,
2912,
24316,
2050,
1024,
1024,
8031,
2015,
1012,
16428,
1035,
10556,
24316,
2050,
1035,
9530,
2546,
1035,
2047,
1012,
11112,
2079,
1064,
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... |
fastlane/fastlane | deliver/lib/deliver/upload_metadata.rb | Deliver.UploadMetadata.normalize_language_keys | def normalize_language_keys(options)
(LOCALISED_VERSION_VALUES + LOCALISED_APP_VALUES).each do |key|
current = options[key]
next unless current && current.kind_of?(Hash)
current.keys.each do |language|
current[language.to_s] = current.delete(language)
end
end
... | ruby | def normalize_language_keys(options)
(LOCALISED_VERSION_VALUES + LOCALISED_APP_VALUES).each do |key|
current = options[key]
next unless current && current.kind_of?(Hash)
current.keys.each do |language|
current[language.to_s] = current.delete(language)
end
end
... | [
"def",
"normalize_language_keys",
"(",
"options",
")",
"(",
"LOCALISED_VERSION_VALUES",
"+",
"LOCALISED_APP_VALUES",
")",
".",
"each",
"do",
"|",
"key",
"|",
"current",
"=",
"options",
"[",
"key",
"]",
"next",
"unless",
"current",
"&&",
"current",
".",
"kind_o... | Normalizes languages keys from symbols to strings | [
"Normalizes",
"languages",
"keys",
"from",
"symbols",
"to",
"strings"
] | 457c5d647c77f0e078dafa5129da616914e002c5 | https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/deliver/lib/deliver/upload_metadata.rb#L336-L347 | train | Normalize language keys | [
30522,
13366,
3671,
4697,
1035,
2653,
1035,
6309,
1006,
7047,
1007,
1006,
2334,
5084,
1035,
2544,
1035,
5300,
1009,
2334,
5084,
1035,
10439,
1035,
5300,
1007,
1012,
2169,
2079,
1064,
3145,
1064,
2783,
1027,
7047,
1031,
3145,
1033,
2279,
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... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_authorization/lib/2018-09-01-preview/generated/azure_mgmt_authorization/role_assignments.rb | Azure::Authorization::Mgmt::V2018_09_01_preview.RoleAssignments.delete | def delete(scope, role_assignment_name, custom_headers:nil)
response = delete_async(scope, role_assignment_name, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def delete(scope, role_assignment_name, custom_headers:nil)
response = delete_async(scope, role_assignment_name, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"delete",
"(",
"scope",
",",
"role_assignment_name",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"delete_async",
"(",
"scope",
",",
"role_assignment_name",
",",
"custom_headers",
":custom_headers",
")",
".",
"value!",
"response",
".",
"body",
... | Deletes a role assignment.
@param scope [String] The scope of the role assignment to delete.
@param role_assignment_name [String] The name of the role assignment to
delete.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request.
@return [RoleAssignment] op... | [
"Deletes",
"a",
"role",
"assignment",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_authorization/lib/2018-09-01-preview/generated/azure_mgmt_authorization/role_assignments.rb#L261-L264 | train | Deletes a role assignment. | [
30522,
13366,
3972,
12870,
1006,
9531,
1010,
2535,
1035,
8775,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
3972,
12870,
1035,
2004,
6038,
2278,
1006,
9531,
1010,
2535,
1035,
8775,
1035,
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... |
dry-rb/dry-initializer | lib/dry/initializer/config.rb | Dry::Initializer.Config.public_attributes | def public_attributes(instance)
definitions.values.each_with_object({}) do |item, obj|
key = item.target
next unless instance.respond_to? key
val = instance.send(key)
obj[key] = val unless null == val
end
end | ruby | def public_attributes(instance)
definitions.values.each_with_object({}) do |item, obj|
key = item.target
next unless instance.respond_to? key
val = instance.send(key)
obj[key] = val unless null == val
end
end | [
"def",
"public_attributes",
"(",
"instance",
")",
"definitions",
".",
"values",
".",
"each_with_object",
"(",
"{",
"}",
")",
"do",
"|",
"item",
",",
"obj",
"|",
"key",
"=",
"item",
".",
"target",
"next",
"unless",
"instance",
".",
"respond_to?",
"key",
"... | The hash of public attributes for an instance of the [#extended_class]
@param [Dry::Initializer::Instance] instance
@return [Hash<Symbol, Object>] | [
"The",
"hash",
"of",
"public",
"attributes",
"for",
"an",
"instance",
"of",
"the",
"[",
"#extended_class",
"]"
] | 422d331468602ff0d3543fbb336b784343e5cc31 | https://github.com/dry-rb/dry-initializer/blob/422d331468602ff0d3543fbb336b784343e5cc31/lib/dry/initializer/config.rb#L77-L84 | train | Returns the public attributes of the given instance. | [
30522,
13366,
2270,
1035,
12332,
1006,
6013,
1007,
15182,
1012,
5300,
1012,
2169,
1035,
2007,
1035,
4874,
1006,
1063,
1065,
1007,
2079,
1064,
8875,
1010,
27885,
3501,
1064,
3145,
1027,
8875,
1012,
4539,
2279,
4983,
6013,
1012,
6869,
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 | management/azure_mgmt_web/lib/2015-08-01/generated/azure_mgmt_web/app_service_certificate_orders.rb | Azure::Web::Mgmt::V2015_08_01.AppServiceCertificateOrders.delete_certificate_with_http_info | def delete_certificate_with_http_info(resource_group_name, certificate_order_name, name, custom_headers:nil)
delete_certificate_async(resource_group_name, certificate_order_name, name, custom_headers:custom_headers).value!
end | ruby | def delete_certificate_with_http_info(resource_group_name, certificate_order_name, name, custom_headers:nil)
delete_certificate_async(resource_group_name, certificate_order_name, name, custom_headers:custom_headers).value!
end | [
"def",
"delete_certificate_with_http_info",
"(",
"resource_group_name",
",",
"certificate_order_name",
",",
"name",
",",
"custom_headers",
":",
"nil",
")",
"delete_certificate_async",
"(",
"resource_group_name",
",",
"certificate_order_name",
",",
"name",
",",
"custom_heade... | Delete the certificate associated with a certificate order.
Delete the certificate associated with a certificate order.
@param resource_group_name [String] Name of the resource group to which the
resource belongs.
@param certificate_order_name [String] Name of the certificate order.
@param name [String] Name of ... | [
"Delete",
"the",
"certificate",
"associated",
"with",
"a",
"certificate",
"order",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_web/lib/2015-08-01/generated/azure_mgmt_web/app_service_certificate_orders.rb#L981-L983 | train | Deletes the specified certificate order. | [
30522,
13366,
3972,
12870,
1035,
8196,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
8196,
1035,
2344,
1035,
2171,
1010,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3972,
12870,
1035,
8196,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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_monitor/lib/2018-11-27-preview/generated/azure_mgmt_monitor/vminsights.rb | Azure::Monitor::Mgmt::V2018_11_27_preview.VMInsights.get_onboarding_status | def get_onboarding_status(resource_uri, custom_headers:nil)
response = get_onboarding_status_async(resource_uri, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def get_onboarding_status(resource_uri, custom_headers:nil)
response = get_onboarding_status_async(resource_uri, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"get_onboarding_status",
"(",
"resource_uri",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"get_onboarding_status_async",
"(",
"resource_uri",
",",
"custom_headers",
":custom_headers",
")",
".",
"value!",
"response",
".",
"body",
"unless",
"response... | Retrieves the VM Insights onboarding status for the specified resource or
resource scope.
@param resource_uri [String] The fully qualified Azure Resource manager
identifier of the resource, or scope, whose status to retrieve.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be add... | [
"Retrieves",
"the",
"VM",
"Insights",
"onboarding",
"status",
"for",
"the",
"specified",
"resource",
"or",
"resource",
"scope",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_monitor/lib/2018-11-27-preview/generated/azure_mgmt_monitor/vminsights.rb#L35-L38 | train | Gets the onboarding status of the resource. | [
30522,
13366,
2131,
1035,
27120,
2075,
1035,
3570,
1006,
7692,
1035,
24471,
2072,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
2131,
1035,
27120,
2075,
1035,
3570,
1035,
2004,
6038,
2278,
1006,
7692,
1035,
24471,
2072,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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/2016-04-30-preview/generated/azure_mgmt_compute/virtual_machines.rb | Azure::Compute::Mgmt::V2016_04_30_preview.VirtualMachines.begin_power_off | def begin_power_off(resource_group_name, vm_name, custom_headers:nil)
response = begin_power_off_async(resource_group_name, vm_name, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def begin_power_off(resource_group_name, vm_name, custom_headers:nil)
response = begin_power_off_async(resource_group_name, vm_name, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"begin_power_off",
"(",
"resource_group_name",
",",
"vm_name",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"begin_power_off_async",
"(",
"resource_group_name",
",",
"vm_name",
",",
"custom_headers",
":custom_headers",
")",
".",
"value!",
"response"... | The operation to power off (stop) a virtual machine. The virtual machine can
be restarted with the same provisioned resources. You are still charged for
this virtual machine.
@param resource_group_name [String] The name of the resource group.
@param vm_name [String] The name of the virtual machine.
@param custom_... | [
"The",
"operation",
"to",
"power",
"off",
"(",
"stop",
")",
"a",
"virtual",
"machine",
".",
"The",
"virtual",
"machine",
"can",
"be",
"restarted",
"with",
"the",
"same",
"provisioned",
"resources",
".",
"You",
"are",
"still",
"charged",
"for",
"this",
"vir... | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_compute/lib/2016-04-30-preview/generated/azure_mgmt_compute/virtual_machines.rb#L1498-L1501 | train | Power off the virtual machine. | [
30522,
13366,
4088,
1035,
2373,
1035,
2125,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
1058,
2213,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
4088,
1035,
2373,
1035,
2125,
1035,
2004,
6038,
2278,
1006,
7... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
shugo/textbringer | lib/textbringer/buffer.rb | Textbringer.Buffer.save_excursion | def save_excursion
old_point = new_mark
old_mark = @mark&.dup
old_column = @goal_column
begin
yield
ensure
point_to_mark(old_point)
old_point.delete
if old_mark
@mark.location = old_mark.location
old_mark.delete
end
@goal_... | ruby | def save_excursion
old_point = new_mark
old_mark = @mark&.dup
old_column = @goal_column
begin
yield
ensure
point_to_mark(old_point)
old_point.delete
if old_mark
@mark.location = old_mark.location
old_mark.delete
end
@goal_... | [
"def",
"save_excursion",
"old_point",
"=",
"new_mark",
"old_mark",
"=",
"@mark",
"&.",
"dup",
"old_column",
"=",
"@goal_column",
"begin",
"yield",
"ensure",
"point_to_mark",
"(",
"old_point",
")",
"old_point",
".",
"delete",
"if",
"old_mark",
"@mark",
".",
"loca... | Don't save Buffer.current. | [
"Don",
"t",
"save",
"Buffer",
".",
"current",
"."
] | dcea7a098b5e04335e73faee5616bd1678add7ec | https://github.com/shugo/textbringer/blob/dcea7a098b5e04335e73faee5616bd1678add7ec/lib/textbringer/buffer.rb#L813-L828 | train | Save the new point and mark to the new mark and mark as an exception. | [
30522,
13366,
3828,
1035,
26144,
2214,
1035,
2391,
1027,
2047,
1035,
2928,
2214,
1035,
2928,
1027,
1030,
2928,
1004,
1012,
4241,
2361,
2214,
1035,
5930,
1027,
1030,
3125,
1035,
5930,
4088,
10750,
5676,
2391,
1035,
2000,
1035,
2928,
1006,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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_datalake_analytics/lib/2015-10-01-preview/generated/azure_mgmt_datalake_analytics/account.rb | Azure::DataLakeAnalytics::Mgmt::V2015_10_01_preview.Account.list_storage_accounts_as_lazy | def list_storage_accounts_as_lazy(resource_group_name, account_name, filter:nil, top:nil, skip:nil, expand:nil, select:nil, orderby:nil, count:nil, search:nil, format:nil, custom_headers:nil)
response = list_storage_accounts_async(resource_group_name, account_name, filter:filter, top:top, skip:skip, expand:expand... | ruby | def list_storage_accounts_as_lazy(resource_group_name, account_name, filter:nil, top:nil, skip:nil, expand:nil, select:nil, orderby:nil, count:nil, search:nil, format:nil, custom_headers:nil)
response = list_storage_accounts_async(resource_group_name, account_name, filter:filter, top:top, skip:skip, expand:expand... | [
"def",
"list_storage_accounts_as_lazy",
"(",
"resource_group_name",
",",
"account_name",
",",
"filter",
":",
"nil",
",",
"top",
":",
"nil",
",",
"skip",
":",
"nil",
",",
"expand",
":",
"nil",
",",
"select",
":",
"nil",
",",
"orderby",
":",
"nil",
",",
"c... | Gets the first page of Azure Storage accounts, if any, linked to the
specified Data Lake Analytics account. The response includes a link to the
next page, if any.
@param resource_group_name [String] The name of the Azure resource group that
contains the Data Lake Analytics account.
@param account_name [String] Th... | [
"Gets",
"the",
"first",
"page",
"of",
"Azure",
"Storage",
"accounts",
"if",
"any",
"linked",
"to",
"the",
"specified",
"Data",
"Lake",
"Analytics",
"account",
".",
"The",
"response",
"includes",
"a",
"link",
"to",
"the",
"next",
"page",
"if",
"any",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_datalake_analytics/lib/2015-10-01-preview/generated/azure_mgmt_datalake_analytics/account.rb#L2994-L3003 | train | Gets a list of all the Azure Storage accounts in a resource group. | [
30522,
13366,
2862,
1035,
5527,
1035,
6115,
1035,
2004,
1035,
13971,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
4070,
1035,
2171,
1010,
11307,
1024,
9152,
2140,
1010,
2327,
1024,
9152,
2140,
1010,
13558,
1024,
9152,
2140,
1010,
7818,
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... |
jekyll/jekyll | lib/jekyll/filters.rb | Jekyll.Filters.compare_property_vs_target | def compare_property_vs_target(property, target)
case target
when NilClass
return true if property.nil?
when Liquid::Expression::MethodLiteral # `empty` or `blank`
return true if Array(property).join == target.to_s
else
Array(property).each do |prop|
return true... | ruby | def compare_property_vs_target(property, target)
case target
when NilClass
return true if property.nil?
when Liquid::Expression::MethodLiteral # `empty` or `blank`
return true if Array(property).join == target.to_s
else
Array(property).each do |prop|
return true... | [
"def",
"compare_property_vs_target",
"(",
"property",
",",
"target",
")",
"case",
"target",
"when",
"NilClass",
"return",
"true",
"if",
"property",
".",
"nil?",
"when",
"Liquid",
"::",
"Expression",
"::",
"MethodLiteral",
"# `empty` or `blank`",
"return",
"true",
... | `where` filter helper | [
"where",
"filter",
"helper"
] | fd74fe3e93a1fb506fa6621a2e271d7b9c5c3e3b | https://github.com/jekyll/jekyll/blob/fd74fe3e93a1fb506fa6621a2e271d7b9c5c3e3b/lib/jekyll/filters.rb#L329-L342 | train | Compare the property and target | [
30522,
13366,
12826,
1035,
3200,
1035,
5443,
1035,
4539,
1006,
3200,
1010,
4539,
1007,
2553,
4539,
2043,
9152,
15472,
27102,
2709,
2995,
2065,
3200,
1012,
9152,
2140,
1029,
2043,
6381,
1024,
1024,
3670,
1024,
1024,
4118,
22779,
7941,
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... |
decidim/decidim | decidim-core/app/services/decidim/traceability.rb | Decidim.Traceability.perform_action! | def perform_action!(action, resource, author, extra_log_info = {})
PaperTrail.request(whodunnit: gid(author)) do
Decidim::ApplicationRecord.transaction do
result = block_given? ? yield : nil
loggable_resource = resource.is_a?(Class) ? result : resource
log(action, author, log... | ruby | def perform_action!(action, resource, author, extra_log_info = {})
PaperTrail.request(whodunnit: gid(author)) do
Decidim::ApplicationRecord.transaction do
result = block_given? ? yield : nil
loggable_resource = resource.is_a?(Class) ? result : resource
log(action, author, log... | [
"def",
"perform_action!",
"(",
"action",
",",
"resource",
",",
"author",
",",
"extra_log_info",
"=",
"{",
"}",
")",
"PaperTrail",
".",
"request",
"(",
"whodunnit",
":",
"gid",
"(",
"author",
")",
")",
"do",
"Decidim",
"::",
"ApplicationRecord",
".",
"trans... | Performs the given block and sets the author of the action.
It also logs the action with the given `action` parameter.
The action and the logging are run inside a transaction.
action - a String or Symbol representing the action performed
resource - An ActiveRecord instance that implements `Decidim::Traceable`
aut... | [
"Performs",
"the",
"given",
"block",
"and",
"sets",
"the",
"author",
"of",
"the",
"action",
".",
"It",
"also",
"logs",
"the",
"action",
"with",
"the",
"given",
"action",
"parameter",
".",
"The",
"action",
"and",
"the",
"logging",
"are",
"run",
"inside",
... | 6e2b14e559a63088669904e3c5c49a5180700cf7 | https://github.com/decidim/decidim/blob/6e2b14e559a63088669904e3c5c49a5180700cf7/decidim-core/app/services/decidim/traceability.rb#L61-L70 | train | Perform an action on the given resource. | [
30522,
13366,
4685,
1035,
2895,
999,
1006,
2895,
1010,
7692,
1010,
3166,
1010,
4469,
1035,
8833,
1035,
18558,
1027,
1063,
1065,
1007,
3259,
6494,
4014,
1012,
5227,
1006,
2040,
27584,
3490,
2102,
1024,
21025,
2094,
1006,
3166,
1007,
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... |
thoughtbot/factory_bot | lib/factory_bot/definition_proxy.rb | FactoryBot.DefinitionProxy.association | def association(name, *options)
if block_given?
raise AssociationDefinitionError.new(
"Unexpected block passed to '#{name}' association "\
"in '#{@definition.name}' factory",
)
else
declaration = Declaration::Association.new(name, *options)
@definition.dec... | ruby | def association(name, *options)
if block_given?
raise AssociationDefinitionError.new(
"Unexpected block passed to '#{name}' association "\
"in '#{@definition.name}' factory",
)
else
declaration = Declaration::Association.new(name, *options)
@definition.dec... | [
"def",
"association",
"(",
"name",
",",
"*",
"options",
")",
"if",
"block_given?",
"raise",
"AssociationDefinitionError",
".",
"new",
"(",
"\"Unexpected block passed to '#{name}' association \"",
"\"in '#{@definition.name}' factory\"",
",",
")",
"else",
"declaration",
"=",
... | Adds an attribute that builds an association. The associated instance will
be built using the same build strategy as the parent instance.
Example:
factory :user do
name 'Joey'
end
factory :post do
association :author, factory: :user
end
Arguments:
* name: +Symbol+
The name of this attrib... | [
"Adds",
"an",
"attribute",
"that",
"builds",
"an",
"association",
".",
"The",
"associated",
"instance",
"will",
"be",
"built",
"using",
"the",
"same",
"build",
"strategy",
"as",
"the",
"parent",
"instance",
"."
] | 99ac02400fd56bd1872fc3ed84f81ea5e8f27737 | https://github.com/thoughtbot/factory_bot/blob/99ac02400fd56bd1872fc3ed84f81ea5e8f27737/lib/factory_bot/definition_proxy.rb#L151-L161 | train | Creates an association definition | [
30522,
13366,
2523,
1006,
2171,
1010,
1008,
7047,
1007,
2065,
3796,
1035,
2445,
1029,
5333,
2523,
3207,
16294,
22753,
2121,
29165,
1012,
2047,
1006,
1000,
9223,
3796,
2979,
2000,
1005,
1001,
1063,
2171,
1065,
1005,
2523,
1000,
1032,
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 | data/azure_cognitiveservices_videosearch/lib/1.0/generated/azure_cognitiveservices_videosearch/videos_operations.rb | Azure::CognitiveServices::VideoSearch::V1_0.VideosOperations.details | def details(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)
response = details_async(query, accept_language:accept_la... | ruby | def details(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)
response = details_async(query, accept_language:accept_la... | [
"def",
"details",
"(",
"query",
",",
"accept_language",
":",
"nil",
",",
"user_agent",
":",
"nil",
",",
"client_id",
":",
"nil",
",",
"client_ip",
":",
"nil",
",",
"location",
":",
"nil",
",",
"country_code",
":",
"nil",
",",
"id",
":",
"nil",
",",
"... | 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#L1079-L1082 | train | Returns the list of the available terms of the specified query. | [
30522,
13366,
4751,
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,
1010,
3295,
1024,
9152,
2140,
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... |
mojombo/chronic | lib/chronic/handlers.rb | Chronic.Handlers.handle_sd_sm_sy | def handle_sd_sm_sy(tokens, options)
new_tokens = [tokens[1], tokens[0], tokens[2]]
time_tokens = tokens.last(tokens.size - 3)
handle_sm_sd_sy(new_tokens + time_tokens, options)
end | ruby | def handle_sd_sm_sy(tokens, options)
new_tokens = [tokens[1], tokens[0], tokens[2]]
time_tokens = tokens.last(tokens.size - 3)
handle_sm_sd_sy(new_tokens + time_tokens, options)
end | [
"def",
"handle_sd_sm_sy",
"(",
"tokens",
",",
"options",
")",
"new_tokens",
"=",
"[",
"tokens",
"[",
"1",
"]",
",",
"tokens",
"[",
"0",
"]",
",",
"tokens",
"[",
"2",
"]",
"]",
"time_tokens",
"=",
"tokens",
".",
"last",
"(",
"tokens",
".",
"size",
"... | Handle scalar-day/scalar-month/scalar-year (endian little) | [
"Handle",
"scalar",
"-",
"day",
"/",
"scalar",
"-",
"month",
"/",
"scalar",
"-",
"year",
"(",
"endian",
"little",
")"
] | 2b1eae7ec440d767c09e0b1a7f0e9bcf30ce1d6c | https://github.com/mojombo/chronic/blob/2b1eae7ec440d767c09e0b1a7f0e9bcf30ce1d6c/lib/chronic/handlers.rb#L231-L235 | train | Handle the S - S - Sy tokens | [
30522,
13366,
5047,
1035,
17371,
1035,
15488,
1035,
25353,
1006,
19204,
2015,
1010,
7047,
1007,
2047,
1035,
19204,
2015,
1027,
1031,
19204,
2015,
1031,
1015,
1033,
1010,
19204,
2015,
1031,
1014,
1033,
1010,
19204,
2015,
1031,
1016,
1033,
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... |
gocardless/hutch | lib/hutch/broker.rb | Hutch.Broker.queue | def queue(name, arguments = {})
with_bunny_precondition_handler('queue') do
namespace = @config[:namespace].to_s.downcase.gsub(/[^-_:\.\w]/, "")
name = name.prepend(namespace + ":") if namespace.present?
channel.queue(name, durable: true, arguments: arguments)
end
end | ruby | def queue(name, arguments = {})
with_bunny_precondition_handler('queue') do
namespace = @config[:namespace].to_s.downcase.gsub(/[^-_:\.\w]/, "")
name = name.prepend(namespace + ":") if namespace.present?
channel.queue(name, durable: true, arguments: arguments)
end
end | [
"def",
"queue",
"(",
"name",
",",
"arguments",
"=",
"{",
"}",
")",
"with_bunny_precondition_handler",
"(",
"'queue'",
")",
"do",
"namespace",
"=",
"@config",
"[",
":namespace",
"]",
".",
"to_s",
".",
"downcase",
".",
"gsub",
"(",
"/",
"\\.",
"\\w",
"/",
... | Create / get a durable queue and apply namespace if it exists. | [
"Create",
"/",
"get",
"a",
"durable",
"queue",
"and",
"apply",
"namespace",
"if",
"it",
"exists",
"."
] | 9314b3b8c84abeb78170730757f3eb8ccc4f54c5 | https://github.com/gocardless/hutch/blob/9314b3b8c84abeb78170730757f3eb8ccc4f54c5/lib/hutch/broker.rb#L173-L179 | train | Queue a message to the server | [
30522,
13366,
24240,
1006,
2171,
1010,
9918,
1027,
1063,
1065,
1007,
2007,
1035,
16291,
1035,
3653,
8663,
20562,
1035,
28213,
1006,
1005,
24240,
1005,
1007,
2079,
3415,
15327,
1027,
1030,
30524,
1007,
2171,
1027,
2171,
1012,
17463,
10497,
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... |
watir/watir | lib/watir/js_execution.rb | Watir.JSExecution.fire_event | def fire_event(event_name)
event_name = event_name.to_s.sub(/^on/, '').downcase
element_call { execute_js :fireEvent, @element, event_name }
end | ruby | def fire_event(event_name)
event_name = event_name.to_s.sub(/^on/, '').downcase
element_call { execute_js :fireEvent, @element, event_name }
end | [
"def",
"fire_event",
"(",
"event_name",
")",
"event_name",
"=",
"event_name",
".",
"to_s",
".",
"sub",
"(",
"/",
"/",
",",
"''",
")",
".",
"downcase",
"element_call",
"{",
"execute_js",
":fireEvent",
",",
"@element",
",",
"event_name",
"}",
"end"
] | Simulates JavaScript events on element.
Note that you may omit "on" from event name.
@example
browser.button(name: "new_user_button").fire_event :click
browser.button(name: "new_user_button").fire_event "mousemove"
browser.button(name: "new_user_button").fire_event "onmouseover"
@param [String, Symbol] ev... | [
"Simulates",
"JavaScript",
"events",
"on",
"element",
".",
"Note",
"that",
"you",
"may",
"omit",
"on",
"from",
"event",
"name",
"."
] | 2d8db09811c6221ae401b85b2f61f5fa66e463a3 | https://github.com/watir/watir/blob/2d8db09811c6221ae401b85b2f61f5fa66e463a3/lib/watir/js_execution.rb#L22-L26 | train | Fire an event on the element. | [
30522,
13366,
2543,
1035,
2724,
1006,
30524,
2655,
1063,
15389,
1035,
1046,
2015,
1024,
2543,
18697,
3372,
1010,
1030,
5783,
1010,
2724,
1035,
2171,
1065,
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... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
elastic/apm-agent-ruby | lib/elastic_apm/stacktrace_builder.rb | ElasticAPM.StacktraceBuilder.build_frame | def build_frame(cache, keys)
line, type = keys
abs_path, lineno, function, _module_name = parse_line(line)
frame = Stacktrace::Frame.new
frame.abs_path = abs_path
frame.filename = strip_load_path(abs_path)
frame.function = function
frame.lineno = lineno.to_i
frame.librar... | ruby | def build_frame(cache, keys)
line, type = keys
abs_path, lineno, function, _module_name = parse_line(line)
frame = Stacktrace::Frame.new
frame.abs_path = abs_path
frame.filename = strip_load_path(abs_path)
frame.function = function
frame.lineno = lineno.to_i
frame.librar... | [
"def",
"build_frame",
"(",
"cache",
",",
"keys",
")",
"line",
",",
"type",
"=",
"keys",
"abs_path",
",",
"lineno",
",",
"function",
",",
"_module_name",
"=",
"parse_line",
"(",
"line",
")",
"frame",
"=",
"Stacktrace",
"::",
"Frame",
".",
"new",
"frame",
... | rubocop:disable Metrics/AbcSize, Metrics/MethodLength | [
"rubocop",
":",
"disable",
"Metrics",
"/",
"AbcSize",
"Metrics",
"/",
"MethodLength"
] | 82190d1a9ba22af3b2c2c6fe6d23cc471f2e7ff6 | https://github.com/elastic/apm-agent-ruby/blob/82190d1a9ba22af3b2c2c6fe6d23cc471f2e7ff6/lib/elastic_apm/stacktrace_builder.rb#L33-L49 | train | Build a frame from the given keys | [
30522,
13366,
3857,
1035,
4853,
1006,
17053,
1010,
6309,
1007,
2240,
1010,
2828,
1027,
6309,
14689,
1035,
4130,
1010,
17517,
2080,
1010,
3853,
1010,
1035,
11336,
1035,
30524,
4853,
1012,
5371,
18442,
1027,
6167,
1035,
7170,
1035,
4130,
1006... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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/sprockets | lib/sprockets/loader.rb | Sprockets.Loader.asset_from_cache | def asset_from_cache(key)
asset = cache.get(key, true)
if asset
asset[:uri] = expand_from_root(asset[:uri])
asset[:load_path] = expand_from_root(asset[:load_path])
asset[:filename] = expand_from_root(asset[:filename])
asset[:metadata][:included].map! ... | ruby | def asset_from_cache(key)
asset = cache.get(key, true)
if asset
asset[:uri] = expand_from_root(asset[:uri])
asset[:load_path] = expand_from_root(asset[:load_path])
asset[:filename] = expand_from_root(asset[:filename])
asset[:metadata][:included].map! ... | [
"def",
"asset_from_cache",
"(",
"key",
")",
"asset",
"=",
"cache",
".",
"get",
"(",
"key",
",",
"true",
")",
"if",
"asset",
"asset",
"[",
":uri",
"]",
"=",
"expand_from_root",
"(",
"asset",
"[",
":uri",
"]",
")",
"asset",
"[",
":load_path",
"]",
"=",... | Internal: Load asset hash from cache
key - A String containing lookup information for an asset
This method converts all "compressed" paths to absolute paths.
Returns a hash of values representing an asset | [
"Internal",
":",
"Load",
"asset",
"hash",
"from",
"cache"
] | 9e3f0d8e98c44f57e67bc138db87bb8469bf5ddd | https://github.com/rails/sprockets/blob/9e3f0d8e98c44f57e67bc138db87bb8469bf5ddd/lib/sprockets/loader.rb#L74-L94 | train | Get the asset from the cache | [
30522,
13366,
11412,
1035,
2013,
1035,
17053,
1006,
3145,
1007,
11412,
1027,
17053,
1012,
2131,
1006,
3145,
1010,
2995,
1007,
2065,
11412,
11412,
1031,
1024,
24471,
2072,
1033,
1027,
7818,
1035,
2013,
1035,
7117,
1006,
11412,
1031,
1024,
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... |
Azure/azure-sdk-for-ruby | data/azure_cognitiveservices_luisauthoring/lib/2.0/generated/azure_cognitiveservices_luisauthoring/versions.rb | Azure::CognitiveServices::LuisAuthoring::V2_0.Versions.delete_unlabelled_utterance | def delete_unlabelled_utterance(app_id, version_id, utterance, custom_headers:nil)
response = delete_unlabelled_utterance_async(app_id, version_id, utterance, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def delete_unlabelled_utterance(app_id, version_id, utterance, custom_headers:nil)
response = delete_unlabelled_utterance_async(app_id, version_id, utterance, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"delete_unlabelled_utterance",
"(",
"app_id",
",",
"version_id",
",",
"utterance",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"delete_unlabelled_utterance_async",
"(",
"app_id",
",",
"version_id",
",",
"utterance",
",",
"custom_headers",
":custom_... | Deleted an unlabelled utterance in a version of the application.
@param app_id The application ID.
@param version_id [String] The version ID.
@param utterance [String] The utterance text to delete.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request.
@r... | [
"Deleted",
"an",
"unlabelled",
"utterance",
"in",
"a",
"version",
"of",
"the",
"application",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_cognitiveservices_luisauthoring/lib/2.0/generated/azure_cognitiveservices_luisauthoring/versions.rb#L756-L759 | train | Deletes an unlabelled utterance. | [
30522,
13366,
3972,
12870,
1035,
4895,
20470,
21148,
1035,
14395,
6651,
1006,
10439,
1035,
8909,
1010,
2544,
1035,
8909,
1010,
14395,
6651,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
3972,
12870,
1035,
4895,
20470,
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... |
piotrmurach/github | lib/github_api/client/git_data/tags.rb | Github.Client::GitData::Tags.create | def create(*args)
arguments(args, required: [:user, :repo]) do
permit VALID_TAG_PARAM_NAMES
assert_values VALID_TAG_PARAM_VALUES
end
post_request("/repos/#{arguments.user}/#{arguments.repo}/git/tags", arguments.params)
end | ruby | def create(*args)
arguments(args, required: [:user, :repo]) do
permit VALID_TAG_PARAM_NAMES
assert_values VALID_TAG_PARAM_VALUES
end
post_request("/repos/#{arguments.user}/#{arguments.repo}/git/tags", arguments.params)
end | [
"def",
"create",
"(",
"*",
"args",
")",
"arguments",
"(",
"args",
",",
"required",
":",
"[",
":user",
",",
":repo",
"]",
")",
"do",
"permit",
"VALID_TAG_PARAM_NAMES",
"assert_values",
"VALID_TAG_PARAM_VALUES",
"end",
"post_request",
"(",
"\"/repos/#{arguments.user... | Create a tag object
Note that creating a tag object does not create the reference that
makes a tag in Git. If you want to create an annotated tag in Git,
you have to do this call to create the tag object, and then create
the refs/tags/[tag] reference. If you want to create a lightweight
tag, you simply have to cr... | [
"Create",
"a",
"tag",
"object"
] | 8702452c66bea33c9388550aed9e9974f76aaef1 | https://github.com/piotrmurach/github/blob/8702452c66bea33c9388550aed9e9974f76aaef1/lib/github_api/client/git_data/tags.rb#L86-L93 | train | Create a tag | [
30522,
13366,
3443,
1006,
1008,
12098,
5620,
1007,
9918,
1006,
12098,
5620,
1010,
3223,
1024,
1031,
1024,
5310,
1010,
1024,
16360,
2080,
1033,
1007,
2079,
9146,
9398,
1035,
6415,
1035,
11498,
2213,
1035,
3415,
20865,
1035,
5300,
9398,
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... |
meew0/discordrb | lib/discordrb/events/message.rb | Discordrb::Events.MessageEvent.send_file | def send_file(file, caption: nil, filename: nil, spoiler: nil)
@message.channel.send_file(file, caption: caption, filename: filename, spoiler: spoiler)
end | ruby | def send_file(file, caption: nil, filename: nil, spoiler: nil)
@message.channel.send_file(file, caption: caption, filename: filename, spoiler: spoiler)
end | [
"def",
"send_file",
"(",
"file",
",",
"caption",
":",
"nil",
",",
"filename",
":",
"nil",
",",
"spoiler",
":",
"nil",
")",
"@message",
".",
"channel",
".",
"send_file",
"(",
"file",
",",
"caption",
":",
"caption",
",",
"filename",
":",
"filename",
",",... | Sends file with a caption to the channel this message was sent in, right now.
It is usually preferable to use {#<<} and {#attach_file} instead
because it avoids rate limiting problems
@param file [File] The file to send to the channel
@param caption [String] The caption attached to the file
@param filename [String... | [
"Sends",
"file",
"with",
"a",
"caption",
"to",
"the",
"channel",
"this",
"message",
"was",
"sent",
"in",
"right",
"now",
".",
"It",
"is",
"usually",
"preferable",
"to",
"use",
"{",
"#<<",
"}",
"and",
"{",
"#attach_file",
"}",
"instead",
"because",
"it",
... | 764298a1ff0be69a1853b510d736f21c2b91a2fe | https://github.com/meew0/discordrb/blob/764298a1ff0be69a1853b510d736f21c2b91a2fe/lib/discordrb/events/message.rb#L133-L135 | train | Send a file to the channel | [
30522,
13366,
4604,
1035,
5371,
1006,
5371,
1010,
14408,
3258,
1024,
9152,
2140,
1010,
5371,
18442,
1024,
9152,
2140,
1010,
27594,
2121,
1024,
9152,
2140,
1007,
1030,
4471,
1012,
3149,
1012,
4604,
1035,
5371,
1006,
5371,
1010,
14408,
3258,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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/2017-03-30/generated/azure_mgmt_network/network_interfaces.rb | Azure::Network::Mgmt::V2017_03_30.NetworkInterfaces.list_virtual_machine_scale_set_ip_configurations | def list_virtual_machine_scale_set_ip_configurations(resource_group_name, virtual_machine_scale_set_name, virtualmachine_index, network_interface_name, expand:nil, custom_headers:nil)
first_page = list_virtual_machine_scale_set_ip_configurations_as_lazy(resource_group_name, virtual_machine_scale_set_name, virtual... | ruby | def list_virtual_machine_scale_set_ip_configurations(resource_group_name, virtual_machine_scale_set_name, virtualmachine_index, network_interface_name, expand:nil, custom_headers:nil)
first_page = list_virtual_machine_scale_set_ip_configurations_as_lazy(resource_group_name, virtual_machine_scale_set_name, virtual... | [
"def",
"list_virtual_machine_scale_set_ip_configurations",
"(",
"resource_group_name",
",",
"virtual_machine_scale_set_name",
",",
"virtualmachine_index",
",",
"network_interface_name",
",",
"expand",
":",
"nil",
",",
"custom_headers",
":",
"nil",
")",
"first_page",
"=",
"l... | Get the specified network interface ip configuration in a virtual machine
scale set.
@param resource_group_name [String] The name of the resource group.
@param virtual_machine_scale_set_name [String] The name of the virtual
machine scale set.
@param virtualmachine_index [String] The virtual machine index.
@param... | [
"Get",
"the",
"specified",
"network",
"interface",
"ip",
"configuration",
"in",
"a",
"virtual",
"machine",
"scale",
"set",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_network/lib/2017-03-30/generated/azure_mgmt_network/network_interfaces.rb#L345-L348 | train | Gets all the virtual machine IP configurations for a network interface. | [
30522,
13366,
2862,
1035,
7484,
1035,
3698,
1035,
4094,
1035,
2275,
1035,
12997,
1035,
22354,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
7484,
1035,
3698,
1035,
4094,
1035,
2275,
1035,
2171,
1010,
7484,
22911,
14014,
1035,
5950,
1010,
2897,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
TrestleAdmin/trestle | app/helpers/trestle/timestamp_helper.rb | Trestle.TimestampHelper.timestamp | def timestamp(time, options={})
return unless time
classes = ["timestamp", options[:class]].compact
precision = options.fetch(:precision) { Trestle.config.timestamp_precision }
date_format = options.fetch(:date_format) { :trestle_date }
time_format = options.fetch(:time_format) { pr... | ruby | def timestamp(time, options={})
return unless time
classes = ["timestamp", options[:class]].compact
precision = options.fetch(:precision) { Trestle.config.timestamp_precision }
date_format = options.fetch(:date_format) { :trestle_date }
time_format = options.fetch(:time_format) { pr... | [
"def",
"timestamp",
"(",
"time",
",",
"options",
"=",
"{",
"}",
")",
"return",
"unless",
"time",
"classes",
"=",
"[",
"\"timestamp\"",
",",
"options",
"[",
":class",
"]",
"]",
".",
"compact",
"precision",
"=",
"options",
".",
"fetch",
"(",
":precision",
... | Renders a Time object as a formatted timestamp (using a <time> tag)
time - The Time object to format.
options - Hash of options (default: {}):
:class - Additional HTML classes to add to the <time> tag.
:precision - Time precision, either :minutes or :seconds (default: :minutes).
... | [
"Renders",
"a",
"Time",
"object",
"as",
"a",
"formatted",
"timestamp",
"(",
"using",
"a",
"<time",
">",
"tag",
")"
] | fd5b8aeb5077e13d539cb5ddd99db1dd279f19ca | https://github.com/TrestleAdmin/trestle/blob/fd5b8aeb5077e13d539cb5ddd99db1dd279f19ca/app/helpers/trestle/timestamp_helper.rb#L19-L33 | train | Returns the time tag for the given time | [
30522,
13366,
2335,
15464,
2361,
1006,
2051,
1010,
7047,
1027,
1063,
1065,
1007,
2709,
4983,
2051,
4280,
1027,
1031,
1000,
2335,
15464,
2361,
1000,
1010,
7047,
1031,
1024,
2465,
1033,
1033,
1012,
9233,
11718,
1027,
7047,
1012,
18584,
1006,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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-ec2/lib/aws-sdk-ec2/resource.rb | Aws::EC2.Resource.create_security_group | def create_security_group(options = {})
resp = @client.create_security_group(options)
SecurityGroup.new(
id: resp.data.group_id,
client: @client
)
end | ruby | def create_security_group(options = {})
resp = @client.create_security_group(options)
SecurityGroup.new(
id: resp.data.group_id,
client: @client
)
end | [
"def",
"create_security_group",
"(",
"options",
"=",
"{",
"}",
")",
"resp",
"=",
"@client",
".",
"create_security_group",
"(",
"options",
")",
"SecurityGroup",
".",
"new",
"(",
"id",
":",
"resp",
".",
"data",
".",
"group_id",
",",
"client",
":",
"@client",... | @example Request syntax with placeholder values
securitygroup = ec2.create_security_group({
description: "String", # required
group_name: "String", # required
vpc_id: "String",
dry_run: false,
})
@param [Hash] options ({})
@option options [required, String] :description
A description for... | [
"@example",
"Request",
"syntax",
"with",
"placeholder",
"values"
] | e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d | https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-ec2/lib/aws-sdk-ec2/resource.rb#L715-L721 | train | Creates a new security group | [
30522,
13366,
3443,
1035,
3036,
1035,
2177,
1006,
7047,
1027,
1063,
1065,
1007,
24501,
2361,
1027,
1030,
7396,
1012,
3443,
1035,
3036,
1035,
2177,
1006,
7047,
1007,
3036,
17058,
1012,
2047,
1006,
8909,
1024,
24501,
2361,
1012,
2951,
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... |
rmosolgo/graphql-ruby | lib/graphql/analysis/analyze_query.rb | GraphQL.Analysis.analyze_query | def analyze_query(query, analyzers, multiplex_states: [])
query.trace("analyze_query", { query: query }) do
analyzers_to_run = analyzers.select do |analyzer|
if analyzer.respond_to?(:analyze?)
analyzer.analyze?(query)
else
true
end
end
... | ruby | def analyze_query(query, analyzers, multiplex_states: [])
query.trace("analyze_query", { query: query }) do
analyzers_to_run = analyzers.select do |analyzer|
if analyzer.respond_to?(:analyze?)
analyzer.analyze?(query)
else
true
end
end
... | [
"def",
"analyze_query",
"(",
"query",
",",
"analyzers",
",",
"multiplex_states",
":",
"[",
"]",
")",
"query",
".",
"trace",
"(",
"\"analyze_query\"",
",",
"{",
"query",
":",
"query",
"}",
")",
"do",
"analyzers_to_run",
"=",
"analyzers",
".",
"select",
"do"... | Visit `query`'s internal representation, calling `analyzers` along the way.
- First, query analyzers are filtered down by calling `.analyze?(query)`, if they respond to that method
- Then, query analyzers are initialized by calling `.initial_value(query)`, if they respond to that method.
- Then, they receive `.call... | [
"Visit",
"query",
"s",
"internal",
"representation",
"calling",
"analyzers",
"along",
"the",
"way",
"."
] | d5be13a816f220b9efbabeaa69a3e56fedf311f5 | https://github.com/rmosolgo/graphql-ruby/blob/d5be13a816f220b9efbabeaa69a3e56fedf311f5/lib/graphql/analysis/analyze_query.rb#L40-L60 | train | Analyzes the query | [
30522,
13366,
17908,
1035,
23032,
1006,
23032,
1010,
17908,
2869,
1010,
3674,
2595,
1035,
2163,
1024,
1031,
1033,
1007,
23032,
1012,
7637,
1006,
1000,
17908,
1035,
23032,
1000,
1010,
1063,
23032,
1024,
23032,
1065,
1007,
2079,
17908,
2869,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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/connection_monitors.rb | Azure::Network::Mgmt::V2018_07_01.ConnectionMonitors.query_async | def query_async(resource_group_name, network_watcher_name, connection_monitor_name, custom_headers:nil)
# Send request
promise = begin_query_async(resource_group_name, network_watcher_name, connection_monitor_name, custom_headers:custom_headers)
promise = promise.then do |response|
# Defining... | ruby | def query_async(resource_group_name, network_watcher_name, connection_monitor_name, custom_headers:nil)
# Send request
promise = begin_query_async(resource_group_name, network_watcher_name, connection_monitor_name, custom_headers:custom_headers)
promise = promise.then do |response|
# Defining... | [
"def",
"query_async",
"(",
"resource_group_name",
",",
"network_watcher_name",
",",
"connection_monitor_name",
",",
"custom_headers",
":",
"nil",
")",
"# Send request",
"promise",
"=",
"begin_query_async",
"(",
"resource_group_name",
",",
"network_watcher_name",
",",
"con... | @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 given to the connection
monitor.
@param custom_headers [Hash{String => String}] A hash of c... | [
"@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",
"."... | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_network/lib/2018-07-01/generated/azure_mgmt_network/connection_monitors.rb#L342-L358 | train | Gets the list of connection monitor events. | [
30522,
13366,
23032,
1035,
2004,
6038,
2278,
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,
1001,
4604,
5227,
4872,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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/2015-06-01/generated/azure_mgmt_cdn/custom_domains.rb | Azure::CDN::Mgmt::V2015_06_01.CustomDomains.list_by_endpoint | def list_by_endpoint(endpoint_name, profile_name, resource_group_name, custom_headers:nil)
response = list_by_endpoint_async(endpoint_name, profile_name, resource_group_name, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def list_by_endpoint(endpoint_name, profile_name, resource_group_name, custom_headers:nil)
response = list_by_endpoint_async(endpoint_name, profile_name, resource_group_name, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"list_by_endpoint",
"(",
"endpoint_name",
",",
"profile_name",
",",
"resource_group_name",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"list_by_endpoint_async",
"(",
"endpoint_name",
",",
"profile_name",
",",
"resource_group_name",
",",
"custom_heade... | Lists the existing CDN custom domains within an endpoint.
@param endpoint_name [String] Name of the endpoint within the CDN profile.
@param profile_name [String] Name of the CDN profile within the resource
group.
@param resource_group_name [String] Name of the resource group within the
Azure subscription.
@param... | [
"Lists",
"the",
"existing",
"CDN",
"custom",
"domains",
"within",
"an",
"endpoint",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_cdn/lib/2015-06-01/generated/azure_mgmt_cdn/custom_domains.rb#L40-L43 | train | Gets the list of all the available network endpoints. | [
30522,
13366,
2862,
1035,
2011,
1035,
2203,
8400,
1006,
2203,
8400,
1035,
2171,
1010,
6337,
1035,
2171,
1010,
7692,
1035,
2177,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
2862,
1035,
2011,
1035,
2203,
8... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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/2015-05-01-preview/generated/azure_mgmt_sql/database_recommended_actions.rb | Azure::SQL::Mgmt::V2015_05_01_preview.DatabaseRecommendedActions.get | def get(resource_group_name, server_name, database_name, advisor_name, recommended_action_name, custom_headers:nil)
response = get_async(resource_group_name, server_name, database_name, advisor_name, recommended_action_name, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def get(resource_group_name, server_name, database_name, advisor_name, recommended_action_name, custom_headers:nil)
response = get_async(resource_group_name, server_name, database_name, advisor_name, recommended_action_name, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"get",
"(",
"resource_group_name",
",",
"server_name",
",",
"database_name",
",",
"advisor_name",
",",
"recommended_action_name",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"get_async",
"(",
"resource_group_name",
",",
"server_name",
",",
"datab... | Gets a database recommended action.
@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 of the database... | [
"Gets",
"a",
"database",
"recommended",
"action",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/database_recommended_actions.rb#L165-L168 | train | Gets the specified database advisor and recommended action. | [
30522,
13366,
2131,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
8241,
1035,
2171,
1010,
7809,
1035,
2171,
1010,
8619,
1035,
2171,
1010,
6749,
1035,
2895,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
2131,
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... |
samvera/hyrax | app/controllers/hyrax/file_sets_controller.rb | Hyrax.FileSetsController.update | def update
if attempt_update
after_update_response
else
after_update_failure_response
end
rescue RSolr::Error::Http => error
flash[:error] = error.message
logger.error "FileSetsController::update rescued #{error.class}\n\t#{error.message}\n #{error.backtrace.join("\n")}... | ruby | def update
if attempt_update
after_update_response
else
after_update_failure_response
end
rescue RSolr::Error::Http => error
flash[:error] = error.message
logger.error "FileSetsController::update rescued #{error.class}\n\t#{error.message}\n #{error.backtrace.join("\n")}... | [
"def",
"update",
"if",
"attempt_update",
"after_update_response",
"else",
"after_update_failure_response",
"end",
"rescue",
"RSolr",
"::",
"Error",
"::",
"Http",
"=>",
"error",
"flash",
"[",
":error",
"]",
"=",
"error",
".",
"message",
"logger",
".",
"error",
"\... | PATCH /concern/file_sets/:id | [
"PATCH",
"/",
"concern",
"/",
"file_sets",
"/",
":",
"id"
] | e2b4f56e829a53b1f11296324736e9d5b8c9ee5f | https://github.com/samvera/hyrax/blob/e2b4f56e829a53b1f11296324736e9d5b8c9ee5f/app/controllers/hyrax/file_sets_controller.rb#L55-L65 | train | Update the file sets | [
30522,
13366,
10651,
2065,
3535,
1035,
10651,
2044,
1035,
10651,
1035,
3433,
2842,
2044,
1035,
10651,
1035,
4945,
1035,
3433,
2203,
5343,
12667,
4747,
2099,
1024,
1024,
7561,
1024,
1024,
8299,
1027,
1028,
7561,
5956,
1031,
1024,
7561,
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... |
samvera/hyrax | spec/support/selectors.rb | Selectors.Dashboard.select_user | def select_user(user, role = 'Depositor')
first('a.select2-choice').click
find('.select2-input').set(user.user_key)
sleep 1
first('div.select2-result-label').click
within('div.add-users') do
select(role)
find('input.edit-collection-add-sharing-button').click
end
e... | ruby | def select_user(user, role = 'Depositor')
first('a.select2-choice').click
find('.select2-input').set(user.user_key)
sleep 1
first('div.select2-result-label').click
within('div.add-users') do
select(role)
find('input.edit-collection-add-sharing-button').click
end
e... | [
"def",
"select_user",
"(",
"user",
",",
"role",
"=",
"'Depositor'",
")",
"first",
"(",
"'a.select2-choice'",
")",
".",
"click",
"find",
"(",
"'.select2-input'",
")",
".",
"set",
"(",
"user",
".",
"user_key",
")",
"sleep",
"1",
"first",
"(",
"'div.select2-r... | For use with javascript user selector that allows for searching for an existing user
and granting them permission to an object.
@param [User] user to select
@param [String] role granting the user permission (e.g. 'Manager' | 'Depositor' | 'Viewer') | [
"For",
"use",
"with",
"javascript",
"user",
"selector",
"that",
"allows",
"for",
"searching",
"for",
"an",
"existing",
"user",
"and",
"granting",
"them",
"permission",
"to",
"an",
"object",
"."
] | e2b4f56e829a53b1f11296324736e9d5b8c9ee5f | https://github.com/samvera/hyrax/blob/e2b4f56e829a53b1f11296324736e9d5b8c9ee5f/spec/support/selectors.rb#L13-L22 | train | Select a user | [
30522,
13366,
7276,
1035,
5310,
1006,
5310,
1010,
2535,
1027,
1005,
12816,
2953,
1005,
1007,
2034,
1006,
1005,
1037,
1012,
7276,
2475,
1011,
3601,
1005,
1007,
1012,
11562,
2424,
1006,
1005,
1012,
7276,
2475,
1011,
7953,
1005,
1007,
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 | 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_partition_health | def get_partition_health(partition_id, events_health_state_filter:0, replicas_health_state_filter:0, exclude_health_statistics:false, timeout:60, custom_headers:nil)
response = get_partition_health_async(partition_id, events_health_state_filter:events_health_state_filter, replicas_health_state_filter:replicas_hea... | ruby | def get_partition_health(partition_id, events_health_state_filter:0, replicas_health_state_filter:0, exclude_health_statistics:false, timeout:60, custom_headers:nil)
response = get_partition_health_async(partition_id, events_health_state_filter:events_health_state_filter, replicas_health_state_filter:replicas_hea... | [
"def",
"get_partition_health",
"(",
"partition_id",
",",
"events_health_state_filter",
":",
"0",
",",
"replicas_health_state_filter",
":",
"0",
",",
"exclude_health_statistics",
":",
"false",
",",
"timeout",
":",
"60",
",",
"custom_headers",
":",
"nil",
")",
"respon... | Gets the health of the specified Service Fabric partition.
Gets the health information of the specified partition.
Use EventsHealthStateFilter to filter the collection of health events
reported on the service based on the health state.
Use ReplicasHealthStateFilter to filter the collection of ReplicaHealthState
o... | [
"Gets",
"the",
"health",
"of",
"the",
"specified",
"Service",
"Fabric",
"partition",
"."
] | 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#L12253-L12256 | train | Gets the health of the specified partition. | [
30522,
13366,
2131,
1035,
13571,
1035,
2740,
1006,
13571,
1035,
8909,
1010,
2824,
1035,
2740,
1035,
2110,
1035,
11307,
1024,
1014,
1010,
15059,
2015,
1035,
2740,
1035,
2110,
1035,
11307,
1024,
1014,
1010,
23329,
1035,
2740,
1035,
6747,
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_consumption/lib/2018-06-30/generated/azure_mgmt_consumption/usage_details.rb | Azure::Consumption::Mgmt::V2018_06_30.UsageDetails.list_by_billing_period_next | def list_by_billing_period_next(next_page_link, custom_headers:nil)
response = list_by_billing_period_next_async(next_page_link, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def list_by_billing_period_next(next_page_link, custom_headers:nil)
response = list_by_billing_period_next_async(next_page_link, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"list_by_billing_period_next",
"(",
"next_page_link",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"list_by_billing_period_next_async",
"(",
"next_page_link",
",",
"custom_headers",
":custom_headers",
")",
".",
"value!",
"response",
".",
"body",
"unle... | Lists the usage details for a scope by billing period. Usage details are
available via this API only for May 1, 2014 or later.
@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... | [
"Lists",
"the",
"usage",
"details",
"for",
"a",
"scope",
"by",
"billing",
"period",
".",
"Usage",
"details",
"are",
"available",
"via",
"this",
"API",
"only",
"for",
"May",
"1",
"2014",
"or",
"later",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_consumption/lib/2018-06-30/generated/azure_mgmt_consumption/usage_details.rb#L1328-L1331 | train | Gets the list of a specific language. | [
30522,
13366,
2862,
1035,
2011,
1035,
25640,
1035,
2558,
1035,
2279,
1006,
2279,
1035,
3931,
1035,
4957,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
2862,
1035,
2011,
1035,
25640,
1035,
2558,
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... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_machine_learning_services/lib/2018-03-01-preview/generated/azure_mgmt_machine_learning_services/machine_learning_compute.rb | Azure::MachineLearningServices::Mgmt::V2018_03_01_preview.MachineLearningCompute.create_or_update_async | def create_or_update_async(resource_group_name, workspace_name, compute_name, parameters, custom_headers:nil)
# Send request
promise = begin_create_or_update_async(resource_group_name, workspace_name, compute_name, parameters, custom_headers:custom_headers)
promise = promise.then do |response|
... | ruby | def create_or_update_async(resource_group_name, workspace_name, compute_name, parameters, custom_headers:nil)
# Send request
promise = begin_create_or_update_async(resource_group_name, workspace_name, compute_name, parameters, custom_headers:custom_headers)
promise = promise.then do |response|
... | [
"def",
"create_or_update_async",
"(",
"resource_group_name",
",",
"workspace_name",
",",
"compute_name",
",",
"parameters",
",",
"custom_headers",
":",
"nil",
")",
"# Send request",
"promise",
"=",
"begin_create_or_update_async",
"(",
"resource_group_name",
",",
"workspac... | @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 compute_name [String] Name of the Azure Machine Learning compute.
@param parameters [ComputeResource] Payload with Machine Learning compute
d... | [
"@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",
".",
"@p... | 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/machine_learning_compute.rb#L259-L275 | train | Creates or updates a compute. | [
30522,
13366,
3443,
1035,
2030,
1035,
10651,
1035,
2004,
6038,
2278,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2573,
15327,
1035,
2171,
1010,
24134,
1035,
2171,
1010,
11709,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
1001,
4604,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 | samples/Ruby/sinatra.rb | Sinatra.Helpers.stream | def stream(keep_open = false)
scheduler = env['async.callback'] ? EventMachine : Stream
current = @params.dup
body Stream.new(scheduler, keep_open) { |out| with_params(current) { yield(out) } }
end | ruby | def stream(keep_open = false)
scheduler = env['async.callback'] ? EventMachine : Stream
current = @params.dup
body Stream.new(scheduler, keep_open) { |out| with_params(current) { yield(out) } }
end | [
"def",
"stream",
"(",
"keep_open",
"=",
"false",
")",
"scheduler",
"=",
"env",
"[",
"'async.callback'",
"]",
"?",
"EventMachine",
":",
"Stream",
"current",
"=",
"@params",
".",
"dup",
"body",
"Stream",
".",
"new",
"(",
"scheduler",
",",
"keep_open",
")",
... | Allows to start sending data to the client even though later parts of
the response body have not yet been generated.
The close parameter specifies whether Stream#close should be called
after the block has been executed. This is only relevant for evented
servers like Thin or Rainbows. | [
"Allows",
"to",
"start",
"sending",
"data",
"to",
"the",
"client",
"even",
"though",
"later",
"parts",
"of",
"the",
"response",
"body",
"have",
"not",
"yet",
"been",
"generated",
"."
] | 9116c90fcbb82ac03b4b33c58cfbde1fcf745e99 | https://github.com/github/linguist/blob/9116c90fcbb82ac03b4b33c58cfbde1fcf745e99/samples/Ruby/sinatra.rb#L343-L347 | train | Creates a new Stream with the current params | [
30522,
13366,
5460,
1006,
2562,
1035,
2330,
1027,
6270,
1007,
6134,
2099,
1027,
4372,
2615,
1031,
1005,
2004,
6038,
2278,
1012,
2655,
5963,
1005,
1033,
1029,
2724,
22911,
14014,
1024,
5460,
2783,
1027,
1030,
11498,
5244,
1012,
4241,
2361,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
jekyll/jekyll | lib/jekyll/site.rb | Jekyll.Site.in_source_dir | def in_source_dir(*paths)
paths.reduce(source) do |base, path|
Jekyll.sanitized_path(base, path)
end
end | ruby | def in_source_dir(*paths)
paths.reduce(source) do |base, path|
Jekyll.sanitized_path(base, path)
end
end | [
"def",
"in_source_dir",
"(",
"*",
"paths",
")",
"paths",
".",
"reduce",
"(",
"source",
")",
"do",
"|",
"base",
",",
"path",
"|",
"Jekyll",
".",
"sanitized_path",
"(",
"base",
",",
"path",
")",
"end",
"end"
] | Public: Prefix a given path with the source directory.
paths - (optional) path elements to a file or directory within the
source directory
Returns a path which is prefixed with the source directory. | [
"Public",
":",
"Prefix",
"a",
"given",
"path",
"with",
"the",
"source",
"directory",
"."
] | fd74fe3e93a1fb506fa6621a2e271d7b9c5c3e3b | https://github.com/jekyll/jekyll/blob/fd74fe3e93a1fb506fa6621a2e271d7b9c5c3e3b/lib/jekyll/site.rb#L378-L382 | train | Returns the absolute path to the source directory. | [
30522,
13366,
1999,
1035,
3120,
1035,
16101,
1006,
1008,
10425,
1007,
10425,
1012,
5547,
1006,
3120,
1007,
2079,
1064,
2918,
1010,
4130,
1064,
15333,
4801,
3363,
1012,
2624,
25090,
5422,
1035,
4130,
1006,
2918,
1010,
4130,
1007,
2203,
2203,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 | activestorage/lib/active_storage/service/azure_storage_service.rb | ActiveStorage.Service::AzureStorageService.stream | def stream(key)
blob = blob_for(key)
chunk_size = 5.megabytes
offset = 0
raise ActiveStorage::FileNotFoundError unless blob.present?
while offset < blob.properties[:content_length]
_, chunk = blobs.get_blob(container, key, start_range: offset, end_range: offset + chu... | ruby | def stream(key)
blob = blob_for(key)
chunk_size = 5.megabytes
offset = 0
raise ActiveStorage::FileNotFoundError unless blob.present?
while offset < blob.properties[:content_length]
_, chunk = blobs.get_blob(container, key, start_range: offset, end_range: offset + chu... | [
"def",
"stream",
"(",
"key",
")",
"blob",
"=",
"blob_for",
"(",
"key",
")",
"chunk_size",
"=",
"5",
".",
"megabytes",
"offset",
"=",
"0",
"raise",
"ActiveStorage",
"::",
"FileNotFoundError",
"unless",
"blob",
".",
"present?",
"while",
"offset",
"<",
"blob"... | Reads the object for the given key in chunks, yielding each to the block. | [
"Reads",
"the",
"object",
"for",
"the",
"given",
"key",
"in",
"chunks",
"yielding",
"each",
"to",
"the",
"block",
"."
] | 85a8bc644be69908f05740a5886ec19cd3679df5 | https://github.com/rails/rails/blob/85a8bc644be69908f05740a5886ec19cd3679df5/activestorage/lib/active_storage/service/azure_storage_service.rb#L137-L150 | train | Get a stream of bytes from the blob. | [
30522,
13366,
5460,
1006,
3145,
1007,
1038,
4135,
2497,
1027,
1038,
4135,
2497,
1035,
2005,
1006,
3145,
1007,
20000,
1035,
2946,
1027,
1019,
1012,
13164,
3762,
4570,
16396,
1027,
1014,
5333,
3161,
23809,
4270,
1024,
1024,
5371,
17048,
14876... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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_with_http_info | def begin_update_tags_with_http_info(resource_group_name, cross_connection_name, cross_connection_parameters, custom_headers:nil)
begin_update_tags_async(resource_group_name, cross_connection_name, cross_connection_parameters, custom_headers:custom_headers).value!
end | ruby | def begin_update_tags_with_http_info(resource_group_name, cross_connection_name, cross_connection_parameters, custom_headers:nil)
begin_update_tags_async(resource_group_name, cross_connection_name, cross_connection_parameters, custom_headers:custom_headers).value!
end | [
"def",
"begin_update_tags_with_http_info",
"(",
"resource_group_name",
",",
"cross_connection_name",
",",
"cross_connection_parameters",
",",
"custom_headers",
":",
"nil",
")",
"begin_update_tags_async",
"(",
"resource_group_name",
",",
"cross_connection_name",
",",
"cross_conn... | 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#L674-L676 | train | Updates the specified cross connection tags. | [
30522,
13366,
4088,
1035,
10651,
1035,
22073,
1035,
2007,
1035,
8299,
1035,
18558,
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,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
forward3d/rbhive | lib/rbhive/t_c_l_i_connection.rb | RBHive.TCLIConnection.async_fetch | def async_fetch(handles, max_rows = 100)
# Can't get data from an unfinished query
unless async_is_complete?(handles)
raise "Can't perform fetch on a query in state: #{async_state(handles)}"
end
# Fetch and
fetch_rows(prepare_operation_handle(handles), :first, max_rows)
... | ruby | def async_fetch(handles, max_rows = 100)
# Can't get data from an unfinished query
unless async_is_complete?(handles)
raise "Can't perform fetch on a query in state: #{async_state(handles)}"
end
# Fetch and
fetch_rows(prepare_operation_handle(handles), :first, max_rows)
... | [
"def",
"async_fetch",
"(",
"handles",
",",
"max_rows",
"=",
"100",
")",
"# Can't get data from an unfinished query",
"unless",
"async_is_complete?",
"(",
"handles",
")",
"raise",
"\"Can't perform fetch on a query in state: #{async_state(handles)}\"",
"end",
"# Fetch and",
"fetc... | Async fetch results from an async execute | [
"Async",
"fetch",
"results",
"from",
"an",
"async",
"execute"
] | a630b57332f2face03501da3ecad2905c78056fa | https://github.com/forward3d/rbhive/blob/a630b57332f2face03501da3ecad2905c78056fa/lib/rbhive/t_c_l_i_connection.rb#L267-L275 | train | Fetch the data from the given operation handles asynchronously | [
30522,
13366,
2004,
6038,
2278,
1035,
18584,
1006,
16024,
1010,
4098,
1035,
10281,
1027,
2531,
1007,
1001,
2064,
1005,
1056,
2131,
2951,
2013,
2019,
14342,
23032,
4983,
2004,
6038,
2278,
1035,
2003,
1035,
3143,
1029,
1006,
16024,
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... |
Azure/azure-sdk-for-ruby | data/azure_cognitiveservices_luisauthoring/lib/2.0/generated/azure_cognitiveservices_luisauthoring/model.rb | Azure::CognitiveServices::LuisAuthoring::V2_0.Model.create_regex_entity_model | def create_regex_entity_model(app_id, version_id, regex_entity_extractor_create_obj, custom_headers:nil)
response = create_regex_entity_model_async(app_id, version_id, regex_entity_extractor_create_obj, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def create_regex_entity_model(app_id, version_id, regex_entity_extractor_create_obj, custom_headers:nil)
response = create_regex_entity_model_async(app_id, version_id, regex_entity_extractor_create_obj, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"create_regex_entity_model",
"(",
"app_id",
",",
"version_id",
",",
"regex_entity_extractor_create_obj",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"create_regex_entity_model_async",
"(",
"app_id",
",",
"version_id",
",",
"regex_entity_extractor_create_... | Adds a regular expression entity model to a version of the application.
@param app_id The application ID.
@param version_id [String] The version ID.
@param regex_entity_extractor_create_obj [RegexModelCreateObject] A model
object containing the name and regex pattern for the new regular expression
entity extracto... | [
"Adds",
"a",
"regular",
"expression",
"entity",
"model",
"to",
"a",
"version",
"of",
"the",
"application",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_cognitiveservices_luisauthoring/lib/2.0/generated/azure_cognitiveservices_luisauthoring/model.rb#L5773-L5776 | train | Creates a regex entity model for a version of the application. | [
30522,
13366,
3443,
1035,
19723,
10288,
1035,
9178,
1035,
2944,
1006,
10439,
1035,
8909,
1010,
2544,
1035,
8909,
1010,
19723,
10288,
1035,
9178,
1035,
14817,
2953,
1035,
3443,
1035,
27885,
3501,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
21... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 | profile/benchmarking/helper.rb | Mongo.Benchmarking.load_file | def load_file(file_name)
File.open(file_name, "r") do |f|
f.each_line.collect do |line|
parse_json(line)
end
end
end | ruby | def load_file(file_name)
File.open(file_name, "r") do |f|
f.each_line.collect do |line|
parse_json(line)
end
end
end | [
"def",
"load_file",
"(",
"file_name",
")",
"File",
".",
"open",
"(",
"file_name",
",",
"\"r\"",
")",
"do",
"|",
"f",
"|",
"f",
".",
"each_line",
".",
"collect",
"do",
"|",
"line",
"|",
"parse_json",
"(",
"line",
")",
"end",
"end",
"end"
] | Load a json file and represent each document as a Hash.
@example Load a file.
Benchmarking.load_file(file_name)
@param [ String ] The file name.
@return [ Array ] A list of extended-json documents.
@since 2.2.3 | [
"Load",
"a",
"json",
"file",
"and",
"represent",
"each",
"document",
"as",
"a",
"Hash",
"."
] | dca26d0870cb3386fad9ccc1d17228097c1fe1c8 | https://github.com/mongodb/mongo-ruby-driver/blob/dca26d0870cb3386fad9ccc1d17228097c1fe1c8/profile/benchmarking/helper.rb#L18-L24 | train | Load a file into the object | [
30522,
13366,
7170,
1035,
5371,
1006,
5371,
1035,
2171,
1007,
5371,
1012,
2330,
1006,
5371,
1035,
2171,
1010,
1000,
1054,
1000,
1007,
2079,
1064,
1042,
1064,
1042,
1012,
2169,
1035,
2240,
1012,
8145,
2079,
1064,
2240,
1064,
11968,
3366,
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... |
square/connect-ruby-sdk | lib/square_connect/models/break_type.rb | SquareConnect.BreakType.location_id= | def location_id=(location_id)
if location_id.nil?
fail ArgumentError, "location_id cannot be nil"
end
if location_id.to_s.length < 1
fail ArgumentError, "invalid value for 'location_id', the character length must be great than or equal to 1."
end
@location_id = location_i... | ruby | def location_id=(location_id)
if location_id.nil?
fail ArgumentError, "location_id cannot be nil"
end
if location_id.to_s.length < 1
fail ArgumentError, "invalid value for 'location_id', the character length must be great than or equal to 1."
end
@location_id = location_i... | [
"def",
"location_id",
"=",
"(",
"location_id",
")",
"if",
"location_id",
".",
"nil?",
"fail",
"ArgumentError",
",",
"\"location_id cannot be nil\"",
"end",
"if",
"location_id",
".",
"to_s",
".",
"length",
"<",
"1",
"fail",
"ArgumentError",
",",
"\"invalid value fo... | Custom attribute writer method with validation
@param [Object] location_id Value to be assigned | [
"Custom",
"attribute",
"writer",
"method",
"with",
"validation"
] | 798eb9ded716f23b9f1518386f1c311a34bca8bf | https://github.com/square/connect-ruby-sdk/blob/798eb9ded716f23b9f1518386f1c311a34bca8bf/lib/square_connect/models/break_type.rb#L176-L186 | train | Sets the location_id of the object. | [
30522,
13366,
3295,
1035,
8909,
1027,
1006,
3295,
1035,
8909,
1007,
2065,
3295,
1035,
8909,
1012,
9152,
2140,
1029,
8246,
6685,
2121,
29165,
1010,
1000,
3295,
1035,
8909,
3685,
2022,
9152,
2140,
1000,
2203,
2065,
3295,
1035,
8909,
1012,
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... |
jhund/filterrific | lib/filterrific/action_controller_extension.rb | Filterrific.ActionControllerExtension.compute_filterrific_params | def compute_filterrific_params(model_class, filterrific_params, opts, persistence_id)
opts = { "sanitize_params" => true }.merge(opts.stringify_keys)
r = (
filterrific_params.presence || # start with passed in params
(persistence_id && session[persistence_id].presence) || # then try session ... | ruby | def compute_filterrific_params(model_class, filterrific_params, opts, persistence_id)
opts = { "sanitize_params" => true }.merge(opts.stringify_keys)
r = (
filterrific_params.presence || # start with passed in params
(persistence_id && session[persistence_id].presence) || # then try session ... | [
"def",
"compute_filterrific_params",
"(",
"model_class",
",",
"filterrific_params",
",",
"opts",
",",
"persistence_id",
")",
"opts",
"=",
"{",
"\"sanitize_params\"",
"=>",
"true",
"}",
".",
"merge",
"(",
"opts",
".",
"stringify_keys",
")",
"r",
"=",
"(",
"filt... | Computes filterrific params using a number of strategies. Limits params
to 'available_filters' if given via opts.
@param model_class [ActiveRecord::Base]
@param filterrific_params [ActionController::Params, Hash]
@param opts [Hash]
@option opts [Boolean, optional] "sanitize_params"
if true, sanitizes all filter... | [
"Computes",
"filterrific",
"params",
"using",
"a",
"number",
"of",
"strategies",
".",
"Limits",
"params",
"to",
"available_filters",
"if",
"given",
"via",
"opts",
"."
] | 811edc57d3e2a3e538c1f0e9554e0909be052881 | https://github.com/jhund/filterrific/blob/811edc57d3e2a3e538c1f0e9554e0909be052881/lib/filterrific/action_controller_extension.rb#L70-L84 | train | Compute the filter params for a model class | [
30522,
13366,
24134,
1035,
11307,
3089,
8873,
2278,
30524,
11498,
5244,
1000,
1027,
1028,
2995,
1065,
1012,
13590,
1006,
23569,
2015,
1012,
5164,
8757,
1035,
6309,
1007,
1054,
1027,
1006,
11307,
3089,
8873,
2278,
1035,
11498,
5244,
1012,
37... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
phusion/passenger | src/ruby_supportlib/phusion_passenger/request_handler.rb | PhusionPassenger.RequestHandler.cleanup | def cleanup
if @main_loop_thread
@main_loop_thread_lock.synchronize do
@graceful_termination_pipe[1].close rescue nil
end
@main_loop_thread.join
end
@server_sockets.each_value do |info|
socket = info[:socket]
type = get_socket_address_type(info[:addres... | ruby | def cleanup
if @main_loop_thread
@main_loop_thread_lock.synchronize do
@graceful_termination_pipe[1].close rescue nil
end
@main_loop_thread.join
end
@server_sockets.each_value do |info|
socket = info[:socket]
type = get_socket_address_type(info[:addres... | [
"def",
"cleanup",
"if",
"@main_loop_thread",
"@main_loop_thread_lock",
".",
"synchronize",
"do",
"@graceful_termination_pipe",
"[",
"1",
"]",
".",
"close",
"rescue",
"nil",
"end",
"@main_loop_thread",
".",
"join",
"end",
"@server_sockets",
".",
"each_value",
"do",
"... | Create a new RequestHandler with the given owner pipe.
+owner_pipe+ must be the readable part of a pipe IO object.
Additionally, the following options may be given:
- connect_password
Clean up temporary stuff created by the request handler.
If the main loop was started by #main_loop, then this method may only
b... | [
"Create",
"a",
"new",
"RequestHandler",
"with",
"the",
"given",
"owner",
"pipe",
".",
"+",
"owner_pipe",
"+",
"must",
"be",
"the",
"readable",
"part",
"of",
"a",
"pipe",
"IO",
"object",
"."
] | 970964b53e0ba86959acdf40f06c99b0c4a128ca | https://github.com/phusion/passenger/blob/970964b53e0ba86959acdf40f06c99b0c4a128ca/src/ruby_supportlib/phusion_passenger/request_handler.rb#L140-L166 | train | Cleanup the connection to the server. | [
30522,
13366,
27686,
2065,
1030,
2364,
1035,
7077,
1035,
11689,
1030,
2364,
1035,
7077,
1035,
11689,
1035,
5843,
1012,
26351,
8093,
10698,
4371,
2079,
1030,
19415,
1035,
18287,
1035,
8667,
1031,
1015,
1033,
1012,
2485,
5343,
9152,
2140,
220... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
jhund/filterrific | lib/filterrific/param_set.rb | Filterrific.ParamSet.condition_filterrific_params | def condition_filterrific_params(fp)
fp.each do |key, val|
case
when val.is_a?(Proc)
# evaluate Procs
fp[key] = val.call
when val.is_a?(Array)
# type cast integers in the array
fp[key] = fp[key].map { |e| e =~ integer_detector_regex ? e.to_i : e }
... | ruby | def condition_filterrific_params(fp)
fp.each do |key, val|
case
when val.is_a?(Proc)
# evaluate Procs
fp[key] = val.call
when val.is_a?(Array)
# type cast integers in the array
fp[key] = fp[key].map { |e| e =~ integer_detector_regex ? e.to_i : e }
... | [
"def",
"condition_filterrific_params",
"(",
"fp",
")",
"fp",
".",
"each",
"do",
"|",
"key",
",",
"val",
"|",
"case",
"when",
"val",
".",
"is_a?",
"(",
"Proc",
")",
"# evaluate Procs",
"fp",
"[",
"key",
"]",
"=",
"val",
".",
"call",
"when",
"val",
"."... | Conditions params: Evaluates Procs and type casts integer values.
@param fp [Hash] the filterrific params hash
@return[Hash] the conditioned params hash | [
"Conditions",
"params",
":",
"Evaluates",
"Procs",
"and",
"type",
"casts",
"integer",
"values",
"."
] | 811edc57d3e2a3e538c1f0e9554e0909be052881 | https://github.com/jhund/filterrific/blob/811edc57d3e2a3e538c1f0e9554e0909be052881/lib/filterrific/param_set.rb#L91-L110 | train | This method is used to evaluate the params in the filter | [
30522,
13366,
4650,
1035,
11307,
3089,
8873,
2278,
1035,
11498,
5244,
1006,
1042,
2361,
1007,
1042,
2361,
1012,
2169,
2079,
1064,
3145,
1010,
11748,
1064,
2553,
2043,
11748,
1012,
2003,
1035,
1037,
1029,
1006,
4013,
2278,
1007,
1001,
16157,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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/workflows.rb | Azure::Logic::Mgmt::V2016_06_01.Workflows.move_with_http_info | def move_with_http_info(resource_group_name, workflow_name, move, custom_headers:nil)
move_async(resource_group_name, workflow_name, move, custom_headers:custom_headers).value!
end | ruby | def move_with_http_info(resource_group_name, workflow_name, move, custom_headers:nil)
move_async(resource_group_name, workflow_name, move, custom_headers:custom_headers).value!
end | [
"def",
"move_with_http_info",
"(",
"resource_group_name",
",",
"workflow_name",
",",
"move",
",",
"custom_headers",
":",
"nil",
")",
"move_async",
"(",
"resource_group_name",
",",
"workflow_name",
",",
"move",
",",
"custom_headers",
":custom_headers",
")",
".",
"val... | Moves an existing workflow.
@param resource_group_name [String] The resource group name.
@param workflow_name [String] The workflow name.
@param move [Workflow] The workflow to move.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request.
@return [MsRestAz... | [
"Moves",
"an",
"existing",
"workflow",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_logic/lib/2016-06-01/generated/azure_mgmt_logic/workflows.rb#L1075-L1077 | train | Moves a workflow to an existing container. | [
30522,
13366,
2693,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2147,
12314,
1035,
2171,
1010,
2693,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
2693,
1035,
2004,
6038,
2278,
1006,
7692,
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... |
puppetlabs/puppet | lib/puppet/functions.rb | Puppet::Functions.DispatcherBuilder.return_type | def return_type(type)
unless type.is_a?(String) || type.is_a?(Puppet::Pops::Types::PAnyType)
raise ArgumentError, _("Argument to 'return_type' must be a String reference to a Puppet Data Type. Got %{type_class}") % { type_class: type.class }
end
@return_type = type
end | ruby | def return_type(type)
unless type.is_a?(String) || type.is_a?(Puppet::Pops::Types::PAnyType)
raise ArgumentError, _("Argument to 'return_type' must be a String reference to a Puppet Data Type. Got %{type_class}") % { type_class: type.class }
end
@return_type = type
end | [
"def",
"return_type",
"(",
"type",
")",
"unless",
"type",
".",
"is_a?",
"(",
"String",
")",
"||",
"type",
".",
"is_a?",
"(",
"Puppet",
"::",
"Pops",
"::",
"Types",
"::",
"PAnyType",
")",
"raise",
"ArgumentError",
",",
"_",
"(",
"\"Argument to 'return_type'... | Defines the return type. Defaults to 'Any'
@param [String] type a reference to a Puppet Data Type
@api public | [
"Defines",
"the",
"return",
"type",
".",
"Defaults",
"to",
"Any",
"@param",
"[",
"String",
"]",
"type",
"a",
"reference",
"to",
"a",
"Puppet",
"Data",
"Type"
] | 4baeed97cbb7571ddc6635f0a24debe2e8b22cd3 | https://github.com/puppetlabs/puppet/blob/4baeed97cbb7571ddc6635f0a24debe2e8b22cd3/lib/puppet/functions.rb#L520-L525 | train | Sets the return type for this object. | [
30522,
13366,
2709,
1035,
2828,
1006,
2828,
1007,
4983,
2828,
1012,
2003,
1035,
1037,
1029,
1006,
5164,
1007,
1064,
1064,
2828,
1012,
2003,
30524,
1024,
1024,
6090,
22123,
18863,
1007,
5333,
6685,
2121,
29165,
1010,
1035,
1006,
1000,
6685,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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/dbref.rb | Mongo.DBRef.as_json | def as_json(*args)
document = { COLLECTION => collection, ID => id }
document.merge!(DATABASE => database) if database
document
end | ruby | def as_json(*args)
document = { COLLECTION => collection, ID => id }
document.merge!(DATABASE => database) if database
document
end | [
"def",
"as_json",
"(",
"*",
"args",
")",
"document",
"=",
"{",
"COLLECTION",
"=>",
"collection",
",",
"ID",
"=>",
"id",
"}",
"document",
".",
"merge!",
"(",
"DATABASE",
"=>",
"database",
")",
"if",
"database",
"document",
"end"
] | Get the DBRef as a JSON document
@example Get the DBRef as a JSON hash.
dbref.as_json
@return [ Hash ] The max key as a JSON hash.
@since 2.1.0 | [
"Get",
"the",
"DBRef",
"as",
"a",
"JSON",
"document"
] | dca26d0870cb3386fad9ccc1d17228097c1fe1c8 | https://github.com/mongodb/mongo-ruby-driver/blob/dca26d0870cb3386fad9ccc1d17228097c1fe1c8/lib/mongo/dbref.rb#L55-L59 | train | Returns the document as JSON | [
30522,
13366,
2004,
1035,
1046,
3385,
1006,
1008,
12098,
5620,
1007,
6254,
1027,
1063,
3074,
1027,
1028,
3074,
1010,
8909,
1027,
1028,
8909,
1065,
6254,
1012,
13590,
999,
1006,
7809,
1027,
1028,
7809,
1007,
2065,
7809,
6254,
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... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_node_health | def get_node_health(node_name, events_health_state_filter:0, timeout:60, custom_headers:nil)
response = get_node_health_async(node_name, events_health_state_filter:events_health_state_filter, timeout:timeout, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def get_node_health(node_name, events_health_state_filter:0, timeout:60, custom_headers:nil)
response = get_node_health_async(node_name, events_health_state_filter:events_health_state_filter, timeout:timeout, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"get_node_health",
"(",
"node_name",
",",
"events_health_state_filter",
":",
"0",
",",
"timeout",
":",
"60",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"get_node_health_async",
"(",
"node_name",
",",
"events_health_state_filter",
":events_health_s... | Gets the health of a Service Fabric node.
Gets the health of a Service Fabric node. Use EventsHealthStateFilter to
filter the collection of health events reported on the node based on the
health state. If the node that you specify by name does not exist in the
health store, this returns an error.
@param node_nam... | [
"Gets",
"the",
"health",
"of",
"a",
"Service",
"Fabric",
"node",
"."
] | 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#L3498-L3501 | train | Gets the node health of a Service Fabric node. | [
30522,
13366,
2131,
1035,
13045,
1035,
2740,
1006,
13045,
1035,
2171,
1010,
2824,
1035,
2740,
1035,
2110,
1035,
11307,
1024,
1014,
1010,
2051,
5833,
1024,
3438,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
2131,
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... |
zendesk/ruby-kafka | lib/kafka/consumer.rb | Kafka.Consumer.resume | def resume(topic, partition)
pause_for(topic, partition).resume!
# During re-balancing we might have lost the paused partition. Check if partition is still in group before seek.
seek_to_next(topic, partition) if @group.assigned_to?(topic, partition)
end | ruby | def resume(topic, partition)
pause_for(topic, partition).resume!
# During re-balancing we might have lost the paused partition. Check if partition is still in group before seek.
seek_to_next(topic, partition) if @group.assigned_to?(topic, partition)
end | [
"def",
"resume",
"(",
"topic",
",",
"partition",
")",
"pause_for",
"(",
"topic",
",",
"partition",
")",
".",
"resume!",
"# During re-balancing we might have lost the paused partition. Check if partition is still in group before seek.",
"seek_to_next",
"(",
"topic",
",",
"part... | Resume processing of a topic partition.
@see #pause
@param topic [String]
@param partition [Integer]
@return [nil] | [
"Resume",
"processing",
"of",
"a",
"topic",
"partition",
"."
] | 2a73471b6a607a52dc85c79301ba522acb4566b5 | https://github.com/zendesk/ruby-kafka/blob/2a73471b6a607a52dc85c79301ba522acb4566b5/lib/kafka/consumer.rb#L159-L164 | train | Resume a partition | [
30522,
13366,
13746,
1006,
8476,
1010,
13571,
1007,
8724,
1035,
2005,
1006,
8476,
1010,
13571,
1007,
1012,
13746,
999,
1001,
2076,
2128,
1011,
20120,
2057,
2453,
2031,
2439,
1996,
5864,
13571,
1012,
4638,
2065,
13571,
2003,
2145,
1999,
2177... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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/catalog_tax.rb | SquareConnect.CatalogTax.calculation_phase= | def calculation_phase=(calculation_phase)
validator = EnumAttributeValidator.new('String', ["TAX_SUBTOTAL_PHASE", "TAX_TOTAL_PHASE"])
unless validator.valid?(calculation_phase)
fail ArgumentError, "invalid value for 'calculation_phase', must be one of #{validator.allowable_values}."
end
... | ruby | def calculation_phase=(calculation_phase)
validator = EnumAttributeValidator.new('String', ["TAX_SUBTOTAL_PHASE", "TAX_TOTAL_PHASE"])
unless validator.valid?(calculation_phase)
fail ArgumentError, "invalid value for 'calculation_phase', must be one of #{validator.allowable_values}."
end
... | [
"def",
"calculation_phase",
"=",
"(",
"calculation_phase",
")",
"validator",
"=",
"EnumAttributeValidator",
".",
"new",
"(",
"'String'",
",",
"[",
"\"TAX_SUBTOTAL_PHASE\"",
",",
"\"TAX_TOTAL_PHASE\"",
"]",
")",
"unless",
"validator",
".",
"valid?",
"(",
"calculation... | Custom attribute writer method checking allowed values (enum).
@param [Object] calculation_phase 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/catalog_tax.rb#L132-L138 | train | Sets the calculation phase of the current page. | [
30522,
13366,
17208,
1035,
4403,
1027,
1006,
17208,
1035,
4403,
1007,
9398,
8844,
1027,
4372,
12248,
4779,
3089,
8569,
2618,
10175,
8524,
4263,
1012,
2047,
1006,
30524,
4171,
1035,
2561,
1035,
4403,
1000,
1033,
1007,
4983,
9398,
8844,
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_cdn/lib/2016-10-02/generated/azure_mgmt_cdn/profiles.rb | Azure::CDN::Mgmt::V2016_10_02.Profiles.delete | def delete(resource_group_name, profile_name, custom_headers:nil)
response = delete_async(resource_group_name, profile_name, custom_headers:custom_headers).value!
nil
end | ruby | def delete(resource_group_name, profile_name, custom_headers:nil)
response = delete_async(resource_group_name, profile_name, custom_headers:custom_headers).value!
nil
end | [
"def",
"delete",
"(",
"resource_group_name",
",",
"profile_name",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"delete_async",
"(",
"resource_group_name",
",",
"profile_name",
",",
"custom_headers",
":custom_headers",
")",
".",
"value!",
"nil",
"end"
] | Deletes an existing CDN profile with the specified parameters. Deleting a
profile will result in the deletion of all of the sub-resources including
endpoints, origins and custom domains.
@param resource_group_name [String] Name of the Resource group within the
Azure subscription.
@param profile_name [String] Name... | [
"Deletes",
"an",
"existing",
"CDN",
"profile",
"with",
"the",
"specified",
"parameters",
".",
"Deleting",
"a",
"profile",
"will",
"result",
"in",
"the",
"deletion",
"of",
"all",
"of",
"the",
"sub",
"-",
"resources",
"including",
"endpoints",
"origins",
"and",
... | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_cdn/lib/2016-10-02/generated/azure_mgmt_cdn/profiles.rb#L420-L423 | train | Deletes the specified elastic network profile. | [
30522,
13366,
3972,
12870,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
6337,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
3972,
12870,
1035,
2004,
6038,
2278,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
6337,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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/package.rb | Axlsx.Package.serialize | def serialize(output, confirm_valid=false)
return false unless !confirm_valid || self.validate.empty?
Relationship.clear_cached_instances
Zip::OutputStream.open(output) do |zip|
write_parts(zip)
end
true
end | ruby | def serialize(output, confirm_valid=false)
return false unless !confirm_valid || self.validate.empty?
Relationship.clear_cached_instances
Zip::OutputStream.open(output) do |zip|
write_parts(zip)
end
true
end | [
"def",
"serialize",
"(",
"output",
",",
"confirm_valid",
"=",
"false",
")",
"return",
"false",
"unless",
"!",
"confirm_valid",
"||",
"self",
".",
"validate",
".",
"empty?",
"Relationship",
".",
"clear_cached_instances",
"Zip",
"::",
"OutputStream",
".",
"open",
... | Serialize your workbook to disk as an xlsx document.
@param [String] output The name of the file you want to serialize your package to
@param [Boolean] confirm_valid Validate the package prior to serialization.
@return [Boolean] False if confirm_valid and validation errors exist. True if the package was serialized
... | [
"Serialize",
"your",
"workbook",
"to",
"disk",
"as",
"an",
"xlsx",
"document",
"."
] | c593a08b2a929dac7aa8dc418b55e26b4c49dc34 | https://github.com/randym/axlsx/blob/c593a08b2a929dac7aa8dc418b55e26b4c49dc34/lib/axlsx/package.rb#L101-L108 | train | Serialize the object to a zip file | [
30522,
13366,
7642,
4697,
1006,
6434,
1010,
12210,
1035,
9398,
1027,
6270,
1007,
2709,
6270,
4983,
999,
12210,
1035,
9398,
1064,
1064,
2969,
1012,
9398,
3686,
1012,
4064,
1029,
3276,
1012,
3154,
1035,
17053,
2094,
1035,
12107,
14101,
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... |
heroku/legacy-cli | lib/heroku/command/plugins.rb | Heroku::Command.Plugins.index | def index
validate_arguments!
plugins = ::Heroku::Plugin.list
if plugins.length > 0
styled_header("Installed Plugins")
styled_array(plugins)
end
::Heroku::JSPlugin.list
end | ruby | def index
validate_arguments!
plugins = ::Heroku::Plugin.list
if plugins.length > 0
styled_header("Installed Plugins")
styled_array(plugins)
end
::Heroku::JSPlugin.list
end | [
"def",
"index",
"validate_arguments!",
"plugins",
"=",
"::",
"Heroku",
"::",
"Plugin",
".",
"list",
"if",
"plugins",
".",
"length",
">",
"0",
"styled_header",
"(",
"\"Installed Plugins\"",
")",
"styled_array",
"(",
"plugins",
")",
"end",
"::",
"Heroku",
"::",
... | plugins
list installed plugins
Example:
$ heroku plugins
=== Installed Plugins
heroku-production-check@0.2.0 | [
"plugins"
] | 6f18521a258394bfb79e6b36f7160ad8559a8e16 | https://github.com/heroku/legacy-cli/blob/6f18521a258394bfb79e6b36f7160ad8559a8e16/lib/heroku/command/plugins.rb#L20-L30 | train | Returns the number of available plugins. | [
30522,
13366,
5950,
9398,
3686,
1035,
9918,
999,
13354,
7076,
1027,
1024,
1024,
5394,
5283,
1024,
1024,
13354,
2378,
1012,
2862,
2065,
13354,
7076,
1012,
3091,
1028,
1014,
13650,
1035,
20346,
1006,
1000,
5361,
13354,
7076,
1000,
1007,
13650... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
jekyll/jekyll | lib/jekyll/static_file.rb | Jekyll.StaticFile.destination | def destination(dest)
dest = @site.in_dest_dir(dest)
@site.in_dest_dir(dest, Jekyll::URL.unescape_path(url))
end | ruby | def destination(dest)
dest = @site.in_dest_dir(dest)
@site.in_dest_dir(dest, Jekyll::URL.unescape_path(url))
end | [
"def",
"destination",
"(",
"dest",
")",
"dest",
"=",
"@site",
".",
"in_dest_dir",
"(",
"dest",
")",
"@site",
".",
"in_dest_dir",
"(",
"dest",
",",
"Jekyll",
"::",
"URL",
".",
"unescape_path",
"(",
"url",
")",
")",
"end"
] | Obtain destination path.
dest - The String path to the destination dir.
Returns destination file path. | [
"Obtain",
"destination",
"path",
"."
] | fd74fe3e93a1fb506fa6621a2e271d7b9c5c3e3b | https://github.com/jekyll/jekyll/blob/fd74fe3e93a1fb506fa6621a2e271d7b9c5c3e3b/lib/jekyll/static_file.rb#L56-L59 | train | Returns the destination directory for this site. | [
30522,
13366,
7688,
1006,
4078,
2102,
1007,
4078,
2102,
1027,
1030,
2609,
1012,
1999,
1035,
4078,
2102,
1035,
16101,
1006,
4078,
2102,
1007,
1030,
2609,
1012,
1999,
1035,
4078,
2102,
1035,
16101,
1006,
4078,
2102,
1010,
15333,
4801,
3363,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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/express_route_cross_connection_peerings.rb | Azure::Network::Mgmt::V2018_07_01.ExpressRouteCrossConnectionPeerings.begin_delete | def begin_delete(resource_group_name, cross_connection_name, peering_name, custom_headers:nil)
response = begin_delete_async(resource_group_name, cross_connection_name, peering_name, custom_headers:custom_headers).value!
nil
end | ruby | def begin_delete(resource_group_name, cross_connection_name, peering_name, custom_headers:nil)
response = begin_delete_async(resource_group_name, cross_connection_name, peering_name, custom_headers:custom_headers).value!
nil
end | [
"def",
"begin_delete",
"(",
"resource_group_name",
",",
"cross_connection_name",
",",
"peering_name",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"begin_delete_async",
"(",
"resource_group_name",
",",
"cross_connection_name",
",",
"peering_name",
",",
"cust... | Deletes the specified peering from the ExpressRouteCrossConnection.
@param resource_group_name [String] The name of the resource group.
@param cross_connection_name [String] The name of the
ExpressRouteCrossConnection.
@param peering_name [String] The name of the peering.
@param custom_headers [Hash{String => Str... | [
"Deletes",
"the",
"specified",
"peering",
"from",
"the",
"ExpressRouteCrossConnection",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_network/lib/2018-07-01/generated/azure_mgmt_network/express_route_cross_connection_peerings.rb#L323-L326 | train | Deletes a peering from the specified ExpressRouteCrossConnection. | [
30522,
13366,
4088,
1035,
3972,
12870,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2892,
1035,
4434,
1035,
2171,
1010,
16740,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
4088,
1035,
3972,
12870,
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 | management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/long_term_retention_backups.rb | Azure::SQL::Mgmt::V2017_03_01_preview.LongTermRetentionBackups.list_by_database | def list_by_database(location_name, long_term_retention_server_name, long_term_retention_database_name, only_latest_per_database:nil, database_state:nil, custom_headers:nil)
first_page = list_by_database_as_lazy(location_name, long_term_retention_server_name, long_term_retention_database_name, only_latest_per_dat... | ruby | def list_by_database(location_name, long_term_retention_server_name, long_term_retention_database_name, only_latest_per_database:nil, database_state:nil, custom_headers:nil)
first_page = list_by_database_as_lazy(location_name, long_term_retention_server_name, long_term_retention_database_name, only_latest_per_dat... | [
"def",
"list_by_database",
"(",
"location_name",
",",
"long_term_retention_server_name",
",",
"long_term_retention_database_name",
",",
"only_latest_per_database",
":",
"nil",
",",
"database_state",
":",
"nil",
",",
"custom_headers",
":",
"nil",
")",
"first_page",
"=",
... | Lists all long term retention backups for a database.
@param location_name [String] The location of the database
@param long_term_retention_server_name [String] The name of the server
@param long_term_retention_database_name [String] The name of the database
@param only_latest_per_database [Boolean] Whether or not... | [
"Lists",
"all",
"long",
"term",
"retention",
"backups",
"for",
"a",
"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/long_term_retention_backups.rb#L185-L188 | train | Gets all the long term retention policies for a database. | [
30522,
13366,
2862,
1035,
2011,
1035,
7809,
1006,
3295,
1035,
2171,
1010,
2146,
1035,
2744,
1035,
20125,
1035,
8241,
1035,
2171,
1010,
2146,
1035,
2744,
1035,
20125,
1035,
7809,
1035,
2171,
1010,
2069,
1035,
6745,
1035,
2566,
1035,
7809,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
getsentry/raven-ruby | lib/raven/instance.rb | Raven.Instance.annotate_exception | def annotate_exception(exc, options = {})
notes = (exc.instance_variable_defined?(:@__raven_context) && exc.instance_variable_get(:@__raven_context)) || {}
Raven::Utils::DeepMergeHash.deep_merge!(notes, options)
exc.instance_variable_set(:@__raven_context, notes)
exc
end | ruby | def annotate_exception(exc, options = {})
notes = (exc.instance_variable_defined?(:@__raven_context) && exc.instance_variable_get(:@__raven_context)) || {}
Raven::Utils::DeepMergeHash.deep_merge!(notes, options)
exc.instance_variable_set(:@__raven_context, notes)
exc
end | [
"def",
"annotate_exception",
"(",
"exc",
",",
"options",
"=",
"{",
"}",
")",
"notes",
"=",
"(",
"exc",
".",
"instance_variable_defined?",
"(",
":@__raven_context",
")",
"&&",
"exc",
".",
"instance_variable_get",
"(",
":@__raven_context",
")",
")",
"||",
"{",
... | Provides extra context to the exception prior to it being handled by
Raven. An exception can have multiple annotations, which are merged
together.
The options (annotation) is treated the same as the ``options``
parameter to ``capture_exception`` or ``Event.from_exception``, and
can contain the same ``:user``, ``:... | [
"Provides",
"extra",
"context",
"to",
"the",
"exception",
"prior",
"to",
"it",
"being",
"handled",
"by",
"Raven",
".",
"An",
"exception",
"can",
"have",
"multiple",
"annotations",
"which",
"are",
"merged",
"together",
"."
] | 729c22f9284939695f14822683bff1a0b72502bd | https://github.com/getsentry/raven-ruby/blob/729c22f9284939695f14822683bff1a0b72502bd/lib/raven/instance.rb#L159-L164 | train | annotate an exception with the given options | [
30522,
13366,
5754,
17287,
2618,
1035,
6453,
1006,
4654,
2278,
1010,
7047,
1027,
1063,
1065,
1007,
3964,
1027,
1006,
4654,
2278,
1012,
6013,
1035,
8023,
1035,
4225,
1029,
1006,
1024,
1030,
1035,
1035,
10000,
1035,
6123,
1007,
1004,
1004,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Shopify/liquid | lib/liquid/standardfilters.rb | Liquid.StandardFilters.truncate | def truncate(input, length = 50, truncate_string = "...".freeze)
return if input.nil?
input_str = input.to_s
length = Utils.to_integer(length)
truncate_string_str = truncate_string.to_s
l = length - truncate_string_str.length
l = 0 if l < 0
input_str.length > length ? input_str... | ruby | def truncate(input, length = 50, truncate_string = "...".freeze)
return if input.nil?
input_str = input.to_s
length = Utils.to_integer(length)
truncate_string_str = truncate_string.to_s
l = length - truncate_string_str.length
l = 0 if l < 0
input_str.length > length ? input_str... | [
"def",
"truncate",
"(",
"input",
",",
"length",
"=",
"50",
",",
"truncate_string",
"=",
"\"...\"",
".",
"freeze",
")",
"return",
"if",
"input",
".",
"nil?",
"input_str",
"=",
"input",
".",
"to_s",
"length",
"=",
"Utils",
".",
"to_integer",
"(",
"length",... | Truncate a string down to x characters | [
"Truncate",
"a",
"string",
"down",
"to",
"x",
"characters"
] | b3b63a683f6daaea7e70f1602ee829abdf970ef3 | https://github.com/Shopify/liquid/blob/b3b63a683f6daaea7e70f1602ee829abdf970ef3/lib/liquid/standardfilters.rb#L75-L83 | train | Truncate the string to a specified length. | [
30522,
13366,
19817,
4609,
16280,
1006,
7953,
1010,
3091,
1027,
2753,
1010,
19817,
4609,
16280,
1035,
5164,
1027,
1000,
1012,
1012,
1012,
1000,
1012,
13184,
1007,
2709,
2065,
7953,
1012,
9152,
2140,
1029,
7953,
1035,
2358,
2099,
1027,
7953,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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.get_security_settings_with_http_info | def get_security_settings_with_http_info(device_name, resource_group_name, manager_name, custom_headers:nil)
get_security_settings_async(device_name, resource_group_name, manager_name, custom_headers:custom_headers).value!
end | ruby | def get_security_settings_with_http_info(device_name, resource_group_name, manager_name, custom_headers:nil)
get_security_settings_async(device_name, resource_group_name, manager_name, custom_headers:custom_headers).value!
end | [
"def",
"get_security_settings_with_http_info",
"(",
"device_name",
",",
"resource_group_name",
",",
"manager_name",
",",
"custom_headers",
":",
"nil",
")",
"get_security_settings_async",
"(",
"device_name",
",",
"resource_group_name",
",",
"manager_name",
",",
"custom_heade... | Returns the Security properties of the specified device name.
@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... | [
"Returns",
"the",
"Security",
"properties",
"of",
"the",
"specified",
"device",
"name",
"."
] | 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#L339-L341 | train | Gets security settings for the specified device. | [
30522,
13366,
2131,
1035,
3036,
1035,
10906,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
5080,
1035,
2171,
1010,
7692,
1035,
2177,
1035,
2171,
1010,
3208,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
2131,
1035,
3036,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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_customer_insights/lib/2017-01-01/generated/azure_mgmt_customer_insights/interactions.rb | Azure::CustomerInsights::Mgmt::V2017_01_01.Interactions.suggest_relationship_links | def suggest_relationship_links(resource_group_name, hub_name, interaction_name, custom_headers:nil)
response = suggest_relationship_links_async(resource_group_name, hub_name, interaction_name, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def suggest_relationship_links(resource_group_name, hub_name, interaction_name, custom_headers:nil)
response = suggest_relationship_links_async(resource_group_name, hub_name, interaction_name, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"suggest_relationship_links",
"(",
"resource_group_name",
",",
"hub_name",
",",
"interaction_name",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"suggest_relationship_links_async",
"(",
"resource_group_name",
",",
"hub_name",
",",
"interaction_name",
",... | Suggests relationships to create relationship links.
@param resource_group_name [String] The name of the resource group.
@param hub_name [String] The name of the hub.
@param interaction_name [String] The name of the interaction.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be ... | [
"Suggests",
"relationships",
"to",
"create",
"relationship",
"links",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_customer_insights/lib/2017-01-01/generated/azure_mgmt_customer_insights/interactions.rb#L286-L289 | train | Suggest relationship links for a hub. | [
30522,
13366,
6592,
1035,
3276,
1035,
6971,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
9594,
1035,
2171,
1010,
8290,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
6592,
1035,
3276,
1035,
6971,
1035,
2004,
6... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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/ddos_custom_policies.rb | Azure::Network::Mgmt::V2019_02_01.DdosCustomPolicies.begin_create_or_update_with_http_info | def begin_create_or_update_with_http_info(resource_group_name, ddos_custom_policy_name, parameters, custom_headers:nil)
begin_create_or_update_async(resource_group_name, ddos_custom_policy_name, parameters, custom_headers:custom_headers).value!
end | ruby | def begin_create_or_update_with_http_info(resource_group_name, ddos_custom_policy_name, parameters, custom_headers:nil)
begin_create_or_update_async(resource_group_name, ddos_custom_policy_name, parameters, custom_headers:custom_headers).value!
end | [
"def",
"begin_create_or_update_with_http_info",
"(",
"resource_group_name",
",",
"ddos_custom_policy_name",
",",
"parameters",
",",
"custom_headers",
":",
"nil",
")",
"begin_create_or_update_async",
"(",
"resource_group_name",
",",
"ddos_custom_policy_name",
",",
"parameters",
... | Creates or updates a DDoS custom policy.
@param resource_group_name [String] The name of the resource group.
@param ddos_custom_policy_name [String] The name of the DDoS custom policy.
@param parameters [DdosCustomPolicy] Parameters supplied to the create or
update operation.
@param custom_headers [Hash{String =>... | [
"Creates",
"or",
"updates",
"a",
"DDoS",
"custom",
"policy",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_network/lib/2019-02-01/generated/azure_mgmt_network/ddos_custom_policies.rb#L356-L358 | train | Creates or updates a DDoS custom policy. | [
30522,
13366,
4088,
1035,
3443,
1035,
2030,
1035,
10651,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
20315,
2891,
1035,
7661,
1035,
3343,
1035,
2171,
1010,
11709,
1010,
7661,
1035,
20346,
2015,
1024,
9152,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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_luisauthoring/lib/2.0/generated/azure_cognitiveservices_luisauthoring/model.rb | Azure::CognitiveServices::LuisAuthoring::V2_0.Model.get_composite_entity | def get_composite_entity(app_id, version_id, c_entity_id, custom_headers:nil)
response = get_composite_entity_async(app_id, version_id, c_entity_id, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def get_composite_entity(app_id, version_id, c_entity_id, custom_headers:nil)
response = get_composite_entity_async(app_id, version_id, c_entity_id, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"get_composite_entity",
"(",
"app_id",
",",
"version_id",
",",
"c_entity_id",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"get_composite_entity_async",
"(",
"app_id",
",",
"version_id",
",",
"c_entity_id",
",",
"custom_headers",
":custom_headers",
... | Gets information about a composite entity in a version of the application.
@param app_id The application ID.
@param version_id [String] The version ID.
@param c_entity_id The composite entity extractor ID.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP reque... | [
"Gets",
"information",
"about",
"a",
"composite",
"entity",
"in",
"a",
"version",
"of",
"the",
"application",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_cognitiveservices_luisauthoring/lib/2.0/generated/azure_cognitiveservices_luisauthoring/model.rb#L2733-L2736 | train | Gets the composite entity. | [
30522,
13366,
2131,
1035,
12490,
1035,
9178,
1006,
10439,
1035,
8909,
1010,
2544,
1035,
8909,
1010,
1039,
1035,
9178,
1035,
8909,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
2131,
1035,
12490,
1035,
9178,
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... |
strongself/Generamba | lib/generamba/template/installer/template_installer_factory.rb | Generamba.TemplateInstallerFactory.installer_for_type | def installer_for_type(type)
case type
when TemplateDeclarationType::LOCAL_TEMPLATE
return Generamba::LocalInstaller.new
when TemplateDeclarationType::REMOTE_TEMPLATE
return Generamba::RemoteInstaller.new
when TemplateDeclarationType::CATALOG_TEMPLATE
return G... | ruby | def installer_for_type(type)
case type
when TemplateDeclarationType::LOCAL_TEMPLATE
return Generamba::LocalInstaller.new
when TemplateDeclarationType::REMOTE_TEMPLATE
return Generamba::RemoteInstaller.new
when TemplateDeclarationType::CATALOG_TEMPLATE
return G... | [
"def",
"installer_for_type",
"(",
"type",
")",
"case",
"type",
"when",
"TemplateDeclarationType",
"::",
"LOCAL_TEMPLATE",
"return",
"Generamba",
"::",
"LocalInstaller",
".",
"new",
"when",
"TemplateDeclarationType",
"::",
"REMOTE_TEMPLATE",
"return",
"Generamba",
"::",
... | Provides the appropriate strategy for a given template type | [
"Provides",
"the",
"appropriate",
"strategy",
"for",
"a",
"given",
"template",
"type"
] | 9ef343805f3a66f58bc36e120e822d5436a4da97 | https://github.com/strongself/Generamba/blob/9ef343805f3a66f58bc36e120e822d5436a4da97/lib/generamba/template/installer/template_installer_factory.rb#L9-L20 | train | Returns a new instance of the installer for the given type | [
30522,
13366,
16500,
2121,
1035,
2005,
1035,
2828,
1006,
2828,
1007,
2553,
2828,
2043,
23561,
3207,
20464,
25879,
3258,
13874,
1024,
1024,
2334,
1035,
23561,
2709,
11416,
11201,
1024,
1024,
2334,
7076,
9080,
3917,
1012,
2047,
2043,
23561,
3... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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-02-01-preview/generated/azure_mgmt_container_registry/builds.rb | Azure::ContainerRegistry::Mgmt::V2018_02_01_preview.Builds.get_log_link_with_http_info | def get_log_link_with_http_info(resource_group_name, registry_name, build_id, custom_headers:nil)
get_log_link_async(resource_group_name, registry_name, build_id, custom_headers:custom_headers).value!
end | ruby | def get_log_link_with_http_info(resource_group_name, registry_name, build_id, custom_headers:nil)
get_log_link_async(resource_group_name, registry_name, build_id, custom_headers:custom_headers).value!
end | [
"def",
"get_log_link_with_http_info",
"(",
"resource_group_name",
",",
"registry_name",
",",
"build_id",
",",
"custom_headers",
":",
"nil",
")",
"get_log_link_async",
"(",
"resource_group_name",
",",
"registry_name",
",",
"build_id",
",",
"custom_headers",
":custom_header... | Gets a link to download the build logs.
@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 build_id [String] The build ID.
@param custom_headers [Hash{String => String}] A hash of cust... | [
"Gets",
"a",
"link",
"to",
"download",
"the",
"build",
"logs",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_container_registry/lib/2018-02-01-preview/generated/azure_mgmt_container_registry/builds.rb#L318-L320 | train | Gets the log link to the specified build. | [
30522,
13366,
2131,
1035,
8833,
1035,
4957,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
15584,
1035,
2171,
1010,
3857,
1035,
8909,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
2131,
1035,
8833,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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/command.rb | Commander.Command.parse_options_and_call_procs | def parse_options_and_call_procs(*args)
return args if args.empty?
# empty proxy_options before populating via OptionParser
# prevents duplication of options if the command is run twice
proxy_options.clear
@options.each_with_object(OptionParser.new) do |option, opts|
opts.on(*optio... | ruby | def parse_options_and_call_procs(*args)
return args if args.empty?
# empty proxy_options before populating via OptionParser
# prevents duplication of options if the command is run twice
proxy_options.clear
@options.each_with_object(OptionParser.new) do |option, opts|
opts.on(*optio... | [
"def",
"parse_options_and_call_procs",
"(",
"*",
"args",
")",
"return",
"args",
"if",
"args",
".",
"empty?",
"# empty proxy_options before populating via OptionParser",
"# prevents duplication of options if the command is run twice",
"proxy_options",
".",
"clear",
"@options",
"."... | :stopdoc:
Parses options and calls associated procs,
returning the arguments remaining. | [
":",
"stopdoc",
":"
] | 332047c14948225462fe60042eed23adfb996d68 | https://github.com/commander-rb/commander/blob/332047c14948225462fe60042eed23adfb996d68/lib/commander/command.rb#L162-L171 | train | Parse the options and call the proc | [
30522,
13366,
11968,
3366,
1035,
7047,
1035,
1998,
1035,
2655,
1035,
4013,
6169,
1006,
1008,
12098,
5620,
1007,
2709,
12098,
5620,
2065,
12098,
5620,
1012,
4064,
1029,
1001,
4064,
24540,
1035,
7047,
2077,
3769,
10924,
3081,
5724,
19362,
804... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
hanami/hanami | lib/hanami/common_logger.rb | Hanami.CommonLogger.log | def log(env, status, header, began_at)
now = Time.now
length = extract_content_length(header)
msg = Hash[
http: env[HTTP_VERSION],
verb: env[REQUEST_METHOD],
status: status.to_s[0..3],
ip: env[HTTP_X_FORWARDED_FOR] || env[REMOTE_ADDR],
path: e... | ruby | def log(env, status, header, began_at)
now = Time.now
length = extract_content_length(header)
msg = Hash[
http: env[HTTP_VERSION],
verb: env[REQUEST_METHOD],
status: status.to_s[0..3],
ip: env[HTTP_X_FORWARDED_FOR] || env[REMOTE_ADDR],
path: e... | [
"def",
"log",
"(",
"env",
",",
"status",
",",
"header",
",",
"began_at",
")",
"now",
"=",
"Time",
".",
"now",
"length",
"=",
"extract_content_length",
"(",
"header",
")",
"msg",
"=",
"Hash",
"[",
"http",
":",
"env",
"[",
"HTTP_VERSION",
"]",
",",
"ve... | @since 1.0.0
@api private
rubocop:disable Metrics/AbcSize
rubocop:disable Metrics/MethodLength | [
"@since",
"1",
".",
"0",
".",
"0",
"@api",
"private"
] | 8c6e5147e92ef869b25379448572da3698eacfdc | https://github.com/hanami/hanami/blob/8c6e5147e92ef869b25379448572da3698eacfdc/lib/hanami/common_logger.rb#L57-L80 | train | Log the request | [
30522,
13366,
8833,
1006,
4372,
2615,
1010,
3570,
1010,
20346,
1010,
2211,
1035,
2012,
1007,
2085,
1027,
2051,
1012,
2085,
3091,
1027,
14817,
1035,
4180,
1035,
3091,
1006,
20346,
1007,
5796,
2290,
1027,
23325,
1031,
8299,
1024,
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_service_bus/lib/2017-04-01/generated/azure_mgmt_service_bus/disaster_recovery_configs.rb | Azure::ServiceBus::Mgmt::V2017_04_01.DisasterRecoveryConfigs.break_pairing | def break_pairing(resource_group_name, namespace_name, alias_parameter, custom_headers:nil)
response = break_pairing_async(resource_group_name, namespace_name, alias_parameter, custom_headers:custom_headers).value!
nil
end | ruby | def break_pairing(resource_group_name, namespace_name, alias_parameter, custom_headers:nil)
response = break_pairing_async(resource_group_name, namespace_name, alias_parameter, custom_headers:custom_headers).value!
nil
end | [
"def",
"break_pairing",
"(",
"resource_group_name",
",",
"namespace_name",
",",
"alias_parameter",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"break_pairing_async",
"(",
"resource_group_name",
",",
"namespace_name",
",",
"alias_parameter",
",",
"custom_hea... | 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#L569-L572 | train | Break a namespace in a given resource group. | [
30522,
13366,
3338,
1035,
22778,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
3415,
15327,
1035,
2171,
1010,
14593,
1035,
16381,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
3338,
1035,
22778,
1035,
2004,
6038,
2278,
1006... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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/pops/loaders.rb | Puppet::Pops.Loaders.instantiate_definition | def instantiate_definition(definition, loader)
case definition
when Model::PlanDefinition
instantiate_PlanDefinition(definition, loader)
when Model::FunctionDefinition
instantiate_FunctionDefinition(definition, loader)
when Model::TypeAlias
instantiate_TypeAlias(definition, loader)
... | ruby | def instantiate_definition(definition, loader)
case definition
when Model::PlanDefinition
instantiate_PlanDefinition(definition, loader)
when Model::FunctionDefinition
instantiate_FunctionDefinition(definition, loader)
when Model::TypeAlias
instantiate_TypeAlias(definition, loader)
... | [
"def",
"instantiate_definition",
"(",
"definition",
",",
"loader",
")",
"case",
"definition",
"when",
"Model",
"::",
"PlanDefinition",
"instantiate_PlanDefinition",
"(",
"definition",
",",
"loader",
")",
"when",
"Model",
"::",
"FunctionDefinition",
"instantiate_Function... | Add given 4.x definition to the given loader. | [
"Add",
"given",
"4",
".",
"x",
"definition",
"to",
"the",
"given",
"loader",
"."
] | 4baeed97cbb7571ddc6635f0a24debe2e8b22cd3 | https://github.com/puppetlabs/puppet/blob/4baeed97cbb7571ddc6635f0a24debe2e8b22cd3/lib/puppet/pops/loaders.rb#L311-L324 | train | Instantiate a definition using the given loader | [
30522,
13366,
7107,
13143,
1035,
6210,
1006,
6210,
1010,
7170,
2121,
1007,
2553,
6210,
2043,
2944,
1024,
1024,
2933,
3207,
16294,
22753,
7107,
13143,
1035,
2933,
3207,
16294,
22753,
1006,
6210,
1010,
7170,
2121,
1007,
2043,
2944,
1024,
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... |
fastlane/fastlane | fastlane_core/lib/fastlane_core/project.rb | FastlaneCore.Project.configurations | def configurations
@configurations ||= if workspace?
workspace
.file_references
.map(&:path)
.reject { |p| p.include?("Pods/Pods.xcodeproj") }
.map do |p|
... | ruby | def configurations
@configurations ||= if workspace?
workspace
.file_references
.map(&:path)
.reject { |p| p.include?("Pods/Pods.xcodeproj") }
.map do |p|
... | [
"def",
"configurations",
"@configurations",
"||=",
"if",
"workspace?",
"workspace",
".",
"file_references",
".",
"map",
"(",
":path",
")",
".",
"reject",
"{",
"|",
"p",
"|",
"p",
".",
"include?",
"(",
"\"Pods/Pods.xcodeproj\"",
")",
"}",
".",
"map",
"do",
... | Get all available configurations in an array | [
"Get",
"all",
"available",
"configurations",
"in",
"an",
"array"
] | 457c5d647c77f0e078dafa5129da616914e002c5 | https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/fastlane_core/lib/fastlane_core/project.rb#L177-L199 | train | Returns the list of build configurations for this project. | [
30522,
13366,
22354,
1030,
22354,
1064,
1064,
1027,
2065,
2573,
15327,
1029,
2573,
15327,
1012,
5371,
1035,
7604,
1012,
4949,
1006,
1004,
1024,
4130,
1007,
1012,
15454,
1063,
1064,
1052,
1064,
1052,
1012,
2421,
1029,
1006,
1000,
26723,
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... |
3scale/3scale_toolbox | lib/3scale_toolbox/configuration.rb | ThreeScaleToolbox.Configuration.read | def read
@store.transaction(true) do
@store.roots.each_with_object({}) do |key, obj|
obj[key] = @store[key]
end
end
end | ruby | def read
@store.transaction(true) do
@store.roots.each_with_object({}) do |key, obj|
obj[key] = @store[key]
end
end
end | [
"def",
"read",
"@store",
".",
"transaction",
"(",
"true",
")",
"do",
"@store",
".",
"roots",
".",
"each_with_object",
"(",
"{",
"}",
")",
"do",
"|",
"key",
",",
"obj",
"|",
"obj",
"[",
"key",
"]",
"=",
"@store",
"[",
"key",
"]",
"end",
"end",
"en... | returns copy of data stored | [
"returns",
"copy",
"of",
"data",
"stored"
] | aeb19add0ae2348788b0b21f641bf88bf7003ea3 | https://github.com/3scale/3scale_toolbox/blob/aeb19add0ae2348788b0b21f641bf88bf7003ea3/lib/3scale_toolbox/configuration.rb#L27-L33 | train | Read the root node from the store | [
30522,
13366,
3191,
1030,
3573,
1012,
12598,
1006,
2995,
1007,
2079,
1030,
3573,
1012,
6147,
1012,
2169,
1035,
2007,
1035,
4874,
1006,
1063,
1065,
1007,
2079,
1064,
3145,
1010,
27885,
3501,
1064,
27885,
3501,
1031,
3145,
1033,
1027,
1030,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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/overcommit | lib/overcommit/hook_context/base.rb | Overcommit::HookContext.Base.filter_directories | def filter_directories(modified_files)
modified_files.reject do |file|
File.directory?(file) && !Overcommit::Utils::FileUtils.symlink?(file)
end
end | ruby | def filter_directories(modified_files)
modified_files.reject do |file|
File.directory?(file) && !Overcommit::Utils::FileUtils.symlink?(file)
end
end | [
"def",
"filter_directories",
"(",
"modified_files",
")",
"modified_files",
".",
"reject",
"do",
"|",
"file",
"|",
"File",
".",
"directory?",
"(",
"file",
")",
"&&",
"!",
"Overcommit",
"::",
"Utils",
"::",
"FileUtils",
".",
"symlink?",
"(",
"file",
")",
"en... | Filter out directories. This could happen when changing a symlink to a
directory as part of an amendment, since the symlink will still appear as
a file, but the actual working tree will have a directory. | [
"Filter",
"out",
"directories",
".",
"This",
"could",
"happen",
"when",
"changing",
"a",
"symlink",
"to",
"a",
"directory",
"as",
"part",
"of",
"an",
"amendment",
"since",
"the",
"symlink",
"will",
"still",
"appear",
"as",
"a",
"file",
"but",
"the",
"actua... | 35d60adb41da942178b789560968e3ad030b0ac7 | https://github.com/sds/overcommit/blob/35d60adb41da942178b789560968e3ad030b0ac7/lib/overcommit/hook_context/base.rb#L133-L137 | train | Filter out directories that are not directories | [
30522,
13366,
11307,
1035,
2472,
3111,
1006,
6310,
1035,
6764,
1007,
6310,
1035,
6764,
1012,
15454,
2079,
1064,
5371,
1064,
5371,
1012,
14176,
1029,
1006,
5371,
1007,
1004,
1004,
999,
2058,
9006,
22930,
1024,
1024,
21183,
12146,
1024,
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... |
stripe/stripe-ruby | lib/stripe/stripe_object.rb | Stripe.StripeObject.update_attributes | def update_attributes(values, opts = {}, dirty: true)
values.each do |k, v|
add_accessors([k], values) unless metaclass.method_defined?(k.to_sym)
@values[k] = Util.convert_to_stripe_object(v, opts)
dirty_value!(@values[k]) if dirty
@unsaved_values.add(k)
end
end | ruby | def update_attributes(values, opts = {}, dirty: true)
values.each do |k, v|
add_accessors([k], values) unless metaclass.method_defined?(k.to_sym)
@values[k] = Util.convert_to_stripe_object(v, opts)
dirty_value!(@values[k]) if dirty
@unsaved_values.add(k)
end
end | [
"def",
"update_attributes",
"(",
"values",
",",
"opts",
"=",
"{",
"}",
",",
"dirty",
":",
"true",
")",
"values",
".",
"each",
"do",
"|",
"k",
",",
"v",
"|",
"add_accessors",
"(",
"[",
"k",
"]",
",",
"values",
")",
"unless",
"metaclass",
".",
"metho... | Mass assigns attributes on the model.
This is a version of +update_attributes+ that takes some extra options
for internal use.
==== Attributes
* +values+ - Hash of values to use to update the current attributes of
the object.
* +opts+ - Options for +StripeObject+ like an API key that will be reused
on sub... | [
"Mass",
"assigns",
"attributes",
"on",
"the",
"model",
"."
] | 322a8c60be8a9b9ac8aad8857864680a32176935 | https://github.com/stripe/stripe-ruby/blob/322a8c60be8a9b9ac8aad8857864680a32176935/lib/stripe/stripe_object.rb#L156-L163 | train | Update the attributes of the object | [
30522,
13366,
10651,
1035,
12332,
1006,
5300,
1010,
23569,
2015,
1027,
1063,
1065,
1010,
6530,
1024,
2995,
1007,
5300,
1012,
2169,
2079,
1064,
1047,
1010,
1058,
1064,
5587,
1035,
3229,
5668,
1006,
1031,
1047,
1033,
1010,
5300,
1007,
4983,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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.