repo stringclasses 235
values | path stringlengths 11 168 | func_name stringlengths 12 143 | original_string stringlengths 83 6.91k | language stringclasses 1
value | code stringlengths 83 6.91k | code_tokens listlengths 15 1.01k | docstring stringlengths 5 25.7k | docstring_tokens listlengths 1 427 | sha stringclasses 235
values | url stringlengths 99 268 | partition stringclasses 1
value | summary stringlengths 7 202 | input_ids listlengths 502 502 | token_type_ids listlengths 502 502 | attention_mask listlengths 502 502 | labels listlengths 502 502 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
aws/aws-sdk-ruby | gems/aws-sdk-glacier/lib/aws-sdk-glacier/account.rb | Aws::Glacier.Account.create_vault | def create_vault(options = {})
options = options.merge(account_id: @id)
resp = @client.create_vault(options)
Vault.new(
account_id: @id,
name: options[:vault_name],
client: @client
)
end | ruby | def create_vault(options = {})
options = options.merge(account_id: @id)
resp = @client.create_vault(options)
Vault.new(
account_id: @id,
name: options[:vault_name],
client: @client
)
end | [
"def",
"create_vault",
"(",
"options",
"=",
"{",
"}",
")",
"options",
"=",
"options",
".",
"merge",
"(",
"account_id",
":",
"@id",
")",
"resp",
"=",
"@client",
".",
"create_vault",
"(",
"options",
")",
"Vault",
".",
"new",
"(",
"account_id",
":",
"@id"... | @!group Actions
@example Request syntax with placeholder values
vault = account.create_vault({
vault_name: "string", # required
})
@param [Hash] options ({})
@option options [required, String] :vault_name
The name of the vault.
@return [Vault] | [
"@!group",
"Actions",
"@example",
"Request",
"syntax",
"with",
"placeholder",
"values"
] | e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d | https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-glacier/lib/aws-sdk-glacier/account.rb#L167-L175 | train | Create a new vault | [
30522,
13366,
3443,
1035,
11632,
1006,
7047,
1027,
1063,
1065,
1007,
7047,
1027,
7047,
1012,
13590,
1006,
4070,
1035,
8909,
1024,
1030,
8909,
1007,
24501,
2361,
1027,
1030,
7396,
1012,
3443,
1035,
11632,
1006,
7047,
1007,
11632,
1012,
2047,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_policy_insights/lib/2018-04-04/generated/azure_mgmt_policy_insights/policy_states.rb | Azure::PolicyInsights::Mgmt::V2018_04_04.PolicyStates.summarize_for_subscription_level_policy_assignment | def summarize_for_subscription_level_policy_assignment(subscription_id, policy_assignment_name, query_options:nil, custom_headers:nil)
response = summarize_for_subscription_level_policy_assignment_async(subscription_id, policy_assignment_name, query_options:query_options, custom_headers:custom_headers).value!
... | ruby | def summarize_for_subscription_level_policy_assignment(subscription_id, policy_assignment_name, query_options:nil, custom_headers:nil)
response = summarize_for_subscription_level_policy_assignment_async(subscription_id, policy_assignment_name, query_options:query_options, custom_headers:custom_headers).value!
... | [
"def",
"summarize_for_subscription_level_policy_assignment",
"(",
"subscription_id",
",",
"policy_assignment_name",
",",
"query_options",
":",
"nil",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"summarize_for_subscription_level_policy_assignment_async",
"(",
"subsc... | Summarizes policy states for the subscription level policy assignment.
@param subscription_id [String] Microsoft Azure subscription ID.
@param policy_assignment_name [String] Policy assignment name.
@param query_options [QueryOptions] Additional parameters for the operation
@param custom_headers [Hash{String => St... | [
"Summarizes",
"policy",
"states",
"for",
"the",
"subscription",
"level",
"policy",
"assignment",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_policy_insights/lib/2018-04-04/generated/azure_mgmt_policy_insights/policy_states.rb#L1631-L1634 | train | Summarizes the policy assignments for the subscription level policy assignment. | [
30522,
13366,
7680,
7849,
4697,
1035,
2005,
1035,
15002,
1035,
2504,
1035,
3343,
1035,
8775,
1006,
15002,
1035,
8909,
1010,
3343,
1035,
8775,
1035,
2171,
1010,
23032,
1035,
7047,
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... |
rmagick/rmagick | ext/RMagick/extconf.rb | RMagick.Extconf.check_multiple_imagemagick_versions | def check_multiple_imagemagick_versions
versions = []
path = ENV['PATH'].split(File::PATH_SEPARATOR)
path.each do |dir|
file = File.join(dir, 'Magick-config')
next unless File.executable? file
vers = `#{file} --version`.chomp.strip
prefix = `#{file} --prefix`.chomp.str... | ruby | def check_multiple_imagemagick_versions
versions = []
path = ENV['PATH'].split(File::PATH_SEPARATOR)
path.each do |dir|
file = File.join(dir, 'Magick-config')
next unless File.executable? file
vers = `#{file} --version`.chomp.strip
prefix = `#{file} --prefix`.chomp.str... | [
"def",
"check_multiple_imagemagick_versions",
"versions",
"=",
"[",
"]",
"path",
"=",
"ENV",
"[",
"'PATH'",
"]",
".",
"split",
"(",
"File",
"::",
"PATH_SEPARATOR",
")",
"path",
".",
"each",
"do",
"|",
"dir",
"|",
"file",
"=",
"File",
".",
"join",
"(",
... | Seems like lots of people have multiple versions of ImageMagick installed. | [
"Seems",
"like",
"lots",
"of",
"people",
"have",
"multiple",
"versions",
"of",
"ImageMagick",
"installed",
"."
] | ef6688ed9d76bf123c2ea1a483eff8635051adb7 | https://github.com/rmagick/rmagick/blob/ef6688ed9d76bf123c2ea1a483eff8635051adb7/ext/RMagick/extconf.rb#L186-L207 | train | Check if there are multiple ImageMagick installed. | [
30522,
13366,
4638,
1035,
3674,
1035,
3746,
2863,
12863,
2243,
1035,
4617,
4617,
1027,
1031,
1033,
4130,
1027,
4372,
2615,
1031,
1005,
4130,
1005,
1033,
1012,
3975,
1006,
5371,
1024,
1024,
4130,
1035,
19802,
25879,
2953,
1007,
4130,
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_search/lib/2015-08-19/generated/azure_mgmt_search/services.rb | Azure::Search::Mgmt::V2015_08_19.Services.update | def update(resource_group_name, search_service_name, service, search_management_request_options:nil, custom_headers:nil)
response = update_async(resource_group_name, search_service_name, service, search_management_request_options:search_management_request_options, custom_headers:custom_headers).value!
respo... | ruby | def update(resource_group_name, search_service_name, service, search_management_request_options:nil, custom_headers:nil)
response = update_async(resource_group_name, search_service_name, service, search_management_request_options:search_management_request_options, custom_headers:custom_headers).value!
respo... | [
"def",
"update",
"(",
"resource_group_name",
",",
"search_service_name",
",",
"service",
",",
"search_management_request_options",
":",
"nil",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"update_async",
"(",
"resource_group_name",
",",
"search_service_name"... | Updates an existing Search service in the given resource group.
@param resource_group_name [String] The name of the resource group within the
current subscription. You can obtain this value from the Azure Resource
Manager API or the portal.
@param search_service_name [String] The name of the Azure Search service t... | [
"Updates",
"an",
"existing",
"Search",
"service",
"in",
"the",
"given",
"resource",
"group",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_search/lib/2015-08-19/generated/azure_mgmt_search/services.rb#L109-L112 | train | Updates an existing search service. | [
30522,
13366,
10651,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
3945,
1035,
2326,
1035,
2171,
1010,
30524,
1035,
5227,
1035,
7047,
1024,
9152,
2140,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
10651,
1035,
2004,
6038,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
awesome-print/awesome_print | lib/awesome_print/ext/nobrainer.rb | AwesomePrint.NoBrainer.cast_with_nobrainer | def cast_with_nobrainer(object, type)
cast = cast_without_nobrainer(object, type)
if defined?(::NoBrainer::Document)
if object.is_a?(Class) && object < ::NoBrainer::Document
cast = :nobrainer_class
elsif object.is_a?(::NoBrainer::Document)
cast = :nobrainer_document
... | ruby | def cast_with_nobrainer(object, type)
cast = cast_without_nobrainer(object, type)
if defined?(::NoBrainer::Document)
if object.is_a?(Class) && object < ::NoBrainer::Document
cast = :nobrainer_class
elsif object.is_a?(::NoBrainer::Document)
cast = :nobrainer_document
... | [
"def",
"cast_with_nobrainer",
"(",
"object",
",",
"type",
")",
"cast",
"=",
"cast_without_nobrainer",
"(",
"object",
",",
"type",
")",
"if",
"defined?",
"(",
"::",
"NoBrainer",
"::",
"Document",
")",
"if",
"object",
".",
"is_a?",
"(",
"Class",
")",
"&&",
... | Add NoBrainer class names to the dispatcher pipeline.
------------------------------------------------------------------------------ | [
"Add",
"NoBrainer",
"class",
"names",
"to",
"the",
"dispatcher",
"pipeline",
".",
"------------------------------------------------------------------------------"
] | 4564fd74721562cbef2443f7d97109bf9192343d | https://github.com/awesome-print/awesome_print/blob/4564fd74721562cbef2443f7d97109bf9192343d/lib/awesome_print/ext/nobrainer.rb#L16-L26 | train | Casts the given object with the nobrainer type. | [
30522,
13366,
3459,
1035,
2007,
1035,
2053,
10024,
26455,
1006,
4874,
1010,
2828,
1007,
3459,
1027,
3459,
1035,
2302,
1035,
2053,
10024,
26455,
1006,
4874,
1010,
2828,
1007,
2065,
4225,
1029,
1006,
1024,
1024,
2053,
10024,
26455,
1024,
1024... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_recovery_services_backup/lib/2016-06-01/generated/azure_mgmt_recovery_services_backup/protection_containers.rb | Azure::RecoveryServicesBackup::Mgmt::V2016_06_01.ProtectionContainers.unregister | def unregister(resource_group_name, vault_name, identity_name, custom_headers:nil)
response = unregister_async(resource_group_name, vault_name, identity_name, custom_headers:custom_headers).value!
nil
end | ruby | def unregister(resource_group_name, vault_name, identity_name, custom_headers:nil)
response = unregister_async(resource_group_name, vault_name, identity_name, custom_headers:custom_headers).value!
nil
end | [
"def",
"unregister",
"(",
"resource_group_name",
",",
"vault_name",
",",
"identity_name",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"unregister_async",
"(",
"resource_group_name",
",",
"vault_name",
",",
"identity_name",
",",
"custom_headers",
":custom_... | Unregisters the given container from your Recovery Services vault.
@param resource_group_name [String] The name of the resource group associated
with the Recovery Services vault.
@param vault_name [String] The name of the Recovery Services vault.
@param identity_name [String] Name of the protection container to un... | [
"Unregisters",
"the",
"given",
"container",
"from",
"your",
"Recovery",
"Services",
"vault",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_recovery_services_backup/lib/2016-06-01/generated/azure_mgmt_recovery_services_backup/protection_containers.rb#L352-L355 | train | Unregisters the specified index in the specified key vault. | [
30522,
13366,
4895,
2890,
24063,
2121,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
11632,
1035,
2171,
1010,
4767,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
4895,
2890,
24063,
2121,
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... |
ruby-i18n/i18n | lib/i18n.rb | I18n.Base.transliterate | def transliterate(key, *, throw: false, raise: false, locale: nil, replacement: nil, **options)
locale ||= config.locale
raise Disabled.new('transliterate') if locale == false
enforce_available_locales!(locale)
config.backend.transliterate(locale, key, replacement)
rescue I18n::ArgumentErro... | ruby | def transliterate(key, *, throw: false, raise: false, locale: nil, replacement: nil, **options)
locale ||= config.locale
raise Disabled.new('transliterate') if locale == false
enforce_available_locales!(locale)
config.backend.transliterate(locale, key, replacement)
rescue I18n::ArgumentErro... | [
"def",
"transliterate",
"(",
"key",
",",
"*",
",",
"throw",
":",
"false",
",",
"raise",
":",
"false",
",",
"locale",
":",
"nil",
",",
"replacement",
":",
"nil",
",",
"**",
"options",
")",
"locale",
"||=",
"config",
".",
"locale",
"raise",
"Disabled",
... | Transliterates UTF-8 characters to ASCII. By default this method will
transliterate only Latin strings to an ASCII approximation:
I18n.transliterate("Ærøskøbing")
# => "AEroskobing"
I18n.transliterate("日本語")
# => "???"
It's also possible to add support for per-locale transliterations. I18n
expects... | [
"Transliterates",
"UTF",
"-",
"8",
"characters",
"to",
"ASCII",
".",
"By",
"default",
"this",
"method",
"will",
"transliterate",
"only",
"Latin",
"strings",
"to",
"an",
"ASCII",
"approximation",
":"
] | 0c5dab494d9b043e00662d8e789229c33045c024 | https://github.com/ruby-i18n/i18n/blob/0c5dab494d9b043e00662d8e789229c33045c024/lib/i18n.rb#L268-L276 | train | transliterate a key to a replacement | [
30522,
13366,
28468,
22139,
1006,
3145,
1010,
1008,
1010,
5466,
1024,
6270,
1010,
5333,
1024,
6270,
1010,
2334,
2063,
1024,
9152,
2140,
1010,
6110,
1024,
9152,
2140,
1010,
1008,
1008,
7047,
1007,
2334,
2063,
1064,
1064,
1027,
9530,
8873,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/metadata.rb | Puppet::ModuleTool.Metadata.validate_version | def validate_version(version)
return if SemanticPuppet::Version.valid?(version)
err = _("version string cannot be parsed as a valid Semantic Version")
raise ArgumentError, _("Invalid 'version' field in metadata.json: %{err}") % { err: err }
end | ruby | def validate_version(version)
return if SemanticPuppet::Version.valid?(version)
err = _("version string cannot be parsed as a valid Semantic Version")
raise ArgumentError, _("Invalid 'version' field in metadata.json: %{err}") % { err: err }
end | [
"def",
"validate_version",
"(",
"version",
")",
"return",
"if",
"SemanticPuppet",
"::",
"Version",
".",
"valid?",
"(",
"version",
")",
"err",
"=",
"_",
"(",
"\"version string cannot be parsed as a valid Semantic Version\"",
")",
"raise",
"ArgumentError",
",",
"_",
"... | Validates that the version string can be parsed as per SemVer. | [
"Validates",
"that",
"the",
"version",
"string",
"can",
"be",
"parsed",
"as",
"per",
"SemVer",
"."
] | 4baeed97cbb7571ddc6635f0a24debe2e8b22cd3 | https://github.com/puppetlabs/puppet/blob/4baeed97cbb7571ddc6635f0a24debe2e8b22cd3/lib/puppet/module_tool/metadata.rb#L189-L194 | train | Validates the version string in the metadata. json | [
30522,
13366,
9398,
3686,
1035,
2544,
1006,
2544,
1007,
2709,
2065,
21641,
14289,
29519,
1024,
1024,
2544,
1012,
9398,
1029,
1006,
2544,
1007,
9413,
2099,
1027,
1035,
1006,
1000,
2544,
30524,
1046,
3385,
1024,
1003,
1063,
9413,
2099,
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... |
middleman/middleman | middleman-cli/lib/middleman-cli/extension.rb | Middleman::Cli.Extension.extension | def extension
copy_file 'extension/gitignore', File.join(name, '.gitignore') unless options[:'skip-git']
template 'extension/Rakefile', File.join(name, 'Rakefile')
template 'extension/gemspec', File.join(name, "#{name}.gemspec")
template 'extension/Gemfile', File.join(name, 'Gemfile')
temp... | ruby | def extension
copy_file 'extension/gitignore', File.join(name, '.gitignore') unless options[:'skip-git']
template 'extension/Rakefile', File.join(name, 'Rakefile')
template 'extension/gemspec', File.join(name, "#{name}.gemspec")
template 'extension/Gemfile', File.join(name, 'Gemfile')
temp... | [
"def",
"extension",
"copy_file",
"'extension/gitignore'",
",",
"File",
".",
"join",
"(",
"name",
",",
"'.gitignore'",
")",
"unless",
"options",
"[",
":'",
"'",
"]",
"template",
"'extension/Rakefile'",
",",
"File",
".",
"join",
"(",
"name",
",",
"'Rakefile'",
... | The extension task | [
"The",
"extension",
"task"
] | a0dd9f78094813162895511e8516e0c5507cee50 | https://github.com/middleman/middleman/blob/a0dd9f78094813162895511e8516e0c5507cee50/middleman-cli/lib/middleman-cli/extension.rb#L27-L36 | train | Create a new extension | [
30522,
13366,
5331,
6100,
1035,
5371,
1005,
5331,
1013,
21025,
3775,
26745,
2890,
1005,
1010,
5371,
1012,
3693,
1006,
2171,
1010,
1005,
1012,
21025,
3775,
26745,
2890,
1005,
1007,
4983,
7047,
1031,
1024,
1005,
13558,
1011,
21025,
2102,
1005... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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.resume_partition_backup | def resume_partition_backup(partition_id, timeout:60, custom_headers:nil)
response = resume_partition_backup_async(partition_id, timeout:timeout, custom_headers:custom_headers).value!
nil
end | ruby | def resume_partition_backup(partition_id, timeout:60, custom_headers:nil)
response = resume_partition_backup_async(partition_id, timeout:timeout, custom_headers:custom_headers).value!
nil
end | [
"def",
"resume_partition_backup",
"(",
"partition_id",
",",
"timeout",
":",
"60",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"resume_partition_backup_async",
"(",
"partition_id",
",",
"timeout",
":",
"timeout",
",",
"custom_headers",
":custom_headers",
... | Resumes periodic backup of partition which was previously suspended.
The previously suspended partition resumes taking periodic backup as per the
backup policy currently configured for the same.
@param partition_id The identity of the partition.
@param timeout [Integer] The server timeout for performing the opera... | [
"Resumes",
"periodic",
"backup",
"of",
"partition",
"which",
"was",
"previously",
"suspended",
"."
] | 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#L25317-L25320 | train | Resumes backup of a partition. | [
30522,
13366,
13746,
1035,
13571,
1035,
10200,
1006,
13571,
1035,
8909,
1010,
2051,
5833,
1024,
3438,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
13746,
1035,
13571,
1035,
10200,
1035,
2004,
6038,
2278,
1006,
13571,
1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_network/lib/2018-10-01/generated/azure_mgmt_network/vpn_sites.rb | Azure::Network::Mgmt::V2018_10_01.VpnSites.update_tags | def update_tags(resource_group_name, vpn_site_name, vpn_site_parameters, custom_headers:nil)
response = update_tags_async(resource_group_name, vpn_site_name, vpn_site_parameters, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def update_tags(resource_group_name, vpn_site_name, vpn_site_parameters, custom_headers:nil)
response = update_tags_async(resource_group_name, vpn_site_name, vpn_site_parameters, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"update_tags",
"(",
"resource_group_name",
",",
"vpn_site_name",
",",
"vpn_site_parameters",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"update_tags_async",
"(",
"resource_group_name",
",",
"vpn_site_name",
",",
"vpn_site_parameters",
",",
"custom_h... | Updates VpnSite tags.
@param resource_group_name [String] The resource group name of the VpnSite.
@param vpn_site_name [String] The name of the VpnSite being updated.
@param vpn_site_parameters [TagsObject] Parameters supplied to update VpnSite
tags.
@param custom_headers [Hash{String => String}] A hash of custom... | [
"Updates",
"VpnSite",
"tags",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_network/lib/2018-10-01/generated/azure_mgmt_network/vpn_sites.rb#L177-L180 | train | Updates vpn site tags. | [
30522,
13366,
10651,
1035,
22073,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
21210,
2078,
1035,
2609,
1035,
2171,
1010,
21210,
2078,
1035,
2609,
1035,
11709,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
10651,
1035,
220... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_cdn/lib/2017-10-12/generated/azure_mgmt_cdn/cdn_management_client.rb | Azure::CDN::Mgmt::V2017_10_12.CdnManagementClient.check_name_availability_with_subscription | def check_name_availability_with_subscription(check_name_availability_input, custom_headers:nil)
response = check_name_availability_with_subscription_async(check_name_availability_input, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def check_name_availability_with_subscription(check_name_availability_input, custom_headers:nil)
response = check_name_availability_with_subscription_async(check_name_availability_input, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"check_name_availability_with_subscription",
"(",
"check_name_availability_input",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"check_name_availability_with_subscription_async",
"(",
"check_name_availability_input",
",",
"custom_headers",
":custom_headers",
")",... | Check the availability of a resource name. This is needed for resources where
name is globally unique, such as a CDN endpoint.
@param check_name_availability_input [CheckNameAvailabilityInput] Input to
check.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP re... | [
"Check",
"the",
"availability",
"of",
"a",
"resource",
"name",
".",
"This",
"is",
"needed",
"for",
"resources",
"where",
"name",
"is",
"globally",
"unique",
"such",
"as",
"a",
"CDN",
"endpoint",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_cdn/lib/2017-10-12/generated/azure_mgmt_cdn/cdn_management_client.rb#L255-L258 | train | Checks whether the name of the resource group is available for use. | [
30522,
13366,
4638,
1035,
2171,
1035,
11343,
1035,
2007,
1035,
15002,
1006,
4638,
1035,
2171,
1035,
11343,
1035,
7953,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
4638,
1035,
2171,
1035,
11343,
1035,
2007,
1035,
15002... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
sensu/sensu | lib/sensu/utilities.rb | Sensu.Utilities.system_address | def system_address
::Socket.ip_address_list.find { |address|
address.ipv4? && !address.ipv4_loopback?
}.ip_address rescue nil
end | ruby | def system_address
::Socket.ip_address_list.find { |address|
address.ipv4? && !address.ipv4_loopback?
}.ip_address rescue nil
end | [
"def",
"system_address",
"::",
"Socket",
".",
"ip_address_list",
".",
"find",
"{",
"|",
"address",
"|",
"address",
".",
"ipv4?",
"&&",
"!",
"address",
".",
"ipv4_loopback?",
"}",
".",
"ip_address",
"rescue",
"nil",
"end"
] | Retrieve the system IP address. If a valid non-loopback
IPv4 address cannot be found and an error is thrown,
`nil` will be returned.
@return [String] system ip address | [
"Retrieve",
"the",
"system",
"IP",
"address",
".",
"If",
"a",
"valid",
"non",
"-",
"loopback",
"IPv4",
"address",
"cannot",
"be",
"found",
"and",
"an",
"error",
"is",
"thrown",
"nil",
"will",
"be",
"returned",
"."
] | 51319e4b58c8d9986f101ad71ff729aa3e51e951 | https://github.com/sensu/sensu/blob/51319e4b58c8d9986f101ad71ff729aa3e51e951/lib/sensu/utilities.rb#L92-L96 | train | Returns the system ip address for the current socket. | [
30522,
13366,
2291,
1035,
4769,
1024,
1024,
22278,
1012,
12997,
1035,
4769,
1035,
2862,
1012,
2424,
1063,
1064,
4769,
1064,
4769,
1012,
12997,
2615,
2549,
1029,
1004,
1004,
999,
4769,
1012,
12997,
2615,
2549,
1035,
7077,
5963,
1029,
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... |
seejohnrun/ice_cube | lib/ice_cube/schedule.rb | IceCube.Schedule.remaining_occurrences | def remaining_occurrences(from = nil, options = {})
require_terminating_rules
from ||= TimeUtil.now(@start_time)
enumerate_occurrences(from, nil, options).to_a
end | ruby | def remaining_occurrences(from = nil, options = {})
require_terminating_rules
from ||= TimeUtil.now(@start_time)
enumerate_occurrences(from, nil, options).to_a
end | [
"def",
"remaining_occurrences",
"(",
"from",
"=",
"nil",
",",
"options",
"=",
"{",
"}",
")",
"require_terminating_rules",
"from",
"||=",
"TimeUtil",
".",
"now",
"(",
"@start_time",
")",
"enumerate_occurrences",
"(",
"from",
",",
"nil",
",",
"options",
")",
"... | The remaining occurrences (same requirements as all_occurrences) | [
"The",
"remaining",
"occurrences",
"(",
"same",
"requirements",
"as",
"all_occurrences",
")"
] | fb6c657bdc4f87dfda2bf83f15c5f487b78ccabd | https://github.com/seejohnrun/ice_cube/blob/fb6c657bdc4f87dfda2bf83f15c5f487b78ccabd/lib/ice_cube/schedule.rb#L200-L204 | train | Returns the remaining occurrences of the current rule. | [
30522,
13366,
3588,
1035,
27247,
1006,
2013,
1027,
9152,
2140,
1010,
7047,
1027,
1063,
1065,
1007,
5478,
1035,
23552,
1035,
3513,
2013,
1064,
1064,
1027,
2051,
21823,
2140,
1012,
2085,
1006,
1030,
2707,
1035,
2051,
1007,
4372,
17897,
11657,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
hashicorp/vault-ruby | lib/vault/request.rb | Vault.Request.extract_headers! | def extract_headers!(options = {})
extract = {
wrap_ttl: Vault::Client::WRAP_TTL_HEADER,
}
{}.tap do |h|
extract.each do |k,v|
if options[k]
h[v] = options.delete(k)
end
end
end
end | ruby | def extract_headers!(options = {})
extract = {
wrap_ttl: Vault::Client::WRAP_TTL_HEADER,
}
{}.tap do |h|
extract.each do |k,v|
if options[k]
h[v] = options.delete(k)
end
end
end
end | [
"def",
"extract_headers!",
"(",
"options",
"=",
"{",
"}",
")",
"extract",
"=",
"{",
"wrap_ttl",
":",
"Vault",
"::",
"Client",
"::",
"WRAP_TTL_HEADER",
",",
"}",
"{",
"}",
".",
"tap",
"do",
"|",
"h",
"|",
"extract",
".",
"each",
"do",
"|",
"k",
",",... | Removes the given header fields from options and returns the result. This
modifies the given options in place.
@param [Hash] options
@return [Hash] | [
"Removes",
"the",
"given",
"header",
"fields",
"from",
"options",
"and",
"returns",
"the",
"result",
".",
"This",
"modifies",
"the",
"given",
"options",
"in",
"place",
"."
] | 02f0532a802ba1a2a0d8703a4585dab76eb9d864 | https://github.com/hashicorp/vault-ruby/blob/02f0532a802ba1a2a0d8703a4585dab76eb9d864/lib/vault/request.rb#L29-L41 | train | Extract the HTTP headers from the request. | [
30522,
13366,
14817,
1035,
20346,
2015,
999,
1006,
7047,
1027,
1063,
1065,
1007,
14817,
1027,
1063,
10236,
1035,
23746,
2140,
1024,
11632,
1024,
1024,
7396,
1024,
1024,
10236,
1035,
23746,
2140,
1035,
20346,
1010,
1065,
1063,
1065,
1012,
11... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_network/lib/2018-01-01/generated/azure_mgmt_network/inbound_nat_rules.rb | Azure::Network::Mgmt::V2018_01_01.InboundNatRules.create_or_update | def create_or_update(resource_group_name, load_balancer_name, inbound_nat_rule_name, inbound_nat_rule_parameters, custom_headers:nil)
response = create_or_update_async(resource_group_name, load_balancer_name, inbound_nat_rule_name, inbound_nat_rule_parameters, custom_headers:custom_headers).value!
response.... | ruby | def create_or_update(resource_group_name, load_balancer_name, inbound_nat_rule_name, inbound_nat_rule_parameters, custom_headers:nil)
response = create_or_update_async(resource_group_name, load_balancer_name, inbound_nat_rule_name, inbound_nat_rule_parameters, custom_headers:custom_headers).value!
response.... | [
"def",
"create_or_update",
"(",
"resource_group_name",
",",
"load_balancer_name",
",",
"inbound_nat_rule_name",
",",
"inbound_nat_rule_parameters",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"create_or_update_async",
"(",
"resource_group_name",
",",
"load_bala... | Creates or updates a load balancer inbound nat rule.
@param resource_group_name [String] The name of the resource group.
@param load_balancer_name [String] The name of the load balancer.
@param inbound_nat_rule_name [String] The name of the inbound nat rule.
@param inbound_nat_rule_parameters [InboundNatRule] Para... | [
"Creates",
"or",
"updates",
"a",
"load",
"balancer",
"inbound",
"nat",
"rule",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_network/lib/2018-01-01/generated/azure_mgmt_network/inbound_nat_rules.rb#L268-L271 | train | Creates or updates a load balancer inbound nat rule. | [
30522,
13366,
3443,
1035,
2030,
1035,
10651,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
7170,
1035,
5703,
2099,
1035,
2171,
1010,
1999,
15494,
1035,
14085,
1035,
3627,
1035,
2171,
1010,
1999,
15494,
1035,
14085,
1035,
3627,
1035,
11709,
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... |
teamcapybara/capybara | lib/capybara/session.rb | Capybara.Session.open_new_window | def open_new_window(kind = :tab)
window_opened_by do
if driver.method(:open_new_window).arity.zero?
driver.open_new_window
else
driver.open_new_window(kind)
end
end
end | ruby | def open_new_window(kind = :tab)
window_opened_by do
if driver.method(:open_new_window).arity.zero?
driver.open_new_window
else
driver.open_new_window(kind)
end
end
end | [
"def",
"open_new_window",
"(",
"kind",
"=",
":tab",
")",
"window_opened_by",
"do",
"if",
"driver",
".",
"method",
"(",
":open_new_window",
")",
".",
"arity",
".",
"zero?",
"driver",
".",
"open_new_window",
"else",
"driver",
".",
"open_new_window",
"(",
"kind",... | Open new window.
Current window doesn't change as the result of this call.
It should be switched to explicitly.
@return [Capybara::Window] window that has been opened | [
"Open",
"new",
"window",
".",
"Current",
"window",
"doesn",
"t",
"change",
"as",
"the",
"result",
"of",
"this",
"call",
".",
"It",
"should",
"be",
"switched",
"to",
"explicitly",
"."
] | 3819078c820c5cd3be6f0bc9e8b1b0cc1190bc41 | https://github.com/teamcapybara/capybara/blob/3819078c820c5cd3be6f0bc9e8b1b0cc1190bc41/lib/capybara/session.rb#L461-L469 | train | Open a new window | [
30522,
13366,
2330,
1035,
2047,
1035,
3332,
1006,
2785,
1027,
1024,
21628,
1007,
3332,
1035,
2441,
1035,
2011,
2079,
2065,
4062,
1012,
4118,
1006,
1024,
2330,
1035,
2047,
1035,
3332,
1007,
1012,
10488,
3723,
1012,
5717,
1029,
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... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_network/lib/2017-03-30/generated/azure_mgmt_network/public_ipaddresses.rb | Azure::Network::Mgmt::V2017_03_30.PublicIPAddresses.list_virtual_machine_scale_set_vmpublic_ipaddresses_next | def list_virtual_machine_scale_set_vmpublic_ipaddresses_next(next_page_link, custom_headers:nil)
response = list_virtual_machine_scale_set_vmpublic_ipaddresses_next_async(next_page_link, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def list_virtual_machine_scale_set_vmpublic_ipaddresses_next(next_page_link, custom_headers:nil)
response = list_virtual_machine_scale_set_vmpublic_ipaddresses_next_async(next_page_link, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"list_virtual_machine_scale_set_vmpublic_ipaddresses_next",
"(",
"next_page_link",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"list_virtual_machine_scale_set_vmpublic_ipaddresses_next_async",
"(",
"next_page_link",
",",
"custom_headers",
":custom_headers",
")",... | Gets information about all public IP addresses in a virtual machine IP
configuration in a virtual machine scale set.
@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 HT... | [
"Gets",
"information",
"about",
"all",
"public",
"IP",
"addresses",
"in",
"a",
"virtual",
"machine",
"IP",
"configuration",
"in",
"a",
"virtual",
"machine",
"scale",
"set",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_network/lib/2017-03-30/generated/azure_mgmt_network/public_ipaddresses.rb#L451-L454 | train | Gets a list of virtual machine public IP addresses. | [
30522,
13366,
2862,
1035,
7484,
1035,
3698,
1035,
4094,
1035,
2275,
1035,
1058,
8737,
12083,
10415,
1035,
25249,
16200,
11393,
2015,
1035,
2279,
1006,
2279,
1035,
3931,
1035,
4957,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
cypriss/mutations | lib/mutations/errors.rb | Mutations.ErrorHash.message | def message
HashWithIndifferentAccess.new.tap do |hash|
each do |k, v|
hash[k] = v.message
end
end
end | ruby | def message
HashWithIndifferentAccess.new.tap do |hash|
each do |k, v|
hash[k] = v.message
end
end
end | [
"def",
"message",
"HashWithIndifferentAccess",
".",
"new",
".",
"tap",
"do",
"|",
"hash",
"|",
"each",
"do",
"|",
"k",
",",
"v",
"|",
"hash",
"[",
"k",
"]",
"=",
"v",
".",
"message",
"end",
"end",
"end"
] | Returns a nested HashWithIndifferentAccess where the values are messages. Eg:
{
email: "isn't in the right format",
name: "is too weird",
adddress: {
city: "is not a city",
state: "isn't a valid option"
}
} | [
"Returns",
"a",
"nested",
"HashWithIndifferentAccess",
"where",
"the",
"values",
"are",
"messages",
".",
"Eg",
":",
"{",
"email",
":",
"isn",
"t",
"in",
"the",
"right",
"format",
"name",
":",
"is",
"too",
"weird",
"adddress",
":",
"{",
"city",
":",
"is",... | c9948325648d0ea85420963829d1a4d6b4f17bd9 | https://github.com/cypriss/mutations/blob/c9948325648d0ea85420963829d1a4d6b4f17bd9/lib/mutations/errors.rb#L133-L139 | train | Returns the message
| [
30522,
13366,
4471,
23325,
24415,
22254,
13355,
7869,
12380,
9468,
7971,
1012,
2047,
1012,
11112,
2079,
1064,
23325,
1064,
2169,
2079,
1064,
1047,
1010,
1058,
1064,
23325,
1031,
1047,
1033,
1027,
1058,
1012,
4471,
2203,
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... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
fastlane/fastlane | fastlane_core/lib/fastlane_core/itunes_transporter.rb | FastlaneCore.ItunesTransporter.upload | def upload(app_id, dir)
actual_dir = File.join(dir, "#{app_id}.itmsp")
UI.message("Going to upload updated app to App Store Connect")
UI.success("This might take a few minutes. Please don't interrupt the script.")
command = @transporter_executor.build_upload_command(@user, @password, actual_di... | ruby | def upload(app_id, dir)
actual_dir = File.join(dir, "#{app_id}.itmsp")
UI.message("Going to upload updated app to App Store Connect")
UI.success("This might take a few minutes. Please don't interrupt the script.")
command = @transporter_executor.build_upload_command(@user, @password, actual_di... | [
"def",
"upload",
"(",
"app_id",
",",
"dir",
")",
"actual_dir",
"=",
"File",
".",
"join",
"(",
"dir",
",",
"\"#{app_id}.itmsp\"",
")",
"UI",
".",
"message",
"(",
"\"Going to upload updated app to App Store Connect\"",
")",
"UI",
".",
"success",
"(",
"\"This might... | Uploads the modified package back to App Store Connect
@param app_id [Integer] The unique App ID
@param dir [String] the path in which the package file is located
@return (Bool) True if everything worked fine
@raise [Deliver::TransporterTransferError] when something went wrong
when transferring | [
"Uploads",
"the",
"modified",
"package",
"back",
"to",
"App",
"Store",
"Connect"
] | 457c5d647c77f0e078dafa5129da616914e002c5 | https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/fastlane_core/lib/fastlane_core/itunes_transporter.rb#L410-L435 | train | Upload the app to the specified directory | [
30522,
13366,
2039,
11066,
1006,
10439,
1035,
8909,
1010,
16101,
1007,
5025,
1035,
16101,
1027,
5371,
1012,
3693,
1006,
16101,
1010,
1000,
1001,
1063,
10439,
1035,
8909,
1065,
1012,
2009,
5244,
2361,
1000,
1007,
21318,
1012,
4471,
1006,
100... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_logic/lib/2016-06-01/generated/azure_mgmt_logic/workflows.rb | Azure::Logic::Mgmt::V2016_06_01.Workflows.update | def update(resource_group_name, workflow_name, workflow, custom_headers:nil)
response = update_async(resource_group_name, workflow_name, workflow, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def update(resource_group_name, workflow_name, workflow, custom_headers:nil)
response = update_async(resource_group_name, workflow_name, workflow, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"update",
"(",
"resource_group_name",
",",
"workflow_name",
",",
"workflow",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"update_async",
"(",
"resource_group_name",
",",
"workflow_name",
",",
"workflow",
",",
"custom_headers",
":custom_headers",
... | Updates a workflow.
@param resource_group_name [String] The resource group name.
@param workflow_name [String] The workflow name.
@param workflow [Workflow] The workflow.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request.
@return [Workflow] operation ... | [
"Updates",
"a",
"workflow",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_logic/lib/2016-06-01/generated/azure_mgmt_logic/workflows.rb#L430-L433 | train | Updates a workflow. | [
30522,
13366,
10651,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2147,
12314,
1035,
2171,
1010,
2147,
12314,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
10651,
1035,
2004,
6038,
2278,
1006,
7692,
1035,
2177,
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... |
Azure/azure-sdk-for-ruby | data/azure_cognitiveservices_face/lib/1.0/generated/azure_cognitiveservices_face/face.rb | Azure::CognitiveServices::Face::V1_0.Face.verify_face_to_person | def verify_face_to_person(face_id, person_id, person_group_id:nil, large_person_group_id:nil, custom_headers:nil)
response = verify_face_to_person_async(face_id, person_id, person_group_id:person_group_id, large_person_group_id:large_person_group_id, custom_headers:custom_headers).value!
response.body unles... | ruby | def verify_face_to_person(face_id, person_id, person_group_id:nil, large_person_group_id:nil, custom_headers:nil)
response = verify_face_to_person_async(face_id, person_id, person_group_id:person_group_id, large_person_group_id:large_person_group_id, custom_headers:custom_headers).value!
response.body unles... | [
"def",
"verify_face_to_person",
"(",
"face_id",
",",
"person_id",
",",
"person_group_id",
":",
"nil",
",",
"large_person_group_id",
":",
"nil",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"verify_face_to_person_async",
"(",
"face_id",
",",
"person_id",
... | Verify whether two faces belong to a same person. Compares a face Id with a
Person Id
@param face_id FaceId of the face, comes from Face - Detect
@param person_id Specify a certain person in a person group or a large person
group. personId is created in PersonGroup Person - Create or LargePersonGroup
Person - Cre... | [
"Verify",
"whether",
"two",
"faces",
"belong",
"to",
"a",
"same",
"person",
".",
"Compares",
"a",
"face",
"Id",
"with",
"a",
"Person",
"Id"
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_cognitiveservices_face/lib/1.0/generated/azure_cognitiveservices_face/face.rb#L1124-L1127 | train | Verify face to person. | [
30522,
13366,
20410,
1035,
2227,
1035,
2000,
1035,
2711,
1006,
2227,
1035,
8909,
1010,
2711,
1035,
8909,
1010,
2711,
1035,
2177,
1035,
8909,
1024,
9152,
2140,
1010,
2312,
1035,
2711,
1035,
2177,
1035,
8909,
1024,
9152,
2140,
1010,
7661,
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-s3/lib/aws-sdk-s3/object_summary.rb | Aws::S3.ObjectSummary.copy_from | def copy_from(options = {})
options = options.merge(
bucket: @bucket_name,
key: @key
)
resp = @client.copy_object(options)
resp.data
end | ruby | def copy_from(options = {})
options = options.merge(
bucket: @bucket_name,
key: @key
)
resp = @client.copy_object(options)
resp.data
end | [
"def",
"copy_from",
"(",
"options",
"=",
"{",
"}",
")",
"options",
"=",
"options",
".",
"merge",
"(",
"bucket",
":",
"@bucket_name",
",",
"key",
":",
"@key",
")",
"resp",
"=",
"@client",
".",
"copy_object",
"(",
"options",
")",
"resp",
".",
"data",
"... | @!group Actions
@example Request syntax with placeholder values
object_summary.copy_from({
acl: "private", # accepts private, public-read, public-read-write, authenticated-read, aws-exec-read, bucket-owner-read, bucket-owner-full-control
cache_control: "CacheControl",
content_disposition: "ContentDi... | [
"@!group",
"Actions",
"@example",
"Request",
"syntax",
"with",
"placeholder",
"values"
] | e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d | https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-s3/lib/aws-sdk-s3/object_summary.rb#L394-L401 | train | Copy the object from the bucket to the key. | [
30522,
13366,
6100,
1035,
2013,
1006,
7047,
1027,
1063,
1065,
1007,
7047,
1027,
7047,
1012,
13590,
1006,
13610,
1024,
1030,
13610,
1035,
2171,
1010,
3145,
1024,
1030,
3145,
1007,
24501,
2361,
1027,
1030,
7396,
1012,
6100,
1035,
4874,
1006,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/open_id_connect_provider.rb | Azure::ApiManagement::Mgmt::V2018_01_01.OpenIdConnectProvider.get_entity_tag_with_http_info | def get_entity_tag_with_http_info(resource_group_name, service_name, opid, custom_headers:nil)
get_entity_tag_async(resource_group_name, service_name, opid, custom_headers:custom_headers).value!
end | ruby | def get_entity_tag_with_http_info(resource_group_name, service_name, opid, custom_headers:nil)
get_entity_tag_async(resource_group_name, service_name, opid, custom_headers:custom_headers).value!
end | [
"def",
"get_entity_tag_with_http_info",
"(",
"resource_group_name",
",",
"service_name",
",",
"opid",
",",
"custom_headers",
":",
"nil",
")",
"get_entity_tag_async",
"(",
"resource_group_name",
",",
"service_name",
",",
"opid",
",",
"custom_headers",
":custom_headers",
... | Gets the entity state (Etag) version of the openIdConnectProvider specified
by its identifier.
@param resource_group_name [String] The name of the resource group.
@param service_name [String] The name of the API Management service.
@param opid [String] Identifier of the OpenID Connect Provider.
@param custom_head... | [
"Gets",
"the",
"entity",
"state",
"(",
"Etag",
")",
"version",
"of",
"the",
"openIdConnectProvider",
"specified",
"by",
"its",
"identifier",
"."
] | 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/open_id_connect_provider.rb#L176-L178 | train | Gets the entity tag for the specified operation. | [
30522,
13366,
2131,
1035,
9178,
1035,
6415,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2326,
1035,
2171,
1010,
6728,
3593,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
2131,
1035,
9178,
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_policy_insights/lib/2018-07-01-preview/generated/azure_mgmt_policy_insights/remediations.rb | Azure::PolicyInsights::Mgmt::V2018_07_01_preview.Remediations.create_or_update_at_resource_with_http_info | def create_or_update_at_resource_with_http_info(resource_id, remediation_name, parameters, custom_headers:nil)
create_or_update_at_resource_async(resource_id, remediation_name, parameters, custom_headers:custom_headers).value!
end | ruby | def create_or_update_at_resource_with_http_info(resource_id, remediation_name, parameters, custom_headers:nil)
create_or_update_at_resource_async(resource_id, remediation_name, parameters, custom_headers:custom_headers).value!
end | [
"def",
"create_or_update_at_resource_with_http_info",
"(",
"resource_id",
",",
"remediation_name",
",",
"parameters",
",",
"custom_headers",
":",
"nil",
")",
"create_or_update_at_resource_async",
"(",
"resource_id",
",",
"remediation_name",
",",
"parameters",
",",
"custom_h... | Creates or updates a remediation at resource scope.
@param resource_id [String] Resource ID.
@param remediation_name [String] The name of the remediation.
@param parameters [Remediation] The remediation parameters.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the H... | [
"Creates",
"or",
"updates",
"a",
"remediation",
"at",
"resource",
"scope",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_policy_insights/lib/2018-07-01-preview/generated/azure_mgmt_policy_insights/remediations.rb#L2077-L2079 | train | Creates or updates a remediation at resource scope. | [
30522,
13366,
3443,
1035,
2030,
1035,
10651,
1035,
2012,
1035,
7692,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
8909,
1010,
2128,
16969,
3508,
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... |
puppetlabs/puppet | lib/puppet/util/provider_features.rb | Puppet::Util::ProviderFeatures.ProviderFeature.methods_available? | def methods_available?(obj)
methods.each do |m|
if obj.is_a?(Class)
return false unless obj.public_method_defined?(m)
else
return false unless obj.respond_to?(m)
end
end
true
end | ruby | def methods_available?(obj)
methods.each do |m|
if obj.is_a?(Class)
return false unless obj.public_method_defined?(m)
else
return false unless obj.respond_to?(m)
end
end
true
end | [
"def",
"methods_available?",
"(",
"obj",
")",
"methods",
".",
"each",
"do",
"|",
"m",
"|",
"if",
"obj",
".",
"is_a?",
"(",
"Class",
")",
"return",
"false",
"unless",
"obj",
".",
"public_method_defined?",
"(",
"m",
")",
"else",
"return",
"false",
"unless"... | Checks whether all feature predicate methods are available.
@param obj [Object, Class] the object or class to check if feature predicates are available or not.
@return [Boolean] Returns whether all of the required methods are available or not in the given object. | [
"Checks",
"whether",
"all",
"feature",
"predicate",
"methods",
"are",
"available",
"."
] | 4baeed97cbb7571ddc6635f0a24debe2e8b22cd3 | https://github.com/puppetlabs/puppet/blob/4baeed97cbb7571ddc6635f0a24debe2e8b22cd3/lib/puppet/util/provider_features.rb#L44-L53 | train | Returns true if the methods available for the given object are available. | [
30522,
13366,
4725,
1035,
2800,
1029,
1006,
27885,
3501,
1007,
4725,
1012,
2169,
2079,
1064,
1049,
1064,
2065,
27885,
3501,
1012,
2003,
1035,
1037,
1029,
1006,
2465,
1007,
2709,
6270,
4983,
27885,
3501,
1012,
2270,
1035,
4118,
1035,
4225,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/drawing/pic.rb | Axlsx.Pic.use_one_cell_anchor | def use_one_cell_anchor
return if @anchor.is_a?(OneCellAnchor)
new_anchor = OneCellAnchor.new(@anchor.drawing, :start_at => [@anchor.from.col, @anchor.from.row])
swap_anchor(new_anchor)
end | ruby | def use_one_cell_anchor
return if @anchor.is_a?(OneCellAnchor)
new_anchor = OneCellAnchor.new(@anchor.drawing, :start_at => [@anchor.from.col, @anchor.from.row])
swap_anchor(new_anchor)
end | [
"def",
"use_one_cell_anchor",
"return",
"if",
"@anchor",
".",
"is_a?",
"(",
"OneCellAnchor",
")",
"new_anchor",
"=",
"OneCellAnchor",
".",
"new",
"(",
"@anchor",
".",
"drawing",
",",
":start_at",
"=>",
"[",
"@anchor",
".",
"from",
".",
"col",
",",
"@anchor",... | Changes the anchor to a one cell anchor. | [
"Changes",
"the",
"anchor",
"to",
"a",
"one",
"cell",
"anchor",
"."
] | c593a08b2a929dac7aa8dc418b55e26b4c49dc34 | https://github.com/randym/axlsx/blob/c593a08b2a929dac7aa8dc418b55e26b4c49dc34/lib/axlsx/drawing/pic.rb#L190-L194 | train | Use one cell anchor to draw the cell | [
30522,
13366,
2224,
1035,
2028,
1035,
3526,
1035,
8133,
2709,
2065,
1030,
8133,
1012,
2003,
1035,
1037,
1029,
1006,
2028,
29109,
5802,
9905,
2099,
1007,
2047,
1035,
8133,
1027,
2028,
29109,
5802,
9905,
2099,
1012,
2047,
1006,
1030,
8133,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | data/azure_cognitiveservices_textanalytics/lib/v2.1/generated/azure_cognitiveservices_textanalytics/text_analytics_client.rb | Azure::CognitiveServices::TextAnalytics::V2_1.TextAnalyticsClient.key_phrases | def key_phrases(show_stats:nil, multi_language_batch_input:nil, custom_headers:nil)
response = key_phrases_async(show_stats:show_stats, multi_language_batch_input:multi_language_batch_input, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def key_phrases(show_stats:nil, multi_language_batch_input:nil, custom_headers:nil)
response = key_phrases_async(show_stats:show_stats, multi_language_batch_input:multi_language_batch_input, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"key_phrases",
"(",
"show_stats",
":",
"nil",
",",
"multi_language_batch_input",
":",
"nil",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"key_phrases_async",
"(",
"show_stats",
":show_stats",
",",
"multi_language_batch_input",
":multi_language_batch_... | The API returns a list of strings denoting the key talking points in the
input text.
See the <a
href="https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/overview#supported-languages">Text
Analytics Documentation</a> for details about the languages that are
supported by key phrase extraction.... | [
"The",
"API",
"returns",
"a",
"list",
"of",
"strings",
"denoting",
"the",
"key",
"talking",
"points",
"in",
"the",
"input",
"text",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_cognitiveservices_textanalytics/lib/v2.1/generated/azure_cognitiveservices_textanalytics/text_analytics_client.rb#L366-L369 | train | Gets the key phrases for the specified language. | [
30522,
13366,
3145,
1035,
15672,
1006,
2265,
1035,
26319,
1024,
9152,
2140,
1010,
4800,
1035,
2653,
1035,
14108,
1035,
7953,
1024,
9152,
2140,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
3145,
1035,
15672,
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... |
haml/haml | lib/haml/helpers.rb | Haml.Helpers.find_and_preserve | def find_and_preserve(input = nil, tags = haml_buffer.options[:preserve], &block)
return find_and_preserve(capture_haml(&block), input || tags) if block
tags = tags.map { |tag| Regexp.escape(tag) }.join('|')
re = /<(#{tags})([^>]*)>(.*?)(<\/\1>)/im
input.to_s.gsub(re) do |s|
s =~ re # Ca... | ruby | def find_and_preserve(input = nil, tags = haml_buffer.options[:preserve], &block)
return find_and_preserve(capture_haml(&block), input || tags) if block
tags = tags.map { |tag| Regexp.escape(tag) }.join('|')
re = /<(#{tags})([^>]*)>(.*?)(<\/\1>)/im
input.to_s.gsub(re) do |s|
s =~ re # Ca... | [
"def",
"find_and_preserve",
"(",
"input",
"=",
"nil",
",",
"tags",
"=",
"haml_buffer",
".",
"options",
"[",
":preserve",
"]",
",",
"&",
"block",
")",
"return",
"find_and_preserve",
"(",
"capture_haml",
"(",
"block",
")",
",",
"input",
"||",
"tags",
")",
... | Uses \{#preserve} to convert any newlines inside whitespace-sensitive tags
into the HTML entities for endlines.
@param tags [Array<String>] Tags that should have newlines escaped
@overload find_and_preserve(input, tags = haml_buffer.options[:preserve])
Escapes newlines within a string.
@param input [String]... | [
"Uses",
"\\",
"{",
"#preserve",
"}",
"to",
"convert",
"any",
"newlines",
"inside",
"whitespace",
"-",
"sensitive",
"tags",
"into",
"the",
"HTML",
"entities",
"for",
"endlines",
"."
] | 9aa0fbe4a91b999978927be569d2ad0cd39076f1 | https://github.com/haml/haml/blob/9aa0fbe4a91b999978927be569d2ad0cd39076f1/lib/haml/helpers.rb#L110-L118 | train | Find and preserve the HTML tags | [
30522,
13366,
2424,
1035,
1998,
1035,
7969,
1006,
7953,
1027,
9152,
2140,
1010,
22073,
1027,
10654,
2140,
1035,
17698,
1012,
7047,
1031,
1024,
7969,
1033,
1010,
1004,
30524,
4949,
1063,
1064,
6415,
1064,
19723,
10288,
2361,
1012,
4019,
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... |
fluent/fluentd | lib/fluent/plugin/out_forward.rb | Fluent::Plugin.ForwardOutput.read_ack_from_sock | def read_ack_from_sock(sock, unpacker)
begin
raw_data = sock.instance_of?(Fluent::PluginHelper::Socket::WrappedSocket::TLS) ? sock.readpartial(@read_length) : sock.recv(@read_length)
rescue Errno::ECONNRESET, EOFError # ECONNRESET for #recv, #EOFError for #readpartial
raw_data = ""
end... | ruby | def read_ack_from_sock(sock, unpacker)
begin
raw_data = sock.instance_of?(Fluent::PluginHelper::Socket::WrappedSocket::TLS) ? sock.readpartial(@read_length) : sock.recv(@read_length)
rescue Errno::ECONNRESET, EOFError # ECONNRESET for #recv, #EOFError for #readpartial
raw_data = ""
end... | [
"def",
"read_ack_from_sock",
"(",
"sock",
",",
"unpacker",
")",
"begin",
"raw_data",
"=",
"sock",
".",
"instance_of?",
"(",
"Fluent",
"::",
"PluginHelper",
"::",
"Socket",
"::",
"WrappedSocket",
"::",
"TLS",
")",
"?",
"sock",
".",
"readpartial",
"(",
"@read_... | return chunk id to be committed | [
"return",
"chunk",
"id",
"to",
"be",
"committed"
] | add2af9a5b7f74fc36957b8e6138b3c5a2871a92 | https://github.com/fluent/fluentd/blob/add2af9a5b7f74fc36957b8e6138b3c5a2871a92/lib/fluent/plugin/out_forward.rb#L457-L495 | train | Read an ack from a socket. | [
30522,
13366,
3191,
1035,
9353,
2243,
1035,
2013,
1035,
28407,
1006,
28407,
1010,
4895,
23947,
2121,
1007,
4088,
6315,
1035,
2951,
1027,
28407,
1012,
6013,
1035,
1997,
1029,
1006,
19376,
1024,
1024,
13354,
2378,
16001,
4842,
1024,
1024,
222... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/content.rb | EPUBMaker.Content.complement | def complement
if @id.nil?
@id = @file.gsub(%r{[\\/\. ]}, '-')
end
if @id =~ /\A[^a-z]/i
@id = "rv-#{@id}"
end
if !@file.nil? && @media.nil?
@media = @file.sub(/.+\./, '').downcase
end
case @media
when 'xhtml', 'xml', 'html'
@media = 'app... | ruby | def complement
if @id.nil?
@id = @file.gsub(%r{[\\/\. ]}, '-')
end
if @id =~ /\A[^a-z]/i
@id = "rv-#{@id}"
end
if !@file.nil? && @media.nil?
@media = @file.sub(/.+\./, '').downcase
end
case @media
when 'xhtml', 'xml', 'html'
@media = 'app... | [
"def",
"complement",
"if",
"@id",
".",
"nil?",
"@id",
"=",
"@file",
".",
"gsub",
"(",
"%r{",
"\\\\",
"\\.",
"}",
",",
"'-'",
")",
"end",
"if",
"@id",
"=~",
"/",
"\\A",
"/i",
"@id",
"=",
"\"rv-#{@id}\"",
"end",
"if",
"!",
"@file",
".",
"nil?",
"&&... | Complement other parameters by using file parameter. | [
"Complement",
"other",
"parameters",
"by",
"using",
"file",
"parameter",
"."
] | 77d1273e671663f05db2992281fd891b776badf0 | https://github.com/kmuto/review/blob/77d1273e671663f05db2992281fd891b776badf0/lib/epubmaker/content.rb#L74-L108 | train | complement the file with the id and media | [
30522,
13366,
13711,
2065,
1030,
8909,
1012,
9152,
2140,
1029,
1030,
8909,
1027,
1030,
5371,
1012,
28177,
12083,
1006,
1003,
1054,
1063,
1031,
1032,
1032,
1013,
1032,
1012,
1033,
1065,
1010,
1005,
1011,
1005,
1007,
2203,
2065,
1030,
8909,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/api.rb | Github.API.set_options | def set_options(options)
unless options.respond_to?(:each)
raise ArgumentError, 'cannot iterate over value'
end
options.each { |key, value| set(key, value) }
end | ruby | def set_options(options)
unless options.respond_to?(:each)
raise ArgumentError, 'cannot iterate over value'
end
options.each { |key, value| set(key, value) }
end | [
"def",
"set_options",
"(",
"options",
")",
"unless",
"options",
".",
"respond_to?",
"(",
":each",
")",
"raise",
"ArgumentError",
",",
"'cannot iterate over value'",
"end",
"options",
".",
"each",
"{",
"|",
"key",
",",
"value",
"|",
"set",
"(",
"key",
",",
... | Set multiple options
@api private | [
"Set",
"multiple",
"options"
] | 8702452c66bea33c9388550aed9e9974f76aaef1 | https://github.com/piotrmurach/github/blob/8702452c66bea33c9388550aed9e9974f76aaef1/lib/github_api/api.rb#L366-L371 | train | Set the options for this object. | [
30522,
13366,
2275,
1035,
7047,
1006,
7047,
1007,
4983,
7047,
1012,
6869,
1035,
2000,
1029,
1006,
1024,
2169,
1007,
5333,
6685,
2121,
29165,
1010,
1005,
3685,
2009,
22139,
2058,
3643,
1005,
2203,
7047,
1012,
2169,
1063,
1064,
3145,
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... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_network/lib/2018-07-01/generated/azure_mgmt_network/virtual_network_gateways.rb | Azure::Network::Mgmt::V2018_07_01.VirtualNetworkGateways.get_vpn_profile_package_url_async | def get_vpn_profile_package_url_async(resource_group_name, virtual_network_gateway_name, custom_headers:nil)
# Send request
promise = begin_get_vpn_profile_package_url_async(resource_group_name, virtual_network_gateway_name, custom_headers:custom_headers)
promise = promise.then do |response|
... | ruby | def get_vpn_profile_package_url_async(resource_group_name, virtual_network_gateway_name, custom_headers:nil)
# Send request
promise = begin_get_vpn_profile_package_url_async(resource_group_name, virtual_network_gateway_name, custom_headers:custom_headers)
promise = promise.then do |response|
... | [
"def",
"get_vpn_profile_package_url_async",
"(",
"resource_group_name",
",",
"virtual_network_gateway_name",
",",
"custom_headers",
":",
"nil",
")",
"# Send request",
"promise",
"=",
"begin_get_vpn_profile_package_url_async",
"(",
"resource_group_name",
",",
"virtual_network_gate... | @param resource_group_name [String] The name of the resource group.
@param virtual_network_gateway_name [String] The name of the virtual network
gateway.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request.
@return [Concurrent::Promise] promise which prov... | [
"@param",
"resource_group_name",
"[",
"String",
"]",
"The",
"name",
"of",
"the",
"resource",
"group",
".",
"@param",
"virtual_network_gateway_name",
"[",
"String",
"]",
"The",
"name",
"of",
"the",
"virtual",
"network",
"gateway",
".",
"@param",
"custom_headers",
... | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_network/lib/2018-07-01/generated/azure_mgmt_network/virtual_network_gateways.rb#L690-L713 | train | Gets the vpn profile package URL for a virtual network gateway. | [
30522,
13366,
2131,
1035,
21210,
2078,
1035,
6337,
1035,
7427,
1035,
24471,
2140,
1035,
2004,
6038,
2278,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
7484,
1035,
2897,
1035,
11909,
1035,
2171,
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... |
aws/aws-sdk-ruby | gems/aws-sdk-ec2/lib/aws-sdk-ec2/classic_address.rb | Aws::EC2.ClassicAddress.disassociate | def disassociate(options = {})
options = options.merge(public_ip: data[:public_ip])
resp = @client.disassociate_address(options)
resp.data
end | ruby | def disassociate(options = {})
options = options.merge(public_ip: data[:public_ip])
resp = @client.disassociate_address(options)
resp.data
end | [
"def",
"disassociate",
"(",
"options",
"=",
"{",
"}",
")",
"options",
"=",
"options",
".",
"merge",
"(",
"public_ip",
":",
"data",
"[",
":public_ip",
"]",
")",
"resp",
"=",
"@client",
".",
"disassociate_address",
"(",
"options",
")",
"resp",
".",
"data",... | @example Request syntax with placeholder values
classic_address.disassociate({
association_id: "String",
dry_run: false,
})
@param [Hash] options ({})
@option options [String] :association_id
\[EC2-VPC\] The association ID. Required for EC2-VPC.
@option options [Boolean] :dry_run
Checks whethe... | [
"@example",
"Request",
"syntax",
"with",
"placeholder",
"values"
] | e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d | https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-ec2/lib/aws-sdk-ec2/classic_address.rb#L286-L290 | train | Disassociate a address from a public IP | [
30522,
13366,
4487,
20939,
6499,
7405,
2618,
1006,
7047,
1027,
1063,
1065,
1007,
7047,
1027,
7047,
1012,
13590,
1006,
2270,
1035,
12997,
1024,
2951,
1031,
1024,
2270,
1035,
12997,
1033,
1007,
24501,
2361,
1027,
1030,
7396,
1012,
4487,
20939... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
chef/chef | lib/chef/shell/shell_session.rb | Shell.DoppelGangerClient.build_node | def build_node
Chef::Log.trace("Building node object for #{@node_name}")
@node = Chef::Node.find_or_create(node_name)
ohai_data = @ohai.data.merge(@node.automatic_attrs)
@node.consume_external_attrs(ohai_data, nil)
@run_list_expansion = @node.expand!("server")
@expanded_run_list_with... | ruby | def build_node
Chef::Log.trace("Building node object for #{@node_name}")
@node = Chef::Node.find_or_create(node_name)
ohai_data = @ohai.data.merge(@node.automatic_attrs)
@node.consume_external_attrs(ohai_data, nil)
@run_list_expansion = @node.expand!("server")
@expanded_run_list_with... | [
"def",
"build_node",
"Chef",
"::",
"Log",
".",
"trace",
"(",
"\"Building node object for #{@node_name}\"",
")",
"@node",
"=",
"Chef",
"::",
"Node",
".",
"find_or_create",
"(",
"node_name",
")",
"ohai_data",
"=",
"@ohai",
".",
"data",
".",
"merge",
"(",
"@node"... | DoppelGanger implementation of build_node. preserves as many of the node's
attributes, and does not save updates to the server | [
"DoppelGanger",
"implementation",
"of",
"build_node",
".",
"preserves",
"as",
"many",
"of",
"the",
"node",
"s",
"attributes",
"and",
"does",
"not",
"save",
"updates",
"to",
"the",
"server"
] | 61f69e18e69e0dca6e8cffdcd7451181d874cdb3 | https://github.com/chef/chef/blob/61f69e18e69e0dca6e8cffdcd7451181d874cdb3/lib/chef/shell/shell_session.rb#L254-L264 | train | Build the node object for this node | [
30522,
13366,
3857,
1035,
13045,
10026,
1024,
1024,
8833,
1012,
7637,
1006,
1000,
2311,
13045,
4874,
2005,
1001,
1063,
1030,
13045,
1035,
2171,
1065,
1000,
1007,
1030,
13045,
1027,
10026,
1024,
1024,
13045,
1012,
2424,
1035,
2030,
1035,
344... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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_diagnostic_categories_slot_next | def list_site_diagnostic_categories_slot_next(next_page_link, custom_headers:nil)
response = list_site_diagnostic_categories_slot_next_async(next_page_link, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def list_site_diagnostic_categories_slot_next(next_page_link, custom_headers:nil)
response = list_site_diagnostic_categories_slot_next_async(next_page_link, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"list_site_diagnostic_categories_slot_next",
"(",
"next_page_link",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"list_site_diagnostic_categories_slot_next_async",
"(",
"next_page_link",
",",
"custom_headers",
":custom_headers",
")",
".",
"value!",
"respons... | Get Diagnostics Categories
Get Diagnostics Categories
@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 [DiagnosticCategoryCollection] operation... | [
"Get",
"Diagnostics",
"Categories"
] | 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#L3192-L3195 | train | Gets the site diagnostic categories for a site. | [
30522,
13366,
2862,
1035,
2609,
1035,
16474,
1035,
7236,
1035,
10453,
1035,
2279,
1006,
2279,
1035,
3931,
1035,
4957,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
2862,
1035,
2609,
1035,
16474,
1035,
7236,
1035,
10453,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/volume_containers.rb | Azure::StorSimple8000Series::Mgmt::V2017_06_01.VolumeContainers.list_by_device_with_http_info | def list_by_device_with_http_info(device_name, resource_group_name, manager_name, custom_headers:nil)
list_by_device_async(device_name, resource_group_name, manager_name, custom_headers:custom_headers).value!
end | ruby | def list_by_device_with_http_info(device_name, resource_group_name, manager_name, custom_headers:nil)
list_by_device_async(device_name, resource_group_name, manager_name, custom_headers:custom_headers).value!
end | [
"def",
"list_by_device_with_http_info",
"(",
"device_name",
",",
"resource_group_name",
",",
"manager_name",
",",
"custom_headers",
":",
"nil",
")",
"list_by_device_async",
"(",
"device_name",
",",
"resource_group_name",
",",
"manager_name",
",",
"custom_headers",
":custo... | Gets all the volume containers in a device.
@param device_name [String] The device name
@param resource_group_name [String] The resource group name
@param manager_name [String] The manager name
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request.
@retur... | [
"Gets",
"all",
"the",
"volume",
"containers",
"in",
"a",
"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/volume_containers.rb#L51-L53 | train | Gets the list of the available virtual network endpoints. | [
30522,
13366,
2862,
1035,
2011,
1035,
5080,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
5080,
1035,
2171,
1010,
7692,
1035,
2177,
1035,
2171,
1010,
3208,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
2862,
1035,
2011,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_cdn/lib/2017-04-02/generated/azure_mgmt_cdn/endpoints.rb | Azure::CDN::Mgmt::V2017_04_02.Endpoints.list_by_profile_as_lazy | def list_by_profile_as_lazy(resource_group_name, profile_name, custom_headers:nil)
response = list_by_profile_async(resource_group_name, profile_name, custom_headers:custom_headers).value!
unless response.nil?
page = response.body
page.next_method = Proc.new do |next_page_link|
lis... | ruby | def list_by_profile_as_lazy(resource_group_name, profile_name, custom_headers:nil)
response = list_by_profile_async(resource_group_name, profile_name, custom_headers:custom_headers).value!
unless response.nil?
page = response.body
page.next_method = Proc.new do |next_page_link|
lis... | [
"def",
"list_by_profile_as_lazy",
"(",
"resource_group_name",
",",
"profile_name",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"list_by_profile_async",
"(",
"resource_group_name",
",",
"profile_name",
",",
"custom_headers",
":custom_headers",
")",
".",
"val... | Lists existing CDN endpoints.
@param resource_group_name [String] Name of the Resource group within the
Azure subscription.
@param profile_name [String] Name of the CDN profile which is unique within
the resource group.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to... | [
"Lists",
"existing",
"CDN",
"endpoints",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_cdn/lib/2017-04-02/generated/azure_mgmt_cdn/endpoints.rb#L1883-L1892 | train | Gets the list of all the ANSHPARIS rules. | [
30522,
13366,
2862,
1035,
2011,
1035,
6337,
1035,
2004,
1035,
13971,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
6337,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
2862,
1035,
2011,
1035,
6337,
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... |
castwide/solargraph | lib/solargraph/api_map.rb | Solargraph.ApiMap.search | def search query
rake_yard(store)
found = []
code_object_paths.each do |k|
if found.empty? || (query.include?('.') || query.include?('#')) || !(k.include?('.') || k.include?('#'))
found.push k if k.downcase.include?(query.downcase)
end
end
found
end | ruby | def search query
rake_yard(store)
found = []
code_object_paths.each do |k|
if found.empty? || (query.include?('.') || query.include?('#')) || !(k.include?('.') || k.include?('#'))
found.push k if k.downcase.include?(query.downcase)
end
end
found
end | [
"def",
"search",
"query",
"rake_yard",
"(",
"store",
")",
"found",
"=",
"[",
"]",
"code_object_paths",
".",
"each",
"do",
"|",
"k",
"|",
"if",
"found",
".",
"empty?",
"||",
"(",
"query",
".",
"include?",
"(",
"'.'",
")",
"||",
"query",
".",
"include?... | Get a list of documented paths that match the query.
@example
api_map.query('str') # Results will include `String` and `Struct`
@param query [String] The text to match
@return [Array<String>] | [
"Get",
"a",
"list",
"of",
"documented",
"paths",
"that",
"match",
"the",
"query",
"."
] | 47badb5d151aca775ccbe6c470236089eae7839d | https://github.com/castwide/solargraph/blob/47badb5d151aca775ccbe6c470236089eae7839d/lib/solargraph/api_map.rb#L394-L403 | train | search for the code object | [
30522,
13366,
3945,
23032,
26008,
1035,
4220,
1006,
3573,
1007,
2179,
1027,
1031,
1033,
3642,
1035,
4874,
1035,
10425,
1012,
2169,
2079,
1064,
1047,
1064,
2065,
2179,
1012,
4064,
1029,
1064,
1064,
1006,
23032,
1012,
2421,
1029,
1006,
1005,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_policy_insights/lib/2018-04-04/generated/azure_mgmt_policy_insights/policy_states.rb | Azure::PolicyInsights::Mgmt::V2018_04_04.PolicyStates.summarize_for_policy_set_definition_with_http_info | def summarize_for_policy_set_definition_with_http_info(subscription_id, policy_set_definition_name, query_options:nil, custom_headers:nil)
summarize_for_policy_set_definition_async(subscription_id, policy_set_definition_name, query_options:query_options, custom_headers:custom_headers).value!
end | ruby | def summarize_for_policy_set_definition_with_http_info(subscription_id, policy_set_definition_name, query_options:nil, custom_headers:nil)
summarize_for_policy_set_definition_async(subscription_id, policy_set_definition_name, query_options:query_options, custom_headers:custom_headers).value!
end | [
"def",
"summarize_for_policy_set_definition_with_http_info",
"(",
"subscription_id",
",",
"policy_set_definition_name",
",",
"query_options",
":",
"nil",
",",
"custom_headers",
":",
"nil",
")",
"summarize_for_policy_set_definition_async",
"(",
"subscription_id",
",",
"policy_se... | Summarizes policy states for the subscription level policy set definition.
@param subscription_id [String] Microsoft Azure subscription ID.
@param policy_set_definition_name [String] Policy set definition name.
@param query_options [QueryOptions] Additional parameters for the operation
@param custom_headers [Hash{... | [
"Summarizes",
"policy",
"states",
"for",
"the",
"subscription",
"level",
"policy",
"set",
"definition",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_policy_insights/lib/2018-04-04/generated/azure_mgmt_policy_insights/policy_states.rb#L1151-L1153 | train | Summarizes policy set definitions for a subscription. | [
30522,
13366,
7680,
7849,
4697,
1035,
2005,
1035,
3343,
1035,
2275,
1035,
6210,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
15002,
1035,
8909,
1010,
3343,
1035,
2275,
1035,
6210,
1035,
2171,
1010,
23032,
1035,
7047,
1024,
9152,
2140,
1010,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_service_bus/lib/2015-08-01/generated/azure_mgmt_service_bus/namespaces.rb | Azure::ServiceBus::Mgmt::V2015_08_01.Namespaces.list_authorization_rules_next | def list_authorization_rules_next(next_page_link, custom_headers:nil)
response = list_authorization_rules_next_async(next_page_link, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def list_authorization_rules_next(next_page_link, custom_headers:nil)
response = list_authorization_rules_next_async(next_page_link, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"list_authorization_rules_next",
"(",
"next_page_link",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"list_authorization_rules_next_async",
"(",
"next_page_link",
",",
"custom_headers",
":custom_headers",
")",
".",
"value!",
"response",
".",
"body",
"... | Gets the authorization rules for a namespace.
@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 [SharedAccessAuthorizationRuleListResult] operatio... | [
"Gets",
"the",
"authorization",
"rules",
"for",
"a",
"namespace",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_service_bus/lib/2015-08-01/generated/azure_mgmt_service_bus/namespaces.rb#L1662-L1665 | train | Gets the authorization rules for a resource group. | [
30522,
13366,
2862,
1035,
20104,
1035,
3513,
1035,
2279,
1006,
2279,
1035,
3931,
1035,
4957,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
2862,
1035,
20104,
1035,
3513,
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/loader.rb | Sprockets.Loader.store_asset | def store_asset(asset, unloaded)
# Save the asset in the cache under the new URI
cached_asset = asset.dup
cached_asset[:uri] = compress_from_root(asset[:uri])
cached_asset[:filename] = compress_from_root(asset[:filename])
cached_asset[:load_path] = compress_fro... | ruby | def store_asset(asset, unloaded)
# Save the asset in the cache under the new URI
cached_asset = asset.dup
cached_asset[:uri] = compress_from_root(asset[:uri])
cached_asset[:filename] = compress_from_root(asset[:filename])
cached_asset[:load_path] = compress_fro... | [
"def",
"store_asset",
"(",
"asset",
",",
"unloaded",
")",
"# Save the asset in the cache under the new URI",
"cached_asset",
"=",
"asset",
".",
"dup",
"cached_asset",
"[",
":uri",
"]",
"=",
"compress_from_root",
"(",
"asset",
"[",
":uri",
"]",
")",
"cached_asset",
... | Internal: Save a given asset to the cache
asset - A hash containing values of loaded asset
unloaded - The UnloadedAsset used to lookup the `asset`
This method converts all absolute paths to "compressed" paths
which are relative if they're in the root. | [
"Internal",
":",
"Save",
"a",
"given",
"asset",
"to",
"the",
"cache"
] | 9e3f0d8e98c44f57e67bc138db87bb8469bf5ddd | https://github.com/rails/sprockets/blob/9e3f0d8e98c44f57e67bc138db87bb8469bf5ddd/lib/sprockets/loader.rb#L198-L259 | train | Stores the asset in the cache | [
30522,
13366,
3573,
1035,
11412,
1006,
11412,
1010,
4895,
30524,
2072,
17053,
2094,
1035,
11412,
1027,
11412,
1012,
4241,
2361,
17053,
2094,
1035,
11412,
1031,
1024,
24471,
2072,
1033,
1027,
4012,
20110,
1035,
2013,
1035,
7117,
1006,
11412,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
square/connect-ruby-sdk | lib/square_connect/models/create_checkout_request.rb | SquareConnect.CreateCheckoutRequest.pre_populate_buyer_email= | def pre_populate_buyer_email=(pre_populate_buyer_email)
if !pre_populate_buyer_email.nil? && pre_populate_buyer_email.to_s.length > 254
fail ArgumentError, "invalid value for 'pre_populate_buyer_email', the character length must be smaller than or equal to 254."
end
@pre_populate_buyer_email... | ruby | def pre_populate_buyer_email=(pre_populate_buyer_email)
if !pre_populate_buyer_email.nil? && pre_populate_buyer_email.to_s.length > 254
fail ArgumentError, "invalid value for 'pre_populate_buyer_email', the character length must be smaller than or equal to 254."
end
@pre_populate_buyer_email... | [
"def",
"pre_populate_buyer_email",
"=",
"(",
"pre_populate_buyer_email",
")",
"if",
"!",
"pre_populate_buyer_email",
".",
"nil?",
"&&",
"pre_populate_buyer_email",
".",
"to_s",
".",
"length",
">",
"254",
"fail",
"ArgumentError",
",",
"\"invalid value for 'pre_populate_buy... | Custom attribute writer method with validation
@param [Object] pre_populate_buyer_email Value to be assigned | [
"Custom",
"attribute",
"writer",
"method",
"with",
"validation"
] | 798eb9ded716f23b9f1518386f1c311a34bca8bf | https://github.com/square/connect-ruby-sdk/blob/798eb9ded716f23b9f1518386f1c311a34bca8bf/lib/square_connect/models/create_checkout_request.rb#L205-L212 | train | Set the pre_populate_buyer_email attribute. | [
30522,
13366,
3653,
1035,
3769,
9869,
1035,
17634,
1035,
10373,
1027,
1006,
3653,
1035,
3769,
9869,
1035,
17634,
1035,
10373,
1007,
2065,
999,
3653,
1035,
3769,
9869,
1035,
17634,
1035,
10373,
1012,
9152,
2140,
1029,
1004,
1004,
3653,
1035,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
meew0/discordrb | lib/discordrb/bot.rb | Discordrb.Bot.send_file | def send_file(channel, file, caption: nil, tts: false, filename: nil, spoiler: nil)
if file.respond_to?(:read)
if spoiler
filename ||= File.basename(file.path)
filename = 'SPOILER_' + filename unless filename.start_with? 'SPOILER_'
end
# https://github.com/rest-client/r... | ruby | def send_file(channel, file, caption: nil, tts: false, filename: nil, spoiler: nil)
if file.respond_to?(:read)
if spoiler
filename ||= File.basename(file.path)
filename = 'SPOILER_' + filename unless filename.start_with? 'SPOILER_'
end
# https://github.com/rest-client/r... | [
"def",
"send_file",
"(",
"channel",
",",
"file",
",",
"caption",
":",
"nil",
",",
"tts",
":",
"false",
",",
"filename",
":",
"nil",
",",
"spoiler",
":",
"nil",
")",
"if",
"file",
".",
"respond_to?",
"(",
":read",
")",
"if",
"spoiler",
"filename",
"||... | Sends a file to a channel. If it is an image, it will automatically be embedded.
@note This executes in a blocking way, so if you're sending long files, be wary of delays.
@param channel [Channel, Integer, #resolve_id] The channel to send something to.
@param file [File] The file that should be sent.
@param caption... | [
"Sends",
"a",
"file",
"to",
"a",
"channel",
".",
"If",
"it",
"is",
"an",
"image",
"it",
"will",
"automatically",
"be",
"embedded",
"."
] | 764298a1ff0be69a1853b510d736f21c2b91a2fe | https://github.com/meew0/discordrb/blob/764298a1ff0be69a1853b510d736f21c2b91a2fe/lib/discordrb/bot.rb#L403-L416 | train | Send a file to a channel | [
30522,
13366,
4604,
1035,
5371,
1006,
3149,
1010,
5371,
1010,
14408,
3258,
1024,
9152,
2140,
1010,
23746,
2015,
1024,
6270,
1010,
5371,
18442,
1024,
9152,
2140,
1010,
27594,
2121,
1024,
9152,
2140,
1007,
2065,
5371,
1012,
6869,
1035,
2000,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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_service_info_with_http_info | def get_service_info_with_http_info(application_id, service_id, timeout:60, custom_headers:nil)
get_service_info_async(application_id, service_id, timeout:timeout, custom_headers:custom_headers).value!
end | ruby | def get_service_info_with_http_info(application_id, service_id, timeout:60, custom_headers:nil)
get_service_info_async(application_id, service_id, timeout:timeout, custom_headers:custom_headers).value!
end | [
"def",
"get_service_info_with_http_info",
"(",
"application_id",
",",
"service_id",
",",
"timeout",
":",
"60",
",",
"custom_headers",
":",
"nil",
")",
"get_service_info_async",
"(",
"application_id",
",",
"service_id",
",",
"timeout",
":",
"timeout",
",",
"custom_he... | Gets the information about the specific service belonging to the Service
Fabric application.
Returns the information about the specified service belonging to the
specified Service Fabric application.
@param application_id [String] The identity of the application. This is
typically the full name of the applicatio... | [
"Gets",
"the",
"information",
"about",
"the",
"specific",
"service",
"belonging",
"to",
"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#L9879-L9881 | train | Gets the information about the service. | [
30522,
13366,
2131,
1035,
2326,
1035,
18558,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
4646,
1035,
8909,
1010,
2326,
1035,
8909,
1010,
2051,
5833,
1024,
3438,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
2131,
1035,
2326,
1035,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
aws/aws-sdk-ruby | gems/aws-sdk-ec2/lib/aws-sdk-ec2/instance.rb | Aws::EC2.Instance.volumes | def volumes(options = {})
batches = Enumerator.new do |y|
options = Aws::Util.deep_merge(options, filters: [{
name: "attachment.instance-id",
values: [@id]
}])
resp = @client.describe_volumes(options)
resp.each_page do |page|
batch = []
page.... | ruby | def volumes(options = {})
batches = Enumerator.new do |y|
options = Aws::Util.deep_merge(options, filters: [{
name: "attachment.instance-id",
values: [@id]
}])
resp = @client.describe_volumes(options)
resp.each_page do |page|
batch = []
page.... | [
"def",
"volumes",
"(",
"options",
"=",
"{",
"}",
")",
"batches",
"=",
"Enumerator",
".",
"new",
"do",
"|",
"y",
"|",
"options",
"=",
"Aws",
"::",
"Util",
".",
"deep_merge",
"(",
"options",
",",
"filters",
":",
"[",
"{",
"name",
":",
"\"attachment.ins... | @example Request syntax with placeholder values
volumes = instance.volumes({
filters: [
{
name: "String",
values: ["String"],
},
],
volume_ids: ["String"],
dry_run: false,
})
@param [Hash] options ({})
@option options [Array<Types::Filter>] :filters
The fi... | [
"@example",
"Request",
"syntax",
"with",
"placeholder",
"values"
] | e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d | https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-ec2/lib/aws-sdk-ec2/instance.rb#L1365-L1385 | train | Returns a collection of all volumes in this instance. | [
30522,
13366,
6702,
1006,
7047,
1027,
1063,
1065,
1007,
14108,
2229,
1027,
4372,
17897,
16259,
1012,
2047,
2079,
1064,
1061,
1064,
7047,
1027,
22091,
2015,
1024,
1024,
21183,
4014,
1012,
2784,
1035,
13590,
1006,
7047,
1010,
17736,
1024,
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_search/lib/2015-08-19/generated/azure_mgmt_search/services.rb | Azure::Search::Mgmt::V2015_08_19.Services.delete_with_http_info | def delete_with_http_info(resource_group_name, search_service_name, search_management_request_options:nil, custom_headers:nil)
delete_async(resource_group_name, search_service_name, search_management_request_options:search_management_request_options, custom_headers:custom_headers).value!
end | ruby | def delete_with_http_info(resource_group_name, search_service_name, search_management_request_options:nil, custom_headers:nil)
delete_async(resource_group_name, search_service_name, search_management_request_options:search_management_request_options, custom_headers:custom_headers).value!
end | [
"def",
"delete_with_http_info",
"(",
"resource_group_name",
",",
"search_service_name",
",",
"search_management_request_options",
":",
"nil",
",",
"custom_headers",
":",
"nil",
")",
"delete_async",
"(",
"resource_group_name",
",",
"search_service_name",
",",
"search_managem... | Deletes a Search service in the given resource group, along with its
associated resources.
@param resource_group_name [String] The name of the resource group within the
current subscription. You can obtain this value from the Azure Resource
Manager API or the portal.
@param search_service_name [String] The name o... | [
"Deletes",
"a",
"Search",
"service",
"in",
"the",
"given",
"resource",
"group",
"along",
"with",
"its",
"associated",
"resources",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_search/lib/2015-08-19/generated/azure_mgmt_search/services.rb#L366-L368 | train | Deletes a search service. | [
30522,
13366,
3972,
12870,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
3945,
1035,
2326,
1035,
2171,
1010,
3945,
1035,
2968,
1035,
5227,
1035,
7047,
1024,
9152,
2140,
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... |
petergoldstein/dalli | lib/dalli/cas/client.rb | Dalli.Client.get_cas | def get_cas(key)
(value, cas) = perform(:cas, key)
value = (!value || value == 'Not found') ? nil : value
if block_given?
yield value, cas
else
[value, cas]
end
end | ruby | def get_cas(key)
(value, cas) = perform(:cas, key)
value = (!value || value == 'Not found') ? nil : value
if block_given?
yield value, cas
else
[value, cas]
end
end | [
"def",
"get_cas",
"(",
"key",
")",
"(",
"value",
",",
"cas",
")",
"=",
"perform",
"(",
":cas",
",",
"key",
")",
"value",
"=",
"(",
"!",
"value",
"||",
"value",
"==",
"'Not found'",
")",
"?",
"nil",
":",
"value",
"if",
"block_given?",
"yield",
"valu... | Get the value and CAS ID associated with the key. If a block is provided,
value and CAS will be passed to the block. | [
"Get",
"the",
"value",
"and",
"CAS",
"ID",
"associated",
"with",
"the",
"key",
".",
"If",
"a",
"block",
"is",
"provided",
"value",
"and",
"CAS",
"will",
"be",
"passed",
"to",
"the",
"block",
"."
] | 5755dbfd06e333a8239f976d4b10492b4555b726 | https://github.com/petergoldstein/dalli/blob/5755dbfd06e333a8239f976d4b10492b4555b726/lib/dalli/cas/client.rb#L9-L17 | train | Get the CAS value for the given key. | [
30522,
13366,
2131,
1035,
25222,
1006,
3145,
1007,
1006,
3643,
1010,
25222,
1007,
1027,
4685,
1006,
1024,
25222,
1010,
3145,
1007,
3643,
1027,
1006,
999,
3643,
1064,
1064,
3643,
1027,
1027,
1005,
2025,
2179,
1005,
1007,
1029,
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_logic/lib/2015-02-01-preview/generated/azure_mgmt_logic/workflow_access_keys.rb | Azure::Logic::Mgmt::V2015_02_01_preview.WorkflowAccessKeys.delete | def delete(resource_group_name, workflow_name, access_key_name, custom_headers:nil)
response = delete_async(resource_group_name, workflow_name, access_key_name, custom_headers:custom_headers).value!
nil
end | ruby | def delete(resource_group_name, workflow_name, access_key_name, custom_headers:nil)
response = delete_async(resource_group_name, workflow_name, access_key_name, custom_headers:custom_headers).value!
nil
end | [
"def",
"delete",
"(",
"resource_group_name",
",",
"workflow_name",
",",
"access_key_name",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"delete_async",
"(",
"resource_group_name",
",",
"workflow_name",
",",
"access_key_name",
",",
"custom_headers",
":custo... | Deletes a workflow access key.
@param resource_group_name [String] The resource group name.
@param workflow_name [String] The workflow name.
@param access_key_name [String] The workflow access key name.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request. | [
"Deletes",
"a",
"workflow",
"access",
"key",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_logic/lib/2015-02-01-preview/generated/azure_mgmt_logic/workflow_access_keys.rb#L342-L345 | train | Deletes a workflow access key. | [
30522,
13366,
3972,
12870,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2147,
12314,
1035,
2171,
1010,
3229,
1035,
3145,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
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... |
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.begin_change_vnet_next | def begin_change_vnet_next(next_page_link, custom_headers:nil)
response = begin_change_vnet_next_async(next_page_link, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def begin_change_vnet_next(next_page_link, custom_headers:nil)
response = begin_change_vnet_next_async(next_page_link, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"begin_change_vnet_next",
"(",
"next_page_link",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"begin_change_vnet_next_async",
"(",
"next_page_link",
",",
"custom_headers",
":custom_headers",
")",
".",
"value!",
"response",
".",
"body",
"unless",
"re... | Move an App Service Environment to a different VNET.
Move an App Service Environment to a different VNET.
@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... | [
"Move",
"an",
"App",
"Service",
"Environment",
"to",
"a",
"different",
"VNET",
"."
] | 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#L7136-L7139 | train | Change the virtual network of a managed network. | [
30522,
13366,
4088,
1035,
2689,
1035,
1058,
7159,
1035,
2279,
1006,
2279,
1035,
3931,
1035,
4957,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
4088,
1035,
2689,
1035,
1058,
7159,
1035,
2279,
1035,
2004,
6038,
2278,
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_locks/lib/2015-01-01/generated/azure_mgmt_locks/management_locks.rb | Azure::Locks::Mgmt::V2015_01_01.ManagementLocks.list_at_resource_level_as_lazy | def list_at_resource_level_as_lazy(resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, filter:nil, custom_headers:nil)
response = list_at_resource_level_async(resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, fil... | ruby | def list_at_resource_level_as_lazy(resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, filter:nil, custom_headers:nil)
response = list_at_resource_level_async(resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, fil... | [
"def",
"list_at_resource_level_as_lazy",
"(",
"resource_group_name",
",",
"resource_provider_namespace",
",",
"parent_resource_path",
",",
"resource_type",
",",
"resource_name",
",",
"filter",
":",
"nil",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"list_at... | Gets all the management locks of a resource or any level below resource.
@param resource_group_name [String] The name of the resource group. The name
is case insensitive.
@param resource_provider_namespace [String] Resource identity.
@param parent_resource_path [String] Resource identity.
@param resource_type [St... | [
"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#L1430-L1439 | train | Gets a list of all the resources under the resource provider namespace. | [
30522,
13366,
2862,
1035,
2012,
1035,
7692,
1035,
2504,
1035,
2004,
1035,
13971,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
7692,
1035,
10802,
1035,
3415,
15327,
1010,
6687,
1035,
7692,
1035,
4130,
1010,
7692,
1035,
2828,
1010,
7692,
1035,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_policy_insights/lib/2018-07-01-preview/generated/azure_mgmt_policy_insights/remediations.rb | Azure::PolicyInsights::Mgmt::V2018_07_01_preview.Remediations.list_deployments_at_management_group_as_lazy | def list_deployments_at_management_group_as_lazy(management_group_id, remediation_name, query_options:nil, custom_headers:nil)
response = list_deployments_at_management_group_async(management_group_id, remediation_name, query_options:query_options, custom_headers:custom_headers).value!
unless response.nil?
... | ruby | def list_deployments_at_management_group_as_lazy(management_group_id, remediation_name, query_options:nil, custom_headers:nil)
response = list_deployments_at_management_group_async(management_group_id, remediation_name, query_options:query_options, custom_headers:custom_headers).value!
unless response.nil?
... | [
"def",
"list_deployments_at_management_group_as_lazy",
"(",
"management_group_id",
",",
"remediation_name",
",",
"query_options",
":",
"nil",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"list_deployments_at_management_group_async",
"(",
"management_group_id",
","... | Gets all deployments for a remediation at management group scope.
@param management_group_id [String] Management group ID.
@param remediation_name [String] The name of the remediation.
@param query_options [QueryOptions] Additional parameters for the operation
@param custom_headers [Hash{String => String}] A hash ... | [
"Gets",
"all",
"deployments",
"for",
"a",
"remediation",
"at",
"management",
"group",
"scope",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_policy_insights/lib/2018-07-01-preview/generated/azure_mgmt_policy_insights/remediations.rb#L3063-L3072 | train | Gets the list of deployments at management group level. | [
30522,
13366,
2862,
1035,
10813,
2015,
1035,
2012,
1035,
2968,
1035,
2177,
1035,
2004,
1035,
13971,
1006,
2968,
1035,
2177,
1035,
8909,
1010,
2128,
16969,
3508,
1035,
2171,
1010,
23032,
1035,
7047,
1024,
9152,
2140,
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... |
aws/aws-sdk-ruby | gems/aws-sdk-s3/lib/aws-sdk-s3/bucket_cors.rb | Aws::S3.BucketCors.delete | def delete(options = {})
options = options.merge(bucket: @bucket_name)
resp = @client.delete_bucket_cors(options)
resp.data
end | ruby | def delete(options = {})
options = options.merge(bucket: @bucket_name)
resp = @client.delete_bucket_cors(options)
resp.data
end | [
"def",
"delete",
"(",
"options",
"=",
"{",
"}",
")",
"options",
"=",
"options",
".",
"merge",
"(",
"bucket",
":",
"@bucket_name",
")",
"resp",
"=",
"@client",
".",
"delete_bucket_cors",
"(",
"options",
")",
"resp",
".",
"data",
"end"
] | @!group Actions
@example Request syntax with placeholder values
bucket_cors.delete()
@param [Hash] options ({})
@return [EmptyStructure] | [
"@!group",
"Actions",
"@example",
"Request",
"syntax",
"with",
"placeholder",
"values"
] | e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d | https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-s3/lib/aws-sdk-s3/bucket_cors.rb#L176-L180 | train | Delete the bucket | [
30522,
13366,
3972,
12870,
1006,
7047,
1027,
1063,
1065,
1007,
7047,
1027,
7047,
1012,
13590,
1006,
13610,
1024,
1030,
13610,
1035,
2171,
1007,
24501,
2361,
1027,
1030,
7396,
1012,
3972,
12870,
1035,
13610,
1035,
2522,
2869,
1006,
7047,
100... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
appium/ruby_lib | lib/appium_lib/android/common/helper.rb | Appium.Android.resource_id | def resource_id(string, on_match)
return '' unless string
# unquote the string
# "com.example.Test:id/enter" -> com.example.Test:id/enter
unquote = string.match(/"(.+)"/)
string = unquote[1] if unquote
# java_package : type / name
#
# com.example.Test:id/enter
#
... | ruby | def resource_id(string, on_match)
return '' unless string
# unquote the string
# "com.example.Test:id/enter" -> com.example.Test:id/enter
unquote = string.match(/"(.+)"/)
string = unquote[1] if unquote
# java_package : type / name
#
# com.example.Test:id/enter
#
... | [
"def",
"resource_id",
"(",
"string",
",",
"on_match",
")",
"return",
"''",
"unless",
"string",
"# unquote the string",
"# \"com.example.Test:id/enter\" -> com.example.Test:id/enter",
"unquote",
"=",
"string",
".",
"match",
"(",
"/",
"/",
")",
"string",
"=",
"unquote",... | @private
Detects if the string represents a resourceId
resourceId is only supported on API >= 18 devices
@param string [String] the string check for a resourceId
value will be auto unquoted
@param on_match [String] the string to return on resourceId match
@return [String] empty string on ... | [
"@private",
"Detects",
"if",
"the",
"string",
"represents",
"a",
"resourceId",
"resourceId",
"is",
"only",
"supported",
"on",
"API",
">",
"=",
"18",
"devices"
] | 1f5898400dd1928bfe42ddd5f842d1f8738f2f76 | https://github.com/appium/ruby_lib/blob/1f5898400dd1928bfe42ddd5f842d1f8738f2f76/lib/appium_lib/android/common/helper.rb#L202-L222 | train | Returns the resource id of the given string. | [
30522,
13366,
7692,
1035,
8909,
1006,
5164,
1010,
2006,
1035,
2674,
1007,
2709,
1005,
1005,
4983,
5164,
1001,
4895,
28940,
12184,
1996,
5164,
1001,
1000,
4012,
1012,
2742,
1012,
3231,
1024,
8909,
1013,
4607,
1000,
1011,
1028,
4012,
1012,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | data/azure_cognitiveservices_luisauthoring/lib/2.0/generated/azure_cognitiveservices_luisauthoring/model.rb | Azure::CognitiveServices::LuisAuthoring::V2_0.Model.list_regex_entity_roles | def list_regex_entity_roles(app_id, version_id, entity_id, custom_headers:nil)
response = list_regex_entity_roles_async(app_id, version_id, entity_id, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def list_regex_entity_roles(app_id, version_id, entity_id, custom_headers:nil)
response = list_regex_entity_roles_async(app_id, version_id, entity_id, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"list_regex_entity_roles",
"(",
"app_id",
",",
"version_id",
",",
"entity_id",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"list_regex_entity_roles_async",
"(",
"app_id",
",",
"version_id",
",",
"entity_id",
",",
"custom_headers",
":custom_headers"... | Get all roles for a regular expression 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 custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request.
@return [Array] ... | [
"Get",
"all",
"roles",
"for",
"a",
"regular",
"expression",
"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#L6806-L6809 | train | Gets the roles of the specified regular expression entity. | [
30522,
13366,
2862,
1035,
19723,
10288,
1035,
9178,
1035,
4395,
1006,
10439,
1035,
8909,
1010,
2544,
1035,
8909,
1010,
9178,
1035,
8909,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
2862,
1035,
19723,
10288,
1035,
9178... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
twitter/secure_headers | lib/secure_headers/headers/content_security_policy.rb | SecureHeaders.ContentSecurityPolicy.build_source_list_directive | def build_source_list_directive(directive)
source_list = @config.directive_value(directive)
if source_list != OPT_OUT && source_list && source_list.any?
normalized_source_list = minify_source_list(directive, source_list)
[symbol_to_hyphen_case(directive), normalized_source_list].join(" ")
... | ruby | def build_source_list_directive(directive)
source_list = @config.directive_value(directive)
if source_list != OPT_OUT && source_list && source_list.any?
normalized_source_list = minify_source_list(directive, source_list)
[symbol_to_hyphen_case(directive), normalized_source_list].join(" ")
... | [
"def",
"build_source_list_directive",
"(",
"directive",
")",
"source_list",
"=",
"@config",
".",
"directive_value",
"(",
"directive",
")",
"if",
"source_list",
"!=",
"OPT_OUT",
"&&",
"source_list",
"&&",
"source_list",
".",
"any?",
"normalized_source_list",
"=",
"mi... | Private: builds a string that represents one directive in a minified form.
directive_name - a symbol representing the various ALL_DIRECTIVES
Returns a string representing a directive. | [
"Private",
":",
"builds",
"a",
"string",
"that",
"represents",
"one",
"directive",
"in",
"a",
"minified",
"form",
"."
] | 543e6712aadae08f1653ed973e6b6204f7eac26a | https://github.com/twitter/secure_headers/blob/543e6712aadae08f1653ed973e6b6204f7eac26a/lib/secure_headers/headers/content_security_policy.rb#L104-L111 | train | Build the source list directive | [
30522,
13366,
3857,
1035,
3120,
1035,
2862,
1035,
16449,
1006,
16449,
1007,
3120,
1035,
2862,
1027,
1030,
9530,
8873,
2290,
1012,
16449,
1035,
3643,
1006,
16449,
1007,
2065,
3120,
1035,
2862,
999,
1027,
23569,
1035,
2041,
1004,
1004,
3120,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/webhook_operations.rb | Azure::Automation::Mgmt::V2015_10_31.WebhookOperations.get_with_http_info | def get_with_http_info(resource_group_name, automation_account_name, webhook_name, custom_headers:nil)
get_async(resource_group_name, automation_account_name, webhook_name, custom_headers:custom_headers).value!
end | ruby | def get_with_http_info(resource_group_name, automation_account_name, webhook_name, custom_headers:nil)
get_async(resource_group_name, automation_account_name, webhook_name, custom_headers:custom_headers).value!
end | [
"def",
"get_with_http_info",
"(",
"resource_group_name",
",",
"automation_account_name",
",",
"webhook_name",
",",
"custom_headers",
":",
"nil",
")",
"get_async",
"(",
"resource_group_name",
",",
"automation_account_name",
",",
"webhook_name",
",",
"custom_headers",
":cus... | Retrieve the webhook identified by webhook name.
@param resource_group_name [String] Name of an Azure Resource group.
@param automation_account_name [String] The name of the automation account.
@param webhook_name [String] The webhook name.
@param custom_headers [Hash{String => String}] A hash of custom headers th... | [
"Retrieve",
"the",
"webhook",
"identified",
"by",
"webhook",
"name",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_automation/lib/2015-10-31/generated/azure_mgmt_automation/webhook_operations.rb#L241-L243 | train | Gets the specified webhook. | [
30522,
13366,
2131,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
19309,
1035,
4070,
1035,
2171,
1010,
4773,
6806,
6559,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
2131,
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... |
samvera/hyrax | app/services/hyrax/file_set_fixity_check_service.rb | Hyrax.FileSetFixityCheckService.fixity_check_file_version | def fixity_check_file_version(file_id, version_uri)
latest_fixity_check = ChecksumAuditLog.logs_for(file_set.id, checked_uri: version_uri).first
return latest_fixity_check unless needs_fixity_check?(latest_fixity_check)
if async_jobs
FixityCheckJob.perform_later(version_uri.to_s, file... | ruby | def fixity_check_file_version(file_id, version_uri)
latest_fixity_check = ChecksumAuditLog.logs_for(file_set.id, checked_uri: version_uri).first
return latest_fixity_check unless needs_fixity_check?(latest_fixity_check)
if async_jobs
FixityCheckJob.perform_later(version_uri.to_s, file... | [
"def",
"fixity_check_file_version",
"(",
"file_id",
",",
"version_uri",
")",
"latest_fixity_check",
"=",
"ChecksumAuditLog",
".",
"logs_for",
"(",
"file_set",
".",
"id",
",",
"checked_uri",
":",
"version_uri",
")",
".",
"first",
"return",
"latest_fixity_check",
"unl... | Retrieve or generate the fixity check for a specific version of a file
@param [String] file_id used to find the file within its parent object (usually "original_file")
@param [String] version_uri the version to be fixity checked (or the file uri for non-versioned files) | [
"Retrieve",
"or",
"generate",
"the",
"fixity",
"check",
"for",
"a",
"specific",
"version",
"of",
"a",
"file"
] | e2b4f56e829a53b1f11296324736e9d5b8c9ee5f | https://github.com/samvera/hyrax/blob/e2b4f56e829a53b1f11296324736e9d5b8c9ee5f/app/services/hyrax/file_set_fixity_check_service.rb#L82-L91 | train | Perform a fixity check for a given file | [
30522,
13366,
8081,
3012,
1035,
4638,
1035,
5371,
1035,
2544,
1006,
5371,
1035,
8909,
1010,
2544,
1035,
24471,
2072,
1007,
6745,
1035,
8081,
3012,
1035,
4638,
1027,
14148,
12248,
21041,
19646,
8649,
1012,
15664,
1035,
2005,
1006,
5371,
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... |
middleman/middleman | middleman-core/lib/middleman-core/rack.rb | Middleman.Rack.process_request | def process_request(env, req, res)
start_time = Time.now
request_path = URI.decode(env['PATH_INFO'].dup)
request_path.force_encoding('UTF-8') if request_path.respond_to? :force_encoding
request_path = ::Middleman::Util.full_path(request_path, @middleman)
full_request_path = File.join(env[... | ruby | def process_request(env, req, res)
start_time = Time.now
request_path = URI.decode(env['PATH_INFO'].dup)
request_path.force_encoding('UTF-8') if request_path.respond_to? :force_encoding
request_path = ::Middleman::Util.full_path(request_path, @middleman)
full_request_path = File.join(env[... | [
"def",
"process_request",
"(",
"env",
",",
"req",
",",
"res",
")",
"start_time",
"=",
"Time",
".",
"now",
"request_path",
"=",
"URI",
".",
"decode",
"(",
"env",
"[",
"'PATH_INFO'",
"]",
".",
"dup",
")",
"request_path",
".",
"force_encoding",
"(",
"'UTF-8... | Core response method. We process the request, check with
the sitemap, and return the correct file, response or status
message.
@param env
@param [Rack::Request] req
@param [Rack::Response] res | [
"Core",
"response",
"method",
".",
"We",
"process",
"the",
"request",
"check",
"with",
"the",
"sitemap",
"and",
"return",
"the",
"correct",
"file",
"response",
"or",
"status",
"message",
"."
] | a0dd9f78094813162895511e8516e0c5507cee50 | https://github.com/middleman/middleman/blob/a0dd9f78094813162895511e8516e0c5507cee50/middleman-core/lib/middleman-core/rack.rb#L86-L119 | train | Process the request | [
30522,
13366,
2832,
1035,
5227,
1006,
4372,
2615,
1010,
2128,
4160,
1010,
24501,
1007,
2707,
1035,
2051,
1027,
2051,
1012,
2085,
5227,
1035,
4130,
1027,
24471,
2072,
1012,
21933,
3207,
1006,
4372,
2615,
1031,
1005,
4130,
1035,
18558,
1005,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/view_helper.rb | MetaTags.ViewHelper.title | def title(title = nil, headline = '')
set_meta_tags(title: title) unless title.nil?
headline.presence || meta_tags[:title]
end | ruby | def title(title = nil, headline = '')
set_meta_tags(title: title) unless title.nil?
headline.presence || meta_tags[:title]
end | [
"def",
"title",
"(",
"title",
"=",
"nil",
",",
"headline",
"=",
"''",
")",
"set_meta_tags",
"(",
"title",
":",
"title",
")",
"unless",
"title",
".",
"nil?",
"headline",
".",
"presence",
"||",
"meta_tags",
"[",
":title",
"]",
"end"
] | Set the page title and return it back.
This method is best suited for use in helpers. It sets the page title
and returns it (or +headline+ if specified).
@param [nil, String, Array] title page title. When passed as an
+Array+, parts will be joined using configured separator value
(see {#display_meta_tags}). ... | [
"Set",
"the",
"page",
"title",
"and",
"return",
"it",
"back",
"."
] | 03585f95edf96cd17024c5c155ce46ec8bc47232 | https://github.com/kpumuk/meta-tags/blob/03585f95edf96cd17024c5c155ce46ec8bc47232/lib/meta_tags/view_helper.rb#L58-L61 | train | Set the title of the page | [
30522,
13366,
2516,
1006,
2516,
1027,
9152,
2140,
1010,
17653,
1027,
1005,
1005,
1007,
2275,
1035,
18804,
1035,
22073,
1006,
2516,
1024,
2516,
1007,
4983,
2516,
1012,
9152,
2140,
1029,
17653,
1012,
3739,
1064,
1064,
18804,
1035,
22073,
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... |
opal/opal | opal/corelib/marshal/read_buffer.rb | Marshal.ReadBuffer.read_regexp | def read_regexp
string = read_string(cache: false)
options = read_byte
result = Regexp.new(string, options)
@object_cache << result
result
end | ruby | def read_regexp
string = read_string(cache: false)
options = read_byte
result = Regexp.new(string, options)
@object_cache << result
result
end | [
"def",
"read_regexp",
"string",
"=",
"read_string",
"(",
"cache",
":",
"false",
")",
"options",
"=",
"read_byte",
"result",
"=",
"Regexp",
".",
"new",
"(",
"string",
",",
"options",
")",
"@object_cache",
"<<",
"result",
"result",
"end"
] | Reads and returns Regexp from an input stream
@example
r = /regexp/mix
is encoded as
'/', 'regexp', r.options.chr | [
"Reads",
"and",
"returns",
"Regexp",
"from",
"an",
"input",
"stream"
] | 41aedc0fd62aab00d3c117ba0caf00206bedd981 | https://github.com/opal/opal/blob/41aedc0fd62aab00d3c117ba0caf00206bedd981/opal/corelib/marshal/read_buffer.rb#L311-L318 | train | Reads a regexp from the input stream. | [
30522,
13366,
3191,
1035,
19723,
10288,
2361,
5164,
1027,
3191,
1035,
5164,
1006,
17053,
1024,
6270,
1007,
7047,
1027,
3191,
1035,
24880,
2765,
1027,
19723,
10288,
2361,
1012,
2047,
1006,
5164,
1010,
7047,
1007,
1030,
4874,
1035,
17053,
102... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
meew0/discordrb | lib/discordrb/commands/command_bot.rb | Discordrb::Commands.CommandBot.command_aliases | def command_aliases(name)
commands.values.select do |command|
command.is_a?(CommandAlias) && command.aliased_command.name == name
end
end | ruby | def command_aliases(name)
commands.values.select do |command|
command.is_a?(CommandAlias) && command.aliased_command.name == name
end
end | [
"def",
"command_aliases",
"(",
"name",
")",
"commands",
".",
"values",
".",
"select",
"do",
"|",
"command",
"|",
"command",
".",
"is_a?",
"(",
"CommandAlias",
")",
"&&",
"command",
".",
"aliased_command",
".",
"name",
"==",
"name",
"end",
"end"
] | Creates a new CommandBot and logs in to Discord.
@param attributes [Hash] The attributes to initialize the CommandBot with.
@see {Discordrb::Bot#initialize} for other attributes that should be used to create the underlying regular bot.
@option attributes [String, Array<String>, #call] :prefix The prefix that should ... | [
"Creates",
"a",
"new",
"CommandBot",
"and",
"logs",
"in",
"to",
"Discord",
".",
"@param",
"attributes",
"[",
"Hash",
"]",
"The",
"attributes",
"to",
"initialize",
"the",
"CommandBot",
"with",
".",
"@see",
"{",
"Discordrb",
"::",
"Bot#initialize",
"}",
"for",... | 764298a1ff0be69a1853b510d736f21c2b91a2fe | https://github.com/meew0/discordrb/blob/764298a1ff0be69a1853b510d736f21c2b91a2fe/lib/discordrb/commands/command_bot.rb#L193-L197 | train | Returns the list of aliases for the given command | [
30522,
13366,
3094,
1035,
14593,
2229,
1006,
2171,
1007,
10954,
1012,
5300,
1012,
7276,
2079,
1064,
3094,
1064,
3094,
1012,
2003,
1035,
1037,
1029,
1006,
3094,
22786,
2015,
1007,
1004,
1004,
3094,
1012,
14593,
2098,
1035,
3094,
1012,
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... |
projectcypress/health-data-standards | lib/hqmf-parser/2.0/types.rb | HQMF2.Value.inclusive_temporal_ref? | def inclusive_temporal_ref?
# FIXME: NINF is used instead of 0 sometimes...? (not in the IG)
# FIXME: Given nullFlavor, but IG uses it and nullValue everywhere...
less_than_equal_tr = attr_val('../@highClosed') == 'true' &&
(attr_val('../cda:low/@value') == '0' || attr_val('... | ruby | def inclusive_temporal_ref?
# FIXME: NINF is used instead of 0 sometimes...? (not in the IG)
# FIXME: Given nullFlavor, but IG uses it and nullValue everywhere...
less_than_equal_tr = attr_val('../@highClosed') == 'true' &&
(attr_val('../cda:low/@value') == '0' || attr_val('... | [
"def",
"inclusive_temporal_ref?",
"# FIXME: NINF is used instead of 0 sometimes...? (not in the IG)",
"# FIXME: Given nullFlavor, but IG uses it and nullValue everywhere...",
"less_than_equal_tr",
"=",
"attr_val",
"(",
"'../@highClosed'",
")",
"==",
"'true'",
"&&",
"(",
"attr_val",
"("... | Check whether the temporal reference should be marked as inclusive | [
"Check",
"whether",
"the",
"temporal",
"reference",
"should",
"be",
"marked",
"as",
"inclusive"
] | 252d4f0927c513eacde6b9ea41b76faa1423c34b | https://github.com/projectcypress/health-data-standards/blob/252d4f0927c513eacde6b9ea41b76faa1423c34b/lib/hqmf-parser/2.0/types.rb#L47-L56 | train | Returns true if the object is inclusive temporal reference | [
30522,
13366,
18678,
1035,
15850,
1035,
25416,
1029,
1001,
8081,
4168,
1024,
9152,
2078,
2546,
2003,
2109,
2612,
1997,
1014,
2823,
1012,
1012,
1012,
1029,
1006,
2025,
1999,
1996,
1045,
2290,
1007,
1001,
8081,
4168,
1024,
2445,
19701,
10258,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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_services.rb | Azure::Storage::Mgmt::V2018_07_01.BlobServices.set_service_properties | def set_service_properties(resource_group_name, account_name, parameters, custom_headers:nil)
response = set_service_properties_async(resource_group_name, account_name, parameters, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def set_service_properties(resource_group_name, account_name, parameters, custom_headers:nil)
response = set_service_properties_async(resource_group_name, account_name, parameters, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"set_service_properties",
"(",
"resource_group_name",
",",
"account_name",
",",
"parameters",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"set_service_properties_async",
"(",
"resource_group_name",
",",
"account_name",
",",
"parameters",
",",
"custom... | Sets the properties of a storage account’s Blob service, including properties
for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules.
@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 ... | [
"Sets",
"the",
"properties",
"of",
"a",
"storage",
"account’s",
"Blob",
"service",
"including",
"properties",
"for",
"Storage",
"Analytics",
"and",
"CORS",
"(",
"Cross",
"-",
"Origin",
"Resource",
"Sharing",
")",
"rules",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/blob_services.rb#L41-L44 | train | Set the service properties of the specified HDInsight account. | [
30522,
13366,
2275,
1035,
2326,
1035,
5144,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
4070,
1035,
2171,
1010,
11709,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
2275,
1035,
2326,
1035,
5144,
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_computervision/lib/2.0/generated/azure_cognitiveservices_computervision/computer_vision_client.rb | Azure::CognitiveServices::ComputerVision::V2_0.ComputerVisionClient.tag_image | def tag_image(url, language:nil, custom_headers:nil)
response = tag_image_async(url, language:language, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def tag_image(url, language:nil, custom_headers:nil)
response = tag_image_async(url, language:language, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"tag_image",
"(",
"url",
",",
"language",
":",
"nil",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"tag_image_async",
"(",
"url",
",",
"language",
":",
"language",
",",
"custom_headers",
":custom_headers",
")",
".",
"value!",
"response",
"... | This operation generates a list of words, or tags, that are relevant to the
content of the supplied image. The Computer Vision API can return tags based
on objects, living beings, scenery or actions found in images. Unlike
categories, tags are not organized according to a hierarchical classification
system, but cor... | [
"This",
"operation",
"generates",
"a",
"list",
"of",
"words",
"or",
"tags",
"that",
"are",
"relevant",
"to",
"the",
"content",
"of",
"the",
"supplied",
"image",
".",
"The",
"Computer",
"Vision",
"API",
"can",
"return",
"tags",
"based",
"on",
"objects",
"li... | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_cognitiveservices_computervision/lib/2.0/generated/azure_cognitiveservices_computervision/computer_vision_client.rb#L978-L981 | train | Tags an image. | [
30522,
13366,
6415,
1035,
3746,
1006,
24471,
2140,
1010,
2653,
1024,
9152,
2140,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
6415,
1035,
3746,
1035,
2004,
6038,
2278,
1006,
24471,
2140,
1010,
2653,
1024,
2653,
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... |
meew0/discordrb | lib/discordrb/bot.rb | Discordrb.Bot.create_oauth_application | def create_oauth_application(name, redirect_uris)
response = JSON.parse(API.create_oauth_application(@token, name, redirect_uris))
[response['id'], response['secret']]
end | ruby | def create_oauth_application(name, redirect_uris)
response = JSON.parse(API.create_oauth_application(@token, name, redirect_uris))
[response['id'], response['secret']]
end | [
"def",
"create_oauth_application",
"(",
"name",
",",
"redirect_uris",
")",
"response",
"=",
"JSON",
".",
"parse",
"(",
"API",
".",
"create_oauth_application",
"(",
"@token",
",",
"name",
",",
"redirect_uris",
")",
")",
"[",
"response",
"[",
"'id'",
"]",
",",... | Creates a new application to do OAuth authorization with. This allows you to use OAuth to authorize users using
Discord. For information how to use this, see the docs: https://discordapp.com/developers/docs/topics/oauth2
@param name [String] What your application should be called.
@param redirect_uris [Array<String>... | [
"Creates",
"a",
"new",
"application",
"to",
"do",
"OAuth",
"authorization",
"with",
".",
"This",
"allows",
"you",
"to",
"use",
"OAuth",
"to",
"authorize",
"users",
"using",
"Discord",
".",
"For",
"information",
"how",
"to",
"use",
"this",
"see",
"the",
"do... | 764298a1ff0be69a1853b510d736f21c2b91a2fe | https://github.com/meew0/discordrb/blob/764298a1ff0be69a1853b510d736f21c2b91a2fe/lib/discordrb/bot.rb#L438-L441 | train | Creates an OAuth application | [
30522,
13366,
3443,
1035,
1051,
4887,
2705,
1035,
4646,
1006,
2171,
1010,
2417,
7442,
6593,
1035,
24471,
2483,
1007,
3433,
1027,
1046,
3385,
1012,
11968,
3366,
1006,
17928,
1012,
3443,
1035,
1051,
4887,
2705,
1035,
4646,
1006,
1030,
19204,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/dsc_node_configuration_operations.rb | Azure::Automation::Mgmt::V2015_10_31.DscNodeConfigurationOperations.delete | def delete(resource_group_name, automation_account_name, node_configuration_name, custom_headers:nil)
response = delete_async(resource_group_name, automation_account_name, node_configuration_name, custom_headers:custom_headers).value!
nil
end | ruby | def delete(resource_group_name, automation_account_name, node_configuration_name, custom_headers:nil)
response = delete_async(resource_group_name, automation_account_name, node_configuration_name, custom_headers:custom_headers).value!
nil
end | [
"def",
"delete",
"(",
"resource_group_name",
",",
"automation_account_name",
",",
"node_configuration_name",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"delete_async",
"(",
"resource_group_name",
",",
"automation_account_name",
",",
"node_configuration_name",
... | Delete the Dsc node configurations by node configuration.
@param resource_group_name [String] Name of an Azure Resource group.
@param automation_account_name [String] The name of the automation account.
@param node_configuration_name [String] The Dsc node configuration name.
@param custom_headers [Hash{String => S... | [
"Delete",
"the",
"Dsc",
"node",
"configurations",
"by",
"node",
"configuration",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_automation/lib/2015-10-31/generated/azure_mgmt_automation/dsc_node_configuration_operations.rb#L34-L37 | train | Deletes a node configuration. | [
30522,
13366,
3972,
12870,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
19309,
1035,
4070,
1035,
2171,
1010,
13045,
1035,
9563,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
3972,
12870,
1035,
2004,
6038,
2278,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_event_grid/lib/2018-01-01/generated/azure_mgmt_event_grid/event_subscriptions.rb | Azure::EventGrid::Mgmt::V2018_01_01.EventSubscriptions.list_regional_by_resource_group_for_topic_type | def list_regional_by_resource_group_for_topic_type(resource_group_name, location, topic_type_name, custom_headers:nil)
response = list_regional_by_resource_group_for_topic_type_async(resource_group_name, location, topic_type_name, custom_headers:custom_headers).value!
response.body unless response.nil?
... | ruby | def list_regional_by_resource_group_for_topic_type(resource_group_name, location, topic_type_name, custom_headers:nil)
response = list_regional_by_resource_group_for_topic_type_async(resource_group_name, location, topic_type_name, custom_headers:custom_headers).value!
response.body unless response.nil?
... | [
"def",
"list_regional_by_resource_group_for_topic_type",
"(",
"resource_group_name",
",",
"location",
",",
"topic_type_name",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"list_regional_by_resource_group_for_topic_type_async",
"(",
"resource_group_name",
",",
"locat... | List all regional event subscriptions under an Azure subscription and
resource group for a topic type
List all event subscriptions from the given location under a specific Azure
subscription and resource group and topic type
@param resource_group_name [String] The name of the resource group within the
user's sub... | [
"List",
"all",
"regional",
"event",
"subscriptions",
"under",
"an",
"Azure",
"subscription",
"and",
"resource",
"group",
"for",
"a",
"topic",
"type"
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_event_grid/lib/2018-01-01/generated/azure_mgmt_event_grid/event_subscriptions.rb#L1197-L1200 | train | Gets the regionalized product product. | [
30522,
13366,
2862,
1035,
3164,
1035,
2011,
1035,
7692,
1035,
2177,
1035,
2005,
1035,
8476,
1035,
2828,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
3295,
1010,
8476,
1035,
2828,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
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... |
rmosolgo/graphql-ruby | lib/graphql/subscriptions.rb | GraphQL.Subscriptions.normalize_arguments | def normalize_arguments(event_name, arg_owner, args)
case arg_owner
when GraphQL::Field, GraphQL::InputObjectType
normalized_args = {}
missing_arg_names = []
args.each do |k, v|
arg_name = k.to_s
arg_defn = arg_owner.arguments[arg_name]
if arg_defn
... | ruby | def normalize_arguments(event_name, arg_owner, args)
case arg_owner
when GraphQL::Field, GraphQL::InputObjectType
normalized_args = {}
missing_arg_names = []
args.each do |k, v|
arg_name = k.to_s
arg_defn = arg_owner.arguments[arg_name]
if arg_defn
... | [
"def",
"normalize_arguments",
"(",
"event_name",
",",
"arg_owner",
",",
"args",
")",
"case",
"arg_owner",
"when",
"GraphQL",
"::",
"Field",
",",
"GraphQL",
"::",
"InputObjectType",
"normalized_args",
"=",
"{",
"}",
"missing_arg_names",
"=",
"[",
"]",
"args",
"... | Recursively normalize `args` as belonging to `arg_owner`:
- convert symbols to strings,
- if needed, camelize the string (using {#normalize_name})
@param arg_owner [GraphQL::Field, GraphQL::BaseType]
@param args [Hash, Array, Any] some GraphQL input value to coerce as `arg_owner`
@return [Any] normalized arguments... | [
"Recursively",
"normalize",
"args",
"as",
"belonging",
"to",
"arg_owner",
":",
"-",
"convert",
"symbols",
"to",
"strings",
"-",
"if",
"needed",
"camelize",
"the",
"string",
"(",
"using",
"{",
"#normalize_name",
"}",
")"
] | d5be13a816f220b9efbabeaa69a3e56fedf311f5 | https://github.com/rmosolgo/graphql-ruby/blob/d5be13a816f220b9efbabeaa69a3e56fedf311f5/lib/graphql/subscriptions.rb#L189-L229 | train | Normalize arguments of a subscription | [
30522,
13366,
3671,
4697,
1035,
9918,
1006,
2724,
1035,
2171,
1010,
12098,
2290,
1035,
3954,
1010,
12098,
5620,
1007,
2553,
12098,
2290,
1035,
3954,
2043,
10629,
4160,
2140,
1024,
1024,
2492,
1010,
10629,
4160,
2140,
1024,
1024,
7953,
16429... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_logic/lib/2016-06-01/generated/azure_mgmt_logic/schemas.rb | Azure::Logic::Mgmt::V2016_06_01.Schemas.list_content_callback_url_with_http_info | def list_content_callback_url_with_http_info(resource_group_name, integration_account_name, schema_name, list_content_callback_url, custom_headers:nil)
list_content_callback_url_async(resource_group_name, integration_account_name, schema_name, list_content_callback_url, custom_headers:custom_headers).value!
e... | ruby | def list_content_callback_url_with_http_info(resource_group_name, integration_account_name, schema_name, list_content_callback_url, custom_headers:nil)
list_content_callback_url_async(resource_group_name, integration_account_name, schema_name, list_content_callback_url, custom_headers:custom_headers).value!
e... | [
"def",
"list_content_callback_url_with_http_info",
"(",
"resource_group_name",
",",
"integration_account_name",
",",
"schema_name",
",",
"list_content_callback_url",
",",
"custom_headers",
":",
"nil",
")",
"list_content_callback_url_async",
"(",
"resource_group_name",
",",
"int... | Get the content callback url.
@param resource_group_name [String] The resource group name.
@param integration_account_name [String] The integration account name.
@param schema_name [String] The integration account schema name.
@param list_content_callback_url [GetCallbackUrlParameters]
@param custom_headers [Hash... | [
"Get",
"the",
"content",
"callback",
"url",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_logic/lib/2016-06-01/generated/azure_mgmt_logic/schemas.rb#L452-L454 | train | Gets the content callback URL for the specified schema. | [
30522,
13366,
2862,
1035,
4180,
1035,
2655,
5963,
1035,
24471,
2140,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
8346,
1035,
4070,
1035,
2171,
1010,
8040,
28433,
1035,
2171,
1010,
2862,
1035,
4180,
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_network/lib/2019-02-01/generated/azure_mgmt_network/network_profiles.rb | Azure::Network::Mgmt::V2019_02_01.NetworkProfiles.get_with_http_info | def get_with_http_info(resource_group_name, network_profile_name, expand:nil, custom_headers:nil)
get_async(resource_group_name, network_profile_name, expand:expand, custom_headers:custom_headers).value!
end | ruby | def get_with_http_info(resource_group_name, network_profile_name, expand:nil, custom_headers:nil)
get_async(resource_group_name, network_profile_name, expand:expand, custom_headers:custom_headers).value!
end | [
"def",
"get_with_http_info",
"(",
"resource_group_name",
",",
"network_profile_name",
",",
"expand",
":",
"nil",
",",
"custom_headers",
":",
"nil",
")",
"get_async",
"(",
"resource_group_name",
",",
"network_profile_name",
",",
"expand",
":",
"expand",
",",
"custom_... | Gets the specified network profile in a specified resource group.
@param resource_group_name [String] The name of the resource group.
@param network_profile_name [String] The name of the public IP prefix.
@param expand [String] Expands referenced resources.
@param custom_headers [Hash{String => String}] A hash of ... | [
"Gets",
"the",
"specified",
"network",
"profile",
"in",
"a",
"specified",
"resource",
"group",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_network/lib/2019-02-01/generated/azure_mgmt_network/network_profiles.rb#L89-L91 | train | Gets the specified network profile s index. | [
30522,
13366,
2131,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2897,
1035,
6337,
1035,
2171,
1010,
7818,
1024,
9152,
2140,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
2131,
1035,
2004,
6038,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | data/azure_cognitiveservices_contentmoderator/lib/1.0/generated/azure_cognitiveservices_contentmoderator/list_management_term.rb | Azure::CognitiveServices::ContentModerator::V1_0.ListManagementTerm.delete_term | def delete_term(list_id, term, language, custom_headers:nil)
response = delete_term_async(list_id, term, language, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def delete_term(list_id, term, language, custom_headers:nil)
response = delete_term_async(list_id, term, language, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"delete_term",
"(",
"list_id",
",",
"term",
",",
"language",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"delete_term_async",
"(",
"list_id",
",",
"term",
",",
"language",
",",
"custom_headers",
":custom_headers",
")",
".",
"value!",
"respo... | Deletes a term from the list with list Id equal to the list Id passed.
@param list_id [String] List Id of the image list.
@param term [String] Term to be deleted
@param language [String] Language of the terms.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP r... | [
"Deletes",
"a",
"term",
"from",
"the",
"list",
"with",
"list",
"Id",
"equal",
"to",
"the",
"list",
"Id",
"passed",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_cognitiveservices_contentmoderator/lib/1.0/generated/azure_cognitiveservices_contentmoderator/list_management_term.rb#L131-L134 | train | Deletes a list term. | [
30522,
13366,
3972,
12870,
1035,
2744,
1006,
2862,
1035,
8909,
1010,
2744,
1010,
2653,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
3972,
12870,
1035,
2744,
1035,
2004,
6038,
2278,
1006,
2862,
1035,
8909,
1010,
2744,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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_event_hub/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/namespaces.rb | Azure::EventHub::Mgmt::V2018_01_01_preview.Namespaces.list_virtual_network_rules_next | def list_virtual_network_rules_next(next_page_link, custom_headers:nil)
response = list_virtual_network_rules_next_async(next_page_link, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def list_virtual_network_rules_next(next_page_link, custom_headers:nil)
response = list_virtual_network_rules_next_async(next_page_link, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"list_virtual_network_rules_next",
"(",
"next_page_link",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"list_virtual_network_rules_next_async",
"(",
"next_page_link",
",",
"custom_headers",
":custom_headers",
")",
".",
"value!",
"response",
".",
"body",... | Gets a list of VirtualNetwork rules for a Namespace.
@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 [VirtualNetworkRuleListResult] operation re... | [
"Gets",
"a",
"list",
"of",
"VirtualNetwork",
"rules",
"for",
"a",
"Namespace",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_event_hub/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/namespaces.rb#L2047-L2050 | train | Gets the virtual network rules for a subscription. | [
30522,
13366,
2862,
1035,
7484,
1035,
2897,
1035,
3513,
1035,
2279,
1006,
2279,
1035,
3931,
1035,
4957,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
2862,
1035,
7484,
1035,
2897,
1035,
3513,
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 | 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.create_service_with_http_info | def create_service_with_http_info(application_id, service_description, timeout:60, custom_headers:nil)
create_service_async(application_id, service_description, timeout:timeout, custom_headers:custom_headers).value!
end | ruby | def create_service_with_http_info(application_id, service_description, timeout:60, custom_headers:nil)
create_service_async(application_id, service_description, timeout:timeout, custom_headers:custom_headers).value!
end | [
"def",
"create_service_with_http_info",
"(",
"application_id",
",",
"service_description",
",",
"timeout",
":",
"60",
",",
"custom_headers",
":",
"nil",
")",
"create_service_async",
"(",
"application_id",
",",
"service_description",
",",
"timeout",
":",
"timeout",
","... | Creates the specified Service Fabric service.
This api allows creating a new Service Fabric stateless or stateful service
under a specified Service Fabric application. The description for creating
the service includes partitioning information and optional properties for
placement and load balancing. Some of the pr... | [
"Creates",
"the",
"specified",
"Service",
"Fabric",
"service",
"."
] | 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#L10153-L10155 | train | Creates a service for the application. | [
30522,
13366,
3443,
1035,
2326,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
4646,
1035,
8909,
1010,
2326,
1035,
6412,
1010,
2051,
5833,
1024,
3438,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3443,
1035,
2326,
1035,
2004,
6038,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
projectcypress/health-data-standards | lib/hqmf-parser/converter/pass1/data_criteria_converter.rb | HQMF.DataCriteriaConverter.create_measure_period_v1_data_criteria | def create_measure_period_v1_data_criteria(doc,measure_period,v1_data_criteria_by_id)
attributes = doc[:attributes]
attributes.keys.each {|key| attributes[key.to_s] = attributes[key]}
measure_period_key = attributes['MEASUREMENT_PERIOD'][:id]
measure_start_key = attributes['MEASUREMENT_S... | ruby | def create_measure_period_v1_data_criteria(doc,measure_period,v1_data_criteria_by_id)
attributes = doc[:attributes]
attributes.keys.each {|key| attributes[key.to_s] = attributes[key]}
measure_period_key = attributes['MEASUREMENT_PERIOD'][:id]
measure_start_key = attributes['MEASUREMENT_S... | [
"def",
"create_measure_period_v1_data_criteria",
"(",
"doc",
",",
"measure_period",
",",
"v1_data_criteria_by_id",
")",
"attributes",
"=",
"doc",
"[",
":attributes",
"]",
"attributes",
".",
"keys",
".",
"each",
"{",
"|",
"key",
"|",
"attributes",
"[",
"key",
"."... | this method creates V1 data criteria for the measurement period. These data criteria can be
referenced properly within the restrictions | [
"this",
"method",
"creates",
"V1",
"data",
"criteria",
"for",
"the",
"measurement",
"period",
".",
"These",
"data",
"criteria",
"can",
"be",
"referenced",
"properly",
"within",
"the",
"restrictions"
] | 252d4f0927c513eacde6b9ea41b76faa1423c34b | https://github.com/projectcypress/health-data-standards/blob/252d4f0927c513eacde6b9ea41b76faa1423c34b/lib/hqmf-parser/converter/pass1/data_criteria_converter.rb#L214-L245 | train | Create a measure period data criteria for a given measure period | [
30522,
13366,
3443,
1035,
5468,
1035,
2558,
1035,
1058,
2487,
1035,
2951,
1035,
9181,
1006,
9986,
1010,
5468,
1035,
2558,
1010,
1058,
2487,
1035,
2951,
1035,
9181,
1035,
2011,
1035,
8909,
1007,
12332,
1027,
9986,
1031,
1024,
12332,
1033,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
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_sync_remotemanagement_certificate_with_http_info | def begin_sync_remotemanagement_certificate_with_http_info(device_name, resource_group_name, manager_name, custom_headers:nil)
begin_sync_remotemanagement_certificate_async(device_name, resource_group_name, manager_name, custom_headers:custom_headers).value!
end | ruby | def begin_sync_remotemanagement_certificate_with_http_info(device_name, resource_group_name, manager_name, custom_headers:nil)
begin_sync_remotemanagement_certificate_async(device_name, resource_group_name, manager_name, custom_headers:custom_headers).value!
end | [
"def",
"begin_sync_remotemanagement_certificate_with_http_info",
"(",
"device_name",
",",
"resource_group_name",
",",
"manager_name",
",",
"custom_headers",
":",
"nil",
")",
"begin_sync_remotemanagement_certificate_async",
"(",
"device_name",
",",
"resource_group_name",
",",
"m... | sync Remote management Certificate between appliance and Service
@param device_name [String] The device name
@param resource_group_name [String] The resource group name
@param manager_name [String] The manager name
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the H... | [
"sync",
"Remote",
"management",
"Certificate",
"between",
"appliance",
"and",
"Service"
] | 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#L998-L1000 | train | Syncs the certificate of a managed cluster. | [
30522,
13366,
4088,
1035,
26351,
1035,
6556,
24805,
20511,
1035,
8196,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
5080,
1035,
2171,
1010,
7692,
1035,
2177,
1035,
2171,
1010,
3208,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/drawing/axis.rb | Axlsx.Axis.to_xml_string | def to_xml_string(str = '')
str << ('<c:axId val="' << @id.to_s << '"/>')
@scaling.to_xml_string str
str << ('<c:delete val="' << @delete.to_s << '"/>')
str << ('<c:axPos val="' << @ax_pos.to_s << '"/>')
str << '<c:majorGridlines>'
# TODO shape properties need to be extracted into a ... | ruby | def to_xml_string(str = '')
str << ('<c:axId val="' << @id.to_s << '"/>')
@scaling.to_xml_string str
str << ('<c:delete val="' << @delete.to_s << '"/>')
str << ('<c:axPos val="' << @ax_pos.to_s << '"/>')
str << '<c:majorGridlines>'
# TODO shape properties need to be extracted into a ... | [
"def",
"to_xml_string",
"(",
"str",
"=",
"''",
")",
"str",
"<<",
"(",
"'<c:axId val=\"'",
"<<",
"@id",
".",
"to_s",
"<<",
"'\"/>'",
")",
"@scaling",
".",
"to_xml_string",
"str",
"str",
"<<",
"(",
"'<c:delete val=\"'",
"<<",
"@delete",
".",
"to_s",
"<<",
... | Serializes the object
@param [String] str
@return [String] | [
"Serializes",
"the",
"object"
] | c593a08b2a929dac7aa8dc418b55e26b4c49dc34 | https://github.com/randym/axlsx/blob/c593a08b2a929dac7aa8dc418b55e26b4c49dc34/lib/axlsx/drawing/axis.rb#L152-L186 | train | Convert the cell to XML string | [
30522,
13366,
2000,
1035,
20950,
1035,
5164,
1006,
2358,
2099,
1027,
1005,
1005,
1007,
2358,
2099,
1026,
1026,
1006,
1005,
1026,
1039,
1024,
22260,
3593,
11748,
1027,
1000,
1005,
1026,
1026,
1030,
8909,
1012,
2000,
1035,
1055,
1026,
1026,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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_event_hub/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/namespaces.rb | Azure::EventHub::Mgmt::V2018_01_01_preview.Namespaces.create_or_update_network_rule_set_with_http_info | def create_or_update_network_rule_set_with_http_info(resource_group_name, namespace_name, parameters, custom_headers:nil)
create_or_update_network_rule_set_async(resource_group_name, namespace_name, parameters, custom_headers:custom_headers).value!
end | ruby | def create_or_update_network_rule_set_with_http_info(resource_group_name, namespace_name, parameters, custom_headers:nil)
create_or_update_network_rule_set_async(resource_group_name, namespace_name, parameters, custom_headers:custom_headers).value!
end | [
"def",
"create_or_update_network_rule_set_with_http_info",
"(",
"resource_group_name",
",",
"namespace_name",
",",
"parameters",
",",
"custom_headers",
":",
"nil",
")",
"create_or_update_network_rule_set_async",
"(",
"resource_group_name",
",",
"namespace_name",
",",
"parameter... | Create or update NetworkRuleSet for a Namespace.
@param resource_group_name [String] Name of the resource group within the
Azure subscription.
@param namespace_name [String] The Namespace name
@param parameters [NetworkRuleSet] The Namespace IpFilterRule.
@param custom_headers [Hash{String => String}] A hash of c... | [
"Create",
"or",
"update",
"NetworkRuleSet",
"for",
"a",
"Namespace",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_event_hub/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/namespaces.rb#L1376-L1378 | train | Creates or updates a network rule set in the specified namespace. | [
30522,
13366,
3443,
1035,
2030,
1035,
10651,
1035,
2897,
1035,
3627,
1035,
2275,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
3415,
15327,
1035,
2171,
1010,
11709,
1010,
7661,
1035,
20346,
2015,
1024,
9152,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
apache/thrift | lib/rb/lib/thrift/protocol/json_protocol.rb | Thrift.JsonProtocol.read_json_escape_char | def read_json_escape_char
str = @reader.read
str += @reader.read
str += @reader.read
str += @reader.read
if RUBY_VERSION >= '1.9'
str.hex.chr(Encoding::UTF_8)
else
str.hex.chr
end
end | ruby | def read_json_escape_char
str = @reader.read
str += @reader.read
str += @reader.read
str += @reader.read
if RUBY_VERSION >= '1.9'
str.hex.chr(Encoding::UTF_8)
else
str.hex.chr
end
end | [
"def",
"read_json_escape_char",
"str",
"=",
"@reader",
".",
"read",
"str",
"+=",
"@reader",
".",
"read",
"str",
"+=",
"@reader",
".",
"read",
"str",
"+=",
"@reader",
".",
"read",
"if",
"RUBY_VERSION",
">=",
"'1.9'",
"str",
".",
"hex",
".",
"chr",
"(",
... | Decodes the four hex parts of a JSON escaped string character and returns
the character via out.
Note - this only supports Unicode characters in the BMP (U+0000 to U+FFFF);
characters above the BMP are encoded as two escape sequences (surrogate pairs),
which is not yet implemented | [
"Decodes",
"the",
"four",
"hex",
"parts",
"of",
"a",
"JSON",
"escaped",
"string",
"character",
"and",
"returns",
"the",
"character",
"via",
"out",
"."
] | 27d8387c49a49fcf193893f834e9766ae0b051c1 | https://github.com/apache/thrift/blob/27d8387c49a49fcf193893f834e9766ae0b051c1/lib/rb/lib/thrift/protocol/json_protocol.rb#L495-L505 | train | Read the JSON escape char | [
30522,
13366,
3191,
1035,
1046,
3385,
1035,
4019,
1035,
25869,
2358,
2099,
1027,
1030,
8068,
1012,
3191,
2358,
2099,
1009,
1027,
1030,
8068,
1012,
3191,
2358,
2099,
1009,
1027,
1030,
8068,
1012,
3191,
2358,
2099,
1009,
1027,
1030,
8068,
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_recovery_services_site_recovery/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/replication_protection_container_mappings.rb | Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10.ReplicationProtectionContainerMappings.begin_update | def begin_update(fabric_name, protection_container_name, mapping_name, update_input, custom_headers:nil)
response = begin_update_async(fabric_name, protection_container_name, mapping_name, update_input, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def begin_update(fabric_name, protection_container_name, mapping_name, update_input, custom_headers:nil)
response = begin_update_async(fabric_name, protection_container_name, mapping_name, update_input, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"begin_update",
"(",
"fabric_name",
",",
"protection_container_name",
",",
"mapping_name",
",",
"update_input",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"begin_update_async",
"(",
"fabric_name",
",",
"protection_container_name",
",",
"mapping_name... | Update protection container mapping.
The operation to update protection container mapping.
@param fabric_name [String] Fabric name.
@param protection_container_name [String] Protection container name.
@param mapping_name [String] Protection container mapping name.
@param update_input [UpdateProtectionContainerMa... | [
"Update",
"protection",
"container",
"mapping",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_recovery_services_site_recovery/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/replication_protection_container_mappings.rb#L732-L735 | train | Updates a protection container mapping. | [
30522,
13366,
4088,
1035,
10651,
1006,
8313,
1035,
2171,
1010,
3860,
1035,
11661,
1035,
2171,
1010,
12375,
1035,
2171,
1010,
10651,
1035,
7953,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
4088,
1035,
10651,
1035,
2004... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Shopify/liquid | lib/liquid/standardfilters.rb | Liquid.StandardFilters.date | def date(input, format)
return input if format.to_s.empty?
return input unless date = Utils.to_date(input)
date.strftime(format.to_s)
end | ruby | def date(input, format)
return input if format.to_s.empty?
return input unless date = Utils.to_date(input)
date.strftime(format.to_s)
end | [
"def",
"date",
"(",
"input",
",",
"format",
")",
"return",
"input",
"if",
"format",
".",
"to_s",
".",
"empty?",
"return",
"input",
"unless",
"date",
"=",
"Utils",
".",
"to_date",
"(",
"input",
")",
"date",
".",
"strftime",
"(",
"format",
".",
"to_s",
... | Reformat a date using Ruby's core Time#strftime( string ) -> string
%a - The abbreviated weekday name (``Sun'')
%A - The full weekday name (``Sunday'')
%b - The abbreviated month name (``Jan'')
%B - The full month name (``January'')
%c - The preferred local date and time representation
%d - Day... | [
"Reformat",
"a",
"date",
"using",
"Ruby",
"s",
"core",
"Time#strftime",
"(",
"string",
")",
"-",
">",
"string"
] | b3b63a683f6daaea7e70f1602ee829abdf970ef3 | https://github.com/Shopify/liquid/blob/b3b63a683f6daaea7e70f1602ee829abdf970ef3/lib/liquid/standardfilters.rb#L325-L331 | train | Convert the input to a date | [
30522,
13366,
3058,
1006,
7953,
1010,
4289,
1007,
2709,
7953,
2065,
4289,
1012,
2000,
1035,
1055,
1012,
4064,
1029,
2709,
7953,
4983,
3058,
1027,
21183,
12146,
1012,
2000,
1035,
3058,
1006,
7953,
1007,
3058,
1012,
2358,
12881,
7292,
1006,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_storagesync/lib/2018-07-01/generated/azure_mgmt_storagesync/registered_servers.rb | Azure::StorageSync::Mgmt::V2018_07_01.RegisteredServers.trigger_rollover_async | def trigger_rollover_async(resource_group_name, storage_sync_service_name, server_id, parameters, custom_headers:nil)
# Send request
promise = begin_trigger_rollover_async(resource_group_name, storage_sync_service_name, server_id, parameters, custom_headers:custom_headers)
promise = promise.then do |... | ruby | def trigger_rollover_async(resource_group_name, storage_sync_service_name, server_id, parameters, custom_headers:nil)
# Send request
promise = begin_trigger_rollover_async(resource_group_name, storage_sync_service_name, server_id, parameters, custom_headers:custom_headers)
promise = promise.then do |... | [
"def",
"trigger_rollover_async",
"(",
"resource_group_name",
",",
"storage_sync_service_name",
",",
"server_id",
",",
"parameters",
",",
"custom_headers",
":",
"nil",
")",
"# Send request",
"promise",
"=",
"begin_trigger_rollover_async",
"(",
"resource_group_name",
",",
"... | @param resource_group_name [String] The name of the resource group. The name
is case insensitive.
@param storage_sync_service_name [String] Name of Storage Sync Service
resource.
@param server_id [String] Server Id
@param parameters [TriggerRolloverRequest] Body of Trigger Rollover request.
@param custom_headers ... | [
"@param",
"resource_group_name",
"[",
"String",
"]",
"The",
"name",
"of",
"the",
"resource",
"group",
".",
"The",
"name",
"is",
"case",
"insensitive",
".",
"@param",
"storage_sync_service_name",
"[",
"String",
"]",
"Name",
"of",
"Storage",
"Sync",
"Service",
"... | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_storagesync/lib/2018-07-01/generated/azure_mgmt_storagesync/registered_servers.rb#L360-L374 | train | Trigger a rollover of a server. | [
30522,
13366,
9495,
1035,
4897,
7840,
1035,
2004,
6038,
2278,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
5527,
1035,
26351,
1035,
2326,
1035,
2171,
1010,
8241,
1035,
8909,
1010,
11709,
1010,
7661,
1035,
20346,
2015,
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_automation/lib/2015-10-31/generated/azure_mgmt_automation/job_operations.rb | Azure::Automation::Mgmt::V2015_10_31.JobOperations.list_by_automation_account | def list_by_automation_account(resource_group_name, automation_account_name, filter:nil, custom_headers:nil)
first_page = list_by_automation_account_as_lazy(resource_group_name, automation_account_name, filter:filter, custom_headers:custom_headers)
first_page.get_all_items
end | ruby | def list_by_automation_account(resource_group_name, automation_account_name, filter:nil, custom_headers:nil)
first_page = list_by_automation_account_as_lazy(resource_group_name, automation_account_name, filter:filter, custom_headers:custom_headers)
first_page.get_all_items
end | [
"def",
"list_by_automation_account",
"(",
"resource_group_name",
",",
"automation_account_name",
",",
"filter",
":",
"nil",
",",
"custom_headers",
":",
"nil",
")",
"first_page",
"=",
"list_by_automation_account_as_lazy",
"(",
"resource_group_name",
",",
"automation_account_... | Retrieve a list of jobs.
@param resource_group_name [String] Name of an Azure Resource group.
@param automation_account_name [String] The name of the automation account.
@param filter [String] The filter to apply on the operation.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will b... | [
"Retrieve",
"a",
"list",
"of",
"jobs",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_automation/lib/2015-10-31/generated/azure_mgmt_automation/job_operations.rb#L635-L638 | train | Gets all the automation accounts in a subscription. | [
30522,
13366,
2862,
1035,
2011,
1035,
19309,
1035,
4070,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
19309,
1035,
4070,
1035,
2171,
1010,
11307,
1024,
9152,
2140,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
2034,
1035,
3931,
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... |
middleman/middleman | middleman-core/lib/middleman-core/util.rb | Middleman.Util.instrument | def instrument(name, payload = {}, &block)
suffixed_name = /\.middleman$/.match?(name) ? name.dup : "#{name}.middleman"
::ActiveSupport::Notifications.instrument(suffixed_name, payload, &block)
end | ruby | def instrument(name, payload = {}, &block)
suffixed_name = /\.middleman$/.match?(name) ? name.dup : "#{name}.middleman"
::ActiveSupport::Notifications.instrument(suffixed_name, payload, &block)
end | [
"def",
"instrument",
"(",
"name",
",",
"payload",
"=",
"{",
"}",
",",
"&",
"block",
")",
"suffixed_name",
"=",
"/",
"\\.",
"/",
".",
"match?",
"(",
"name",
")",
"?",
"name",
".",
"dup",
":",
"\"#{name}.middleman\"",
"::",
"ActiveSupport",
"::",
"Notifi... | Facade for ActiveSupport/Notification | [
"Facade",
"for",
"ActiveSupport",
"/",
"Notification"
] | a0dd9f78094813162895511e8516e0c5507cee50 | https://github.com/middleman/middleman/blob/a0dd9f78094813162895511e8516e0c5507cee50/middleman-core/lib/middleman-core/util.rb#L16-L19 | train | Instruments a message with the given name. | [
30522,
13366,
6602,
1006,
2171,
1010,
18093,
1027,
1063,
1065,
1010,
1004,
3796,
1007,
16809,
2098,
1035,
2171,
1027,
1013,
1032,
1012,
2690,
2386,
1002,
1013,
1012,
2674,
1029,
1006,
2171,
1007,
1029,
2171,
1012,
4241,
2361,
1024,
1000,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_web/lib/2018-02-01/generated/azure_mgmt_web/recommendations.rb | Azure::Web::Mgmt::V2018_02_01.Recommendations.list_history_for_web_app_next | def list_history_for_web_app_next(next_page_link, custom_headers:nil)
response = list_history_for_web_app_next_async(next_page_link, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def list_history_for_web_app_next(next_page_link, custom_headers:nil)
response = list_history_for_web_app_next_async(next_page_link, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"list_history_for_web_app_next",
"(",
"next_page_link",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"list_history_for_web_app_next_async",
"(",
"next_page_link",
",",
"custom_headers",
":custom_headers",
")",
".",
"value!",
"response",
".",
"body",
"... | Get past recommendations for an app, optionally specified by the time range.
Get past recommendations for an app, optionally specified by the time range.
@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... | [
"Get",
"past",
"recommendations",
"for",
"an",
"app",
"optionally",
"specified",
"by",
"the",
"time",
"range",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_web/lib/2018-02-01/generated/azure_mgmt_web/recommendations.rb#L1062-L1065 | train | Gets the history for the App Service Environment. | [
30522,
13366,
2862,
1035,
2381,
1035,
2005,
1035,
4773,
1035,
10439,
1035,
2279,
1006,
2279,
1035,
3931,
1035,
4957,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
2862,
1035,
2381,
1035,
2005,
1035,
4773,
1035,
10439,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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.delete_with_http_info | def delete_with_http_info(resource_group_name, automation_account_name, job_schedule_id, custom_headers:nil)
delete_async(resource_group_name, automation_account_name, job_schedule_id, custom_headers:custom_headers).value!
end | ruby | def delete_with_http_info(resource_group_name, automation_account_name, job_schedule_id, custom_headers:nil)
delete_async(resource_group_name, automation_account_name, job_schedule_id, custom_headers:custom_headers).value!
end | [
"def",
"delete_with_http_info",
"(",
"resource_group_name",
",",
"automation_account_name",
",",
"job_schedule_id",
",",
"custom_headers",
":",
"nil",
")",
"delete_async",
"(",
"resource_group_name",
",",
"automation_account_name",
",",
"job_schedule_id",
",",
"custom_heade... | Delete the job schedule identified by job schedule name.
@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 custom_headers [Hash{String => String}] A hash of custom hea... | [
"Delete",
"the",
"job",
"schedule",
"identified",
"by",
"job",
"schedule",
"name",
"."
] | 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#L50-L52 | train | Deletes the specified job schedule. | [
30522,
13366,
3972,
12870,
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,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3972,
12870,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_recovery_services_backup/lib/2016-12-01/generated/azure_mgmt_recovery_services_backup/protection_containers.rb | Azure::RecoveryServicesBackup::Mgmt::V2016_12_01.ProtectionContainers.unregister_with_http_info | def unregister_with_http_info(vault_name, resource_group_name, fabric_name, container_name, custom_headers:nil)
unregister_async(vault_name, resource_group_name, fabric_name, container_name, custom_headers:custom_headers).value!
end | ruby | def unregister_with_http_info(vault_name, resource_group_name, fabric_name, container_name, custom_headers:nil)
unregister_async(vault_name, resource_group_name, fabric_name, container_name, custom_headers:custom_headers).value!
end | [
"def",
"unregister_with_http_info",
"(",
"vault_name",
",",
"resource_group_name",
",",
"fabric_name",
",",
"container_name",
",",
"custom_headers",
":",
"nil",
")",
"unregister_async",
"(",
"vault_name",
",",
"resource_group_name",
",",
"fabric_name",
",",
"container_n... | Unregisters the given container from your Recovery Services Vault. This is an
asynchronous operation. To determine
whether the backend service has finished processing the request, call Get
Container Operation Result API.
@param vault_name [String] The name of the recovery services vault.
@param resource_group_nam... | [
"Unregisters",
"the",
"given",
"container",
"from",
"your",
"Recovery",
"Services",
"Vault",
".",
"This",
"is",
"an",
"asynchronous",
"operation",
".",
"To",
"determine",
"whether",
"the",
"backend",
"service",
"has",
"finished",
"processing",
"the",
"request",
... | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_recovery_services_backup/lib/2016-12-01/generated/azure_mgmt_recovery_services_backup/protection_containers.rb#L298-L300 | train | Unregisters the specified container from the specified vault. | [
30522,
13366,
4895,
2890,
24063,
2121,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
11632,
1035,
2171,
1010,
7692,
1035,
2177,
1035,
2171,
1010,
8313,
1035,
2171,
1010,
11661,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
mongodb/mongoid | lib/mongoid/criteria.rb | Mongoid.Criteria.check_for_missing_documents! | def check_for_missing_documents!(result, ids)
if (result.size < ids.size) && Mongoid.raise_not_found_error
raise Errors::DocumentNotFound.new(klass, ids, ids - result.map(&:_id))
end
end | ruby | def check_for_missing_documents!(result, ids)
if (result.size < ids.size) && Mongoid.raise_not_found_error
raise Errors::DocumentNotFound.new(klass, ids, ids - result.map(&:_id))
end
end | [
"def",
"check_for_missing_documents!",
"(",
"result",
",",
"ids",
")",
"if",
"(",
"result",
".",
"size",
"<",
"ids",
".",
"size",
")",
"&&",
"Mongoid",
".",
"raise_not_found_error",
"raise",
"Errors",
"::",
"DocumentNotFound",
".",
"new",
"(",
"klass",
",",
... | Are documents in the query missing, and are we configured to raise an
error?
@api private
@example Check for missing documents.
criteria.check_for_missing_documents!([], [ 1 ])
@param [ Array<Document> ] result The result.
@param [ Array<Object> ] ids The ids.
@raise [ Errors::DocumentNotFound ] If none ar... | [
"Are",
"documents",
"in",
"the",
"query",
"missing",
"and",
"are",
"we",
"configured",
"to",
"raise",
"an",
"error?"
] | 56976e32610f4c2450882b0bfe14da099f0703f4 | https://github.com/mongodb/mongoid/blob/56976e32610f4c2450882b0bfe14da099f0703f4/lib/mongoid/criteria.rb#L459-L463 | train | Check for missing documents | [
30522,
13366,
4638,
1035,
2005,
1035,
4394,
1035,
5491,
999,
1006,
2765,
1010,
8909,
2015,
1007,
2065,
1006,
2765,
1012,
2946,
1026,
8909,
2015,
1012,
2946,
1007,
1004,
1004,
12256,
3995,
3593,
1012,
5333,
1035,
2025,
1035,
2179,
1035,
75... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | data/azure_key_vault/lib/2016-10-01/generated/azure_key_vault/key_vault_client.rb | Azure::KeyVault::V2016_10_01.KeyVaultClient.purge_deleted_certificate | def purge_deleted_certificate(vault_base_url, certificate_name, custom_headers:nil)
response = purge_deleted_certificate_async(vault_base_url, certificate_name, custom_headers:custom_headers).value!
nil
end | ruby | def purge_deleted_certificate(vault_base_url, certificate_name, custom_headers:nil)
response = purge_deleted_certificate_async(vault_base_url, certificate_name, custom_headers:custom_headers).value!
nil
end | [
"def",
"purge_deleted_certificate",
"(",
"vault_base_url",
",",
"certificate_name",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"purge_deleted_certificate_async",
"(",
"vault_base_url",
",",
"certificate_name",
",",
"custom_headers",
":custom_headers",
")",
"... | Permanently deletes the specified deleted certificate.
The PurgeDeletedCertificate operation performs an irreversible deletion of
the specified certificate, without possibility for recovery. The operation is
not available if the recovery level does not specify 'Purgeable'. This
operation requires the certificate/p... | [
"Permanently",
"deletes",
"the",
"specified",
"deleted",
"certificate",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_key_vault/lib/2016-10-01/generated/azure_key_vault/key_vault_client.rb#L6757-L6760 | train | Purges the deleted certificate. | [
30522,
13366,
24694,
1035,
17159,
1035,
8196,
1006,
11632,
1035,
2918,
1035,
24471,
2140,
1010,
8196,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
24694,
1035,
17159,
1035,
8196,
1035,
2004,
6038,
2278,
100... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
aws/aws-sdk-ruby | gems/aws-sdk-s3/lib/aws-sdk-s3/multipart_upload.rb | Aws::S3.MultipartUpload.abort | def abort(options = {})
options = options.merge(
bucket: @bucket_name,
key: @object_key,
upload_id: @id
)
resp = @client.abort_multipart_upload(options)
resp.data
end | ruby | def abort(options = {})
options = options.merge(
bucket: @bucket_name,
key: @object_key,
upload_id: @id
)
resp = @client.abort_multipart_upload(options)
resp.data
end | [
"def",
"abort",
"(",
"options",
"=",
"{",
"}",
")",
"options",
"=",
"options",
".",
"merge",
"(",
"bucket",
":",
"@bucket_name",
",",
"key",
":",
"@object_key",
",",
"upload_id",
":",
"@id",
")",
"resp",
"=",
"@client",
".",
"abort_multipart_upload",
"("... | @!group Actions
@example Request syntax with placeholder values
multipart_upload.abort({
request_payer: "requester", # accepts requester
})
@param [Hash] options ({})
@option options [String] :request_payer
Confirms that the requester knows that she or he will be charged for
the request. Bucket own... | [
"@!group",
"Actions",
"@example",
"Request",
"syntax",
"with",
"placeholder",
"values"
] | e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d | https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-s3/lib/aws-sdk-s3/multipart_upload.rb#L225-L233 | train | Aborts the current upload | [
30522,
13366,
11113,
11589,
1006,
7047,
1027,
1063,
1065,
1007,
7047,
1027,
7047,
1012,
13590,
1006,
13610,
1024,
1030,
13610,
1035,
2171,
1010,
3145,
1024,
1030,
4874,
1035,
3145,
1010,
2039,
11066,
1035,
8909,
1024,
1030,
8909,
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... |
samvera/hyrax | app/services/hyrax/user_stat_importer.rb | Hyrax.UserStatImporter.tally_results | def tally_results(current_stats, stat_name, total_stats)
current_stats.each do |stats|
# Exclude the stats from today since it will only be a partial day's worth of data
break if stats.date == Time.zone.today
date_key = stats.date.to_s
old_count = total_stats[date_key] ?... | ruby | def tally_results(current_stats, stat_name, total_stats)
current_stats.each do |stats|
# Exclude the stats from today since it will only be a partial day's worth of data
break if stats.date == Time.zone.today
date_key = stats.date.to_s
old_count = total_stats[date_key] ?... | [
"def",
"tally_results",
"(",
"current_stats",
",",
"stat_name",
",",
"total_stats",
")",
"current_stats",
".",
"each",
"do",
"|",
"stats",
"|",
"# Exclude the stats from today since it will only be a partial day's worth of data",
"break",
"if",
"stats",
".",
"date",
"==",... | For each date, add the view and download counts for this file to the view & download sub-totals for that day.
The resulting hash will look something like this: {"2014-11-30 00:00:00 UTC" => {:views=>2, :downloads=>5},
"2014-12-01 00:00:00 UTC" => {:views=>4, :downloads=>4}} | [
"For",
"each",
"date",
"add",
"the",
"view",
"and",
"download",
"counts",
"for",
"this",
"file",
"to",
"the",
"view",
"&",
"download",
"sub",
"-",
"totals",
"for",
"that",
"day",
".",
"The",
"resulting",
"hash",
"will",
"look",
"something",
"like",
"this... | e2b4f56e829a53b1f11296324736e9d5b8c9ee5f | https://github.com/samvera/hyrax/blob/e2b4f56e829a53b1f11296324736e9d5b8c9ee5f/app/services/hyrax/user_stat_importer.rb#L117-L131 | train | tally the results of the current stats | [
30522,
13366,
19552,
1035,
3463,
1006,
2783,
1035,
26319,
1010,
28093,
1035,
2171,
1010,
2561,
1035,
26319,
1007,
2783,
1035,
26319,
1012,
2169,
2079,
1064,
26319,
1064,
1001,
30524,
1012,
2651,
3058,
1035,
3145,
1027,
26319,
1012,
3058,
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... |
rails/spring | lib/spring/json.rb | Spring.OkJson.lex | def lex(s)
ts = []
while s.length > 0
typ, lexeme, val = tok(s)
if typ == nil
raise Error, "invalid character at #{s[0,10].inspect}"
end
if typ != :space
ts << [typ, lexeme, val]
end
s = s[lexeme.length..-1]
end
ts
end | ruby | def lex(s)
ts = []
while s.length > 0
typ, lexeme, val = tok(s)
if typ == nil
raise Error, "invalid character at #{s[0,10].inspect}"
end
if typ != :space
ts << [typ, lexeme, val]
end
s = s[lexeme.length..-1]
end
ts
end | [
"def",
"lex",
"(",
"s",
")",
"ts",
"=",
"[",
"]",
"while",
"s",
".",
"length",
">",
"0",
"typ",
",",
"lexeme",
",",
"val",
"=",
"tok",
"(",
"s",
")",
"if",
"typ",
"==",
"nil",
"raise",
"Error",
",",
"\"invalid character at #{s[0,10].inspect}\"",
"end... | Scans s and returns a list of json tokens,
excluding white space (as defined in RFC 4627). | [
"Scans",
"s",
"and",
"returns",
"a",
"list",
"of",
"json",
"tokens",
"excluding",
"white",
"space",
"(",
"as",
"defined",
"in",
"RFC",
"4627",
")",
"."
] | e7a36afa436fcc59b6945f68dbc08f1076e65585 | https://github.com/rails/spring/blob/e7a36afa436fcc59b6945f68dbc08f1076e65585/lib/spring/json.rb#L235-L248 | train | Lex a string into a list of tokens. | [
30522,
13366,
17244,
1006,
1055,
1007,
24529,
1027,
1031,
1033,
2096,
1055,
1012,
3091,
1028,
1014,
5939,
2361,
1010,
17244,
21382,
1010,
11748,
1027,
2000,
2243,
1006,
1055,
1007,
2065,
5939,
2361,
1027,
1027,
9152,
2140,
5333,
7561,
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... |
googleapis/google-cloud-ruby | google-cloud-storage/lib/google-cloud-storage.rb | Google.Cloud.storage | def storage scope: nil, retries: nil, timeout: nil
Google::Cloud.storage @project, @keyfile, scope: scope,
retries: (retries || @retries),
timeout: (timeout || @timeout)
end | ruby | def storage scope: nil, retries: nil, timeout: nil
Google::Cloud.storage @project, @keyfile, scope: scope,
retries: (retries || @retries),
timeout: (timeout || @timeout)
end | [
"def",
"storage",
"scope",
":",
"nil",
",",
"retries",
":",
"nil",
",",
"timeout",
":",
"nil",
"Google",
"::",
"Cloud",
".",
"storage",
"@project",
",",
"@keyfile",
",",
"scope",
":",
"scope",
",",
"retries",
":",
"(",
"retries",
"||",
"@retries",
")",... | Creates a new object for connecting to the Storage service.
Each call creates a new connection.
For more information on connecting to Google Cloud see the
{file:AUTHENTICATION.md Authentication Guide}.
@see https://cloud.google.com/storage/docs/authentication#oauth Storage
OAuth 2.0 Authentication
@param [St... | [
"Creates",
"a",
"new",
"object",
"for",
"connecting",
"to",
"the",
"Storage",
"service",
".",
"Each",
"call",
"creates",
"a",
"new",
"connection",
"."
] | 846c1a57250ac860ef4de1b54853a480ab2ff702 | https://github.com/googleapis/google-cloud-ruby/blob/846c1a57250ac860ef4de1b54853a480ab2ff702/google-cloud-storage/lib/google-cloud-storage.rb#L67-L71 | train | Create a new instance of the Storage class. | [
30522,
13366,
5527,
9531,
1024,
9152,
2140,
1010,
2128,
21011,
1024,
9152,
2140,
1010,
2051,
5833,
1024,
9152,
2140,
8224,
1024,
1024,
6112,
1012,
5527,
1030,
2622,
1010,
1030,
3145,
8873,
2571,
1010,
9531,
1024,
9531,
1010,
2128,
21011,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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_managed_applications/lib/2018-06-01/generated/azure_mgmt_managed_applications/applications.rb | Azure::ManagedApplications::Mgmt::V2018_06_01.Applications.begin_create_or_update_with_http_info | def begin_create_or_update_with_http_info(resource_group_name, application_name, parameters, custom_headers:nil)
begin_create_or_update_async(resource_group_name, application_name, parameters, custom_headers:custom_headers).value!
end | ruby | def begin_create_or_update_with_http_info(resource_group_name, application_name, parameters, custom_headers:nil)
begin_create_or_update_async(resource_group_name, application_name, parameters, custom_headers:custom_headers).value!
end | [
"def",
"begin_create_or_update_with_http_info",
"(",
"resource_group_name",
",",
"application_name",
",",
"parameters",
",",
"custom_headers",
":",
"nil",
")",
"begin_create_or_update_async",
"(",
"resource_group_name",
",",
"application_name",
",",
"parameters",
",",
"cust... | Creates a new managed application.
@param resource_group_name [String] The name of the resource group. The name
is case insensitive.
@param application_name [String] The name of the managed application.
@param parameters [Application] Parameters supplied to the create or update a
managed application.
@param cust... | [
"Creates",
"a",
"new",
"managed",
"application",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_managed_applications/lib/2018-06-01/generated/azure_mgmt_managed_applications/applications.rb#L926-L928 | train | Creates or updates an existing App Service Environment. | [
30522,
13366,
4088,
1035,
3443,
1035,
2030,
1035,
10651,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
4646,
1035,
2171,
1010,
11709,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
4088,
1035,
3443,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
lynndylanhurley/devise_token_auth | app/controllers/devise_token_auth/unlocks_controller.rb | DeviseTokenAuth.UnlocksController.create | def create
return render_create_error_missing_email unless resource_params[:email]
@email = get_case_insensitive_field_from_resource_params(:email)
@resource = find_resource(:email, @email)
if @resource
yield @resource if block_given?
@resource.send_unlock_instructions(
... | ruby | def create
return render_create_error_missing_email unless resource_params[:email]
@email = get_case_insensitive_field_from_resource_params(:email)
@resource = find_resource(:email, @email)
if @resource
yield @resource if block_given?
@resource.send_unlock_instructions(
... | [
"def",
"create",
"return",
"render_create_error_missing_email",
"unless",
"resource_params",
"[",
":email",
"]",
"@email",
"=",
"get_case_insensitive_field_from_resource_params",
"(",
":email",
")",
"@resource",
"=",
"find_resource",
"(",
":email",
",",
"@email",
")",
"... | this action is responsible for generating unlock tokens and
sending emails | [
"this",
"action",
"is",
"responsible",
"for",
"generating",
"unlock",
"tokens",
"and",
"sending",
"emails"
] | 0727ac77e5d1cf8c065faa81ca6ddbba9cc0fe44 | https://github.com/lynndylanhurley/devise_token_auth/blob/0727ac77e5d1cf8c065faa81ca6ddbba9cc0fe44/app/controllers/devise_token_auth/unlocks_controller.rb#L9-L32 | train | Create a new resource using the given email | [
30522,
13366,
3443,
2709,
17552,
1035,
3443,
1035,
7561,
1035,
4394,
1035,
10373,
4983,
7692,
1035,
11498,
5244,
1031,
1024,
10373,
1033,
1030,
30524,
1007,
2065,
1030,
7692,
10750,
1030,
7692,
2065,
3796,
1035,
2445,
1029,
1030,
7692,
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_authorization/lib/2015-07-01/generated/azure_mgmt_authorization/permissions.rb | Azure::Authorization::Mgmt::V2015_07_01.Permissions.list_for_resource_with_http_info | def list_for_resource_with_http_info(resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, custom_headers:nil)
list_for_resource_async(resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, custom_headers:custom_headers... | ruby | def list_for_resource_with_http_info(resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, custom_headers:nil)
list_for_resource_async(resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, custom_headers:custom_headers... | [
"def",
"list_for_resource_with_http_info",
"(",
"resource_group_name",
",",
"resource_provider_namespace",
",",
"parent_resource_path",
",",
"resource_type",
",",
"resource_name",
",",
"custom_headers",
":",
"nil",
")",
"list_for_resource_async",
"(",
"resource_group_name",
"... | Gets all permissions the caller has for a resource.
@param resource_group_name [String] The name of the resource group containing
the resource. The name is case insensitive.
@param resource_provider_namespace [String] The namespace of the resource
provider.
@param parent_resource_path [String] The parent resource... | [
"Gets",
"all",
"permissions",
"the",
"caller",
"has",
"for",
"a",
"resource",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_authorization/lib/2015-07-01/generated/azure_mgmt_authorization/permissions.rb#L156-L158 | train | Gets the list of resources under the resource provider. | [
30522,
13366,
2862,
1035,
2005,
1035,
7692,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
7692,
1035,
10802,
1035,
3415,
15327,
1010,
6687,
1035,
7692,
1035,
4130,
1010,
7692,
1035,
2828,
1010,
7692,
1035,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
rails/rails | actionview/lib/action_view/record_identifier.rb | ActionView.RecordIdentifier.record_key_for_dom_id | def record_key_for_dom_id(record) # :doc:
key = convert_to_model(record).to_key
key ? key.join(JOIN) : key
end | ruby | def record_key_for_dom_id(record) # :doc:
key = convert_to_model(record).to_key
key ? key.join(JOIN) : key
end | [
"def",
"record_key_for_dom_id",
"(",
"record",
")",
"# :doc:",
"key",
"=",
"convert_to_model",
"(",
"record",
")",
".",
"to_key",
"key",
"?",
"key",
".",
"join",
"(",
"JOIN",
")",
":",
"key",
"end"
] | Returns a string representation of the key attribute(s) that is suitable for use in an HTML DOM id.
This can be overwritten to customize the default generated string representation if desired.
If you need to read back a key from a dom_id in order to query for the underlying database record,
you should write a helper... | [
"Returns",
"a",
"string",
"representation",
"of",
"the",
"key",
"attribute",
"(",
"s",
")",
"that",
"is",
"suitable",
"for",
"use",
"in",
"an",
"HTML",
"DOM",
"id",
".",
"This",
"can",
"be",
"overwritten",
"to",
"customize",
"the",
"default",
"generated",
... | 85a8bc644be69908f05740a5886ec19cd3679df5 | https://github.com/rails/rails/blob/85a8bc644be69908f05740a5886ec19cd3679df5/actionview/lib/action_view/record_identifier.rb#L107-L110 | train | Returns the key for the dom id | [
30522,
13366,
2501,
1035,
3145,
1035,
2005,
1035,
14383,
1035,
8909,
1006,
2501,
1007,
1001,
1024,
9986,
1024,
3145,
1027,
10463,
1035,
2000,
1035,
2944,
1006,
2501,
1007,
1012,
2000,
1035,
3145,
3145,
1029,
3145,
1012,
3693,
1006,
3693,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_service_bus/lib/2015-08-01/generated/azure_mgmt_service_bus/queues.rb | Azure::ServiceBus::Mgmt::V2015_08_01.Queues.delete_with_http_info | def delete_with_http_info(resource_group_name, namespace_name, queue_name, custom_headers:nil)
delete_async(resource_group_name, namespace_name, queue_name, custom_headers:custom_headers).value!
end | ruby | def delete_with_http_info(resource_group_name, namespace_name, queue_name, custom_headers:nil)
delete_async(resource_group_name, namespace_name, queue_name, custom_headers:custom_headers).value!
end | [
"def",
"delete_with_http_info",
"(",
"resource_group_name",
",",
"namespace_name",
",",
"queue_name",
",",
"custom_headers",
":",
"nil",
")",
"delete_async",
"(",
"resource_group_name",
",",
"namespace_name",
",",
"queue_name",
",",
"custom_headers",
":custom_headers",
... | Deletes a queue from the specified namespace in a resource group.
@param resource_group_name [String] Name of the Resource group within the
Azure subscription.
@param namespace_name [String] The namespace name
@param queue_name [String] The queue name.
@param custom_headers [Hash{String => String}] A hash of cust... | [
"Deletes",
"a",
"queue",
"from",
"the",
"specified",
"namespace",
"in",
"a",
"resource",
"group",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_service_bus/lib/2015-08-01/generated/azure_mgmt_service_bus/queues.rb#L270-L272 | train | Deletes a queue. | [
30522,
13366,
3972,
12870,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
3415,
15327,
1035,
2171,
1010,
24240,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3972,
12870,
1035,
2004,
6038... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
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.deploy_service_package_to_node_with_http_info | def deploy_service_package_to_node_with_http_info(node_name, deploy_service_package_to_node_description, timeout:60, custom_headers:nil)
deploy_service_package_to_node_async(node_name, deploy_service_package_to_node_description, timeout:timeout, custom_headers:custom_headers).value!
end | ruby | def deploy_service_package_to_node_with_http_info(node_name, deploy_service_package_to_node_description, timeout:60, custom_headers:nil)
deploy_service_package_to_node_async(node_name, deploy_service_package_to_node_description, timeout:timeout, custom_headers:custom_headers).value!
end | [
"def",
"deploy_service_package_to_node_with_http_info",
"(",
"node_name",
",",
"deploy_service_package_to_node_description",
",",
"timeout",
":",
"60",
",",
"custom_headers",
":",
"nil",
")",
"deploy_service_package_to_node_async",
"(",
"node_name",
",",
"deploy_service_package... | Downloads all of the code packages associated with specified service manifest
on the specified node.
This API provides a way to download code packages including the container
images on a specific node outside of the normal application deployment and
upgrade path. This is useful for the large code packages and cont... | [
"Downloads",
"all",
"of",
"the",
"code",
"packages",
"associated",
"with",
"specified",
"service",
"manifest",
"on",
"the",
"specified",
"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#L16986-L16988 | train | Deployes a service package to a node. | [
30522,
13366,
21296,
1035,
2326,
1035,
7427,
1035,
2000,
1035,
13045,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
13045,
1035,
2171,
1010,
21296,
1035,
2326,
1035,
7427,
1035,
2000,
1035,
13045,
1035,
6412,
1010,
2051,
5833,
1024,
3438,
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... |
sds/scss-lint | lib/scss_lint/linter/property_sort_order.rb | SCSSLint.Linter::PropertySortOrder.compare_properties | def compare_properties(a, b)
if a[:property] == b[:property]
compare_by_vendor(a, b)
elsif @preferred_order
compare_by_order(a, b, @preferred_order)
else
a[:property] <=> b[:property]
end
end | ruby | def compare_properties(a, b)
if a[:property] == b[:property]
compare_by_vendor(a, b)
elsif @preferred_order
compare_by_order(a, b, @preferred_order)
else
a[:property] <=> b[:property]
end
end | [
"def",
"compare_properties",
"(",
"a",
",",
"b",
")",
"if",
"a",
"[",
":property",
"]",
"==",
"b",
"[",
":property",
"]",
"compare_by_vendor",
"(",
"a",
",",
"b",
")",
"elsif",
"@preferred_order",
"compare_by_order",
"(",
"a",
",",
"b",
",",
"@preferred_... | Compares two properties which can contain a vendor prefix. It allows for a
sort order like:
p {
border: ...
-moz-border-radius: ...
-o-border-radius: ...
-webkit-border-radius: ...
border-radius: ...
color: ...
}
...where vendor-prefixed properties come before the standard proper... | [
"Compares",
"two",
"properties",
"which",
"can",
"contain",
"a",
"vendor",
"prefix",
".",
"It",
"allows",
"for",
"a",
"sort",
"order",
"like",
":"
] | e99afe4ede041a431a06e585c12ce82f6ad50116 | https://github.com/sds/scss-lint/blob/e99afe4ede041a431a06e585c12ce82f6ad50116/lib/scss_lint/linter/property_sort_order.rb#L127-L135 | train | Compare two objects | [
30522,
13366,
12826,
1035,
5144,
1006,
1037,
1010,
1038,
1007,
2065,
1037,
1031,
1024,
3200,
1033,
1027,
1027,
30524,
1033,
1026,
1027,
1028,
1038,
1031,
1024,
3200,
1033,
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,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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.