repo stringclasses 237
values | path stringlengths 11 168 | func_name stringlengths 10 147 | original_string stringlengths 79 124k | language stringclasses 1
value | code stringlengths 79 124k | code_tokens listlengths 16 45.3k | docstring stringlengths 4 23.5k | docstring_tokens listlengths 1 452 | sha stringclasses 237
values | url stringlengths 95 268 | partition stringclasses 1
value | summary stringlengths 8 229 | input_ids listlengths 502 502 | token_type_ids listlengths 502 502 | attention_mask listlengths 502 502 | labels listlengths 502 502 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
decidim/decidim | decidim-core/lib/decidim/form_builder.rb | Decidim.FormBuilder.date_field | def date_field(attribute, options = {})
value = object.send(attribute)
data = { datepicker: "" }
data[:startdate] = I18n.localize(value, format: :decidim_short) if value.present? && value.is_a?(Date)
datepicker_format = ruby_format_to_datepicker(I18n.t("date.formats.decidim_short"))
data[:... | ruby | def date_field(attribute, options = {})
value = object.send(attribute)
data = { datepicker: "" }
data[:startdate] = I18n.localize(value, format: :decidim_short) if value.present? && value.is_a?(Date)
datepicker_format = ruby_format_to_datepicker(I18n.t("date.formats.decidim_short"))
data[:... | [
"def",
"date_field",
"(",
"attribute",
",",
"options",
"=",
"{",
"}",
")",
"value",
"=",
"object",
".",
"send",
"(",
"attribute",
")",
"data",
"=",
"{",
"datepicker",
":",
"\"\"",
"}",
"data",
"[",
":startdate",
"]",
"=",
"I18n",
".",
"localize",
"("... | Public: Override so the date fields are rendered using foundation
datepicker library | [
"Public",
":",
"Override",
"so",
"the",
"date",
"fields",
"are",
"rendered",
"using",
"foundation",
"datepicker",
"library"
] | 6e2b14e559a63088669904e3c5c49a5180700cf7 | https://github.com/decidim/decidim/blob/6e2b14e559a63088669904e3c5c49a5180700cf7/decidim-core/lib/decidim/form_builder.rb#L311-L325 | train | Returns a date field | [
30522,
13366,
3058,
1035,
2492,
1006,
17961,
1010,
7047,
1027,
1063,
1065,
1007,
3643,
1027,
4874,
1012,
4604,
1006,
17961,
1007,
2951,
1027,
1063,
3058,
24330,
5484,
1024,
1000,
1000,
1065,
2951,
1031,
1024,
2707,
13701,
1033,
1027,
1045,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
abonas/kubeclient | lib/kubeclient/common.rb | Kubeclient.ClientMixin.format_datetime | def format_datetime(value)
case value
when DateTime, Time
value.strftime('%FT%T.%9N%:z')
when String
value
else
raise ArgumentError, "unsupported type '#{value.class}' of time value '#{value}'"
end
end | ruby | def format_datetime(value)
case value
when DateTime, Time
value.strftime('%FT%T.%9N%:z')
when String
value
else
raise ArgumentError, "unsupported type '#{value.class}' of time value '#{value}'"
end
end | [
"def",
"format_datetime",
"(",
"value",
")",
"case",
"value",
"when",
"DateTime",
",",
"Time",
"value",
".",
"strftime",
"(",
"'%FT%T.%9N%:z'",
")",
"when",
"String",
"value",
"else",
"raise",
"ArgumentError",
",",
"\"unsupported type '#{value.class}' of time value '#... | Format datetime according to RFC3339 | [
"Format",
"datetime",
"according",
"to",
"RFC3339"
] | 3630f6c82532fba04f3e1a62d6b99c6cf2910451 | https://github.com/abonas/kubeclient/blob/3630f6c82532fba04f3e1a62d6b99c6cf2910451/lib/kubeclient/common.rb#L499-L508 | train | Format a datetime value | [
30522,
13366,
4289,
1035,
3058,
7292,
1006,
3643,
1007,
2553,
3643,
2043,
3058,
7292,
1010,
2051,
3643,
1012,
2358,
12881,
7292,
1006,
1005,
1003,
3027,
1003,
1056,
1012,
1003,
1023,
2078,
1003,
1024,
1062,
1005,
1007,
2043,
5164,
3643,
2... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | 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_deployed_service_type_info_list | def get_deployed_service_type_info_list(node_name, application_id, service_manifest_name:nil, timeout:60, custom_headers:nil)
response = get_deployed_service_type_info_list_async(node_name, application_id, service_manifest_name:service_manifest_name, timeout:timeout, custom_headers:custom_headers).value!
re... | ruby | def get_deployed_service_type_info_list(node_name, application_id, service_manifest_name:nil, timeout:60, custom_headers:nil)
response = get_deployed_service_type_info_list_async(node_name, application_id, service_manifest_name:service_manifest_name, timeout:timeout, custom_headers:custom_headers).value!
re... | [
"def",
"get_deployed_service_type_info_list",
"(",
"node_name",
",",
"application_id",
",",
"service_manifest_name",
":",
"nil",
",",
"timeout",
":",
"60",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"get_deployed_service_type_info_list_async",
"(",
"node_n... | Gets the list containing the information about service types from the
applications deployed on a node in a Service Fabric cluster.
Gets the list containing the information about service types from the
applications deployed on a node in a Service Fabric cluster. The response
includes the name of the service type, i... | [
"Gets",
"the",
"list",
"containing",
"the",
"information",
"about",
"service",
"types",
"from",
"the",
"applications",
"deployed",
"on",
"a",
"node",
"in",
"a",
"Service",
"Fabric",
"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#L5730-L5733 | train | Gets the list of service type information for a node. | [
30522,
13366,
2131,
1035,
7333,
1035,
2326,
1035,
2828,
1035,
18558,
1035,
2862,
1006,
13045,
1035,
2171,
1010,
4646,
1035,
8909,
1010,
2326,
1035,
19676,
1035,
2171,
1024,
9152,
2140,
1010,
2051,
5833,
1024,
3438,
1010,
7661,
1035,
20346,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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_service/lib/2019-02-01/generated/azure_mgmt_container_service/managed_clusters.rb | Azure::ContainerService::Mgmt::V2019_02_01.ManagedClusters.reset_service_principal_profile_async | def reset_service_principal_profile_async(resource_group_name, resource_name, parameters, custom_headers:nil)
# Send request
promise = begin_reset_service_principal_profile_async(resource_group_name, resource_name, parameters, custom_headers:custom_headers)
promise = promise.then do |response|
... | ruby | def reset_service_principal_profile_async(resource_group_name, resource_name, parameters, custom_headers:nil)
# Send request
promise = begin_reset_service_principal_profile_async(resource_group_name, resource_name, parameters, custom_headers:custom_headers)
promise = promise.then do |response|
... | [
"def",
"reset_service_principal_profile_async",
"(",
"resource_group_name",
",",
"resource_name",
",",
"parameters",
",",
"custom_headers",
":",
"nil",
")",
"# Send request",
"promise",
"=",
"begin_reset_service_principal_profile_async",
"(",
"resource_group_name",
",",
"reso... | @param resource_group_name [String] The name of the resource group.
@param resource_name [String] The name of the managed cluster resource.
@param parameters [ManagedClusterServicePrincipalProfile] Parameters supplied
to the Reset Service Principal Profile operation for a Managed Cluster.
@param custom_headers [Has... | [
"@param",
"resource_group_name",
"[",
"String",
"]",
"The",
"name",
"of",
"the",
"resource",
"group",
".",
"@param",
"resource_name",
"[",
"String",
"]",
"The",
"name",
"of",
"the",
"managed",
"cluster",
"resource",
".",
"@param",
"parameters",
"[",
"ManagedCl... | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_container_service/lib/2019-02-01/generated/azure_mgmt_container_service/managed_clusters.rb#L897-L911 | train | Resets the principal profile of the specified service. | [
30522,
13366,
25141,
1035,
2326,
1035,
4054,
1035,
6337,
1035,
2004,
6038,
2278,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
7692,
1035,
2171,
1010,
11709,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
1001,
4604,
5227,
4872,
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... |
puppetlabs/puppet | lib/puppet/network/http/connection.rb | Puppet::Network::HTTP.Connection.parse_retry_after_header | def parse_retry_after_header(header_value)
retry_after = begin
Integer(header_value)
rescue TypeError, ArgumentError
begin
DateTime.rfc2822(header_value)
rescue ArgumentError
retur... | ruby | def parse_retry_after_header(header_value)
retry_after = begin
Integer(header_value)
rescue TypeError, ArgumentError
begin
DateTime.rfc2822(header_value)
rescue ArgumentError
retur... | [
"def",
"parse_retry_after_header",
"(",
"header_value",
")",
"retry_after",
"=",
"begin",
"Integer",
"(",
"header_value",
")",
"rescue",
"TypeError",
",",
"ArgumentError",
"begin",
"DateTime",
".",
"rfc2822",
"(",
"header_value",
")",
"rescue",
"ArgumentError",
"ret... | Parse the value of a Retry-After header
Parses a string containing an Integer or RFC 2822 datestamp and returns
an integer number of seconds before a request can be retried.
@param header_value [String] The value of the Retry-After header.
@return [Integer] Number of seconds to wait before retrying the
reques... | [
"Parse",
"the",
"value",
"of",
"a",
"Retry",
"-",
"After",
"header"
] | 4baeed97cbb7571ddc6635f0a24debe2e8b22cd3 | https://github.com/puppetlabs/puppet/blob/4baeed97cbb7571ddc6635f0a24debe2e8b22cd3/lib/puppet/network/http/connection.rb#L292-L310 | train | Parse the retry after header value | [
30522,
13366,
11968,
3366,
1035,
2128,
11129,
1035,
2044,
1035,
20346,
1006,
20346,
1035,
3643,
1007,
2128,
11129,
1035,
2044,
1027,
4088,
16109,
1006,
20346,
1035,
3643,
1007,
5343,
2828,
2121,
29165,
1010,
6685,
2121,
29165,
4088,
3058,
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... |
aws/aws-sdk-ruby | gems/aws-sdk-iam/lib/aws-sdk-iam/role_policy.rb | Aws::IAM.RolePolicy.put | def put(options = {})
options = options.merge(
role_name: @role_name,
policy_name: @name
)
resp = @client.put_role_policy(options)
resp.data
end | ruby | def put(options = {})
options = options.merge(
role_name: @role_name,
policy_name: @name
)
resp = @client.put_role_policy(options)
resp.data
end | [
"def",
"put",
"(",
"options",
"=",
"{",
"}",
")",
"options",
"=",
"options",
".",
"merge",
"(",
"role_name",
":",
"@role_name",
",",
"policy_name",
":",
"@name",
")",
"resp",
"=",
"@client",
".",
"put_role_policy",
"(",
"options",
")",
"resp",
".",
"da... | @example Request syntax with placeholder values
role_policy.put({
policy_document: "policyDocumentType", # required
})
@param [Hash] options ({})
@option options [required, String] :policy_document
The policy document.
The [regex pattern][1] used to validate this parameter is a string of
charact... | [
"@example",
"Request",
"syntax",
"with",
"placeholder",
"values"
] | e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d | https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-iam/lib/aws-sdk-iam/role_policy.rb#L222-L229 | train | Put a policy on the role | [
30522,
13366,
2404,
1006,
7047,
1027,
1063,
1065,
1007,
7047,
1027,
7047,
1012,
13590,
1006,
2535,
1035,
2171,
1024,
1030,
2535,
1035,
2171,
1010,
3343,
1035,
2171,
1024,
1030,
2171,
1007,
24501,
2361,
1027,
1030,
7396,
1012,
2404,
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_container_registry/lib/2017-06-01-preview/generated/azure_mgmt_container_registry/webhooks.rb | Azure::ContainerRegistry::Mgmt::V2017_06_01_preview.Webhooks.list_events | def list_events(resource_group_name, registry_name, webhook_name, custom_headers:nil)
first_page = list_events_as_lazy(resource_group_name, registry_name, webhook_name, custom_headers:custom_headers)
first_page.get_all_items
end | ruby | def list_events(resource_group_name, registry_name, webhook_name, custom_headers:nil)
first_page = list_events_as_lazy(resource_group_name, registry_name, webhook_name, custom_headers:custom_headers)
first_page.get_all_items
end | [
"def",
"list_events",
"(",
"resource_group_name",
",",
"registry_name",
",",
"webhook_name",
",",
"custom_headers",
":",
"nil",
")",
"first_page",
"=",
"list_events_as_lazy",
"(",
"resource_group_name",
",",
"registry_name",
",",
"webhook_name",
",",
"custom_headers",
... | Lists recent events for the specified webhook.
@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 webhook_name [String] The name of the webhook.
@param custom_headers [Hash{String => S... | [
"Lists",
"recent",
"events",
"for",
"the",
"specified",
"webhook",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_container_registry/lib/2017-06-01-preview/generated/azure_mgmt_container_registry/webhooks.rb#L591-L594 | train | Gets all the events associated with the webhook. | [
30522,
13366,
2862,
1035,
2824,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
15584,
1035,
2171,
1010,
4773,
6806,
6559,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
2034,
1035,
3931,
1027,
2862,
1035,
2824,
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_container_registry/lib/2018-09-01/generated/azure_mgmt_container_registry/tasks.rb | Azure::ContainerRegistry::Mgmt::V2018_09_01.Tasks.update | def update(resource_group_name, registry_name, task_name, task_update_parameters, custom_headers:nil)
response = update_async(resource_group_name, registry_name, task_name, task_update_parameters, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def update(resource_group_name, registry_name, task_name, task_update_parameters, custom_headers:nil)
response = update_async(resource_group_name, registry_name, task_name, task_update_parameters, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"update",
"(",
"resource_group_name",
",",
"registry_name",
",",
"task_name",
",",
"task_update_parameters",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"update_async",
"(",
"resource_group_name",
",",
"registry_name",
",",
"task_name",
",",
"tas... | Updates a task with the specified parameters.
@param resource_group_name [String] The name of the resource group to which
the container registry belongs.
@param registry_name [String] The name of the container registry.
@param task_name [String] The name of the container registry task.
@param task_update_paramete... | [
"Updates",
"a",
"task",
"with",
"the",
"specified",
"parameters",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_container_registry/lib/2018-09-01/generated/azure_mgmt_container_registry/tasks.rb#L333-L336 | train | Updates a task s information in a task registry. | [
30522,
13366,
10651,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
15584,
1035,
2171,
1010,
4708,
1035,
2171,
1010,
4708,
1035,
10651,
1035,
11709,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
10651,
1035,
2004,
6038,
2278... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | data/azure_cognitiveservices_luisauthoring/lib/2.0/generated/azure_cognitiveservices_luisauthoring/model.rb | Azure::CognitiveServices::LuisAuthoring::V2_0.Model.update_sub_list | def update_sub_list(app_id, version_id, cl_entity_id, sub_list_id, word_list_base_update_object, custom_headers:nil)
response = update_sub_list_async(app_id, version_id, cl_entity_id, sub_list_id, word_list_base_update_object, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def update_sub_list(app_id, version_id, cl_entity_id, sub_list_id, word_list_base_update_object, custom_headers:nil)
response = update_sub_list_async(app_id, version_id, cl_entity_id, sub_list_id, word_list_base_update_object, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"update_sub_list",
"(",
"app_id",
",",
"version_id",
",",
"cl_entity_id",
",",
"sub_list_id",
",",
"word_list_base_update_object",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"update_sub_list_async",
"(",
"app_id",
",",
"version_id",
",",
"cl_ent... | Updates one of the list entity's sublists in a version of the application.
@param app_id The application ID.
@param version_id [String] The version ID.
@param cl_entity_id The list entity extractor ID.
@param sub_list_id [Integer] The sublist ID.
@param word_list_base_update_object [WordListBaseUpdateObject] A su... | [
"Updates",
"one",
"of",
"the",
"list",
"entity",
"s",
"sublists",
"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#L3741-L3744 | train | Updates a list in a version of the application. | [
30522,
13366,
10651,
1035,
4942,
1035,
2862,
1006,
10439,
1035,
8909,
1010,
2544,
1035,
8909,
1010,
18856,
1035,
9178,
1035,
8909,
1010,
4942,
1035,
2862,
1035,
8909,
1010,
2773,
1035,
2862,
1035,
2918,
1035,
10651,
1035,
4874,
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... |
kmuto/review | lib/epubmaker/epubcommon.rb | EPUBMaker.EPUBCommon.container | def container
@opf_path = opf_path
tmplfile = File.expand_path('./xml/container.xml.erb', ReVIEW::Template::TEMPLATE_DIR)
tmpl = ReVIEW::Template.load(tmplfile)
tmpl.result(binding)
end | ruby | def container
@opf_path = opf_path
tmplfile = File.expand_path('./xml/container.xml.erb', ReVIEW::Template::TEMPLATE_DIR)
tmpl = ReVIEW::Template.load(tmplfile)
tmpl.result(binding)
end | [
"def",
"container",
"@opf_path",
"=",
"opf_path",
"tmplfile",
"=",
"File",
".",
"expand_path",
"(",
"'./xml/container.xml.erb'",
",",
"ReVIEW",
"::",
"Template",
"::",
"TEMPLATE_DIR",
")",
"tmpl",
"=",
"ReVIEW",
"::",
"Template",
".",
"load",
"(",
"tmplfile",
... | Return container content. | [
"Return",
"container",
"content",
"."
] | 77d1273e671663f05db2992281fd891b776badf0 | https://github.com/kmuto/review/blob/77d1273e671663f05db2992281fd891b776badf0/lib/epubmaker/epubcommon.rb#L118-L123 | train | Returns the index of the container in the current directory. | [
30522,
13366,
11661,
1030,
6728,
2546,
1035,
4130,
1027,
6728,
2546,
1035,
4130,
1056,
8737,
10270,
9463,
1027,
5371,
1012,
7818,
1035,
4130,
1006,
1005,
1012,
1013,
20950,
1013,
11661,
1012,
20950,
1012,
9413,
2497,
1005,
1010,
3319,
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... |
rails/rails | railties/lib/rails/application.rb | Rails.Application.config_for | def config_for(name, env: Rails.env)
if name.is_a?(Pathname)
yaml = name
else
yaml = Pathname.new("#{paths["config"].existent.first}/#{name}.yml")
end
if yaml.exist?
require "erb"
config = YAML.load(ERB.new(yaml.read).result) || {}
config = (config["share... | ruby | def config_for(name, env: Rails.env)
if name.is_a?(Pathname)
yaml = name
else
yaml = Pathname.new("#{paths["config"].existent.first}/#{name}.yml")
end
if yaml.exist?
require "erb"
config = YAML.load(ERB.new(yaml.read).result) || {}
config = (config["share... | [
"def",
"config_for",
"(",
"name",
",",
"env",
":",
"Rails",
".",
"env",
")",
"if",
"name",
".",
"is_a?",
"(",
"Pathname",
")",
"yaml",
"=",
"name",
"else",
"yaml",
"=",
"Pathname",
".",
"new",
"(",
"\"#{paths[\"config\"].existent.first}/#{name}.yml\"",
")",
... | Convenience for loading config/foo.yml for the current Rails env.
Example:
# config/exception_notification.yml:
production:
url: http://127.0.0.1:8080
namespace: my_app_production
development:
url: http://localhost:3001
namespace: my_app_development
# config/environme... | [
"Convenience",
"for",
"loading",
"config",
"/",
"foo",
".",
"yml",
"for",
"the",
"current",
"Rails",
"env",
"."
] | 85a8bc644be69908f05740a5886ec19cd3679df5 | https://github.com/rails/rails/blob/85a8bc644be69908f05740a5886ec19cd3679df5/railties/lib/rails/application.rb#L222-L244 | train | Load the configuration file for the given name. | [
30522,
13366,
9530,
8873,
2290,
1035,
2005,
1006,
2171,
1010,
4372,
2615,
1024,
15168,
1012,
4372,
2615,
1007,
2065,
2171,
1012,
2003,
1035,
1037,
1029,
1006,
4130,
18442,
1007,
8038,
19968,
1027,
2171,
2842,
8038,
19968,
1027,
4130,
18442,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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-autoscaling/lib/aws-sdk-autoscaling/auto_scaling_group.rb | Aws::AutoScaling.AutoScalingGroup.load_balancers | def load_balancers(options = {})
batches = Enumerator.new do |y|
batch = []
options = options.merge(auto_scaling_group_name: @name)
resp = @client.describe_load_balancers(options)
resp.data.load_balancers.each do |l|
batch << LoadBalancer.new(
group_name: @nam... | ruby | def load_balancers(options = {})
batches = Enumerator.new do |y|
batch = []
options = options.merge(auto_scaling_group_name: @name)
resp = @client.describe_load_balancers(options)
resp.data.load_balancers.each do |l|
batch << LoadBalancer.new(
group_name: @nam... | [
"def",
"load_balancers",
"(",
"options",
"=",
"{",
"}",
")",
"batches",
"=",
"Enumerator",
".",
"new",
"do",
"|",
"y",
"|",
"batch",
"=",
"[",
"]",
"options",
"=",
"options",
".",
"merge",
"(",
"auto_scaling_group_name",
":",
"@name",
")",
"resp",
"=",... | @example Request syntax with placeholder values
load_balancers = auto_scaling_group.load_balancers({
next_token: "XmlString",
max_records: 1,
})
@param [Hash] options ({})
@option options [String] :next_token
The token for the next set of items to return. (You received this
token from a previou... | [
"@example",
"Request",
"syntax",
"with",
"placeholder",
"values"
] | e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d | https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-autoscaling/lib/aws-sdk-autoscaling/auto_scaling_group.rb#L1054-L1070 | train | Returns an array of all load balancers in the auto scaling group | [
30522,
13366,
7170,
1035,
5703,
2869,
1006,
7047,
1027,
1063,
1065,
1007,
14108,
2229,
1027,
4372,
17897,
16259,
1012,
2047,
2079,
1064,
1061,
1064,
14108,
1027,
1031,
1033,
7047,
1027,
7047,
1012,
13590,
1006,
8285,
1035,
25169,
1035,
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... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_redis/lib/2017-02-01/generated/azure_mgmt_redis/firewall_rules.rb | Azure::Redis::Mgmt::V2017_02_01.FirewallRules.create_or_update_with_http_info | def create_or_update_with_http_info(resource_group_name, cache_name, rule_name, parameters, custom_headers:nil)
create_or_update_async(resource_group_name, cache_name, rule_name, parameters, custom_headers:custom_headers).value!
end | ruby | def create_or_update_with_http_info(resource_group_name, cache_name, rule_name, parameters, custom_headers:nil)
create_or_update_async(resource_group_name, cache_name, rule_name, parameters, custom_headers:custom_headers).value!
end | [
"def",
"create_or_update_with_http_info",
"(",
"resource_group_name",
",",
"cache_name",
",",
"rule_name",
",",
"parameters",
",",
"custom_headers",
":",
"nil",
")",
"create_or_update_async",
"(",
"resource_group_name",
",",
"cache_name",
",",
"rule_name",
",",
"paramet... | Create or update a redis cache firewall rule
@param resource_group_name [String] The name of the resource group.
@param cache_name [String] The name of the Redis cache.
@param rule_name [String] The name of the firewall rule.
@param parameters [RedisFirewallRule] Parameters supplied to the create or
update redis ... | [
"Create",
"or",
"update",
"a",
"redis",
"cache",
"firewall",
"rule"
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_redis/lib/2017-02-01/generated/azure_mgmt_redis/firewall_rules.rb#L147-L149 | train | Creates or updates a rule in the specified resource group. | [
30522,
13366,
3443,
1035,
2030,
1035,
10651,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
17053,
1035,
2171,
1010,
3627,
1035,
2171,
1010,
11709,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3443,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
square/connect-ruby-sdk | lib/square_connect/api/v1_transactions_api.rb | SquareConnect.V1TransactionsApi.retrieve_bank_account | def retrieve_bank_account(location_id, bank_account_id, opts = {})
data, _status_code, _headers = retrieve_bank_account_with_http_info(location_id, bank_account_id, opts)
return data
end | ruby | def retrieve_bank_account(location_id, bank_account_id, opts = {})
data, _status_code, _headers = retrieve_bank_account_with_http_info(location_id, bank_account_id, opts)
return data
end | [
"def",
"retrieve_bank_account",
"(",
"location_id",
",",
"bank_account_id",
",",
"opts",
"=",
"{",
"}",
")",
"data",
",",
"_status_code",
",",
"_headers",
"=",
"retrieve_bank_account_with_http_info",
"(",
"location_id",
",",
"bank_account_id",
",",
"opts",
")",
"r... | RetrieveBankAccount
Provides non-confidential details for a merchant's associated bank account. This endpoint does not provide full bank account numbers, and there is no way to obtain a full bank account number with the Connect API.
@param location_id The ID of the bank account's associated location.
@param bank... | [
"RetrieveBankAccount",
"Provides",
"non",
"-",
"confidential",
"details",
"for",
"a",
"merchant",
"s",
"associated",
"bank",
"account",
".",
"This",
"endpoint",
"does",
"not",
"provide",
"full",
"bank",
"account",
"numbers",
"and",
"there",
"is",
"no",
"way",
... | 798eb9ded716f23b9f1518386f1c311a34bca8bf | https://github.com/square/connect-ruby-sdk/blob/798eb9ded716f23b9f1518386f1c311a34bca8bf/lib/square_connect/api/v1_transactions_api.rb#L435-L438 | train | Retrieve a specific bank account | [
30522,
13366,
12850,
1035,
2924,
1035,
4070,
1006,
3295,
1035,
8909,
1010,
2924,
1035,
4070,
1035,
8909,
1010,
23569,
2015,
1027,
1063,
1065,
1007,
2951,
1010,
1035,
3570,
1035,
3642,
1010,
1035,
20346,
2015,
1027,
12850,
1035,
2924,
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... |
decidim/decidim | decidim-core/app/helpers/decidim/component_path_helper.rb | Decidim.ComponentPathHelper.main_component_url | def main_component_url(component)
current_params = try(:params) || {}
EngineRouter.main_proxy(component).root_url(locale: current_params[:locale])
end | ruby | def main_component_url(component)
current_params = try(:params) || {}
EngineRouter.main_proxy(component).root_url(locale: current_params[:locale])
end | [
"def",
"main_component_url",
"(",
"component",
")",
"current_params",
"=",
"try",
"(",
":params",
")",
"||",
"{",
"}",
"EngineRouter",
".",
"main_proxy",
"(",
"component",
")",
".",
"root_url",
"(",
"locale",
":",
"current_params",
"[",
":locale",
"]",
")",
... | Returns the defined root url for a given component.
component - the Component we want to find the root path for.
Returns an absolute url. | [
"Returns",
"the",
"defined",
"root",
"url",
"for",
"a",
"given",
"component",
"."
] | 6e2b14e559a63088669904e3c5c49a5180700cf7 | https://github.com/decidim/decidim/blob/6e2b14e559a63088669904e3c5c49a5180700cf7/decidim-core/app/helpers/decidim/component_path_helper.rb#L21-L24 | train | Returns the main component url | [
30522,
13366,
2364,
1035,
6922,
1035,
24471,
2140,
1006,
6922,
1007,
2783,
1035,
11498,
5244,
1027,
3046,
1006,
1024,
11498,
5244,
1007,
1064,
1064,
1063,
1065,
3194,
22494,
3334,
1012,
2364,
1035,
24540,
1006,
6922,
1007,
30524,
2334,
2063... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
floere/phony | lib/phony/country_codes.rb | Phony.CountryCodes.add | def add country_code, country
country_code = country_code.to_s
optimized_country_code_access = country_code.size
@countries ||= {}
@countries[optimized_country_code_access] ||= {}
@countries[optimized_country_code_access][country_code] = country
end | ruby | def add country_code, country
country_code = country_code.to_s
optimized_country_code_access = country_code.size
@countries ||= {}
@countries[optimized_country_code_access] ||= {}
@countries[optimized_country_code_access][country_code] = country
end | [
"def",
"add",
"country_code",
",",
"country",
"country_code",
"=",
"country_code",
".",
"to_s",
"optimized_country_code_access",
"=",
"country_code",
".",
"size",
"@countries",
"||=",
"{",
"}",
"@countries",
"[",
"optimized_country_code_access",
"]",
"||=",
"{",
"}"... | Add the given country to the mapping under the
given country code. | [
"Add",
"the",
"given",
"country",
"to",
"the",
"mapping",
"under",
"the",
"given",
"country",
"code",
"."
] | 9ca50743499cf478a25fdb927bcdacd29d2c90c7 | https://github.com/floere/phony/blob/9ca50743499cf478a25fdb927bcdacd29d2c90c7/lib/phony/country_codes.rb#L21-L28 | train | Add a country to the country_list | [
30522,
13366,
5587,
2406,
1035,
3642,
1010,
2406,
2406,
1035,
3642,
1027,
2406,
1035,
3642,
1012,
2000,
1035,
1055,
23569,
27605,
5422,
1035,
2406,
1035,
3642,
1035,
3229,
1027,
2406,
1035,
3642,
1012,
2946,
1030,
3032,
1064,
1064,
1027,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_monitor/lib/2018-01-01/generated/azure_mgmt_monitor/metric_definitions.rb | Azure::Monitor::Mgmt::V2018_01_01.MetricDefinitions.list_with_http_info | def list_with_http_info(resource_uri, metricnamespace:nil, custom_headers:nil)
list_async(resource_uri, metricnamespace:metricnamespace, custom_headers:custom_headers).value!
end | ruby | def list_with_http_info(resource_uri, metricnamespace:nil, custom_headers:nil)
list_async(resource_uri, metricnamespace:metricnamespace, custom_headers:custom_headers).value!
end | [
"def",
"list_with_http_info",
"(",
"resource_uri",
",",
"metricnamespace",
":",
"nil",
",",
"custom_headers",
":",
"nil",
")",
"list_async",
"(",
"resource_uri",
",",
"metricnamespace",
":",
"metricnamespace",
",",
"custom_headers",
":custom_headers",
")",
".",
"val... | Lists the metric definitions for the resource.
@param resource_uri [String] The identifier of the resource.
@param metricnamespace [String] Metric namespace to query metric definitions
for.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request.
@return [M... | [
"Lists",
"the",
"metric",
"definitions",
"for",
"the",
"resource",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_monitor/lib/2018-01-01/generated/azure_mgmt_monitor/metric_definitions.rb#L51-L53 | train | Gets the list of the HDInsight Vulnerability Analytics Vulnerability assessment. | [
30522,
13366,
2862,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
24471,
2072,
1010,
12046,
18442,
23058,
1024,
9152,
2140,
30524,
9152,
2140,
1007,
2862,
1035,
2004,
6038,
2278,
1006,
7692,
1035,
24471,
2072,
1010,
12046,
18442,
2... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/api_operation_policy.rb | Azure::ApiManagement::Mgmt::V2018_01_01.ApiOperationPolicy.list_by_operation_with_http_info | def list_by_operation_with_http_info(resource_group_name, service_name, api_id, operation_id, custom_headers:nil)
list_by_operation_async(resource_group_name, service_name, api_id, operation_id, custom_headers:custom_headers).value!
end | ruby | def list_by_operation_with_http_info(resource_group_name, service_name, api_id, operation_id, custom_headers:nil)
list_by_operation_async(resource_group_name, service_name, api_id, operation_id, custom_headers:custom_headers).value!
end | [
"def",
"list_by_operation_with_http_info",
"(",
"resource_group_name",
",",
"service_name",
",",
"api_id",
",",
"operation_id",
",",
"custom_headers",
":",
"nil",
")",
"list_by_operation_async",
"(",
"resource_group_name",
",",
"service_name",
",",
"api_id",
",",
"opera... | Get the list of policy configuration at the API Operation level.
@param resource_group_name [String] The name of the resource group.
@param service_name [String] The name of the API Management service.
@param api_id [String] API revision identifier. Must be unique in the current
API Management service instance. No... | [
"Get",
"the",
"list",
"of",
"policy",
"configuration",
"at",
"the",
"API",
"Operation",
"level",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/api_operation_policy.rb#L59-L61 | train | Gets the list of the documents that are associated with the specified operation. | [
30522,
13366,
2862,
1035,
2011,
1035,
3169,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2326,
1035,
2171,
1010,
17928,
1035,
8909,
1010,
3169,
1035,
8909,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_storage/lib/2018-03-01-preview/generated/azure_mgmt_storage/storage_accounts.rb | Azure::Storage::Mgmt::V2018_03_01_preview.StorageAccounts.create_or_update_management_policies_with_http_info | def create_or_update_management_policies_with_http_info(resource_group_name, account_name, properties, custom_headers:nil)
create_or_update_management_policies_async(resource_group_name, account_name, properties, custom_headers:custom_headers).value!
end | ruby | def create_or_update_management_policies_with_http_info(resource_group_name, account_name, properties, custom_headers:nil)
create_or_update_management_policies_async(resource_group_name, account_name, properties, custom_headers:custom_headers).value!
end | [
"def",
"create_or_update_management_policies_with_http_info",
"(",
"resource_group_name",
",",
"account_name",
",",
"properties",
",",
"custom_headers",
":",
"nil",
")",
"create_or_update_management_policies_async",
"(",
"resource_group_name",
",",
"account_name",
",",
"propert... | Sets the data policy rules associated with the specified storage account.
@param resource_group_name [String] The name of the resource group within the
user's subscription. The name is case insensitive.
@param account_name [String] The name of the storage account within the
specified resource group. Storage accoun... | [
"Sets",
"the",
"data",
"policy",
"rules",
"associated",
"with",
"the",
"specified",
"storage",
"account",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_storage/lib/2018-03-01-preview/generated/azure_mgmt_storage/storage_accounts.rb#L1349-L1351 | train | Creates or updates management policies. | [
30522,
13366,
3443,
1035,
2030,
1035,
10651,
1035,
2968,
1035,
6043,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
4070,
1035,
2171,
1010,
5144,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3443,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
randym/axlsx | lib/axlsx/stylesheet/table_styles.rb | Axlsx.TableStyles.to_xml_string | def to_xml_string(str = '')
str << '<tableStyles '
serialized_attributes str, {:count => self.size }
str << '>'
each { |table_style| table_style.to_xml_string(str) }
str << '</tableStyles>'
end | ruby | def to_xml_string(str = '')
str << '<tableStyles '
serialized_attributes str, {:count => self.size }
str << '>'
each { |table_style| table_style.to_xml_string(str) }
str << '</tableStyles>'
end | [
"def",
"to_xml_string",
"(",
"str",
"=",
"''",
")",
"str",
"<<",
"'<tableStyles '",
"serialized_attributes",
"str",
",",
"{",
":count",
"=>",
"self",
".",
"size",
"}",
"str",
"<<",
"'>'",
"each",
"{",
"|",
"table_style",
"|",
"table_style",
".",
"to_xml_st... | Serializes the object
@param [String] str
@return [String] | [
"Serializes",
"the",
"object"
] | c593a08b2a929dac7aa8dc418b55e26b4c49dc34 | https://github.com/randym/axlsx/blob/c593a08b2a929dac7aa8dc418b55e26b4c49dc34/lib/axlsx/stylesheet/table_styles.rb#L36-L42 | train | Serialize the table styles to a string. | [
30522,
13366,
2000,
1035,
20950,
1035,
5164,
1006,
2358,
2099,
1027,
1005,
1005,
1007,
2358,
2099,
1026,
1026,
1005,
1026,
7251,
27983,
2015,
1005,
27289,
1035,
12332,
2358,
2099,
1010,
1063,
1024,
4175,
1027,
1028,
2969,
1012,
2946,
1065,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
CocoaPods/Xcodeproj | lib/xcodeproj/workspace.rb | Xcodeproj.Workspace.<< | def <<(path_or_reference)
return unless @document && @document.respond_to?(:root)
case path_or_reference
when String
project_file_reference = Xcodeproj::Workspace::FileReference.new(path_or_reference)
when Xcodeproj::Workspace::FileReference
project_file_reference = path_or_refe... | ruby | def <<(path_or_reference)
return unless @document && @document.respond_to?(:root)
case path_or_reference
when String
project_file_reference = Xcodeproj::Workspace::FileReference.new(path_or_reference)
when Xcodeproj::Workspace::FileReference
project_file_reference = path_or_refe... | [
"def",
"<<",
"(",
"path_or_reference",
")",
"return",
"unless",
"@document",
"&&",
"@document",
".",
"respond_to?",
"(",
":root",
")",
"case",
"path_or_reference",
"when",
"String",
"project_file_reference",
"=",
"Xcodeproj",
"::",
"Workspace",
"::",
"FileReference"... | Adds a new path to the list of the of projects contained in the
workspace.
@param [String, Xcodeproj::Workspace::FileReference] path_or_reference
A string or Xcode::Workspace::FileReference containing a path to an Xcode project
@raise [ArgumentError] Raised if the input is neither a String nor a FileReferen... | [
"Adds",
"a",
"new",
"path",
"to",
"the",
"list",
"of",
"the",
"of",
"projects",
"contained",
"in",
"the",
"workspace",
".",
"@param",
"[",
"String",
"Xcodeproj",
"::",
"Workspace",
"::",
"FileReference",
"]",
"path_or_reference",
"A",
"string",
"or",
"Xcode"... | 3be1684437a6f8e69c7836ad4c85a2b78663272f | https://github.com/CocoaPods/Xcodeproj/blob/3be1684437a6f8e69c7836ad4c85a2b78663272f/lib/xcodeproj/workspace.rb#L98-L113 | train | Adds a file or file reference to the document. | [
30522,
13366,
1026,
1026,
1006,
4130,
1035,
2030,
1035,
4431,
1007,
2709,
4983,
1030,
6254,
1004,
1004,
1030,
6254,
1012,
6869,
1035,
2000,
1029,
1006,
1024,
7117,
1007,
2553,
4130,
1035,
2030,
1035,
4431,
2043,
5164,
2622,
1035,
5371,
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... |
aws/aws-sdk-ruby | gems/aws-sdk-iam/lib/aws-sdk-iam/policy.rb | Aws::IAM.Policy.attach_group | def attach_group(options = {})
options = options.merge(policy_arn: @arn)
resp = @client.attach_group_policy(options)
resp.data
end | ruby | def attach_group(options = {})
options = options.merge(policy_arn: @arn)
resp = @client.attach_group_policy(options)
resp.data
end | [
"def",
"attach_group",
"(",
"options",
"=",
"{",
"}",
")",
"options",
"=",
"options",
".",
"merge",
"(",
"policy_arn",
":",
"@arn",
")",
"resp",
"=",
"@client",
".",
"attach_group_policy",
"(",
"options",
")",
"resp",
".",
"data",
"end"
] | @!group Actions
@example Request syntax with placeholder values
policy.attach_group({
group_name: "groupNameType", # required
})
@param [Hash] options ({})
@option options [required, String] :group_name
The name (friendly name, not ARN) of the group to attach the policy
to.
This parameter allow... | [
"@!group",
"Actions",
"@example",
"Request",
"syntax",
"with",
"placeholder",
"values"
] | e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d | https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-iam/lib/aws-sdk-iam/policy.rb#L287-L291 | train | Attach policy to a group | [
30522,
13366,
22476,
1035,
2177,
1006,
7047,
1027,
1063,
1065,
1007,
7047,
1027,
7047,
1012,
13590,
1006,
3343,
1035,
12098,
2078,
1024,
1030,
12098,
2078,
1007,
24501,
2361,
1027,
1030,
7396,
1012,
22476,
1035,
2177,
1035,
3343,
1006,
7047... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
commander-rb/commander | lib/commander/runner.rb | Commander.Runner.expand_optionally_negative_switches | def expand_optionally_negative_switches(switches)
switches.reduce([]) do |memo, val|
if val =~ /\[no-\]/
memo << val.gsub(/\[no-\]/, '')
memo << val.gsub(/\[no-\]/, 'no-')
else
memo << val
end
end
end | ruby | def expand_optionally_negative_switches(switches)
switches.reduce([]) do |memo, val|
if val =~ /\[no-\]/
memo << val.gsub(/\[no-\]/, '')
memo << val.gsub(/\[no-\]/, 'no-')
else
memo << val
end
end
end | [
"def",
"expand_optionally_negative_switches",
"(",
"switches",
")",
"switches",
".",
"reduce",
"(",
"[",
"]",
")",
"do",
"|",
"memo",
",",
"val",
"|",
"if",
"val",
"=~",
"/",
"\\[",
"\\]",
"/",
"memo",
"<<",
"val",
".",
"gsub",
"(",
"/",
"\\[",
"\\]"... | expand switches of the style '--[no-]blah' into both their
'--blah' and '--no-blah' variants, so that they can be
properly detected and removed | [
"expand",
"switches",
"of",
"the",
"style",
"--",
"[",
"no",
"-",
"]",
"blah",
"into",
"both",
"their",
"--",
"blah",
"and",
"--",
"no",
"-",
"blah",
"variants",
"so",
"that",
"they",
"can",
"be",
"properly",
"detected",
"and",
"removed"
] | 332047c14948225462fe60042eed23adfb996d68 | https://github.com/commander-rb/commander/blob/332047c14948225462fe60042eed23adfb996d68/lib/commander/runner.rb#L360-L369 | train | Expand the given array of switches to be the same as the ones in the array. | [
30522,
13366,
7818,
1035,
11887,
2135,
1035,
4997,
1035,
15924,
1006,
15924,
1007,
15924,
1012,
5547,
1006,
1031,
1033,
1007,
2079,
1064,
24443,
1010,
11748,
1064,
2065,
11748,
1027,
1066,
1013,
1032,
1031,
2053,
1011,
1032,
1033,
1013,
244... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
rmagick/rmagick | lib/rmagick_internal.rb | Magick.Image.view | def view(x, y, width, height)
view = View.new(self, x, y, width, height)
return view unless block_given?
begin
yield(view)
ensure
view.sync
end
nil
end | ruby | def view(x, y, width, height)
view = View.new(self, x, y, width, height)
return view unless block_given?
begin
yield(view)
ensure
view.sync
end
nil
end | [
"def",
"view",
"(",
"x",
",",
"y",
",",
"width",
",",
"height",
")",
"view",
"=",
"View",
".",
"new",
"(",
"self",
",",
"x",
",",
"y",
",",
"width",
",",
"height",
")",
"return",
"view",
"unless",
"block_given?",
"begin",
"yield",
"(",
"view",
")... | Construct a view. If a block is present, yield and pass the view
object, otherwise return the view object. | [
"Construct",
"a",
"view",
".",
"If",
"a",
"block",
"is",
"present",
"yield",
"and",
"pass",
"the",
"view",
"object",
"otherwise",
"return",
"the",
"view",
"object",
"."
] | ef6688ed9d76bf123c2ea1a483eff8635051adb7 | https://github.com/rmagick/rmagick/blob/ef6688ed9d76bf123c2ea1a483eff8635051adb7/lib/rmagick_internal.rb#L997-L1008 | train | Creates a new view object. | [
30522,
13366,
3193,
1006,
1060,
1010,
1061,
1010,
9381,
1010,
4578,
1007,
3193,
1027,
3193,
1012,
2047,
1006,
2969,
1010,
1060,
1010,
1061,
1010,
9381,
1010,
4578,
1007,
2709,
3193,
4983,
3796,
1035,
2445,
1029,
4088,
10750,
1006,
3193,
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_service_fabric/lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb | Azure::ServiceFabric::V6_2_0_9.ServiceFabricClientAPIs.invoke_container_api | def invoke_container_api(node_name, application_id, service_manifest_name, code_package_name, code_package_instance_id, container_api_request_body, timeout:60, custom_headers:nil)
response = invoke_container_api_async(node_name, application_id, service_manifest_name, code_package_name, code_package_instance_id, c... | ruby | def invoke_container_api(node_name, application_id, service_manifest_name, code_package_name, code_package_instance_id, container_api_request_body, timeout:60, custom_headers:nil)
response = invoke_container_api_async(node_name, application_id, service_manifest_name, code_package_name, code_package_instance_id, c... | [
"def",
"invoke_container_api",
"(",
"node_name",
",",
"application_id",
",",
"service_manifest_name",
",",
"code_package_name",
",",
"code_package_instance_id",
",",
"container_api_request_body",
",",
"timeout",
":",
"60",
",",
"custom_headers",
":",
"nil",
")",
"respon... | Invoke container API on a container deployed on a Service Fabric node.
Invoke container API on a container deployed on a Service Fabric node for the
given code package.
@param node_name [String] The name of the node.
@param application_id [String] The identity of the application. This is
typically the full name ... | [
"Invoke",
"container",
"API",
"on",
"a",
"container",
"deployed",
"on",
"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#L17555-L17558 | train | Invoke the container API. | [
30522,
13366,
1999,
6767,
3489,
1035,
11661,
1035,
17928,
1006,
13045,
1035,
2171,
1010,
4646,
1035,
8909,
1010,
2326,
1035,
19676,
1035,
2171,
1010,
3642,
1035,
7427,
1035,
2171,
1010,
3642,
1035,
7427,
1035,
6013,
1035,
8909,
1010,
11661,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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/utils/cookies_config.rb | SecureHeaders.CookiesConfig.validate_exclusive_use_of_samesite_enforcement! | def validate_exclusive_use_of_samesite_enforcement!(attribute)
if (intersection = (config[:samesite][:lax].fetch(attribute, []) & config[:samesite][:strict].fetch(attribute, []))).any?
raise CookiesConfigError.new("samesite cookie config is invalid, cookie(s) #{intersection.join(', ')} cannot be enforced ... | ruby | def validate_exclusive_use_of_samesite_enforcement!(attribute)
if (intersection = (config[:samesite][:lax].fetch(attribute, []) & config[:samesite][:strict].fetch(attribute, []))).any?
raise CookiesConfigError.new("samesite cookie config is invalid, cookie(s) #{intersection.join(', ')} cannot be enforced ... | [
"def",
"validate_exclusive_use_of_samesite_enforcement!",
"(",
"attribute",
")",
"if",
"(",
"intersection",
"=",
"(",
"config",
"[",
":samesite",
"]",
"[",
":lax",
"]",
".",
"fetch",
"(",
"attribute",
",",
"[",
"]",
")",
"&",
"config",
"[",
":samesite",
"]",... | validate exclusivity of only and except members within strict and lax | [
"validate",
"exclusivity",
"of",
"only",
"and",
"except",
"members",
"within",
"strict",
"and",
"lax"
] | 543e6712aadae08f1653ed973e6b6204f7eac26a | https://github.com/twitter/secure_headers/blob/543e6712aadae08f1653ed973e6b6204f7eac26a/lib/secure_headers/utils/cookies_config.rb#L81-L85 | train | Validate the exclusive use of a particular attribute | [
30522,
13366,
9398,
3686,
1035,
7262,
1035,
2224,
1035,
1997,
1035,
2168,
28032,
2063,
1035,
7285,
999,
1006,
17961,
1007,
2065,
1006,
6840,
1027,
1006,
9530,
8873,
2290,
1031,
1024,
2168,
28032,
2063,
1033,
1031,
1024,
27327,
1033,
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_automation/lib/2015-10-31/generated/azure_mgmt_automation/job_schedule_operations.rb | Azure::Automation::Mgmt::V2015_10_31.JobScheduleOperations.create_with_http_info | def create_with_http_info(resource_group_name, automation_account_name, job_schedule_id, parameters, custom_headers:nil)
create_async(resource_group_name, automation_account_name, job_schedule_id, parameters, custom_headers:custom_headers).value!
end | ruby | def create_with_http_info(resource_group_name, automation_account_name, job_schedule_id, parameters, custom_headers:nil)
create_async(resource_group_name, automation_account_name, job_schedule_id, parameters, custom_headers:custom_headers).value!
end | [
"def",
"create_with_http_info",
"(",
"resource_group_name",
",",
"automation_account_name",
",",
"job_schedule_id",
",",
"parameters",
",",
"custom_headers",
":",
"nil",
")",
"create_async",
"(",
"resource_group_name",
",",
"automation_account_name",
",",
"job_schedule_id",... | Create a job schedule.
@param resource_group_name [String] Name of an Azure Resource group.
@param automation_account_name [String] The name of the automation account.
@param job_schedule_id The job schedule name.
@param parameters [JobScheduleCreateParameters] The parameters supplied to
the create job schedule o... | [
"Create",
"a",
"job",
"schedule",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_automation/lib/2015-10-31/generated/azure_mgmt_automation/job_schedule_operations.rb#L242-L244 | train | Creates a job schedule. | [
30522,
13366,
3443,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
19309,
1035,
4070,
1035,
2171,
1010,
3105,
1035,
6134,
1035,
8909,
1010,
11709,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3443,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_network/lib/2018-08-01/generated/azure_mgmt_network/network_watchers.rb | Azure::Network::Mgmt::V2018_08_01.NetworkWatchers.begin_verify_ipflow_with_http_info | def begin_verify_ipflow_with_http_info(resource_group_name, network_watcher_name, parameters, custom_headers:nil)
begin_verify_ipflow_async(resource_group_name, network_watcher_name, parameters, custom_headers:custom_headers).value!
end | ruby | def begin_verify_ipflow_with_http_info(resource_group_name, network_watcher_name, parameters, custom_headers:nil)
begin_verify_ipflow_async(resource_group_name, network_watcher_name, parameters, custom_headers:custom_headers).value!
end | [
"def",
"begin_verify_ipflow_with_http_info",
"(",
"resource_group_name",
",",
"network_watcher_name",
",",
"parameters",
",",
"custom_headers",
":",
"nil",
")",
"begin_verify_ipflow_async",
"(",
"resource_group_name",
",",
"network_watcher_name",
",",
"parameters",
",",
"cu... | Verify IP flow from the specified VM to a location given the currently
configured NSG rules.
@param resource_group_name [String] The name of the resource group.
@param network_watcher_name [String] The name of the network watcher.
@param parameters [VerificationIPFlowParameters] Parameters that define the
IP flow... | [
"Verify",
"IP",
"flow",
"from",
"the",
"specified",
"VM",
"to",
"a",
"location",
"given",
"the",
"currently",
"configured",
"NSG",
"rules",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_network/lib/2018-08-01/generated/azure_mgmt_network/network_watchers.rb#L1302-L1304 | train | Verify IP flow. | [
30522,
13366,
4088,
1035,
20410,
1035,
12997,
12314,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2897,
1035,
3422,
2121,
1035,
2171,
1010,
11709,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
4088... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
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.list_by_database_advisor_with_http_info | def list_by_database_advisor_with_http_info(resource_group_name, server_name, database_name, advisor_name, custom_headers:nil)
list_by_database_advisor_async(resource_group_name, server_name, database_name, advisor_name, custom_headers:custom_headers).value!
end | ruby | def list_by_database_advisor_with_http_info(resource_group_name, server_name, database_name, advisor_name, custom_headers:nil)
list_by_database_advisor_async(resource_group_name, server_name, database_name, advisor_name, custom_headers:custom_headers).value!
end | [
"def",
"list_by_database_advisor_with_http_info",
"(",
"resource_group_name",
",",
"server_name",
",",
"database_name",
",",
"advisor_name",
",",
"custom_headers",
":",
"nil",
")",
"list_by_database_advisor_async",
"(",
"resource_group_name",
",",
"server_name",
",",
"datab... | Gets list of Database Recommended Actions.
@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 d... | [
"Gets",
"list",
"of",
"Database",
"Recommended",
"Actions",
"."
] | 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#L60-L62 | train | Gets the list of all the documents in a database advisor. | [
30522,
13366,
2862,
1035,
2011,
1035,
7809,
1035,
8619,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
8241,
1035,
2171,
1010,
7809,
1035,
2171,
1010,
8619,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
rails/rails | actionpack/lib/action_controller/metal/streaming.rb | ActionController.Streaming._process_options | def _process_options(options)
super
if options[:stream]
if request.version == "HTTP/1.0"
options.delete(:stream)
else
headers["Cache-Control"] ||= "no-cache"
headers["Transfer-Encoding"] = "chunked"
headers.delete("Content-Length")
... | ruby | def _process_options(options)
super
if options[:stream]
if request.version == "HTTP/1.0"
options.delete(:stream)
else
headers["Cache-Control"] ||= "no-cache"
headers["Transfer-Encoding"] = "chunked"
headers.delete("Content-Length")
... | [
"def",
"_process_options",
"(",
"options",
")",
"super",
"if",
"options",
"[",
":stream",
"]",
"if",
"request",
".",
"version",
"==",
"\"HTTP/1.0\"",
"options",
".",
"delete",
"(",
":stream",
")",
"else",
"headers",
"[",
"\"Cache-Control\"",
"]",
"||=",
"\"n... | Set proper cache control and transfer encoding when streaming | [
"Set",
"proper",
"cache",
"control",
"and",
"transfer",
"encoding",
"when",
"streaming"
] | 85a8bc644be69908f05740a5886ec19cd3679df5 | https://github.com/rails/rails/blob/85a8bc644be69908f05740a5886ec19cd3679df5/actionpack/lib/action_controller/metal/streaming.rb#L201-L212 | train | process options | [
30522,
13366,
1035,
2832,
1035,
7047,
1006,
7047,
1007,
3565,
2065,
7047,
1031,
1024,
5460,
1033,
2065,
5227,
1012,
2544,
1027,
1027,
1000,
8299,
1013,
1015,
1012,
1014,
1000,
7047,
1012,
3972,
12870,
1006,
1024,
5460,
1007,
2842,
20346,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
mongodb/mongoid | lib/mongoid/persistence_context.rb | Mongoid.PersistenceContext.client | def client
@client ||= (client = Clients.with_name(client_name)
client = client.use(database_name) if database_name_option
client.with(client_options))
end | ruby | def client
@client ||= (client = Clients.with_name(client_name)
client = client.use(database_name) if database_name_option
client.with(client_options))
end | [
"def",
"client",
"@client",
"||=",
"(",
"client",
"=",
"Clients",
".",
"with_name",
"(",
"client_name",
")",
"client",
"=",
"client",
".",
"use",
"(",
"database_name",
")",
"if",
"database_name_option",
"client",
".",
"with",
"(",
"client_options",
")",
")",... | Get the client for this persistence context.
@example Get the client for this persistence context.
context.client
@return [ Mongo::Client ] The client for this persistence
context.
@since 6.0.0 | [
"Get",
"the",
"client",
"for",
"this",
"persistence",
"context",
"."
] | 56976e32610f4c2450882b0bfe14da099f0703f4 | https://github.com/mongodb/mongoid/blob/56976e32610f4c2450882b0bfe14da099f0703f4/lib/mongoid/persistence_context.rb#L111-L115 | train | Returns the client object for this client. | [
30522,
13366,
7396,
1030,
7396,
1064,
1064,
1027,
1006,
7396,
1027,
7846,
1012,
2007,
1035,
2171,
1006,
7396,
1035,
2171,
1007,
7396,
1027,
7396,
1012,
2224,
1006,
7809,
1035,
2171,
1007,
2065,
7809,
1035,
2171,
1035,
5724,
7396,
1012,
20... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
rails/rails | activesupport/lib/active_support/subscriber.rb | ActiveSupport.Subscriber.start | def start(name, id, payload)
event = ActiveSupport::Notifications::Event.new(name, nil, nil, id, payload)
event.start!
parent = event_stack.last
parent << event if parent
event_stack.push event
end | ruby | def start(name, id, payload)
event = ActiveSupport::Notifications::Event.new(name, nil, nil, id, payload)
event.start!
parent = event_stack.last
parent << event if parent
event_stack.push event
end | [
"def",
"start",
"(",
"name",
",",
"id",
",",
"payload",
")",
"event",
"=",
"ActiveSupport",
"::",
"Notifications",
"::",
"Event",
".",
"new",
"(",
"name",
",",
"nil",
",",
"nil",
",",
"id",
",",
"payload",
")",
"event",
".",
"start!",
"parent",
"=",
... | :nodoc: | [
":",
"nodoc",
":"
] | 85a8bc644be69908f05740a5886ec19cd3679df5 | https://github.com/rails/rails/blob/85a8bc644be69908f05740a5886ec19cd3679df5/activesupport/lib/active_support/subscriber.rb#L130-L137 | train | Starts an event | [
30522,
13366,
2707,
1006,
2171,
1010,
8909,
1010,
18093,
1007,
2724,
1027,
3161,
6342,
9397,
11589,
1024,
1024,
26828,
2015,
1024,
1024,
2724,
1012,
2047,
1006,
2171,
1010,
9152,
2140,
1010,
9152,
2140,
1010,
8909,
1010,
18093,
1007,
2724,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
randym/axlsx | lib/axlsx/workbook/worksheet/pivot_table.rb | Axlsx.PivotTable.range= | def range=(v)
DataTypeValidator.validate "#{self.class}.range", [String], v
if v.is_a?(String)
@range = v
end
end | ruby | def range=(v)
DataTypeValidator.validate "#{self.class}.range", [String], v
if v.is_a?(String)
@range = v
end
end | [
"def",
"range",
"=",
"(",
"v",
")",
"DataTypeValidator",
".",
"validate",
"\"#{self.class}.range\"",
",",
"[",
"String",
"]",
",",
"v",
"if",
"v",
".",
"is_a?",
"(",
"String",
")",
"@range",
"=",
"v",
"end",
"end"
] | (see #range) | [
"(",
"see",
"#range",
")"
] | c593a08b2a929dac7aa8dc418b55e26b4c49dc34 | https://github.com/randym/axlsx/blob/c593a08b2a929dac7aa8dc418b55e26b4c49dc34/lib/axlsx/workbook/worksheet/pivot_table.rb#L68-L73 | train | Set the range of the formula. | [
30522,
13366,
2846,
1027,
1006,
1058,
1007,
2951,
13874,
10175,
8524,
4263,
1012,
9398,
30524,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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.delete_regex_entity_role_with_http_info | def delete_regex_entity_role_with_http_info(app_id, version_id, entity_id, role_id, custom_headers:nil)
delete_regex_entity_role_async(app_id, version_id, entity_id, role_id, custom_headers:custom_headers).value!
end | ruby | def delete_regex_entity_role_with_http_info(app_id, version_id, entity_id, role_id, custom_headers:nil)
delete_regex_entity_role_async(app_id, version_id, entity_id, role_id, custom_headers:custom_headers).value!
end | [
"def",
"delete_regex_entity_role_with_http_info",
"(",
"app_id",
",",
"version_id",
",",
"entity_id",
",",
"role_id",
",",
"custom_headers",
":",
"nil",
")",
"delete_regex_entity_role_async",
"(",
"app_id",
",",
"version_id",
",",
"entity_id",
",",
"role_id",
",",
"... | Delete a role for a given regular expression in a version of the application.
@param app_id The application ID.
@param version_id [String] The version ID.
@param entity_id The entity ID.
@param role_id The entity role Id.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added ... | [
"Delete",
"a",
"role",
"for",
"a",
"given",
"regular",
"expression",
"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#L9949-L9951 | train | Deletes a regex entity role. | [
30522,
13366,
3972,
12870,
1035,
19723,
10288,
1035,
9178,
1035,
2535,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
10439,
1035,
8909,
1010,
2544,
1035,
8909,
1010,
9178,
1035,
8909,
1010,
2535,
1035,
8909,
1010,
7661,
1035,
20346,
2015,
1024... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_sql/lib/2017-10-01-preview/generated/azure_mgmt_sql/database_vulnerability_assessment_scans.rb | Azure::SQL::Mgmt::V2017_10_01_preview.DatabaseVulnerabilityAssessmentScans.list_by_database_next | def list_by_database_next(next_page_link, custom_headers:nil)
response = list_by_database_next_async(next_page_link, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def list_by_database_next(next_page_link, custom_headers:nil)
response = list_by_database_next_async(next_page_link, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"list_by_database_next",
"(",
"next_page_link",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"list_by_database_next_async",
"(",
"next_page_link",
",",
"custom_headers",
":custom_headers",
")",
".",
"value!",
"response",
".",
"body",
"unless",
"resp... | Lists the vulnerability assessment scans of a database.
@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 [VulnerabilityAssessmentScanRecordListRe... | [
"Lists",
"the",
"vulnerability",
"assessment",
"scans",
"of",
"a",
"database",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_sql/lib/2017-10-01-preview/generated/azure_mgmt_sql/database_vulnerability_assessment_scans.rb#L517-L520 | train | Gets the list of all the documents in a database. | [
30522,
13366,
2862,
1035,
2011,
1035,
7809,
1035,
2279,
1006,
2279,
1035,
3931,
1035,
4957,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
2862,
1035,
2011,
1035,
7809,
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... |
randym/axlsx | lib/axlsx/workbook/shared_strings_table.rb | Axlsx.SharedStringsTable.to_xml_string | def to_xml_string(str='')
Axlsx::sanitize(@shared_xml_string)
str << ('<?xml version="1.0" encoding="UTF-8"?><sst xmlns="' << XML_NS << '"')
str << (' count="' << @count.to_s << '" uniqueCount="' << unique_count.to_s << '"')
str << (' xml:space="' << xml_space.to_s << '">' << @shared_xml_string ... | ruby | def to_xml_string(str='')
Axlsx::sanitize(@shared_xml_string)
str << ('<?xml version="1.0" encoding="UTF-8"?><sst xmlns="' << XML_NS << '"')
str << (' count="' << @count.to_s << '" uniqueCount="' << unique_count.to_s << '"')
str << (' xml:space="' << xml_space.to_s << '">' << @shared_xml_string ... | [
"def",
"to_xml_string",
"(",
"str",
"=",
"''",
")",
"Axlsx",
"::",
"sanitize",
"(",
"@shared_xml_string",
")",
"str",
"<<",
"(",
"'<?xml version=\"1.0\" encoding=\"UTF-8\"?><sst xmlns=\"'",
"<<",
"XML_NS",
"<<",
"'\"'",
")",
"str",
"<<",
"(",
"' count=\"'",
"<<",
... | Creates a new Shared Strings Table agains an array of cells
@param [Array] cells This is an array of all of the cells in the workbook
@param [Symbol] xml_space The xml:space behavior for the shared string table.
Serializes the object
@param [String] str
@return [String] | [
"Creates",
"a",
"new",
"Shared",
"Strings",
"Table",
"agains",
"an",
"array",
"of",
"cells"
] | c593a08b2a929dac7aa8dc418b55e26b4c49dc34 | https://github.com/randym/axlsx/blob/c593a08b2a929dac7aa8dc418b55e26b4c49dc34/lib/axlsx/workbook/shared_strings_table.rb#L49-L54 | train | Convert the object to XML string. | [
30522,
13366,
2000,
1035,
20950,
1035,
5164,
1006,
2358,
2099,
1027,
1005,
1005,
1007,
22260,
4877,
2595,
1024,
1024,
2624,
25090,
4371,
1006,
1030,
4207,
1035,
20950,
1035,
5164,
1007,
2358,
2099,
1026,
1026,
1006,
1005,
1026,
1029,
20950,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
rubocop-hq/rubocop | lib/rubocop/config.rb | RuboCop.Config.base_dir_for_path_parameters | def base_dir_for_path_parameters
@base_dir_for_path_parameters ||=
if File.basename(loaded_path).start_with?('.rubocop') &&
loaded_path != File.join(Dir.home, ConfigLoader::DOTFILE)
File.expand_path(File.dirname(loaded_path))
else
Dir.pwd
end
end | ruby | def base_dir_for_path_parameters
@base_dir_for_path_parameters ||=
if File.basename(loaded_path).start_with?('.rubocop') &&
loaded_path != File.join(Dir.home, ConfigLoader::DOTFILE)
File.expand_path(File.dirname(loaded_path))
else
Dir.pwd
end
end | [
"def",
"base_dir_for_path_parameters",
"@base_dir_for_path_parameters",
"||=",
"if",
"File",
".",
"basename",
"(",
"loaded_path",
")",
".",
"start_with?",
"(",
"'.rubocop'",
")",
"&&",
"loaded_path",
"!=",
"File",
".",
"join",
"(",
"Dir",
".",
"home",
",",
"Conf... | Paths specified in configuration files starting with .rubocop are
relative to the directory where that file is. Paths in other config files
are relative to the current directory. This is so that paths in
config/default.yml, for example, are not relative to RuboCop's config
directory since that wouldn't work. | [
"Paths",
"specified",
"in",
"configuration",
"files",
"starting",
"with",
".",
"rubocop",
"are",
"relative",
"to",
"the",
"directory",
"where",
"that",
"file",
"is",
".",
"Paths",
"in",
"other",
"config",
"files",
"are",
"relative",
"to",
"the",
"current",
"... | 2a4f4f0fdac4e1bb25891fc312af2ea60c6aa2f0 | https://github.com/rubocop-hq/rubocop/blob/2a4f4f0fdac4e1bb25891fc312af2ea60c6aa2f0/lib/rubocop/config.rb#L442-L450 | train | Returns the base_dir_for_path_parameters for the path parameters | [
30522,
13366,
2918,
1035,
16101,
1035,
2005,
1035,
4130,
1035,
11709,
1030,
2918,
1035,
16101,
1035,
2005,
1035,
4130,
1035,
11709,
1064,
1064,
1027,
2065,
5371,
1012,
2918,
18442,
1006,
8209,
1035,
4130,
1007,
1012,
2707,
1035,
2007,
1029,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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/bolt | lib/bolt/r10k_log_proxy.rb | Bolt.R10KLogProxy.to_bolt_level | def to_bolt_level(level_num)
level_str = Log4r::LNAMES[level_num]&.downcase || 'debug'
if level_str =~ /debug/
:debug
else
level_str.to_sym
end
end | ruby | def to_bolt_level(level_num)
level_str = Log4r::LNAMES[level_num]&.downcase || 'debug'
if level_str =~ /debug/
:debug
else
level_str.to_sym
end
end | [
"def",
"to_bolt_level",
"(",
"level_num",
")",
"level_str",
"=",
"Log4r",
"::",
"LNAMES",
"[",
"level_num",
"]",
"&.",
"downcase",
"||",
"'debug'",
"if",
"level_str",
"=~",
"/",
"/",
":debug",
"else",
"level_str",
".",
"to_sym",
"end",
"end"
] | Convert an r10k log level to a bolt log level. These correspond 1-to-1
except that r10k has debug, debug1, and debug2. The log event has the log
level as an integer that we need to look up. | [
"Convert",
"an",
"r10k",
"log",
"level",
"to",
"a",
"bolt",
"log",
"level",
".",
"These",
"correspond",
"1",
"-",
"to",
"-",
"1",
"except",
"that",
"r10k",
"has",
"debug",
"debug1",
"and",
"debug2",
".",
"The",
"log",
"event",
"has",
"the",
"log",
"l... | 50689a33699939d262ea7c822a4b24fd8c4f8d8a | https://github.com/puppetlabs/bolt/blob/50689a33699939d262ea7c822a4b24fd8c4f8d8a/lib/bolt/r10k_log_proxy.rb#L21-L28 | train | Returns the level number for the log | [
30522,
13366,
2000,
1035,
10053,
1035,
2504,
1006,
2504,
1035,
16371,
2213,
1007,
2504,
1035,
2358,
2099,
1027,
8833,
2549,
2099,
1024,
1024,
1048,
18442,
2015,
1031,
2504,
1035,
16371,
2213,
1033,
30524,
2842,
2504,
1035,
2358,
2099,
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... |
elastic/apm-agent-ruby | lib/elastic_apm/config.rb | ElasticAPM.Config.set_from_env | def set_from_env
ENV_TO_KEY.each do |env_key, key|
next unless (value = ENV[env_key])
type, key = key if key.is_a? Array
value =
case type
when :int then value.to_i
when :float then value.to_f
when :bool then !%w[0 false].include?(value.strip.downc... | ruby | def set_from_env
ENV_TO_KEY.each do |env_key, key|
next unless (value = ENV[env_key])
type, key = key if key.is_a? Array
value =
case type
when :int then value.to_i
when :float then value.to_f
when :bool then !%w[0 false].include?(value.strip.downc... | [
"def",
"set_from_env",
"ENV_TO_KEY",
".",
"each",
"do",
"|",
"env_key",
",",
"key",
"|",
"next",
"unless",
"(",
"value",
"=",
"ENV",
"[",
"env_key",
"]",
")",
"type",
",",
"key",
"=",
"key",
"if",
"key",
".",
"is_a?",
"Array",
"value",
"=",
"case",
... | rubocop:disable Metrics/MethodLength, Metrics/CyclomaticComplexity
rubocop:disable Metrics/AbcSize | [
"rubocop",
":",
"disable",
"Metrics",
"/",
"MethodLength",
"Metrics",
"/",
"CyclomaticComplexity",
"rubocop",
":",
"disable",
"Metrics",
"/",
"AbcSize"
] | 82190d1a9ba22af3b2c2c6fe6d23cc471f2e7ff6 | https://github.com/elastic/apm-agent-ruby/blob/82190d1a9ba22af3b2c2c6fe6d23cc471f2e7ff6/lib/elastic_apm/config.rb#L354-L372 | train | Set the value of the environment variable | [
30522,
13366,
2275,
1035,
2013,
1035,
4372,
2615,
4372,
2615,
1035,
2000,
1035,
3145,
1012,
2169,
2079,
1064,
4372,
2615,
1035,
3145,
1010,
3145,
1064,
2279,
4983,
1006,
3643,
1027,
4372,
2615,
1031,
4372,
2615,
1035,
3145,
1033,
1007,
28... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
activeadmin/activeadmin | lib/active_admin/application.rb | ActiveAdmin.Application.load! | def load!
unless loaded?
ActiveSupport::Notifications.publish BeforeLoadEvent, self # before_load hook
files.each { |file| load file } # load files
namespace(default_namespace) # init AA resources
ActiveSupport::Notifications... | ruby | def load!
unless loaded?
ActiveSupport::Notifications.publish BeforeLoadEvent, self # before_load hook
files.each { |file| load file } # load files
namespace(default_namespace) # init AA resources
ActiveSupport::Notifications... | [
"def",
"load!",
"unless",
"loaded?",
"ActiveSupport",
"::",
"Notifications",
".",
"publish",
"BeforeLoadEvent",
",",
"self",
"# before_load hook",
"files",
".",
"each",
"{",
"|",
"file",
"|",
"load",
"file",
"}",
"# load files",
"namespace",
"(",
"default_namespac... | Loads all ruby files that are within the load_paths setting.
To reload everything simply call `ActiveAdmin.unload!` | [
"Loads",
"all",
"ruby",
"files",
"that",
"are",
"within",
"the",
"load_paths",
"setting",
".",
"To",
"reload",
"everything",
"simply",
"call",
"ActiveAdmin",
".",
"unload!"
] | 0759c8dcf97865748c9344459162ac3c7e65a6cd | https://github.com/activeadmin/activeadmin/blob/0759c8dcf97865748c9344459162ac3c7e65a6cd/lib/active_admin/application.rb#L112-L120 | train | Load the AA resources | [
30522,
13366,
7170,
999,
4983,
8209,
1029,
3161,
6342,
9397,
11589,
1024,
1024,
26828,
2015,
1012,
10172,
2077,
11066,
18697,
3372,
1010,
2969,
1001,
2077,
1035,
7170,
8103,
6764,
1012,
2169,
1063,
1064,
5371,
1064,
7170,
5371,
1065,
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... |
aws/aws-sdk-ruby | gems/aws-sdk-s3/lib/aws-sdk-s3/bucket.rb | Aws::S3.Bucket.multipart_uploads | def multipart_uploads(options = {})
batches = Enumerator.new do |y|
options = options.merge(bucket: @name)
resp = @client.list_multipart_uploads(options)
resp.each_page do |page|
batch = []
page.data.uploads.each do |u|
batch << MultipartUpload.new(
... | ruby | def multipart_uploads(options = {})
batches = Enumerator.new do |y|
options = options.merge(bucket: @name)
resp = @client.list_multipart_uploads(options)
resp.each_page do |page|
batch = []
page.data.uploads.each do |u|
batch << MultipartUpload.new(
... | [
"def",
"multipart_uploads",
"(",
"options",
"=",
"{",
"}",
")",
"batches",
"=",
"Enumerator",
".",
"new",
"do",
"|",
"y",
"|",
"options",
"=",
"options",
".",
"merge",
"(",
"bucket",
":",
"@name",
")",
"resp",
"=",
"@client",
".",
"list_multipart_uploads... | @example Request syntax with placeholder values
multipart_uploads = bucket.multipart_uploads({
delimiter: "Delimiter",
encoding_type: "url", # accepts url
key_marker: "KeyMarker",
prefix: "Prefix",
upload_id_marker: "UploadIdMarker",
})
@param [Hash] options ({})
@option options [Strin... | [
"@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.rb#L501-L520 | train | Returns a collection of MultipartUploads | [
30522,
13366,
4800,
19362,
2102,
1035,
2039,
11066,
2015,
1006,
7047,
1027,
1063,
1065,
1007,
14108,
2229,
1027,
4372,
17897,
16259,
1012,
2047,
2079,
1064,
1061,
1064,
7047,
1027,
7047,
1012,
13590,
1006,
13610,
1024,
1030,
2171,
1007,
245... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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/module_tool/contents_description.rb | Puppet::ModuleTool.ContentsDescription.provider_doc | def provider_doc(type)
providers = []
type.providers.sort.each do |prov|
providers.push(:name => prov, :doc => type.provider(prov).doc)
end
providers
end | ruby | def provider_doc(type)
providers = []
type.providers.sort.each do |prov|
providers.push(:name => prov, :doc => type.provider(prov).doc)
end
providers
end | [
"def",
"provider_doc",
"(",
"type",
")",
"providers",
"=",
"[",
"]",
"type",
".",
"providers",
".",
"sort",
".",
"each",
"do",
"|",
"prov",
"|",
"providers",
".",
"push",
"(",
":name",
"=>",
"prov",
",",
":doc",
"=>",
"type",
".",
"provider",
"(",
... | Return an array of hashes representing this +type+'s providers, each
containing :name and :doc. | [
"Return",
"an",
"array",
"of",
"hashes",
"representing",
"this",
"+",
"type",
"+",
"s",
"providers",
"each",
"containing",
":",
"name",
"and",
":",
"doc",
"."
] | 4baeed97cbb7571ddc6635f0a24debe2e8b22cd3 | https://github.com/puppetlabs/puppet/blob/4baeed97cbb7571ddc6635f0a24debe2e8b22cd3/lib/puppet/module_tool/contents_description.rb#L78-L86 | train | Returns the doc of the provider doc for a given type | [
30522,
13366,
10802,
1035,
9986,
1006,
2828,
1007,
11670,
1027,
1031,
1033,
2828,
1012,
11670,
1012,
4066,
1012,
2169,
2079,
1064,
4013,
2615,
1064,
11670,
1012,
5245,
1006,
1024,
2171,
1027,
1028,
4013,
2615,
1010,
1024,
9986,
1027,
1028,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_recovery_services_backup/lib/2017-07-01/generated/azure_mgmt_recovery_services_backup/protection_intent_operations.rb | Azure::RecoveryServicesBackup::Mgmt::V2017_07_01.ProtectionIntentOperations.create_or_update_with_http_info | def create_or_update_with_http_info(vault_name, resource_group_name, fabric_name, intent_object_name, parameters, custom_headers:nil)
create_or_update_async(vault_name, resource_group_name, fabric_name, intent_object_name, parameters, custom_headers:custom_headers).value!
end | ruby | def create_or_update_with_http_info(vault_name, resource_group_name, fabric_name, intent_object_name, parameters, custom_headers:nil)
create_or_update_async(vault_name, resource_group_name, fabric_name, intent_object_name, parameters, custom_headers:custom_headers).value!
end | [
"def",
"create_or_update_with_http_info",
"(",
"vault_name",
",",
"resource_group_name",
",",
"fabric_name",
",",
"intent_object_name",
",",
"parameters",
",",
"custom_headers",
":",
"nil",
")",
"create_or_update_async",
"(",
"vault_name",
",",
"resource_group_name",
",",... | Create Intent for Enabling backup of an item. This is a synchronous
operation.
@param vault_name [String] The name of the recovery services vault.
@param resource_group_name [String] The name of the resource group where the
recovery services vault is present.
@param fabric_name [String] Fabric name associated wit... | [
"Create",
"Intent",
"for",
"Enabling",
"backup",
"of",
"an",
"item",
".",
"This",
"is",
"a",
"synchronous",
"operation",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_recovery_services_backup/lib/2017-07-01/generated/azure_mgmt_recovery_services_backup/protection_intent_operations.rb#L174-L176 | train | Creates or updates an intent object in the specified vault. | [
30522,
13366,
3443,
30524,
2171,
1010,
8313,
1035,
2171,
1010,
7848,
1035,
4874,
1035,
2171,
1010,
11709,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3443,
1035,
2030,
1035,
10651,
1035,
2004,
6038,
2278,
1006,
11632,
1035,
2171,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Katello/katello | app/controllers/katello/api/v2/sync_controller.rb | Katello.Api::V2::SyncController.find_object | def find_object
if params.key?(:product_id)
@obj = find_product
elsif params.key?(:repository_id)
@obj = find_repository
else
fail HttpErrors::NotFound, N_("Couldn't find subject of synchronization") if @obj.nil?
end
@obj
end | ruby | def find_object
if params.key?(:product_id)
@obj = find_product
elsif params.key?(:repository_id)
@obj = find_repository
else
fail HttpErrors::NotFound, N_("Couldn't find subject of synchronization") if @obj.nil?
end
@obj
end | [
"def",
"find_object",
"if",
"params",
".",
"key?",
"(",
":product_id",
")",
"@obj",
"=",
"find_product",
"elsif",
"params",
".",
"key?",
"(",
":repository_id",
")",
"@obj",
"=",
"find_repository",
"else",
"fail",
"HttpErrors",
"::",
"NotFound",
",",
"N_",
"(... | used in unit tests | [
"used",
"in",
"unit",
"tests"
] | a1c9280067607999cae43bab89b53ba870856b76 | https://github.com/Katello/katello/blob/a1c9280067607999cae43bab89b53ba870856b76/app/controllers/katello/api/v2/sync_controller.rb#L16-L25 | train | Find the object in the current context | [
30522,
13366,
2424,
1035,
4874,
2065,
11498,
5244,
1012,
3145,
1029,
1006,
1024,
4031,
1035,
8909,
1007,
1030,
27885,
3501,
1027,
2424,
1035,
4031,
3449,
5332,
2546,
11498,
5244,
1012,
3145,
1029,
1006,
1024,
22409,
1035,
8909,
1007,
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... |
haml/haml | lib/haml/util.rb | Haml.Util.handle_interpolation | def handle_interpolation(str)
scan = StringScanner.new(str)
yield scan while scan.scan(/(.*?)(\\*)#([\{@$])/)
scan.rest
end | ruby | def handle_interpolation(str)
scan = StringScanner.new(str)
yield scan while scan.scan(/(.*?)(\\*)#([\{@$])/)
scan.rest
end | [
"def",
"handle_interpolation",
"(",
"str",
")",
"scan",
"=",
"StringScanner",
".",
"new",
"(",
"str",
")",
"yield",
"scan",
"while",
"scan",
".",
"scan",
"(",
"/",
"\\\\",
"\\{",
"/",
")",
"scan",
".",
"rest",
"end"
] | Scans through a string looking for the interoplation-opening `#{`
and, when it's found, yields the scanner to the calling code
so it can handle it properly.
The scanner will have any backslashes immediately in front of the `#{`
as the second capture group (`scan[2]`),
and the text prior to that as the first (`sca... | [
"Scans",
"through",
"a",
"string",
"looking",
"for",
"the",
"interoplation",
"-",
"opening",
"#",
"{",
"and",
"when",
"it",
"s",
"found",
"yields",
"the",
"scanner",
"to",
"the",
"calling",
"code",
"so",
"it",
"can",
"handle",
"it",
"properly",
"."
] | 9aa0fbe4a91b999978927be569d2ad0cd39076f1 | https://github.com/haml/haml/blob/9aa0fbe4a91b999978927be569d2ad0cd39076f1/lib/haml/util.rb#L147-L151 | train | Handles interpolation in a string | [
30522,
13366,
5047,
1035,
6970,
18155,
3370,
1006,
2358,
2099,
1007,
13594,
1027,
7817,
9336,
3678,
1012,
2047,
1006,
2358,
2099,
1007,
10750,
13594,
2096,
13594,
1012,
13594,
1006,
1013,
1006,
1012,
1008,
1029,
1007,
1006,
1032,
1032,
1008... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
colszowka/simplecov | lib/simplecov/configuration.rb | SimpleCov.Configuration.coverage_path | def coverage_path
@coverage_path ||= begin
coverage_path = File.expand_path(coverage_dir, root)
FileUtils.mkdir_p coverage_path
coverage_path
end
end | ruby | def coverage_path
@coverage_path ||= begin
coverage_path = File.expand_path(coverage_dir, root)
FileUtils.mkdir_p coverage_path
coverage_path
end
end | [
"def",
"coverage_path",
"@coverage_path",
"||=",
"begin",
"coverage_path",
"=",
"File",
".",
"expand_path",
"(",
"coverage_dir",
",",
"root",
")",
"FileUtils",
".",
"mkdir_p",
"coverage_path",
"coverage_path",
"end",
"end"
] | Returns the full path to the output directory using SimpleCov.root
and SimpleCov.coverage_dir, so you can adjust this by configuring those
values. Will create the directory if it's missing | [
"Returns",
"the",
"full",
"path",
"to",
"the",
"output",
"directory",
"using",
"SimpleCov",
".",
"root",
"and",
"SimpleCov",
".",
"coverage_dir",
"so",
"you",
"can",
"adjust",
"this",
"by",
"configuring",
"those",
"values",
".",
"Will",
"create",
"the",
"dir... | 8f6978a2513f10c4dd8d7dd7eed666fe3f2b55c2 | https://github.com/colszowka/simplecov/blob/8f6978a2513f10c4dd8d7dd7eed666fe3f2b55c2/lib/simplecov/configuration.rb#L42-L48 | train | Returns the path to the coverage file for the current project. | [
30522,
13366,
6325,
1035,
4130,
1030,
6325,
1035,
4130,
1064,
1064,
1027,
4088,
6325,
1035,
4130,
1027,
5371,
1012,
30524,
12395,
4305,
2099,
1035,
1052,
6325,
1035,
4130,
6325,
1035,
4130,
2203,
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... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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/issues/milestones.rb | Github.Client::Issues::Milestones.update | def update(*args)
arguments(args, required: [:user, :repo, :number]) do
permit VALID_MILESTONE_INPUTS
end
patch_request("/repos/#{arguments.user}/#{arguments.repo}/milestones/#{arguments.number}", arguments.params)
end | ruby | def update(*args)
arguments(args, required: [:user, :repo, :number]) do
permit VALID_MILESTONE_INPUTS
end
patch_request("/repos/#{arguments.user}/#{arguments.repo}/milestones/#{arguments.number}", arguments.params)
end | [
"def",
"update",
"(",
"*",
"args",
")",
"arguments",
"(",
"args",
",",
"required",
":",
"[",
":user",
",",
":repo",
",",
":number",
"]",
")",
"do",
"permit",
"VALID_MILESTONE_INPUTS",
"end",
"patch_request",
"(",
"\"/repos/#{arguments.user}/#{arguments.repo}/miles... | Update a milestone
@param [Hash] params
@option params [String] :title
Required string. The title of the milestone
@option params [String] :state
The state of the milestone. Either open or closed. Default: open.
@option params [String] :description
A description of the milestone
@option params [String] :... | [
"Update",
"a",
"milestone"
] | 8702452c66bea33c9388550aed9e9974f76aaef1 | https://github.com/piotrmurach/github/blob/8702452c66bea33c9388550aed9e9974f76aaef1/lib/github_api/client/issues/milestones.rb#L125-L131 | train | Update a milestone | [
30522,
13366,
10651,
1006,
1008,
12098,
5620,
1007,
9918,
1006,
12098,
5620,
1010,
3223,
1024,
1031,
1024,
5310,
1010,
1024,
16360,
2080,
1010,
1024,
2193,
1033,
1007,
2079,
9146,
9398,
1035,
19199,
1035,
20407,
2203,
8983,
1035,
5227,
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... |
randym/axlsx | lib/axlsx/util/simple_typed_list.rb | Axlsx.SimpleTypedList.delete | def delete(v)
return unless include? v
raise ArgumentError, "Item is protected and cannot be deleted" if protected? index(v)
@list.delete v
end | ruby | def delete(v)
return unless include? v
raise ArgumentError, "Item is protected and cannot be deleted" if protected? index(v)
@list.delete v
end | [
"def",
"delete",
"(",
"v",
")",
"return",
"unless",
"include?",
"v",
"raise",
"ArgumentError",
",",
"\"Item is protected and cannot be deleted\"",
"if",
"protected?",
"index",
"(",
"v",
")",
"@list",
".",
"delete",
"v",
"end"
] | delete the item from the list
@param [Any] v The item to be deleted.
@raise [ArgumentError] if the item's index is protected by locking
@return [Any] The item deleted | [
"delete",
"the",
"item",
"from",
"the",
"list"
] | c593a08b2a929dac7aa8dc418b55e26b4c49dc34 | https://github.com/randym/axlsx/blob/c593a08b2a929dac7aa8dc418b55e26b4c49dc34/lib/axlsx/util/simple_typed_list.rb#L108-L112 | train | Delete the item at the given index. | [
30522,
13366,
3972,
12870,
1006,
1058,
1007,
2709,
4983,
2421,
1029,
1058,
5333,
6685,
2121,
29165,
1010,
1000,
8875,
2003,
5123,
1998,
3685,
2022,
17159,
1000,
2065,
5123,
1029,
5950,
1006,
1058,
1007,
1030,
2862,
1012,
3972,
12870,
1058,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
aws/aws-sdk-ruby | gems/aws-sdk-iam/lib/aws-sdk-iam/resource.rb | Aws::IAM.Resource.create_server_certificate | def create_server_certificate(options = {})
resp = @client.upload_server_certificate(options)
ServerCertificate.new(
name: options[:server_certificate_name],
client: @client
)
end | ruby | def create_server_certificate(options = {})
resp = @client.upload_server_certificate(options)
ServerCertificate.new(
name: options[:server_certificate_name],
client: @client
)
end | [
"def",
"create_server_certificate",
"(",
"options",
"=",
"{",
"}",
")",
"resp",
"=",
"@client",
".",
"upload_server_certificate",
"(",
"options",
")",
"ServerCertificate",
".",
"new",
"(",
"name",
":",
"options",
"[",
":server_certificate_name",
"]",
",",
"clien... | @example Request syntax with placeholder values
servercertificate = iam.create_server_certificate({
path: "pathType",
server_certificate_name: "serverCertificateNameType", # required
certificate_body: "certificateBodyType", # required
private_key: "privateKeyType", # required
certificate_ch... | [
"@example",
"Request",
"syntax",
"with",
"placeholder",
"values"
] | e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d | https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-iam/lib/aws-sdk-iam/resource.rb#L600-L606 | train | Create a server certificate | [
30522,
13366,
3443,
1035,
8241,
1035,
8196,
1006,
7047,
1027,
1063,
1065,
1007,
24501,
2361,
1027,
1030,
7396,
1012,
2039,
11066,
1035,
8241,
1035,
8196,
1006,
7047,
1007,
8241,
17119,
3775,
8873,
16280,
1012,
2047,
1006,
2171,
1024,
7047,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
cloudfoundry/bosh | src/bosh-director/lib/bosh/director/job_runner.rb | Bosh::Director.JobRunner.log_exception | def log_exception(exception)
# Event log is being used here to propagate the error.
# It's up to event log renderer to find the error and
# signal it properly.
director_error = DirectorError.create_from_exception(exception)
Config.event_log.log_error(director_error)
end | ruby | def log_exception(exception)
# Event log is being used here to propagate the error.
# It's up to event log renderer to find the error and
# signal it properly.
director_error = DirectorError.create_from_exception(exception)
Config.event_log.log_error(director_error)
end | [
"def",
"log_exception",
"(",
"exception",
")",
"# Event log is being used here to propagate the error.",
"# It's up to event log renderer to find the error and",
"# signal it properly.",
"director_error",
"=",
"DirectorError",
".",
"create_from_exception",
"(",
"exception",
")",
"Con... | Logs the exception in the event log
@param [Exception] exception | [
"Logs",
"the",
"exception",
"in",
"the",
"event",
"log"
] | 2eaa7100879ddd20cd909cd698514746195e28b7 | https://github.com/cloudfoundry/bosh/blob/2eaa7100879ddd20cd909cd698514746195e28b7/src/bosh-director/lib/bosh/director/job_runner.rb#L159-L165 | train | Log the exception. | [
30522,
13366,
8833,
1035,
6453,
1006,
6453,
1007,
1001,
2724,
8833,
2003,
2108,
2109,
2182,
2000,
17678,
16098,
2618,
1996,
7561,
1012,
1001,
2009,
1005,
1055,
2039,
2000,
2724,
8833,
17552,
2121,
2000,
2424,
1996,
7561,
1998,
1001,
4742,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
appium/ruby_lib | lib/appium_lib/ios/element/textfield.rb | Appium.Ios._textfield_contains_string | def _textfield_contains_string(value)
contains = { target: value, substring: true, insensitive: true }
contains_obj = { name: contains, label: contains, value: contains }
_textfield_visible.merge(contains_obj)
end | ruby | def _textfield_contains_string(value)
contains = { target: value, substring: true, insensitive: true }
contains_obj = { name: contains, label: contains, value: contains }
_textfield_visible.merge(contains_obj)
end | [
"def",
"_textfield_contains_string",
"(",
"value",
")",
"contains",
"=",
"{",
"target",
":",
"value",
",",
"substring",
":",
"true",
",",
"insensitive",
":",
"true",
"}",
"contains_obj",
"=",
"{",
"name",
":",
"contains",
",",
"label",
":",
"contains",
","... | Appium | [
"Appium"
] | 1f5898400dd1928bfe42ddd5f842d1f8738f2f76 | https://github.com/appium/ruby_lib/blob/1f5898400dd1928bfe42ddd5f842d1f8738f2f76/lib/appium_lib/ios/element/textfield.rb#L111-L115 | train | Returns the textfield_visible hash with the textfield_visible and textfield_label hash with the textfield_value and textfield_value | [
30522,
13366,
1035,
3793,
3790,
1035,
3397,
1035,
5164,
1006,
3643,
1007,
3397,
1027,
1063,
4539,
1024,
3643,
1010,
4942,
3367,
4892,
1024,
2995,
1010,
16021,
6132,
13043,
1024,
2995,
1065,
3397,
1035,
27885,
3501,
1027,
1063,
2171,
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_web/lib/2018-02-01/generated/azure_mgmt_web/diagnostics.rb | Azure::Web::Mgmt::V2018_02_01.Diagnostics.list_site_analyses | def list_site_analyses(resource_group_name, site_name, diagnostic_category, custom_headers:nil)
first_page = list_site_analyses_as_lazy(resource_group_name, site_name, diagnostic_category, custom_headers:custom_headers)
first_page.get_all_items
end | ruby | def list_site_analyses(resource_group_name, site_name, diagnostic_category, custom_headers:nil)
first_page = list_site_analyses_as_lazy(resource_group_name, site_name, diagnostic_category, custom_headers:custom_headers)
first_page.get_all_items
end | [
"def",
"list_site_analyses",
"(",
"resource_group_name",
",",
"site_name",
",",
"diagnostic_category",
",",
"custom_headers",
":",
"nil",
")",
"first_page",
"=",
"list_site_analyses_as_lazy",
"(",
"resource_group_name",
",",
"site_name",
",",
"diagnostic_category",
",",
... | Get Site Analyses
Get Site Analyses
@param resource_group_name [String] Name of the resource group to which the
resource belongs.
@param site_name [String] Site Name
@param diagnostic_category [String] Diagnostic Category
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be adde... | [
"Get",
"Site",
"Analyses"
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_web/lib/2018-02-01/generated/azure_mgmt_web/diagnostics.rb#L694-L697 | train | Gets all the analyses for a site. | [
30522,
13366,
2862,
1035,
2609,
1035,
16478,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2609,
1035,
2171,
1010,
16474,
1035,
4696,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
2034,
1035,
3931,
1027,
2862,
1035,
2609,
1035,
16478,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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.in_iframe | def in_iframe(identifier, frame=nil, &block)
frame = frame.nil? ? [] : frame.dup
frame << {iframe: identifier}
block.call(frame)
end | ruby | def in_iframe(identifier, frame=nil, &block)
frame = frame.nil? ? [] : frame.dup
frame << {iframe: identifier}
block.call(frame)
end | [
"def",
"in_iframe",
"(",
"identifier",
",",
"frame",
"=",
"nil",
",",
"&",
"block",
")",
"frame",
"=",
"frame",
".",
"nil?",
"?",
"[",
"]",
":",
"frame",
".",
"dup",
"frame",
"<<",
"{",
"iframe",
":",
"identifier",
"}",
"block",
".",
"call",
"(",
... | Identify an element as existing within an iframe. A frame parameter
is passed to the block and must be passed to the other calls to PageObject.
You can nest calls to in_frame by passing the frame to the next level.
@example
in_iframe(:id => 'frame_id') do |frame|
text_field(:first_name, :id => 'fname', :fr... | [
"Identify",
"an",
"element",
"as",
"existing",
"within",
"an",
"iframe",
".",
"A",
"frame",
"parameter",
"is",
"passed",
"to",
"the",
"block",
"and",
"must",
"be",
"passed",
"to",
"the",
"other",
"calls",
"to",
"PageObject",
".",
"You",
"can",
"nest",
"c... | 850d775bf63768fbb1551a34480195785fe8e193 | https://github.com/cheezy/page-object/blob/850d775bf63768fbb1551a34480195785fe8e193/lib/page-object/accessors.rb#L176-L180 | train | Adds an iframe to the frame. | [
30522,
13366,
1999,
1035,
2065,
6444,
2063,
1006,
8909,
4765,
18095,
1010,
4853,
1027,
9152,
2140,
1010,
1004,
3796,
1007,
4853,
1027,
4853,
1012,
9152,
2140,
1029,
1029,
1031,
1033,
1024,
4853,
1012,
4241,
2361,
4853,
1026,
1026,
1063,
2... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_stor_simple8000_series/lib/2017-06-01/generated/azure_mgmt_stor_simple8000_series/device_settings.rb | Azure::StorSimple8000Series::Mgmt::V2017_06_01.DeviceSettings.begin_create_or_update_alert_settings_with_http_info | def begin_create_or_update_alert_settings_with_http_info(device_name, parameters, resource_group_name, manager_name, custom_headers:nil)
begin_create_or_update_alert_settings_async(device_name, parameters, resource_group_name, manager_name, custom_headers:custom_headers).value!
end | ruby | def begin_create_or_update_alert_settings_with_http_info(device_name, parameters, resource_group_name, manager_name, custom_headers:nil)
begin_create_or_update_alert_settings_async(device_name, parameters, resource_group_name, manager_name, custom_headers:custom_headers).value!
end | [
"def",
"begin_create_or_update_alert_settings_with_http_info",
"(",
"device_name",
",",
"parameters",
",",
"resource_group_name",
",",
"manager_name",
",",
"custom_headers",
":",
"nil",
")",
"begin_create_or_update_alert_settings_async",
"(",
"device_name",
",",
"parameters",
... | Creates or updates the alert settings of the specified device.
@param device_name [String] The device name
@param parameters [AlertSettings] The alert settings to be added or updated.
@param resource_group_name [String] The resource group name
@param manager_name [String] The manager name
@param custom_headers [H... | [
"Creates",
"or",
"updates",
"the",
"alert",
"settings",
"of",
"the",
"specified",
"device",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_stor_simple8000_series/lib/2017-06-01/generated/azure_mgmt_stor_simple8000_series/device_settings.rb#L671-L673 | train | Creates or updates the alert settings of the specified device. | [
30522,
13366,
4088,
1035,
3443,
1035,
2030,
1035,
10651,
1035,
9499,
1035,
10906,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
5080,
1035,
2171,
1010,
11709,
1010,
7692,
1035,
2177,
1035,
2171,
1010,
3208,
1035,
2171,
1010,
7661,
1035,
20346,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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/readers/page_reader.rb | Jekyll.PageReader.read | def read(files)
files.map do |page|
@unfiltered_content << Page.new(@site, @site.source, @dir, page)
end
@unfiltered_content.select { |page| site.publisher.publish?(page) }
end | ruby | def read(files)
files.map do |page|
@unfiltered_content << Page.new(@site, @site.source, @dir, page)
end
@unfiltered_content.select { |page| site.publisher.publish?(page) }
end | [
"def",
"read",
"(",
"files",
")",
"files",
".",
"map",
"do",
"|",
"page",
"|",
"@unfiltered_content",
"<<",
"Page",
".",
"new",
"(",
"@site",
",",
"@site",
".",
"source",
",",
"@dir",
",",
"page",
")",
"end",
"@unfiltered_content",
".",
"select",
"{",
... | Read all the files in <source>/<dir>/ for Yaml header and create a new Page
object for each file.
dir - The String relative path of the directory to read.
Returns an array of static pages. | [
"Read",
"all",
"the",
"files",
"in",
"<source",
">",
"/",
"<dir",
">",
"/",
"for",
"Yaml",
"header",
"and",
"create",
"a",
"new",
"Page",
"object",
"for",
"each",
"file",
"."
] | fd74fe3e93a1fb506fa6621a2e271d7b9c5c3e3b | https://github.com/jekyll/jekyll/blob/fd74fe3e93a1fb506fa6621a2e271d7b9c5c3e3b/lib/jekyll/readers/page_reader.rb#L18-L23 | train | Read the content of the given files. | [
30522,
13366,
3191,
1006,
6764,
1007,
6764,
1012,
4949,
2079,
1064,
3931,
1064,
1030,
4895,
8873,
21928,
2098,
1035,
4180,
1026,
1026,
3931,
1012,
2047,
1006,
1030,
2609,
1010,
1030,
2609,
1012,
3120,
1010,
1030,
16101,
1010,
3931,
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... |
aws/aws-sdk-ruby | gems/aws-sdk-iam/lib/aws-sdk-iam/policy.rb | Aws::IAM.Policy.create_version | def create_version(options = {})
options = options.merge(policy_arn: @arn)
resp = @client.create_policy_version(options)
PolicyVersion.new(
arn: @arn,
version_id: resp.data.policy_version.version_id,
client: @client
)
end | ruby | def create_version(options = {})
options = options.merge(policy_arn: @arn)
resp = @client.create_policy_version(options)
PolicyVersion.new(
arn: @arn,
version_id: resp.data.policy_version.version_id,
client: @client
)
end | [
"def",
"create_version",
"(",
"options",
"=",
"{",
"}",
")",
"options",
"=",
"options",
".",
"merge",
"(",
"policy_arn",
":",
"@arn",
")",
"resp",
"=",
"@client",
".",
"create_policy_version",
"(",
"options",
")",
"PolicyVersion",
".",
"new",
"(",
"arn",
... | @example Request syntax with placeholder values
policyversion = policy.create_version({
policy_document: "policyDocumentType", # required
set_as_default: false,
})
@param [Hash] options ({})
@option options [required, String] :policy_document
The JSON policy document that you want to use as the co... | [
"@example",
"Request",
"syntax",
"with",
"placeholder",
"values"
] | e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d | https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-iam/lib/aws-sdk-iam/policy.rb#L383-L391 | train | Creates a version of the policy | [
30522,
13366,
3443,
1035,
2544,
1006,
7047,
1027,
1063,
1065,
1007,
7047,
1027,
7047,
1012,
13590,
1006,
3343,
1035,
12098,
2078,
1024,
1030,
12098,
2078,
1007,
24501,
2361,
1027,
1030,
7396,
1012,
3443,
1035,
3343,
1035,
2544,
1006,
7047,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_web/lib/2018-02-01/generated/azure_mgmt_web/app_service_environments.rb | Azure::Web::Mgmt::V2018_02_01.AppServiceEnvironments.list_web_apps_next | def list_web_apps_next(next_page_link, custom_headers:nil)
response = list_web_apps_next_async(next_page_link, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def list_web_apps_next(next_page_link, custom_headers:nil)
response = list_web_apps_next_async(next_page_link, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"list_web_apps_next",
"(",
"next_page_link",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"list_web_apps_next_async",
"(",
"next_page_link",
",",
"custom_headers",
":custom_headers",
")",
".",
"value!",
"response",
".",
"body",
"unless",
"response",... | Get all apps in an App Service Environment.
Get all apps in an App Service Environment.
@param next_page_link [String] The NextLink from the previous successful call
to List operation.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request.
@return [WebAp... | [
"Get",
"all",
"apps",
"in",
"an",
"App",
"Service",
"Environment",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_web/lib/2018-02-01/generated/azure_mgmt_web/app_service_environments.rb#L6228-L6231 | train | Gets the list of all the apps in a Web App Service Environment. | [
30522,
13366,
2862,
1035,
4773,
1035,
18726,
1035,
2279,
1006,
2279,
1035,
3931,
1035,
4957,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
2862,
1035,
4773,
1035,
18726,
1035,
2279,
1035,
2004,
6038,
2278,
1006,
2279,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
rails/sprockets | lib/sprockets/source_map_utils.rb | Sprockets.SourceMapUtils.vlq_encode_mappings | def vlq_encode_mappings(ary)
ary.map { |group|
group.map { |segment|
vlq_encode(segment)
}.join(',')
}.join(';')
end | ruby | def vlq_encode_mappings(ary)
ary.map { |group|
group.map { |segment|
vlq_encode(segment)
}.join(',')
}.join(';')
end | [
"def",
"vlq_encode_mappings",
"(",
"ary",
")",
"ary",
".",
"map",
"{",
"|",
"group",
"|",
"group",
".",
"map",
"{",
"|",
"segment",
"|",
"vlq_encode",
"(",
"segment",
")",
"}",
".",
"join",
"(",
"','",
")",
"}",
".",
"join",
"(",
"';'",
")",
"end... | Public: Encode a mapping array into a compact VLQ string.
ary - Two dimensional Array of Integers.
Returns a VLQ encoded String seperated by , and ;. | [
"Public",
":",
"Encode",
"a",
"mapping",
"array",
"into",
"a",
"compact",
"VLQ",
"string",
"."
] | 9e3f0d8e98c44f57e67bc138db87bb8469bf5ddd | https://github.com/rails/sprockets/blob/9e3f0d8e98c44f57e67bc138db87bb8469bf5ddd/lib/sprockets/source_map_utils.rb#L455-L461 | train | Encode a list of mappings | [
30522,
13366,
1058,
2140,
4160,
1035,
4372,
16044,
1035,
12375,
2015,
1006,
12098,
2100,
1007,
12098,
2100,
1012,
4949,
1063,
1064,
2177,
1064,
2177,
1012,
4949,
1063,
1064,
6903,
1064,
1058,
2140,
4160,
1035,
4372,
16044,
1006,
6903,
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... |
opal/opal | stdlib/racc/parser.rb | Racc.Parser.on_error | def on_error(t, val, vstack)
raise ParseError, sprintf("\nparse error on value %s (%s)",
val.inspect, token_to_str(t) || '?')
end | ruby | def on_error(t, val, vstack)
raise ParseError, sprintf("\nparse error on value %s (%s)",
val.inspect, token_to_str(t) || '?')
end | [
"def",
"on_error",
"(",
"t",
",",
"val",
",",
"vstack",
")",
"raise",
"ParseError",
",",
"sprintf",
"(",
"\"\\nparse error on value %s (%s)\"",
",",
"val",
".",
"inspect",
",",
"token_to_str",
"(",
"t",
")",
"||",
"'?'",
")",
"end"
] | This method is called when a parse error is found.
ERROR_TOKEN_ID is an internal ID of token which caused error.
You can get string representation of this ID by calling
#token_to_str.
ERROR_VALUE is a value of error token.
value_stack is a stack of symbol values.
DO NOT MODIFY this object.
This method raises... | [
"This",
"method",
"is",
"called",
"when",
"a",
"parse",
"error",
"is",
"found",
"."
] | 41aedc0fd62aab00d3c117ba0caf00206bedd981 | https://github.com/opal/opal/blob/41aedc0fd62aab00d3c117ba0caf00206bedd981/stdlib/racc/parser.rb#L532-L535 | train | handle parse error | [
30522,
13366,
2006,
1035,
7561,
1006,
1056,
1010,
11748,
1010,
5443,
2696,
3600,
1007,
5333,
11968,
19763,
18933,
2099,
1010,
9043,
2546,
1006,
1000,
1032,
27937,
11650,
2063,
7561,
2006,
3643,
1003,
1055,
1006,
1003,
1055,
1007,
1000,
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... |
david942j/one_gadget | lib/one_gadget/cli.rb | OneGadget.CLI.info_build_id | def info_build_id(id)
result = OneGadget::Gadget.builds_info(id)
return false if result.nil? # invalid form or BuildID not found
OneGadget::Logger.info("Information of #{id}:\n#{result.join("\n")}")
true
end | ruby | def info_build_id(id)
result = OneGadget::Gadget.builds_info(id)
return false if result.nil? # invalid form or BuildID not found
OneGadget::Logger.info("Information of #{id}:\n#{result.join("\n")}")
true
end | [
"def",
"info_build_id",
"(",
"id",
")",
"result",
"=",
"OneGadget",
"::",
"Gadget",
".",
"builds_info",
"(",
"id",
")",
"return",
"false",
"if",
"result",
".",
"nil?",
"# invalid form or BuildID not found",
"OneGadget",
"::",
"Logger",
".",
"info",
"(",
"\"Inf... | Displays libc information given BuildID.
@param [String] id
@return [Boolean]
+false+ is returned if no information found.
@example
CLI.info_build_id('b417c')
# [OneGadget] Information of b417c:
# spec/data/libc-2.27-b417c0ba7cc5cf06d1d1bed6652cedb9253c60d0.so
# Advanced Mi... | [
"Displays",
"libc",
"information",
"given",
"BuildID",
"."
] | ff6ef04541e83441bfe3c2664a6febd1640f4263 | https://github.com/david942j/one_gadget/blob/ff6ef04541e83441bfe3c2664a6febd1640f4263/lib/one_gadget/cli.rb#L92-L98 | train | Returns the BuildID information for a given BuildID | [
30522,
13366,
18558,
1035,
3857,
1035,
8909,
1006,
8909,
1007,
2765,
1027,
2028,
3654,
24291,
1024,
1024,
11721,
24291,
1012,
16473,
1035,
18558,
1006,
8909,
1007,
2709,
6270,
2065,
2765,
1012,
9152,
2140,
1029,
1001,
19528,
2433,
2030,
385... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 | activesupport/lib/active_support/xml_mini/rexml.rb | ActiveSupport.XmlMini_REXML.merge_texts! | def merge_texts!(hash, element)
unless element.has_text?
hash
else
# must use value to prevent double-escaping
texts = +""
element.texts.each { |t| texts << t.value }
merge!(hash, CONTENT_KEY, texts)
end
end | ruby | def merge_texts!(hash, element)
unless element.has_text?
hash
else
# must use value to prevent double-escaping
texts = +""
element.texts.each { |t| texts << t.value }
merge!(hash, CONTENT_KEY, texts)
end
end | [
"def",
"merge_texts!",
"(",
"hash",
",",
"element",
")",
"unless",
"element",
".",
"has_text?",
"hash",
"else",
"# must use value to prevent double-escaping",
"texts",
"=",
"+",
"\"\"",
"element",
".",
"texts",
".",
"each",
"{",
"|",
"t",
"|",
"texts",
"<<",
... | Merge all the texts of an element into the hash
hash::
Hash to add the converted element to.
element::
XML element whose texts are to me merged into the hash | [
"Merge",
"all",
"the",
"texts",
"of",
"an",
"element",
"into",
"the",
"hash"
] | 85a8bc644be69908f05740a5886ec19cd3679df5 | https://github.com/rails/rails/blob/85a8bc644be69908f05740a5886ec19cd3679df5/activesupport/lib/active_support/xml_mini/rexml.rb#L74-L83 | train | merges the texts of the given element into the hash. | [
30522,
13366,
13590,
1035,
6981,
999,
1006,
23325,
1010,
5783,
1007,
4983,
5783,
1012,
2038,
1035,
3793,
1029,
23325,
2842,
1001,
2442,
2224,
3643,
2000,
4652,
3313,
1011,
13002,
6981,
1027,
1009,
1000,
1000,
5783,
1012,
6981,
1012,
2169,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_compute/lib/2018-04-01/generated/azure_mgmt_compute/snapshots.rb | Azure::Compute::Mgmt::V2018_04_01.Snapshots.create_or_update | def create_or_update(resource_group_name, snapshot_name, snapshot, custom_headers:nil)
response = create_or_update_async(resource_group_name, snapshot_name, snapshot, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def create_or_update(resource_group_name, snapshot_name, snapshot, custom_headers:nil)
response = create_or_update_async(resource_group_name, snapshot_name, snapshot, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"create_or_update",
"(",
"resource_group_name",
",",
"snapshot_name",
",",
"snapshot",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"create_or_update_async",
"(",
"resource_group_name",
",",
"snapshot_name",
",",
"snapshot",
",",
"custom_headers",
"... | Creates or updates a snapshot.
@param resource_group_name [String] The name of the resource group.
@param snapshot_name [String] The name of the snapshot that is being created.
The name can't be changed after the snapshot is created. Supported characters
for the name are a-z, A-Z, 0-9 and _. The max name length is... | [
"Creates",
"or",
"updates",
"a",
"snapshot",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_compute/lib/2018-04-01/generated/azure_mgmt_compute/snapshots.rb#L38-L41 | train | Creates or updates a snapshot. | [
30522,
13366,
3443,
1035,
2030,
1035,
10651,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
20057,
12326,
1035,
2171,
1010,
20057,
12326,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
3443,
1035,
2030,
1035,
10651,
1035,
200... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_api_management/lib/2017-03-01/generated/azure_mgmt_api_management/tenant_configuration.rb | Azure::ApiManagement::Mgmt::V2017_03_01.TenantConfiguration.begin_deploy_with_http_info | def begin_deploy_with_http_info(resource_group_name, service_name, parameters, custom_headers:nil)
begin_deploy_async(resource_group_name, service_name, parameters, custom_headers:custom_headers).value!
end | ruby | def begin_deploy_with_http_info(resource_group_name, service_name, parameters, custom_headers:nil)
begin_deploy_async(resource_group_name, service_name, parameters, custom_headers:custom_headers).value!
end | [
"def",
"begin_deploy_with_http_info",
"(",
"resource_group_name",
",",
"service_name",
",",
"parameters",
",",
"custom_headers",
":",
"nil",
")",
"begin_deploy_async",
"(",
"resource_group_name",
",",
"service_name",
",",
"parameters",
",",
"custom_headers",
":custom_head... | This operation applies changes from the specified Git branch to the
configuration database. This is a long running operation and could take
several minutes to complete.
@param resource_group_name [String] The name of the resource group.
@param service_name [String] The name of the API Management service.
@param p... | [
"This",
"operation",
"applies",
"changes",
"from",
"the",
"specified",
"Git",
"branch",
"to",
"the",
"configuration",
"database",
".",
"This",
"is",
"a",
"long",
"running",
"operation",
"and",
"could",
"take",
"several",
"minutes",
"to",
"complete",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_api_management/lib/2017-03-01/generated/azure_mgmt_api_management/tenant_configuration.rb#L297-L299 | train | Creates a new service deployment. | [
30522,
13366,
4088,
1035,
21296,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2326,
1035,
2171,
1010,
11709,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
4088,
1035,
21296,
1035,
2004,
6038,
2278,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/api_management_services.rb | Azure::ApiManagement::Mgmt::V2016_10_10.ApiManagementServices.manage_deployments | def manage_deployments(resource_group_name, service_name, parameters, custom_headers:nil)
response = manage_deployments_async(resource_group_name, service_name, parameters, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def manage_deployments(resource_group_name, service_name, parameters, custom_headers:nil)
response = manage_deployments_async(resource_group_name, service_name, parameters, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"manage_deployments",
"(",
"resource_group_name",
",",
"service_name",
",",
"parameters",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"manage_deployments_async",
"(",
"resource_group_name",
",",
"service_name",
",",
"parameters",
",",
"custom_headers... | Manages deployments of an API Management service. This operation can be used
to do the following: Change SKU, Change SKU Units, Change Service Tier
(Developer/Standard/Premium) and Manage VPN Configuration. This is a long
running operation and can take several minutes to complete.
@param resource_group_name [Strin... | [
"Manages",
"deployments",
"of",
"an",
"API",
"Management",
"service",
".",
"This",
"operation",
"can",
"be",
"used",
"to",
"do",
"the",
"following",
":",
"Change",
"SKU",
"Change",
"SKU",
"Units",
"Change",
"Service",
"Tier",
"(",
"Developer",
"/",
"Standard... | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/api_management_services.rb#L39-L42 | train | Manage the deployments of the specified service. | [
30522,
13366,
6133,
1035,
10813,
2015,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2326,
1035,
2171,
1010,
11709,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
6133,
1035,
10813,
2015,
1035,
2004,
6038,
2278,
1006,
7692,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
phusion/passenger | src/ruby_supportlib/phusion_passenger/message_channel.rb | PhusionPassenger.MessageChannel.read_hash | def read_hash
buffer = new_buffer
if !@io.read(HEADER_SIZE, buffer)
return nil
end
while buffer.size < HEADER_SIZE
tmp = @io.read(HEADER_SIZE - buffer.size)
if tmp.empty?
return nil
else
buffer << tmp
end
end
chunk_size = b... | ruby | def read_hash
buffer = new_buffer
if !@io.read(HEADER_SIZE, buffer)
return nil
end
while buffer.size < HEADER_SIZE
tmp = @io.read(HEADER_SIZE - buffer.size)
if tmp.empty?
return nil
else
buffer << tmp
end
end
chunk_size = b... | [
"def",
"read_hash",
"buffer",
"=",
"new_buffer",
"if",
"!",
"@io",
".",
"read",
"(",
"HEADER_SIZE",
",",
"buffer",
")",
"return",
"nil",
"end",
"while",
"buffer",
".",
"size",
"<",
"HEADER_SIZE",
"tmp",
"=",
"@io",
".",
"read",
"(",
"HEADER_SIZE",
"-",
... | Read an array message from the underlying file descriptor and return the
result as a hash instead of an array. This assumes that the array message
has an even number of elements.
Returns nil when end-of-stream has been reached.
Might raise SystemCallError, IOError or SocketError when something
goes wrong. | [
"Read",
"an",
"array",
"message",
"from",
"the",
"underlying",
"file",
"descriptor",
"and",
"return",
"the",
"result",
"as",
"a",
"hash",
"instead",
"of",
"an",
"array",
".",
"This",
"assumes",
"that",
"the",
"array",
"message",
"has",
"an",
"even",
"numbe... | 970964b53e0ba86959acdf40f06c99b0c4a128ca | https://github.com/phusion/passenger/blob/970964b53e0ba86959acdf40f06c99b0c4a128ca/src/ruby_supportlib/phusion_passenger/message_channel.rb#L108-L162 | train | Read a hash from the file. | [
30522,
13366,
3191,
1035,
23325,
17698,
1027,
2047,
1035,
17698,
2065,
999,
1030,
22834,
1012,
3191,
1006,
20346,
1035,
2946,
1010,
17698,
1007,
2709,
9152,
2140,
2203,
2096,
17698,
1012,
2946,
1026,
20346,
1035,
2946,
1056,
8737,
1027,
103... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
middleman/middleman | middleman-cli/lib/middleman-cli/server.rb | Middleman::Cli.Server.server | def server
require 'middleman-core'
require 'middleman-core/preview_server'
unless ENV['MM_ROOT']
puts '== Could not find a Middleman project config.rb'
exit
end
params = {
debug: options['verbose'],
instrumenting: options['instrument'],
reload_pat... | ruby | def server
require 'middleman-core'
require 'middleman-core/preview_server'
unless ENV['MM_ROOT']
puts '== Could not find a Middleman project config.rb'
exit
end
params = {
debug: options['verbose'],
instrumenting: options['instrument'],
reload_pat... | [
"def",
"server",
"require",
"'middleman-core'",
"require",
"'middleman-core/preview_server'",
"unless",
"ENV",
"[",
"'MM_ROOT'",
"]",
"puts",
"'== Could not find a Middleman project config.rb'",
"exit",
"end",
"params",
"=",
"{",
"debug",
":",
"options",
"[",
"'verbose'",... | Start the server | [
"Start",
"the",
"server"
] | a0dd9f78094813162895511e8516e0c5507cee50 | https://github.com/middleman/middleman/blob/a0dd9f78094813162895511e8516e0c5507cee50/middleman-cli/lib/middleman-cli/server.rb#L36-L54 | train | Starts the preview server | [
30522,
13366,
8241,
5478,
1005,
2690,
2386,
1011,
4563,
1005,
5478,
1005,
2690,
2386,
1011,
4563,
1013,
19236,
1035,
8241,
1005,
4983,
4372,
2615,
1031,
1005,
3461,
1035,
7117,
1005,
1033,
8509,
1005,
1027,
1027,
2071,
2025,
2424,
1037,
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... |
middleman/middleman | middleman-cli/lib/middleman-cli/init.rb | Middleman::Cli.Init.init | def init
require 'fileutils'
require 'tmpdir'
unless git_present?
msg = 'You need to install the git command line tool to initialize a new project. '
msg << "For help installing git, please refer to GitHub's tutorial at https://help.github.com/articles/set-up-git"
say msg, :r... | ruby | def init
require 'fileutils'
require 'tmpdir'
unless git_present?
msg = 'You need to install the git command line tool to initialize a new project. '
msg << "For help installing git, please refer to GitHub's tutorial at https://help.github.com/articles/set-up-git"
say msg, :r... | [
"def",
"init",
"require",
"'fileutils'",
"require",
"'tmpdir'",
"unless",
"git_present?",
"msg",
"=",
"'You need to install the git command line tool to initialize a new project. '",
"msg",
"<<",
"\"For help installing git, please refer to GitHub's tutorial at https://help.github.com/artic... | The init task | [
"The",
"init",
"task"
] | a0dd9f78094813162895511e8516e0c5507cee50 | https://github.com/middleman/middleman/blob/a0dd9f78094813162895511e8516e0c5507cee50/middleman-cli/lib/middleman-cli/init.rb#L30-L84 | train | Initialize a new project | [
30522,
13366,
1999,
4183,
5478,
1005,
5371,
21823,
4877,
1005,
5478,
1005,
1056,
8737,
4305,
2099,
1005,
4983,
21025,
2102,
1035,
2556,
1029,
5796,
2290,
1027,
1005,
2017,
2342,
2000,
16500,
1996,
21025,
2102,
3094,
2240,
6994,
2000,
3988,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Fullscreen/yt | lib/yt/request.rb | Yt.Request.send_http_request | def send_http_request
net_http_options = [uri.host, uri.port, use_ssl: true]
ActiveSupport::Notifications.instrument 'request.yt' do |payload|
payload[:method] = @method
payload[:request_uri] = uri
payload[:response] = Net::HTTP.start(*net_http_options) do |http|
http.reque... | ruby | def send_http_request
net_http_options = [uri.host, uri.port, use_ssl: true]
ActiveSupport::Notifications.instrument 'request.yt' do |payload|
payload[:method] = @method
payload[:request_uri] = uri
payload[:response] = Net::HTTP.start(*net_http_options) do |http|
http.reque... | [
"def",
"send_http_request",
"net_http_options",
"=",
"[",
"uri",
".",
"host",
",",
"uri",
".",
"port",
",",
"use_ssl",
":",
"true",
"]",
"ActiveSupport",
"::",
"Notifications",
".",
"instrument",
"'request.yt'",
"do",
"|",
"payload",
"|",
"payload",
"[",
":m... | Send the request to the server, allowing ActiveSupport::Notifications
client to subscribe to the request. | [
"Send",
"the",
"request",
"to",
"the",
"server",
"allowing",
"ActiveSupport",
"::",
"Notifications",
"client",
"to",
"subscribe",
"to",
"the",
"request",
"."
] | bf5c33b977cb162bb7735ad5b80d1abdb5a38215 | https://github.com/Fullscreen/yt/blob/bf5c33b977cb162bb7735ad5b80d1abdb5a38215/lib/yt/request.rb#L170-L179 | train | Send HTTP request to the server | [
30522,
13366,
4604,
1035,
8299,
1035,
5227,
5658,
1035,
8299,
1035,
7047,
1027,
1031,
24471,
2072,
1012,
3677,
1010,
24471,
2072,
1012,
3417,
1010,
2224,
1035,
7020,
2140,
1024,
2995,
1033,
3161,
6342,
9397,
11589,
1024,
1024,
26828,
2015,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
aws/aws-sdk-ruby | gems/aws-sdk-cloudwatch/lib/aws-sdk-cloudwatch/alarm.rb | Aws::CloudWatch.Alarm.disable_actions | def disable_actions(options = {})
options = Aws::Util.deep_merge(options, alarm_names: [@name])
resp = @client.disable_alarm_actions(options)
resp.data
end | ruby | def disable_actions(options = {})
options = Aws::Util.deep_merge(options, alarm_names: [@name])
resp = @client.disable_alarm_actions(options)
resp.data
end | [
"def",
"disable_actions",
"(",
"options",
"=",
"{",
"}",
")",
"options",
"=",
"Aws",
"::",
"Util",
".",
"deep_merge",
"(",
"options",
",",
"alarm_names",
":",
"[",
"@name",
"]",
")",
"resp",
"=",
"@client",
".",
"disable_alarm_actions",
"(",
"options",
"... | @example Request syntax with placeholder values
alarm.disable_actions()
@param [Hash] options ({})
@return [EmptyStructure] | [
"@example",
"Request",
"syntax",
"with",
"placeholder",
"values"
] | e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d | https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-cloudwatch/lib/aws-sdk-cloudwatch/alarm.rb#L408-L412 | train | Disable all actions for this alarm | [
30522,
13366,
4487,
19150,
1035,
4506,
1006,
7047,
1027,
1063,
1065,
1007,
7047,
1027,
22091,
2015,
1024,
1024,
21183,
4014,
1012,
2784,
1035,
13590,
1006,
7047,
1010,
8598,
1035,
3415,
1024,
1031,
1030,
2171,
1033,
1007,
24501,
2361,
1027,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_locks/lib/2015-01-01/generated/azure_mgmt_locks/management_locks.rb | Azure::Locks::Mgmt::V2015_01_01.ManagementLocks.list_at_resource_level_next | def list_at_resource_level_next(next_page_link, custom_headers:nil)
response = list_at_resource_level_next_async(next_page_link, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def list_at_resource_level_next(next_page_link, custom_headers:nil)
response = list_at_resource_level_next_async(next_page_link, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"list_at_resource_level_next",
"(",
"next_page_link",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"list_at_resource_level_next_async",
"(",
"next_page_link",
",",
"custom_headers",
":custom_headers",
")",
".",
"value!",
"response",
".",
"body",
"unle... | Gets all the management locks of a resource or any level below resource.
@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 [ManagementLockListResu... | [
"Gets",
"all",
"the",
"management",
"locks",
"of",
"a",
"resource",
"or",
"any",
"level",
"below",
"resource",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_locks/lib/2015-01-01/generated/azure_mgmt_locks/management_locks.rb#L1226-L1229 | train | Gets the list of a specific resource group. | [
30522,
13366,
2862,
1035,
2012,
1035,
7692,
1035,
2504,
1035,
2279,
1006,
2279,
1035,
3931,
1035,
4957,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
2862,
1035,
2012,
1035,
7692,
1035,
2504,
1035,
2279,
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_compute/lib/2018-04-01/generated/azure_mgmt_compute/virtual_machine_images.rb | Azure::Compute::Mgmt::V2018_04_01.VirtualMachineImages.list | def list(location, publisher_name, offer, skus, filter:nil, top:nil, orderby:nil, custom_headers:nil)
response = list_async(location, publisher_name, offer, skus, filter:filter, top:top, orderby:orderby, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def list(location, publisher_name, offer, skus, filter:nil, top:nil, orderby:nil, custom_headers:nil)
response = list_async(location, publisher_name, offer, skus, filter:filter, top:top, orderby:orderby, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"list",
"(",
"location",
",",
"publisher_name",
",",
"offer",
",",
"skus",
",",
"filter",
":",
"nil",
",",
"top",
":",
"nil",
",",
"orderby",
":",
"nil",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"list_async",
"(",
"location",
","... | Gets a list of all virtual machine image versions for the specified location,
publisher, offer, and SKU.
@param location [String] The name of a supported Azure region.
@param publisher_name [String] A valid image publisher.
@param offer [String] A valid image publisher offer.
@param skus [String] A valid image SK... | [
"Gets",
"a",
"list",
"of",
"all",
"virtual",
"machine",
"image",
"versions",
"for",
"the",
"specified",
"location",
"publisher",
"offer",
"and",
"SKU",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_compute/lib/2018-04-01/generated/azure_mgmt_compute/virtual_machine_images.rb#L144-L147 | train | Gets the list of available image images. | [
30522,
13366,
2862,
1006,
3295,
1010,
6674,
1035,
2171,
1010,
3749,
1010,
15315,
2271,
1010,
11307,
1024,
9152,
2140,
1010,
2327,
1024,
9152,
2140,
1010,
2344,
3762,
1024,
9152,
2140,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/api_management_services.rb | Azure::ApiManagement::Mgmt::V2016_10_10.ApiManagementServices.begin_apply_network_configuration_updates | def begin_apply_network_configuration_updates(resource_group_name, service_name, custom_headers:nil)
response = begin_apply_network_configuration_updates_async(resource_group_name, service_name, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def begin_apply_network_configuration_updates(resource_group_name, service_name, custom_headers:nil)
response = begin_apply_network_configuration_updates_async(resource_group_name, service_name, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"begin_apply_network_configuration_updates",
"(",
"resource_group_name",
",",
"service_name",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"begin_apply_network_configuration_updates_async",
"(",
"resource_group_name",
",",
"service_name",
",",
"custom_headers... | Updates the Microsoft.ApiManagement resource running in the Virtual network
to pick the updated network settings.
@param resource_group_name [String] The name of the resource group.
@param service_name [String] The name of the API Management service.
@param custom_headers [Hash{String => String}] A hash of custom ... | [
"Updates",
"the",
"Microsoft",
".",
"ApiManagement",
"resource",
"running",
"in",
"the",
"Virtual",
"network",
"to",
"pick",
"the",
"updated",
"network",
"settings",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/api_management_services.rb#L1690-L1693 | train | Apply network configuration updates to a service. | [
30522,
13366,
4088,
1035,
6611,
1035,
2897,
1035,
9563,
1035,
14409,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2326,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
4088,
1035,
6611,
1035,
2897,
1035,
9563,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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_backup_progress_with_http_info | def get_partition_backup_progress_with_http_info(partition_id, timeout:60, custom_headers:nil)
get_partition_backup_progress_async(partition_id, timeout:timeout, custom_headers:custom_headers).value!
end | ruby | def get_partition_backup_progress_with_http_info(partition_id, timeout:60, custom_headers:nil)
get_partition_backup_progress_async(partition_id, timeout:timeout, custom_headers:custom_headers).value!
end | [
"def",
"get_partition_backup_progress_with_http_info",
"(",
"partition_id",
",",
"timeout",
":",
"60",
",",
"custom_headers",
":",
"nil",
")",
"get_partition_backup_progress_async",
"(",
"partition_id",
",",
"timeout",
":",
"timeout",
",",
"custom_headers",
":custom_heade... | Gets details for the latest backup triggered for this partition.
Returns information about the state of the latest backup along with details
or failure reason in case of completion.
@param partition_id The identity of the partition.
@param timeout [Integer] The server timeout for performing the operation in
seco... | [
"Gets",
"details",
"for",
"the",
"latest",
"backup",
"triggered",
"for",
"this",
"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#L25595-L25597 | train | Gets the backup progress of the backup of the partition. | [
30522,
13366,
2131,
1035,
13571,
1035,
10200,
1035,
5082,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
13571,
1035,
8909,
1010,
2051,
5833,
1024,
3438,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
2131,
1035,
13571,
1035,
10200,
103... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_network/lib/2019-02-01/generated/azure_mgmt_network/interface_endpoints.rb | Azure::Network::Mgmt::V2019_02_01.InterfaceEndpoints.begin_delete | def begin_delete(resource_group_name, interface_endpoint_name, custom_headers:nil)
response = begin_delete_async(resource_group_name, interface_endpoint_name, custom_headers:custom_headers).value!
nil
end | ruby | def begin_delete(resource_group_name, interface_endpoint_name, custom_headers:nil)
response = begin_delete_async(resource_group_name, interface_endpoint_name, custom_headers:custom_headers).value!
nil
end | [
"def",
"begin_delete",
"(",
"resource_group_name",
",",
"interface_endpoint_name",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"begin_delete_async",
"(",
"resource_group_name",
",",
"interface_endpoint_name",
",",
"custom_headers",
":custom_headers",
")",
"."... | Deletes the specified interface endpoint.
@param resource_group_name [String] The name of the resource group.
@param interface_endpoint_name [String] The name of the interface endpoint.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request. | [
"Deletes",
"the",
"specified",
"interface",
"endpoint",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_network/lib/2019-02-01/generated/azure_mgmt_network/interface_endpoints.rb#L384-L387 | train | Deletes an interface endpoint. | [
30522,
13366,
4088,
1035,
3972,
12870,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
8278,
1035,
2203,
8400,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
4088,
1035,
3972,
12870,
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... |
mhenrixon/sidekiq-unique-jobs | lib/sidekiq_unique_jobs/scripts.rb | SidekiqUniqueJobs.Scripts.handle_error | def handle_error(ex, file_name)
if ex.message == "NOSCRIPT No matching script. Please use EVAL."
SCRIPT_SHAS.delete(file_name)
return yield if block_given?
end
raise ScriptError, file_name: file_name, source_exception: ex
end | ruby | def handle_error(ex, file_name)
if ex.message == "NOSCRIPT No matching script. Please use EVAL."
SCRIPT_SHAS.delete(file_name)
return yield if block_given?
end
raise ScriptError, file_name: file_name, source_exception: ex
end | [
"def",
"handle_error",
"(",
"ex",
",",
"file_name",
")",
"if",
"ex",
".",
"message",
"==",
"\"NOSCRIPT No matching script. Please use EVAL.\"",
"SCRIPT_SHAS",
".",
"delete",
"(",
"file_name",
")",
"return",
"yield",
"if",
"block_given?",
"end",
"raise",
"ScriptError... | Handle errors to allow retrying errors that need retrying
@param [Redis::CommandError] ex exception to handle
@param [Symbol] file_name the name of the lua script
@return [void]
@yieldreturn [void] yields back to the caller when NOSCRIPT is raised | [
"Handle",
"errors",
"to",
"allow",
"retrying",
"errors",
"that",
"need",
"retrying"
] | 2944b97c720528f53962ccfd17d43ac939a77f46 | https://github.com/mhenrixon/sidekiq-unique-jobs/blob/2944b97c720528f53962ccfd17d43ac939a77f46/lib/sidekiq_unique_jobs/scripts.rb#L87-L94 | train | Handle error | [
30522,
13366,
5047,
1035,
7561,
1006,
4654,
1010,
5371,
1035,
2171,
1007,
2065,
4654,
1012,
4471,
1027,
1027,
1000,
16839,
23235,
2053,
9844,
5896,
1012,
3531,
2224,
9345,
2140,
1012,
1000,
5896,
1035,
21146,
2015,
1012,
3972,
12870,
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... |
sporkmonger/addressable | lib/addressable/uri.rb | Addressable.URI.normalized_scheme | def normalized_scheme
return nil unless self.scheme
@normalized_scheme ||= begin
if self.scheme =~ /^\s*ssh\+svn\s*$/i
"svn+ssh".dup
else
Addressable::URI.normalize_component(
self.scheme.strip.downcase,
Addressable::URI::CharacterClasses::SCHEME
... | ruby | def normalized_scheme
return nil unless self.scheme
@normalized_scheme ||= begin
if self.scheme =~ /^\s*ssh\+svn\s*$/i
"svn+ssh".dup
else
Addressable::URI.normalize_component(
self.scheme.strip.downcase,
Addressable::URI::CharacterClasses::SCHEME
... | [
"def",
"normalized_scheme",
"return",
"nil",
"unless",
"self",
".",
"scheme",
"@normalized_scheme",
"||=",
"begin",
"if",
"self",
".",
"scheme",
"=~",
"/",
"\\s",
"\\+",
"\\s",
"/i",
"\"svn+ssh\"",
".",
"dup",
"else",
"Addressable",
"::",
"URI",
".",
"normal... | The scheme component for this URI, normalized.
@return [String] The scheme component, normalized. | [
"The",
"scheme",
"component",
"for",
"this",
"URI",
"normalized",
"."
] | 5894c95a7768435cb46d1355954611dbd194832e | https://github.com/sporkmonger/addressable/blob/5894c95a7768435cb46d1355954611dbd194832e/lib/addressable/uri.rb#L855-L870 | train | Returns the normalized scheme of the URI. | [
30522,
13366,
3671,
3550,
1035,
5679,
2709,
9152,
2140,
4983,
2969,
1012,
5679,
1030,
3671,
3550,
1035,
5679,
1064,
1064,
1027,
4088,
2065,
2969,
1012,
5679,
1027,
1066,
1013,
1034,
1032,
1055,
1008,
7020,
2232,
1032,
1009,
17917,
2078,
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... |
elastic/apm-agent-ruby | lib/elastic_apm/config.rb | ElasticAPM.Config.available_spies | def available_spies
%w[
delayed_job
elasticsearch
faraday
http
json
mongo
net_http
redis
sequel
sidekiq
sinatra
tilt
rake
]
end | ruby | def available_spies
%w[
delayed_job
elasticsearch
faraday
http
json
mongo
net_http
redis
sequel
sidekiq
sinatra
tilt
rake
]
end | [
"def",
"available_spies",
"%w[",
"delayed_job",
"elasticsearch",
"faraday",
"http",
"json",
"mongo",
"net_http",
"redis",
"sequel",
"sidekiq",
"sinatra",
"tilt",
"rake",
"]",
"end"
] | rubocop:disable Metrics/MethodLength | [
"rubocop",
":",
"disable",
"Metrics",
"/",
"MethodLength"
] | 82190d1a9ba22af3b2c2c6fe6d23cc471f2e7ff6 | https://github.com/elastic/apm-agent-ruby/blob/82190d1a9ba22af3b2c2c6fe6d23cc471f2e7ff6/lib/elastic_apm/config.rb#L248-L264 | train | Returns the available spies for the given path | [
30522,
13366,
2800,
1035,
16794,
1003,
1059,
1031,
8394,
1035,
3105,
21274,
17310,
11140,
2521,
28039,
8299,
1046,
3385,
12256,
3995,
5658,
1035,
8299,
2417,
2483,
8297,
2217,
3211,
4160,
19643,
17010,
26008,
1033,
2203,
102,
0,
0,
0,
0,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
mikker/passwordless | lib/passwordless/router_helpers.rb | Passwordless.RouterHelpers.passwordless_for | def passwordless_for(resource, at: nil, as: nil)
mount_at = at || resource.to_s
mount_as = as || resource.to_s
mount(
Passwordless::Engine, at: mount_at, as: mount_as,
defaults: {authenticatable: resource.to_s.singularize}
)
Passwordless.mounted_as = ... | ruby | def passwordless_for(resource, at: nil, as: nil)
mount_at = at || resource.to_s
mount_as = as || resource.to_s
mount(
Passwordless::Engine, at: mount_at, as: mount_as,
defaults: {authenticatable: resource.to_s.singularize}
)
Passwordless.mounted_as = ... | [
"def",
"passwordless_for",
"(",
"resource",
",",
"at",
":",
"nil",
",",
"as",
":",
"nil",
")",
"mount_at",
"=",
"at",
"||",
"resource",
".",
"to_s",
"mount_as",
"=",
"as",
"||",
"resource",
".",
"to_s",
"mount",
"(",
"Passwordless",
"::",
"Engine",
","... | Generates passwordless routes for a given Model
Example usage:
passwordless_for :users
# or with options ...
passwordless_for :users, at: 'session_stuff', as: :user_session_things
@param resource [Symbol] the pluralized symbol of a Model (e.g - :users).
@param at [String] Optional - provide custom p... | [
"Generates",
"passwordless",
"routes",
"for",
"a",
"given",
"Model",
"Example",
"usage",
":",
"passwordless_for",
":",
"users",
"#",
"or",
"with",
"options",
"...",
"passwordless_for",
":",
"users",
"at",
":",
"session_stuff",
"as",
":",
":",
"user_session_thing... | 80d3e00c78114aed01f336514a236dfc17d0a91a | https://github.com/mikker/passwordless/blob/80d3e00c78114aed01f336514a236dfc17d0a91a/lib/passwordless/router_helpers.rb#L19-L28 | train | Creates a new Passwordless engine for the given resource. | [
30522,
13366,
20786,
3238,
1035,
2005,
1006,
7692,
1010,
2012,
1024,
9152,
2140,
1010,
2004,
1024,
9152,
2140,
1007,
4057,
1035,
2012,
1027,
2012,
1064,
1064,
7692,
1012,
2000,
1035,
1055,
4057,
1035,
2004,
1027,
2004,
1064,
1064,
7692,
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_storage/lib/2018-07-01/generated/azure_mgmt_storage/blob_containers.rb | Azure::Storage::Mgmt::V2018_07_01.BlobContainers.get_immutability_policy | def get_immutability_policy(resource_group_name, account_name, container_name, if_match:nil, custom_headers:nil)
response = get_immutability_policy_async(resource_group_name, account_name, container_name, if_match:if_match, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def get_immutability_policy(resource_group_name, account_name, container_name, if_match:nil, custom_headers:nil)
response = get_immutability_policy_async(resource_group_name, account_name, container_name, if_match:if_match, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"get_immutability_policy",
"(",
"resource_group_name",
",",
"account_name",
",",
"container_name",
",",
"if_match",
":",
"nil",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"get_immutability_policy_async",
"(",
"resource_group_name",
",",
"account_nam... | Gets the existing immutability policy along with the corresponding ETag in
response headers and body.
@param resource_group_name [String] The name of the resource group within the
user's subscription. The name is case insensitive.
@param account_name [String] The name of the storage account within the
specified r... | [
"Gets",
"the",
"existing",
"immutability",
"policy",
"along",
"with",
"the",
"corresponding",
"ETag",
"in",
"response",
"headers",
"and",
"body",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/blob_containers.rb#L1142-L1145 | train | Gets the immutability policy for a container. | [
30522,
13366,
2131,
1035,
10047,
28120,
8010,
1035,
3343,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
4070,
1035,
2171,
1010,
11661,
1035,
2171,
1010,
2065,
1035,
2674,
1024,
9152,
2140,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
aws/aws-sdk-ruby | gems/aws-sdk-rds/lib/aws-sdk-rds/db_cluster_snapshot.rb | Aws::RDS.DBClusterSnapshot.delete | def delete(options = {})
options = options.merge(db_cluster_snapshot_identifier: @snapshot_id)
resp = @client.delete_db_cluster_snapshot(options)
DBClusterSnapshot.new(
cluster_id: resp.data.db_cluster_snapshot.db_cluster_identifier,
snapshot_id: resp.data.db_cluster_snapshot.db_cluste... | ruby | def delete(options = {})
options = options.merge(db_cluster_snapshot_identifier: @snapshot_id)
resp = @client.delete_db_cluster_snapshot(options)
DBClusterSnapshot.new(
cluster_id: resp.data.db_cluster_snapshot.db_cluster_identifier,
snapshot_id: resp.data.db_cluster_snapshot.db_cluste... | [
"def",
"delete",
"(",
"options",
"=",
"{",
"}",
")",
"options",
"=",
"options",
".",
"merge",
"(",
"db_cluster_snapshot_identifier",
":",
"@snapshot_id",
")",
"resp",
"=",
"@client",
".",
"delete_db_cluster_snapshot",
"(",
"options",
")",
"DBClusterSnapshot",
".... | @example Request syntax with placeholder values
db_cluster_snapshot.delete()
@param [Hash] options ({})
@return [DBClusterSnapshot] | [
"@example",
"Request",
"syntax",
"with",
"placeholder",
"values"
] | e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d | https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-rds/lib/aws-sdk-rds/db_cluster_snapshot.rb#L443-L452 | train | Delete a DB cluster snapshot | [
30522,
13366,
3972,
12870,
1006,
7047,
1027,
1063,
1065,
1007,
7047,
1027,
7047,
1012,
13590,
1006,
16962,
1035,
9324,
1035,
20057,
12326,
1035,
8909,
4765,
18095,
1024,
1030,
20057,
12326,
1035,
8909,
1007,
24501,
2361,
1027,
1030,
7396,
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... |
hanami/hanami | lib/hanami/middleware_stack.rb | Hanami.MiddlewareStack.load! | def load!
load_default_stack
stack.each { |m, args, block| builder.use(load_middleware(m), *args, &block) }
builder.run routes
self
end | ruby | def load!
load_default_stack
stack.each { |m, args, block| builder.use(load_middleware(m), *args, &block) }
builder.run routes
self
end | [
"def",
"load!",
"load_default_stack",
"stack",
".",
"each",
"{",
"|",
"m",
",",
"args",
",",
"block",
"|",
"builder",
".",
"use",
"(",
"load_middleware",
"(",
"m",
")",
",",
"args",
",",
"block",
")",
"}",
"builder",
".",
"run",
"routes",
"self",
"en... | Instantiate a middleware stack
@param configuration [Hanami::ApplicationConfiguration] the application's configuration
@return [Hanami::MiddlewareStack] the new stack
@since 0.1.0
@api private
@see Hanami::ApplicationConfiguration
Load the middleware stack
@return [Hanami::MiddlewareStack] the loaded middle... | [
"Instantiate",
"a",
"middleware",
"stack"
] | 8c6e5147e92ef869b25379448572da3698eacfdc | https://github.com/hanami/hanami/blob/8c6e5147e92ef869b25379448572da3698eacfdc/lib/hanami/middleware_stack.rb#L34-L40 | train | Load the middleware stack and routes | [
30522,
13366,
7170,
999,
7170,
1035,
12398,
1035,
9991,
9991,
1012,
2169,
1063,
1064,
1049,
1010,
12098,
5620,
1010,
3796,
1064,
12508,
1012,
2224,
1006,
7170,
1035,
2690,
8059,
1006,
1049,
1007,
1010,
1008,
12098,
5620,
1010,
1004,
3796,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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/instance_pools.rb | Azure::SQL::Mgmt::V2018_06_01_preview.InstancePools.update_async | def update_async(resource_group_name, instance_pool_name, parameters, custom_headers:nil)
# Send request
promise = begin_update_async(resource_group_name, instance_pool_name, parameters, custom_headers:custom_headers)
promise = promise.then do |response|
# Defining deserialization method.
... | ruby | def update_async(resource_group_name, instance_pool_name, parameters, custom_headers:nil)
# Send request
promise = begin_update_async(resource_group_name, instance_pool_name, parameters, custom_headers:custom_headers)
promise = promise.then do |response|
# Defining deserialization method.
... | [
"def",
"update_async",
"(",
"resource_group_name",
",",
"instance_pool_name",
",",
"parameters",
",",
"custom_headers",
":",
"nil",
")",
"# Send request",
"promise",
"=",
"begin_update_async",
"(",
"resource_group_name",
",",
"instance_pool_name",
",",
"parameters",
","... | @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 instance_pool_name [String] The name of the instance pool to be
updated.
@param parameters [InstancePoolUpdate] The requested instance p... | [
"@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",
"por... | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_sql/lib/2018-06-01-preview/generated/azure_mgmt_sql/instance_pools.rb#L256-L272 | train | Updates an instance pool. | [
30522,
13366,
10651,
1035,
2004,
6038,
2278,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
6013,
1035,
4770,
1035,
2171,
1010,
11709,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
1001,
4604,
5227,
4872,
1027,
4088,
1035,
10651,
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_redis/lib/2017-02-01/generated/azure_mgmt_redis/redis.rb | Azure::Redis::Mgmt::V2017_02_01.Redis.begin_import_data | def begin_import_data(resource_group_name, name, parameters, custom_headers:nil)
response = begin_import_data_async(resource_group_name, name, parameters, custom_headers:custom_headers).value!
nil
end | ruby | def begin_import_data(resource_group_name, name, parameters, custom_headers:nil)
response = begin_import_data_async(resource_group_name, name, parameters, custom_headers:custom_headers).value!
nil
end | [
"def",
"begin_import_data",
"(",
"resource_group_name",
",",
"name",
",",
"parameters",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"begin_import_data_async",
"(",
"resource_group_name",
",",
"name",
",",
"parameters",
",",
"custom_headers",
":custom_head... | Import data into Redis cache.
@param resource_group_name [String] The name of the resource group.
@param name [String] The name of the Redis cache.
@param parameters [ImportRDBParameters] Parameters for Redis import
operation.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be a... | [
"Import",
"data",
"into",
"Redis",
"cache",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_redis/lib/2017-02-01/generated/azure_mgmt_redis/redis.rb#L1087-L1090 | train | Import a collection of data into a Data Lake Store. | [
30522,
13366,
4088,
1035,
12324,
1035,
2951,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2171,
1010,
11709,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
4088,
1035,
12324,
1035,
2951,
1035,
2004,
6038,
2278,
1006,
7692,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
middleman/middleman | middleman-core/lib/middleman-core/dns_resolver.rb | Middleman.DnsResolver.ips_for | def ips_for(name)
resolvers.each do |r|
ips = r.getaddresses(name)
return ips unless ips.nil? || ips.empty?
end
[]
end | ruby | def ips_for(name)
resolvers.each do |r|
ips = r.getaddresses(name)
return ips unless ips.nil? || ips.empty?
end
[]
end | [
"def",
"ips_for",
"(",
"name",
")",
"resolvers",
".",
"each",
"do",
"|",
"r",
"|",
"ips",
"=",
"r",
".",
"getaddresses",
"(",
"name",
")",
"return",
"ips",
"unless",
"ips",
".",
"nil?",
"||",
"ips",
".",
"empty?",
"end",
"[",
"]",
"end"
] | Get ips for given name
First the local resolver is used. On POSIX-systems /etc/hosts is used. On
Windows C:\Windows\System32\drivers\etc\hosts is used.
@param [String] name
The name which should be resolved. | [
"Get",
"ips",
"for",
"given",
"name"
] | a0dd9f78094813162895511e8516e0c5507cee50 | https://github.com/middleman/middleman/blob/a0dd9f78094813162895511e8516e0c5507cee50/middleman-core/lib/middleman-core/dns_resolver.rb#L63-L71 | train | Returns the IP addresses for the given name. | [
30522,
13366,
12997,
2015,
1035,
2005,
1006,
2171,
1007,
10663,
2869,
1012,
2169,
2079,
1064,
1054,
1064,
12997,
2015,
1027,
1054,
1012,
2131,
4215,
30524,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | data/azure_service_fabric/lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb | Azure::ServiceFabric::V6_2_0_9.ServiceFabricClientAPIs.get_application_health | def get_application_health(application_id, events_health_state_filter:0, deployed_applications_health_state_filter:0, services_health_state_filter:0, exclude_health_statistics:false, timeout:60, custom_headers:nil)
response = get_application_health_async(application_id, events_health_state_filter:events_health_st... | ruby | def get_application_health(application_id, events_health_state_filter:0, deployed_applications_health_state_filter:0, services_health_state_filter:0, exclude_health_statistics:false, timeout:60, custom_headers:nil)
response = get_application_health_async(application_id, events_health_state_filter:events_health_st... | [
"def",
"get_application_health",
"(",
"application_id",
",",
"events_health_state_filter",
":",
"0",
",",
"deployed_applications_health_state_filter",
":",
"0",
",",
"services_health_state_filter",
":",
"0",
",",
"exclude_health_statistics",
":",
"false",
",",
"timeout",
... | Gets the health of the service fabric application.
Returns the heath state of the service fabric application. The response
reports either Ok, Error or Warning health state. If the entity is not found
in the health store, it will return Error.
@param application_id [String] The identity of the application. This is... | [
"Gets",
"the",
"health",
"of",
"the",
"service",
"fabric",
"application",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_service_fabric/lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb#L6882-L6885 | train | Gets the health of the specified application. | [
30522,
13366,
2131,
1035,
4646,
1035,
2740,
1006,
4646,
1035,
8909,
1010,
2824,
1035,
2740,
1035,
2110,
1035,
11307,
1024,
1014,
1010,
7333,
1035,
5097,
1035,
2740,
1035,
2110,
1035,
11307,
1024,
1014,
1010,
2578,
1035,
2740,
1035,
2110,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | data/azure_cognitiveservices_luisauthoring/lib/2.0/generated/azure_cognitiveservices_luisauthoring/model.rb | Azure::CognitiveServices::LuisAuthoring::V2_0.Model.get_entity_role | def get_entity_role(app_id, version_id, entity_id, role_id, custom_headers:nil)
response = get_entity_role_async(app_id, version_id, entity_id, role_id, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def get_entity_role(app_id, version_id, entity_id, role_id, custom_headers:nil)
response = get_entity_role_async(app_id, version_id, entity_id, role_id, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"get_entity_role",
"(",
"app_id",
",",
"version_id",
",",
"entity_id",
",",
"role_id",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"get_entity_role_async",
"(",
"app_id",
",",
"version_id",
",",
"entity_id",
",",
"role_id",
",",
"custom_heade... | Get one role for a given entity in a version of the application
@param app_id The application ID.
@param version_id [String] The version ID.
@param entity_id entity ID.
@param role_id entity role ID.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request.
... | [
"Get",
"one",
"role",
"for",
"a",
"given",
"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#L8781-L8784 | train | Gets the role of the entity. | [
30522,
13366,
2131,
1035,
9178,
1035,
2535,
1006,
10439,
1035,
8909,
1010,
2544,
1035,
8909,
1010,
9178,
1035,
8909,
1010,
2535,
1035,
8909,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
2131,
1035,
9178,
1035,
2535,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 | activesupport/lib/active_support/inflector/methods.rb | ActiveSupport.Inflector.camelize | def camelize(term, uppercase_first_letter = true)
string = term.to_s
if uppercase_first_letter
string = string.sub(/^[a-z\d]*/) { |match| inflections.acronyms[match] || match.capitalize }
else
string = string.sub(inflections.acronyms_camelize_regex) { |match| match.downcase }
end... | ruby | def camelize(term, uppercase_first_letter = true)
string = term.to_s
if uppercase_first_letter
string = string.sub(/^[a-z\d]*/) { |match| inflections.acronyms[match] || match.capitalize }
else
string = string.sub(inflections.acronyms_camelize_regex) { |match| match.downcase }
end... | [
"def",
"camelize",
"(",
"term",
",",
"uppercase_first_letter",
"=",
"true",
")",
"string",
"=",
"term",
".",
"to_s",
"if",
"uppercase_first_letter",
"string",
"=",
"string",
".",
"sub",
"(",
"/",
"\\d",
"/",
")",
"{",
"|",
"match",
"|",
"inflections",
".... | Converts strings to UpperCamelCase.
If the +uppercase_first_letter+ parameter is set to false, then produces
lowerCamelCase.
Also converts '/' to '::' which is useful for converting
paths to namespaces.
camelize('active_model') # => "ActiveModel"
camelize('active_model', false) # => "... | [
"Converts",
"strings",
"to",
"UpperCamelCase",
".",
"If",
"the",
"+",
"uppercase_first_letter",
"+",
"parameter",
"is",
"set",
"to",
"false",
"then",
"produces",
"lowerCamelCase",
"."
] | 85a8bc644be69908f05740a5886ec19cd3679df5 | https://github.com/rails/rails/blob/85a8bc644be69908f05740a5886ec19cd3679df5/activesupport/lib/active_support/inflector/methods.rb#L68-L78 | train | CamelCase a term | [
30522,
13366,
19130,
4697,
1006,
2744,
1010,
3356,
18382,
1035,
2034,
1035,
3661,
1027,
2995,
1007,
5164,
1027,
2744,
1012,
2000,
1035,
1055,
2065,
3356,
18382,
1035,
2034,
1035,
3661,
5164,
1027,
5164,
1012,
4942,
1006,
1013,
1034,
1031,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | data/azure_cognitiveservices_luisauthoring/lib/2.0/generated/azure_cognitiveservices_luisauthoring/model.rb | Azure::CognitiveServices::LuisAuthoring::V2_0.Model.list_regex_entity_infos | def list_regex_entity_infos(app_id, version_id, skip:0, take:100, custom_headers:nil)
response = list_regex_entity_infos_async(app_id, version_id, skip:skip, take:take, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def list_regex_entity_infos(app_id, version_id, skip:0, take:100, custom_headers:nil)
response = list_regex_entity_infos_async(app_id, version_id, skip:skip, take:take, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"list_regex_entity_infos",
"(",
"app_id",
",",
"version_id",
",",
"skip",
":",
"0",
",",
"take",
":",
"100",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"list_regex_entity_infos_async",
"(",
"app_id",
",",
"version_id",
",",
"skip",
":",
... | Gets information about the regular expression entity models in a version of
the application.
@param app_id The application ID.
@param version_id [String] The version ID.
@param skip [Integer] The number of entries to skip. Default value is 0.
@param take [Integer] The number of entries to return. Maximum page siz... | [
"Gets",
"information",
"about",
"the",
"regular",
"expression",
"entity",
"models",
"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#L5651-L5654 | train | Gets the regex entity infos for the application version. | [
30522,
13366,
2862,
1035,
19723,
10288,
1035,
9178,
1035,
18558,
2015,
1006,
10439,
1035,
8909,
1010,
2544,
1035,
8909,
1010,
13558,
1024,
1014,
1010,
2202,
1024,
2531,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
2862... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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/image.rb | Aws::EC2.Image.modify_attribute | def modify_attribute(options = {})
options = options.merge(image_id: @id)
resp = @client.modify_image_attribute(options)
resp.data
end | ruby | def modify_attribute(options = {})
options = options.merge(image_id: @id)
resp = @client.modify_image_attribute(options)
resp.data
end | [
"def",
"modify_attribute",
"(",
"options",
"=",
"{",
"}",
")",
"options",
"=",
"options",
".",
"merge",
"(",
"image_id",
":",
"@id",
")",
"resp",
"=",
"@client",
".",
"modify_image_attribute",
"(",
"options",
")",
"resp",
".",
"data",
"end"
] | @example Request syntax with placeholder values
image.modify_attribute({
attribute: "String",
description: "value", # value <Hash,Array,String,Numeric,Boolean,IO,Set,nil>
launch_permission: {
add: [
{
group: "all", # accepts all
user_id: "String",
},
... | [
"@example",
"Request",
"syntax",
"with",
"placeholder",
"values"
] | e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d | https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-ec2/lib/aws-sdk-ec2/image.rb#L481-L485 | train | Modify an image attribute | [
30522,
13366,
19933,
1035,
17961,
1006,
7047,
1027,
1063,
1065,
1007,
7047,
1027,
7047,
1012,
13590,
1006,
3746,
1035,
8909,
1024,
1030,
8909,
1007,
24501,
2361,
1027,
1030,
7396,
1012,
19933,
1035,
3746,
1035,
17961,
1006,
7047,
1007,
2450... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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/2017-12-01/generated/azure_mgmt_compute/virtual_machines.rb | Azure::Compute::Mgmt::V2017_12_01.VirtualMachines.begin_run_command_with_http_info | def begin_run_command_with_http_info(resource_group_name, vm_name, parameters, custom_headers:nil)
begin_run_command_async(resource_group_name, vm_name, parameters, custom_headers:custom_headers).value!
end | ruby | def begin_run_command_with_http_info(resource_group_name, vm_name, parameters, custom_headers:nil)
begin_run_command_async(resource_group_name, vm_name, parameters, custom_headers:custom_headers).value!
end | [
"def",
"begin_run_command_with_http_info",
"(",
"resource_group_name",
",",
"vm_name",
",",
"parameters",
",",
"custom_headers",
":",
"nil",
")",
"begin_run_command_async",
"(",
"resource_group_name",
",",
"vm_name",
",",
"parameters",
",",
"custom_headers",
":custom_head... | Run command on the VM.
@param resource_group_name [String] The name of the resource group.
@param vm_name [String] The name of the virtual machine.
@param parameters [RunCommandInput] Parameters supplied to the Run command
operation.
@param custom_headers [Hash{String => String}] A hash of custom headers that
wi... | [
"Run",
"command",
"on",
"the",
"VM",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_compute/lib/2017-12-01/generated/azure_mgmt_compute/virtual_machines.rb#L2418-L2420 | train | Runs a command on a virtual machine. | [
30522,
13366,
4088,
1035,
2448,
1035,
3094,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
1058,
2213,
1035,
2171,
1010,
11709,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
4088,
1035,
2448,
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... |
doorkeeper-gem/doorkeeper | app/controllers/doorkeeper/tokens_controller.rb | Doorkeeper.TokensController.authorized? | def authorized?
return unless token.present?
# Client is confidential, therefore client authentication & authorization
# is required
if token.application_id? && token.application.confidential?
# We authorize client by checking token's application
server.client && server.client.a... | ruby | def authorized?
return unless token.present?
# Client is confidential, therefore client authentication & authorization
# is required
if token.application_id? && token.application.confidential?
# We authorize client by checking token's application
server.client && server.client.a... | [
"def",
"authorized?",
"return",
"unless",
"token",
".",
"present?",
"# Client is confidential, therefore client authentication & authorization",
"# is required",
"if",
"token",
".",
"application_id?",
"&&",
"token",
".",
"application",
".",
"confidential?",
"# We authorize clie... | OAuth 2.0 Section 2.1 defines two client types, "public" & "confidential".
Public clients (as per RFC 7009) do not require authentication whereas
confidential clients must be authenticated for their token revocation.
Once a confidential client is authenticated, it must be authorized to
revoke the provided access o... | [
"OAuth",
"2",
".",
"0",
"Section",
"2",
".",
"1",
"defines",
"two",
"client",
"types",
"public",
"&",
"confidential",
".",
"Public",
"clients",
"(",
"as",
"per",
"RFC",
"7009",
")",
"do",
"not",
"require",
"authentication",
"whereas",
"confidential",
"clie... | f1be81891c3d54a42928c1b9e03c5d6833b8af87 | https://github.com/doorkeeper-gem/doorkeeper/blob/f1be81891c3d54a42928c1b9e03c5d6833b8af87/app/controllers/doorkeeper/tokens_controller.rb#L59-L71 | train | Check if the client is authorized | [
30522,
13366,
9362,
1029,
2709,
4983,
19204,
1012,
2556,
1029,
1001,
7396,
2003,
18777,
1010,
3568,
7396,
27280,
1004,
20104,
1001,
2003,
3223,
2065,
19204,
1012,
4646,
1035,
8909,
1029,
1004,
1004,
19204,
1012,
30524,
14203,
2995,
2203,
22... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
mongodb/mongoid | lib/mongoid/reloadable.rb | Mongoid.Reloadable.reload_root_document | def reload_root_document
{}.merge(collection.find({ _id: _id }, session: _session).read(mode: :primary).first || {})
end | ruby | def reload_root_document
{}.merge(collection.find({ _id: _id }, session: _session).read(mode: :primary).first || {})
end | [
"def",
"reload_root_document",
"{",
"}",
".",
"merge",
"(",
"collection",
".",
"find",
"(",
"{",
"_id",
":",
"_id",
"}",
",",
"session",
":",
"_session",
")",
".",
"read",
"(",
"mode",
":",
":primary",
")",
".",
"first",
"||",
"{",
"}",
")",
"end"
... | Reload the root document.
@example Reload the document.
document.reload_root_document
@return [ Hash ] The reloaded attributes.
@since 2.3.2 | [
"Reload",
"the",
"root",
"document",
"."
] | 56976e32610f4c2450882b0bfe14da099f0703f4 | https://github.com/mongodb/mongoid/blob/56976e32610f4c2450882b0bfe14da099f0703f4/lib/mongoid/reloadable.rb#L61-L63 | train | Reload the root document | [
30522,
13366,
2128,
11066,
1035,
7117,
1035,
6254,
1063,
1065,
1012,
13590,
1006,
3074,
1012,
2424,
1006,
1063,
1035,
8909,
1024,
1035,
8909,
1065,
1010,
5219,
1024,
1035,
5219,
1007,
1012,
3191,
1006,
5549,
1024,
1024,
3078,
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 | 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_sas_tokens_next | def list_sas_tokens_next(next_page_link, custom_headers:nil)
response = list_sas_tokens_next_async(next_page_link, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def list_sas_tokens_next(next_page_link, custom_headers:nil)
response = list_sas_tokens_next_async(next_page_link, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"list_sas_tokens_next",
"(",
"next_page_link",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"list_sas_tokens_next_async",
"(",
"next_page_link",
",",
"custom_headers",
":custom_headers",
")",
".",
"value!",
"response",
".",
"body",
"unless",
"respon... | Gets the SAS token associated with the specified Data Lake Analytics and
Azure Storage account and container combination.
@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 t... | [
"Gets",
"the",
"SAS",
"token",
"associated",
"with",
"the",
"specified",
"Data",
"Lake",
"Analytics",
"and",
"Azure",
"Storage",
"account",
"and",
"container",
"combination",
"."
] | 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#L2448-L2451 | train | Gets the SAS tokens for the specified App Service Environment. | [
30522,
13366,
2862,
1035,
21871,
1035,
19204,
2015,
1035,
2279,
30524,
7661,
1035,
20346,
2015,
1007,
1012,
3643,
999,
3433,
1012,
2303,
4983,
3433,
1012,
9152,
2140,
1029,
2203,
102,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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_iot_hub/lib/2017-01-19/generated/azure_mgmt_iot_hub/iot_hub_resource.rb | Azure::IotHub::Mgmt::V2017_01_19.IotHubResource.get_job | def get_job(resource_group_name, resource_name, job_id, custom_headers:nil)
response = get_job_async(resource_group_name, resource_name, job_id, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def get_job(resource_group_name, resource_name, job_id, custom_headers:nil)
response = get_job_async(resource_group_name, resource_name, job_id, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"get_job",
"(",
"resource_group_name",
",",
"resource_name",
",",
"job_id",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"get_job_async",
"(",
"resource_group_name",
",",
"resource_name",
",",
"job_id",
",",
"custom_headers",
":custom_headers",
")... | Get the details of a job from an IoT hub. For more information, see:
https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry.
Get the details of a job from an IoT hub. For more information, see:
https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry.
@param resource_group_... | [
"Get",
"the",
"details",
"of",
"a",
"job",
"from",
"an",
"IoT",
"hub",
".",
"For",
"more",
"information",
"see",
":",
"https",
":",
"//",
"docs",
".",
"microsoft",
".",
"com",
"/",
"azure",
"/",
"iot",
"-",
"hub",
"/",
"iot",
"-",
"hub",
"-",
"de... | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_iot_hub/lib/2017-01-19/generated/azure_mgmt_iot_hub/iot_hub_resource.rb#L1187-L1190 | train | Gets the specified job. | [
30522,
13366,
2131,
1035,
3105,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
7692,
1035,
2171,
1010,
3105,
1035,
8909,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
2131,
1035,
3105,
1035,
2004,
6038,
2278,
1006,
7692,
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... |
aws/aws-sdk-ruby | gems/aws-sdk-rds/lib/aws-sdk-rds/db_cluster_snapshot.rb | Aws::RDS.DBClusterSnapshot.copy | def copy(options = {})
options = options.merge(source_db_cluster_snapshot_identifier: @snapshot_id)
resp = @client.copy_db_cluster_snapshot(options)
DBClusterSnapshot.new(
cluster_id: resp.data.db_cluster_snapshot.db_cluster_identifier,
snapshot_id: resp.data.db_cluster_snapshot.db_clu... | ruby | def copy(options = {})
options = options.merge(source_db_cluster_snapshot_identifier: @snapshot_id)
resp = @client.copy_db_cluster_snapshot(options)
DBClusterSnapshot.new(
cluster_id: resp.data.db_cluster_snapshot.db_cluster_identifier,
snapshot_id: resp.data.db_cluster_snapshot.db_clu... | [
"def",
"copy",
"(",
"options",
"=",
"{",
"}",
")",
"options",
"=",
"options",
".",
"merge",
"(",
"source_db_cluster_snapshot_identifier",
":",
"@snapshot_id",
")",
"resp",
"=",
"@client",
".",
"copy_db_cluster_snapshot",
"(",
"options",
")",
"DBClusterSnapshot",
... | @example Request syntax with placeholder values
dbclustersnapshot = db_cluster_snapshot.copy({
target_db_cluster_snapshot_identifier: "String", # required
kms_key_id: "String",
pre_signed_url: "String",
copy_tags: false,
tags: [
{
key: "String",
value: "String",
... | [
"@example",
"Request",
"syntax",
"with",
"placeholder",
"values"
] | e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d | https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-rds/lib/aws-sdk-rds/db_cluster_snapshot.rb#L427-L436 | train | Copy the current DB cluster snapshot to another DB cluster snapshot | [
30522,
13366,
6100,
1006,
7047,
1027,
1063,
1065,
1007,
7047,
1027,
7047,
1012,
13590,
1006,
3120,
1035,
16962,
1035,
9324,
1035,
20057,
12326,
1035,
8909,
4765,
18095,
1024,
1030,
20057,
12326,
1035,
8909,
1007,
24501,
2361,
1027,
1030,
73... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
colszowka/simplecov | lib/simplecov/file_list.rb | SimpleCov.FileList.covered_strength | def covered_strength
return 0.0 if empty? || lines_of_code.zero?
Float(map { |f| f.covered_strength * f.lines_of_code }.inject(:+) / lines_of_code)
end | ruby | def covered_strength
return 0.0 if empty? || lines_of_code.zero?
Float(map { |f| f.covered_strength * f.lines_of_code }.inject(:+) / lines_of_code)
end | [
"def",
"covered_strength",
"return",
"0.0",
"if",
"empty?",
"||",
"lines_of_code",
".",
"zero?",
"Float",
"(",
"map",
"{",
"|",
"f",
"|",
"f",
".",
"covered_strength",
"*",
"f",
".",
"lines_of_code",
"}",
".",
"inject",
"(",
":+",
")",
"/",
"lines_of_cod... | Computes the strength (hits / line) based upon lines covered and lines missed
@return [Float] | [
"Computes",
"the",
"strength",
"(",
"hits",
"/",
"line",
")",
"based",
"upon",
"lines",
"covered",
"and",
"lines",
"missed"
] | 8f6978a2513f10c4dd8d7dd7eed666fe3f2b55c2 | https://github.com/colszowka/simplecov/blob/8f6978a2513f10c4dd8d7dd7eed666fe3f2b55c2/lib/simplecov/file_list.rb#L56-L59 | train | Returns the number of covered terms of the formula. | [
30522,
13366,
3139,
1035,
3997,
2709,
1014,
1012,
1014,
2065,
4064,
1029,
1064,
1064,
3210,
1035,
1997,
1035,
3642,
1012,
5717,
1029,
14257,
1006,
4949,
1063,
1064,
1042,
1064,
1042,
1012,
3139,
1035,
3997,
1008,
1042,
1012,
3210,
1035,
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_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... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_cdn/lib/2016-04-02/generated/azure_mgmt_cdn/profiles.rb | Azure::CDN::Mgmt::V2016_04_02.Profiles.begin_create_with_http_info | def begin_create_with_http_info(profile_name, profile_properties, resource_group_name, custom_headers:nil)
begin_create_async(profile_name, profile_properties, resource_group_name, custom_headers:custom_headers).value!
end | ruby | def begin_create_with_http_info(profile_name, profile_properties, resource_group_name, custom_headers:nil)
begin_create_async(profile_name, profile_properties, resource_group_name, custom_headers:custom_headers).value!
end | [
"def",
"begin_create_with_http_info",
"(",
"profile_name",
",",
"profile_properties",
",",
"resource_group_name",
",",
"custom_headers",
":",
"nil",
")",
"begin_create_async",
"(",
"profile_name",
",",
"profile_properties",
",",
"resource_group_name",
",",
"custom_headers",... | Creates a new CDN profile with the specified parameters.
@param profile_name [String] Name of the CDN profile within the resource
group.
@param profile_properties [ProfileCreateParameters] Profile properties needed
for creation.
@param resource_group_name [String] Name of the resource group within the
Azure subs... | [
"Creates",
"a",
"new",
"CDN",
"profile",
"with",
"the",
"specified",
"parameters",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_cdn/lib/2016-04-02/generated/azure_mgmt_cdn/profiles.rb#L584-L586 | train | Creates a new Advisor. | [
30522,
13366,
4088,
1035,
3443,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
6337,
1035,
2171,
1010,
6337,
1035,
5144,
1010,
7692,
1035,
2177,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
4088,
1035,
3443,
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_stream_analytics/lib/2016-03-01/generated/azure_mgmt_stream_analytics/outputs.rb | Azure::StreamAnalytics::Mgmt::V2016_03_01.Outputs.update_with_http_info | def update_with_http_info(output, resource_group_name, job_name, output_name, if_match:nil, custom_headers:nil)
update_async(output, resource_group_name, job_name, output_name, if_match:if_match, custom_headers:custom_headers).value!
end | ruby | def update_with_http_info(output, resource_group_name, job_name, output_name, if_match:nil, custom_headers:nil)
update_async(output, resource_group_name, job_name, output_name, if_match:if_match, custom_headers:custom_headers).value!
end | [
"def",
"update_with_http_info",
"(",
"output",
",",
"resource_group_name",
",",
"job_name",
",",
"output_name",
",",
"if_match",
":",
"nil",
",",
"custom_headers",
":",
"nil",
")",
"update_async",
"(",
"output",
",",
"resource_group_name",
",",
"job_name",
",",
... | Updates an existing output under an existing streaming job. This can be used
to partially update (ie. update one or two properties) an output without
affecting the rest the job or output definition.
@param output [Output] An Output object. The properties specified here will
overwrite the corresponding properties i... | [
"Updates",
"an",
"existing",
"output",
"under",
"an",
"existing",
"streaming",
"job",
".",
"This",
"can",
"be",
"used",
"to",
"partially",
"update",
"(",
"ie",
".",
"update",
"one",
"or",
"two",
"properties",
")",
"an",
"output",
"without",
"affecting",
"t... | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_stream_analytics/lib/2016-03-01/generated/azure_mgmt_stream_analytics/outputs.rb#L224-L226 | train | Updates an existing output s index. | [
30522,
13366,
10651,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
6434,
1010,
7692,
1035,
2177,
1035,
2171,
1010,
3105,
1035,
2171,
1010,
6434,
1035,
2171,
1010,
2065,
1035,
2674,
1024,
9152,
2140,
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... |
kpumuk/meta-tags | lib/meta_tags/renderer.rb | MetaTags.Renderer.render_charset | def render_charset(tags)
charset = meta_tags.extract(:charset)
tags << Tag.new(:meta, charset: charset) if charset.present?
end | ruby | def render_charset(tags)
charset = meta_tags.extract(:charset)
tags << Tag.new(:meta, charset: charset) if charset.present?
end | [
"def",
"render_charset",
"(",
"tags",
")",
"charset",
"=",
"meta_tags",
".",
"extract",
"(",
":charset",
")",
"tags",
"<<",
"Tag",
".",
"new",
"(",
":meta",
",",
"charset",
":",
"charset",
")",
"if",
"charset",
".",
"present?",
"end"
] | Renders charset tag.
@param [Array<Tag>] tags a buffer object to store tag in. | [
"Renders",
"charset",
"tag",
"."
] | 03585f95edf96cd17024c5c155ce46ec8bc47232 | https://github.com/kpumuk/meta-tags/blob/03585f95edf96cd17024c5c155ce46ec8bc47232/lib/meta_tags/renderer.rb#L47-L50 | train | Render the charset tag | [
30522,
13366,
17552,
1035,
25869,
13462,
1006,
22073,
1007,
25869,
13462,
1027,
18804,
1035,
22073,
1012,
14817,
1006,
1024,
25869,
13462,
1007,
22073,
1026,
1026,
6415,
1012,
2047,
1006,
1024,
18804,
1010,
25869,
13462,
1024,
25869,
13462,
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... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.