repo stringclasses 237
values | path stringlengths 11 168 | func_name stringlengths 10 147 | original_string stringlengths 79 124k | language stringclasses 1
value | code stringlengths 79 124k | code_tokens listlengths 16 45.3k | docstring stringlengths 4 23.5k | docstring_tokens listlengths 1 452 | sha stringclasses 237
values | url stringlengths 95 268 | partition stringclasses 1
value | summary stringlengths 8 229 | input_ids listlengths 502 502 | token_type_ids listlengths 502 502 | attention_mask listlengths 502 502 | labels listlengths 502 502 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
puppetlabs/pdk | lib/pdk/answer_file.rb | PDK.AnswerFile.update! | def update!(new_answers = {})
unless new_answers.is_a?(Hash)
raise PDK::CLI::FatalError, _('Answer file can be updated only with a Hash')
end
answers.merge!(new_answers)
save_to_disk
end | ruby | def update!(new_answers = {})
unless new_answers.is_a?(Hash)
raise PDK::CLI::FatalError, _('Answer file can be updated only with a Hash')
end
answers.merge!(new_answers)
save_to_disk
end | [
"def",
"update!",
"(",
"new_answers",
"=",
"{",
"}",
")",
"unless",
"new_answers",
".",
"is_a?",
"(",
"Hash",
")",
"raise",
"PDK",
"::",
"CLI",
"::",
"FatalError",
",",
"_",
"(",
"'Answer file can be updated only with a Hash'",
")",
"end",
"answers",
".",
"m... | Update the stored answers in memory and then save them to disk.
@param new_answers [Hash{String => Object}] The new questions and answers
to be merged into the existing answers.
@raise [PDK::CLI::FatalError] if the new answers are not provided as
a Hash.
@raise (see #save_to_disk) | [
"Update",
"the",
"stored",
"answers",
"in",
"memory",
"and",
"then",
"save",
"them",
"to",
"disk",
"."
] | 0d864aff62ffef04b5104addf399d0476afd71e7 | https://github.com/puppetlabs/pdk/blob/0d864aff62ffef04b5104addf399d0476afd71e7/lib/pdk/answer_file.rb#L57-L65 | train | Updates the answers hash | [
30522,
13366,
10651,
999,
1006,
2047,
1035,
6998,
1027,
1063,
1065,
1007,
4983,
2047,
1035,
6998,
1012,
2003,
1035,
1037,
1029,
1006,
23325,
1007,
5333,
22851,
2243,
1024,
1024,
18856,
2072,
1024,
1024,
10611,
2121,
29165,
1010,
1035,
1006,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
aws/aws-sdk-ruby | gems/aws-sdk-sns/lib/aws-sdk-sns/resource.rb | Aws::SNS.Resource.create_topic | def create_topic(options = {})
resp = @client.create_topic(options)
Topic.new(
arn: resp.data.topic_arn,
client: @client
)
end | ruby | def create_topic(options = {})
resp = @client.create_topic(options)
Topic.new(
arn: resp.data.topic_arn,
client: @client
)
end | [
"def",
"create_topic",
"(",
"options",
"=",
"{",
"}",
")",
"resp",
"=",
"@client",
".",
"create_topic",
"(",
"options",
")",
"Topic",
".",
"new",
"(",
"arn",
":",
"resp",
".",
"data",
".",
"topic_arn",
",",
"client",
":",
"@client",
")",
"end"
] | @example Request syntax with placeholder values
topic = sns.create_topic({
name: "topicName", # required
attributes: {
"attributeName" => "attributeValue",
},
tags: [
{
key: "TagKey", # required
value: "TagValue", # required
},
],
})
@param [Hash] ... | [
"@example",
"Request",
"syntax",
"with",
"placeholder",
"values"
] | e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d | https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-sns/lib/aws-sdk-sns/resource.rb#L110-L116 | train | Create a topic | [
30522,
13366,
3443,
1035,
8476,
1006,
7047,
1027,
1063,
1065,
1007,
24501,
2361,
1027,
1030,
7396,
1012,
3443,
1035,
8476,
1006,
7047,
1007,
8476,
1012,
2047,
1006,
12098,
2078,
1024,
24501,
2361,
1012,
2951,
1012,
8476,
1035,
12098,
2078,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_container_registry/lib/2017-06-01-preview/generated/azure_mgmt_container_registry/replications.rb | Azure::ContainerRegistry::Mgmt::V2017_06_01_preview.Replications.create | def create(resource_group_name, registry_name, replication_name, replication, custom_headers:nil)
response = create_async(resource_group_name, registry_name, replication_name, replication, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def create(resource_group_name, registry_name, replication_name, replication, custom_headers:nil)
response = create_async(resource_group_name, registry_name, replication_name, replication, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"create",
"(",
"resource_group_name",
",",
"registry_name",
",",
"replication_name",
",",
"replication",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"create_async",
"(",
"resource_group_name",
",",
"registry_name",
",",
"replication_name",
",",
"... | Creates a replication for a container registry with the specified parameters.
@param resource_group_name [String] The name of the resource group to which
the container registry belongs.
@param registry_name [String] The name of the container registry.
@param replication_name [String] The name of the replication.
... | [
"Creates",
"a",
"replication",
"for",
"a",
"container",
"registry",
"with",
"the",
"specified",
"parameters",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_container_registry/lib/2017-06-01-preview/generated/azure_mgmt_container_registry/replications.rb#L142-L145 | train | Creates a new cluster replication. | [
30522,
13366,
3443,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
15584,
1035,
2171,
1010,
21647,
1035,
2171,
1010,
21647,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
3443,
1035,
2004,
6038,
2278,
1006,
7692,
1035,
2177,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
sds/overcommit | lib/overcommit/configuration.rb | Overcommit.Configuration.all_plugin_hook_configs | def all_plugin_hook_configs
hook_configs = {}
Overcommit::Utils.supported_hook_types.each do |hook_type|
hook_type_class_name = Overcommit::Utils.camel_case(hook_type)
directory = File.join(plugin_directory, hook_type.tr('-', '_'))
plugin_paths = Dir[File.join(directory, '*.rb')].s... | ruby | def all_plugin_hook_configs
hook_configs = {}
Overcommit::Utils.supported_hook_types.each do |hook_type|
hook_type_class_name = Overcommit::Utils.camel_case(hook_type)
directory = File.join(plugin_directory, hook_type.tr('-', '_'))
plugin_paths = Dir[File.join(directory, '*.rb')].s... | [
"def",
"all_plugin_hook_configs",
"hook_configs",
"=",
"{",
"}",
"Overcommit",
"::",
"Utils",
".",
"supported_hook_types",
".",
"each",
"do",
"|",
"hook_type",
"|",
"hook_type_class_name",
"=",
"Overcommit",
"::",
"Utils",
".",
"camel_case",
"(",
"hook_type",
")",... | Returns configuration for all plugin hooks in each hook type.
@return [Hash] | [
"Returns",
"configuration",
"for",
"all",
"plugin",
"hooks",
"in",
"each",
"hook",
"type",
"."
] | 35d60adb41da942178b789560968e3ad030b0ac7 | https://github.com/sds/overcommit/blob/35d60adb41da942178b789560968e3ad030b0ac7/lib/overcommit/configuration.rb#L91-L112 | train | Returns a Hash of all hook configs | [
30522,
13366,
2035,
1035,
13354,
2378,
1035,
8103,
1035,
9530,
8873,
5620,
8103,
1035,
9530,
8873,
5620,
1027,
1063,
1065,
2058,
9006,
22930,
1024,
1024,
21183,
12146,
1012,
3569,
1035,
8103,
1035,
4127,
1012,
2169,
2079,
1064,
8103,
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... |
troessner/reek | samples/smelly_source/inline.rb | Inline.C.build | def build
so_name = self.so_name
so_exists = File.file? so_name
unless so_exists and File.mtime(rb_file) < File.mtime(so_name) then
unless File.directory? Inline.directory then
warn "NOTE: creating #{Inline.directory} for RubyInline" if $DEBUG
Dir.mkdir Inline.directory, 0... | ruby | def build
so_name = self.so_name
so_exists = File.file? so_name
unless so_exists and File.mtime(rb_file) < File.mtime(so_name) then
unless File.directory? Inline.directory then
warn "NOTE: creating #{Inline.directory} for RubyInline" if $DEBUG
Dir.mkdir Inline.directory, 0... | [
"def",
"build",
"so_name",
"=",
"self",
".",
"so_name",
"so_exists",
"=",
"File",
".",
"file?",
"so_name",
"unless",
"so_exists",
"and",
"File",
".",
"mtime",
"(",
"rb_file",
")",
"<",
"File",
".",
"mtime",
"(",
"so_name",
")",
"then",
"unless",
"File",
... | Builds the source file, if needed, and attempts to compile it. | [
"Builds",
"the",
"source",
"file",
"if",
"needed",
"and",
"attempts",
"to",
"compile",
"it",
"."
] | 8c6b5c0c6228a6981ab48543457889f9ea984054 | https://github.com/troessner/reek/blob/8c6b5c0c6228a6981ab48543457889f9ea984054/samples/smelly_source/inline.rb#L338-L474 | train | Build the RubyInline object | [
30522,
13366,
3857,
2061,
1035,
2171,
1027,
2969,
1012,
2061,
1035,
2171,
2061,
1035,
6526,
1027,
5371,
1012,
5371,
1029,
2061,
1035,
2171,
4983,
2061,
1035,
6526,
1998,
5371,
1012,
11047,
14428,
1006,
21144,
1035,
5371,
1007,
1026,
5371,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
puppetlabs/pdk | lib/pdk/util.rb | PDK.Util.module_root | def module_root
metadata_path = find_upwards('metadata.json')
if metadata_path
File.dirname(metadata_path)
elsif in_module_root?
Dir.pwd
else
nil
end
end | ruby | def module_root
metadata_path = find_upwards('metadata.json')
if metadata_path
File.dirname(metadata_path)
elsif in_module_root?
Dir.pwd
else
nil
end
end | [
"def",
"module_root",
"metadata_path",
"=",
"find_upwards",
"(",
"'metadata.json'",
")",
"if",
"metadata_path",
"File",
".",
"dirname",
"(",
"metadata_path",
")",
"elsif",
"in_module_root?",
"Dir",
".",
"pwd",
"else",
"nil",
"end",
"end"
] | Returns path to the root of the module being worked on.
@return [String, nil] Fully qualified base path to module, or nil if
the current working dir does not appear to be within a module. | [
"Returns",
"path",
"to",
"the",
"root",
"of",
"the",
"module",
"being",
"worked",
"on",
"."
] | 0d864aff62ffef04b5104addf399d0476afd71e7 | https://github.com/puppetlabs/pdk/blob/0d864aff62ffef04b5104addf399d0476afd71e7/lib/pdk/util.rb#L113-L122 | train | Returns the root of the module. | [
30522,
13366,
11336,
1035,
7117,
27425,
1035,
4130,
1027,
2424,
1035,
14873,
1006,
1005,
27425,
1012,
1046,
3385,
1005,
1007,
2065,
27425,
1035,
4130,
5371,
1012,
16101,
18442,
1006,
27425,
1035,
4130,
1007,
3449,
5332,
2546,
1999,
1035,
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_cognitive_services/lib/2017-04-18/generated/azure_mgmt_cognitive_services/check_sku_availability.rb | Azure::CognitiveServices::Mgmt::V2017_04_18.CheckSkuAvailability.list_with_http_info | def list_with_http_info(location, skus, kind, type, custom_headers:nil)
list_async(location, skus, kind, type, custom_headers:custom_headers).value!
end | ruby | def list_with_http_info(location, skus, kind, type, custom_headers:nil)
list_async(location, skus, kind, type, custom_headers:custom_headers).value!
end | [
"def",
"list_with_http_info",
"(",
"location",
",",
"skus",
",",
"kind",
",",
"type",
",",
"custom_headers",
":",
"nil",
")",
"list_async",
"(",
"location",
",",
"skus",
",",
"kind",
",",
"type",
",",
"custom_headers",
":custom_headers",
")",
".",
"value!",
... | Check available SKUs.
@param location [String] Resource location.
@param skus [Array<String>] The SKU of the resource.
@param kind [String] The Kind of the resource.
@param type [String] The Type of the resource.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HT... | [
"Check",
"available",
"SKUs",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_cognitive_services/lib/2017-04-18/generated/azure_mgmt_cognitive_services/check_sku_availability.rb#L53-L55 | train | Gets the list of the available VulnerabilityAssessment documents. | [
30522,
13366,
2862,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
3295,
1010,
15315,
2271,
1010,
2785,
1010,
2828,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
2862,
1035,
2004,
6038,
2278,
1006,
3295,
1010,
15315,
2271,
1010,
2785,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
aws/aws-sdk-ruby | gems/aws-sdk-ec2/lib/aws-sdk-ec2/resource.rb | Aws::EC2.Resource.register_image | def register_image(options = {})
resp = @client.register_image(options)
Image.new(
id: resp.data.image_id,
client: @client
)
end | ruby | def register_image(options = {})
resp = @client.register_image(options)
Image.new(
id: resp.data.image_id,
client: @client
)
end | [
"def",
"register_image",
"(",
"options",
"=",
"{",
"}",
")",
"resp",
"=",
"@client",
".",
"register_image",
"(",
"options",
")",
"Image",
".",
"new",
"(",
"id",
":",
"resp",
".",
"data",
".",
"image_id",
",",
"client",
":",
"@client",
")",
"end"
] | @example Request syntax with placeholder values
image = ec2.register_image({
image_location: "String",
architecture: "i386", # accepts i386, x86_64, arm64
block_device_mappings: [
{
device_name: "String",
virtual_name: "String",
ebs: {
delete_on_terminatio... | [
"@example",
"Request",
"syntax",
"with",
"placeholder",
"values"
] | e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d | https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-ec2/lib/aws-sdk-ec2/resource.rb#L1186-L1192 | train | Register an image with the specified options. | [
30522,
13366,
4236,
1035,
3746,
1006,
7047,
1027,
1063,
1065,
1007,
24501,
2361,
1027,
1030,
7396,
1012,
4236,
1035,
3746,
1006,
7047,
1007,
3746,
1012,
2047,
1006,
8909,
1024,
24501,
2361,
1012,
2951,
1012,
3746,
1035,
8909,
1010,
7396,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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_batch/lib/2017-09-01/generated/azure_mgmt_batch/certificate_operations.rb | Azure::Batch::Mgmt::V2017_09_01.CertificateOperations.cancel_deletion | def cancel_deletion(resource_group_name, account_name, certificate_name, custom_headers:nil)
response = cancel_deletion_async(resource_group_name, account_name, certificate_name, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def cancel_deletion(resource_group_name, account_name, certificate_name, custom_headers:nil)
response = cancel_deletion_async(resource_group_name, account_name, certificate_name, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"cancel_deletion",
"(",
"resource_group_name",
",",
"account_name",
",",
"certificate_name",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"cancel_deletion_async",
"(",
"resource_group_name",
",",
"account_name",
",",
"certificate_name",
",",
"custom_h... | Cancels a failed deletion of a certificate from the specified account.
If you try to delete a certificate that is being used by a pool or compute
node, the status of the certificate changes to deleteFailed. If you decide
that you want to continue using the certificate, you can use this operation
to set the status ... | [
"Cancels",
"a",
"failed",
"deletion",
"of",
"a",
"certificate",
"from",
"the",
"specified",
"account",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_batch/lib/2017-09-01/generated/azure_mgmt_batch/certificate_operations.rb#L528-L531 | train | Cancels deletion of a certificate. | [
30522,
13366,
17542,
1035,
3972,
20624,
2239,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
4070,
1035,
2171,
1010,
8196,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
17542,
1035,
3972,
20624,
2239,
1035,
2004,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/api_management_services.rb | Azure::ApiManagement::Mgmt::V2016_10_10.ApiManagementServices.begin_update_with_http_info | def begin_update_with_http_info(resource_group_name, service_name, parameters, custom_headers:nil)
begin_update_async(resource_group_name, service_name, parameters, custom_headers:custom_headers).value!
end | ruby | def begin_update_with_http_info(resource_group_name, service_name, parameters, custom_headers:nil)
begin_update_async(resource_group_name, service_name, parameters, custom_headers:custom_headers).value!
end | [
"def",
"begin_update_with_http_info",
"(",
"resource_group_name",
",",
"service_name",
",",
"parameters",
",",
"custom_headers",
":",
"nil",
")",
"begin_update_async",
"(",
"resource_group_name",
",",
"service_name",
",",
"parameters",
",",
"custom_headers",
":custom_head... | Updates an existing API Management service.
@param resource_group_name [String] The name of the resource group.
@param service_name [String] The name of the API Management service.
@param parameters [ApiManagementServiceUpdateParameters] Parameters supplied
to the CreateOrUpdate API Management service operation.
... | [
"Updates",
"an",
"existing",
"API",
"Management",
"service",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/api_management_services.rb#L1474-L1476 | train | Updates a service s covering specification. | [
30522,
13366,
4088,
1035,
10651,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2326,
1035,
2171,
1010,
11709,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
4088,
1035,
10651,
1035,
2004,
6038,
2278,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
watir/watir | lib/watir/cookies.rb | Watir.Cookies.to_a | def to_a
@control.all_cookies.map do |e|
e.merge(expires: e[:expires] ? e[:expires].to_time : nil)
end
end | ruby | def to_a
@control.all_cookies.map do |e|
e.merge(expires: e[:expires] ? e[:expires].to_time : nil)
end
end | [
"def",
"to_a",
"@control",
".",
"all_cookies",
".",
"map",
"do",
"|",
"e",
"|",
"e",
".",
"merge",
"(",
"expires",
":",
"e",
"[",
":expires",
"]",
"?",
"e",
"[",
":expires",
"]",
".",
"to_time",
":",
"nil",
")",
"end",
"end"
] | Returns array of cookies.
@example
browser.cookies.to_a
#=> {:name=>"my_session", :value=>"BAh7B0kiD3Nlc3Npb25faWQGOgZFRkk", :domain=>"mysite.com"}
@return [Array<Hash>] | [
"Returns",
"array",
"of",
"cookies",
"."
] | 2d8db09811c6221ae401b85b2f61f5fa66e463a3 | https://github.com/watir/watir/blob/2d8db09811c6221ae401b85b2f61f5fa66e463a3/lib/watir/cookies.rb#L19-L23 | train | Returns a list of all the cookies that are in the cache | [
30522,
13366,
2000,
1035,
1037,
1030,
2491,
1012,
2035,
1035,
16324,
1012,
4949,
2079,
1064,
1041,
1064,
1041,
1012,
13590,
1006,
4654,
20781,
2015,
1024,
1041,
1031,
1024,
4654,
20781,
2015,
1033,
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,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/selector_visitor.rb | SCSSLint.SelectorVisitor.selector_node_name | def selector_node_name(node)
if node.class.class_variable_defined?(:@@snake_case_name)
return node.class.class_variable_get(:@@snake_case_name)
end
rindex = node.class.name.rindex('::')
name = node.class.name[(rindex + 2)..-1]
name.gsub!(/([A-Z]+)([A-Z][a-z])/, '\1_\2')
name... | ruby | def selector_node_name(node)
if node.class.class_variable_defined?(:@@snake_case_name)
return node.class.class_variable_get(:@@snake_case_name)
end
rindex = node.class.name.rindex('::')
name = node.class.name[(rindex + 2)..-1]
name.gsub!(/([A-Z]+)([A-Z][a-z])/, '\1_\2')
name... | [
"def",
"selector_node_name",
"(",
"node",
")",
"if",
"node",
".",
"class",
".",
"class_variable_defined?",
"(",
":@@snake_case_name",
")",
"return",
"node",
".",
"class",
".",
"class_variable_get",
"(",
":@@snake_case_name",
")",
"end",
"rindex",
"=",
"node",
".... | The class name of a node, in snake_case form, e.g.
`Sass::Selector::SimpleSequence` -> `simple_sequence`.
The name is memoized as a class variable on the node itself. | [
"The",
"class",
"name",
"of",
"a",
"node",
"in",
"snake_case",
"form",
"e",
".",
"g",
".",
"Sass",
"::",
"Selector",
"::",
"SimpleSequence",
"-",
">",
"simple_sequence",
"."
] | e99afe4ede041a431a06e585c12ce82f6ad50116 | https://github.com/sds/scss-lint/blob/e99afe4ede041a431a06e585c12ce82f6ad50116/lib/scss_lint/selector_visitor.rb#L29-L40 | train | Returns the name of the given node. | [
30522,
13366,
27000,
1035,
13045,
1035,
2171,
1006,
13045,
1007,
2065,
13045,
1012,
2465,
1012,
2465,
1035,
8023,
1035,
4225,
1029,
1006,
1024,
1030,
1030,
7488,
1035,
2553,
1035,
2171,
1007,
2709,
13045,
1012,
2465,
1012,
2465,
1035,
8023,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
cloudfoundry/bosh | src/bosh-director/lib/bosh/director/nats_rpc.rb | Bosh::Director.NatsRpc.subscribe_inbox | def subscribe_inbox
# double-check locking to reduce synchronization
if @subject_id.nil?
# nats lazy-load needs to be outside the synchronized block
client = nats
@lock.synchronize do
if @subject_id.nil?
@subject_id = client.subscribe("#{@inbox_name}.>") do |mes... | ruby | def subscribe_inbox
# double-check locking to reduce synchronization
if @subject_id.nil?
# nats lazy-load needs to be outside the synchronized block
client = nats
@lock.synchronize do
if @subject_id.nil?
@subject_id = client.subscribe("#{@inbox_name}.>") do |mes... | [
"def",
"subscribe_inbox",
"# double-check locking to reduce synchronization",
"if",
"@subject_id",
".",
"nil?",
"# nats lazy-load needs to be outside the synchronized block",
"client",
"=",
"nats",
"@lock",
".",
"synchronize",
"do",
"if",
"@subject_id",
".",
"nil?",
"@subject_i... | subscribe to an inbox, if not already subscribed | [
"subscribe",
"to",
"an",
"inbox",
"if",
"not",
"already",
"subscribed"
] | 2eaa7100879ddd20cd909cd698514746195e28b7 | https://github.com/cloudfoundry/bosh/blob/2eaa7100879ddd20cd909cd698514746195e28b7/src/bosh-director/lib/bosh/director/nats_rpc.rb#L114-L128 | train | Subscribe to the inbox | [
30522,
13366,
4942,
29234,
1035,
1999,
8758,
1001,
3313,
1011,
4638,
14889,
2000,
5547,
26351,
8093,
10698,
9276,
2065,
1030,
3395,
1035,
8909,
1012,
9152,
2140,
1029,
1001,
14085,
2015,
13971,
1011,
7170,
3791,
2000,
2022,
2648,
1996,
2554... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | data/azure_cognitiveservices_luisauthoring/lib/2.0/generated/azure_cognitiveservices_luisauthoring/model.rb | Azure::CognitiveServices::LuisAuthoring::V2_0.Model.delete_custom_entity_role_with_http_info | def delete_custom_entity_role_with_http_info(app_id, version_id, entity_id, role_id, custom_headers:nil)
delete_custom_entity_role_async(app_id, version_id, entity_id, role_id, custom_headers:custom_headers).value!
end | ruby | def delete_custom_entity_role_with_http_info(app_id, version_id, entity_id, role_id, custom_headers:nil)
delete_custom_entity_role_async(app_id, version_id, entity_id, role_id, custom_headers:custom_headers).value!
end | [
"def",
"delete_custom_entity_role_with_http_info",
"(",
"app_id",
",",
"version_id",
",",
"entity_id",
",",
"role_id",
",",
"custom_headers",
":",
"nil",
")",
"delete_custom_entity_role_async",
"(",
"app_id",
",",
"version_id",
",",
"entity_id",
",",
"role_id",
",",
... | Delete a role for a given prebuilt entity in a version of the application.
@param app_id The application ID.
@param version_id [String] The version ID.
@param entity_id The entity ID.
@param role_id The entity role Id.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to ... | [
"Delete",
"a",
"role",
"for",
"a",
"given",
"prebuilt",
"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#L11196-L11198 | train | Deletes a role from an existing entity. | [
30522,
13366,
3972,
12870,
1035,
7661,
1035,
9178,
1035,
2535,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
10439,
1035,
8909,
1010,
2544,
1035,
8909,
1010,
9178,
1035,
8909,
1010,
2535,
1035,
8909,
1010,
7661,
1035,
20346,
30524,
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... |
alexreisner/geocoder | lib/geocoder/calculations.rb | Geocoder.Calculations.endpoint | def endpoint(start, heading, distance, options = {})
radius = earth_radius(options[:units])
start = extract_coordinates(start)
# convert degrees to radians
start = to_radians(start)
lat = start[0]
lon = start[1]
heading = to_radians(heading)
distance = distance.to_f
... | ruby | def endpoint(start, heading, distance, options = {})
radius = earth_radius(options[:units])
start = extract_coordinates(start)
# convert degrees to radians
start = to_radians(start)
lat = start[0]
lon = start[1]
heading = to_radians(heading)
distance = distance.to_f
... | [
"def",
"endpoint",
"(",
"start",
",",
"heading",
",",
"distance",
",",
"options",
"=",
"{",
"}",
")",
"radius",
"=",
"earth_radius",
"(",
"options",
"[",
":units",
"]",
")",
"start",
"=",
"extract_coordinates",
"(",
"start",
")",
"# convert degrees to radian... | Given a start point, heading (in degrees), and distance, provides
an endpoint.
The starting point is given in the same way that points are given to all
Geocoder methods that accept points as arguments. It can be:
* an array of coordinates ([lat,lon])
* a geocodable address (string)
* a geocoded object (one which... | [
"Given",
"a",
"start",
"point",
"heading",
"(",
"in",
"degrees",
")",
"and",
"distance",
"provides",
"an",
"endpoint",
".",
"The",
"starting",
"point",
"is",
"given",
"in",
"the",
"same",
"way",
"that",
"points",
"are",
"given",
"to",
"all",
"Geocoder",
... | e087dc2759264ee6f307b926bb2de4ec2406859e | https://github.com/alexreisner/geocoder/blob/e087dc2759264ee6f307b926bb2de4ec2406859e/lib/geocoder/calculations.rb#L269-L289 | train | Returns the endpoint of the given start and heading | [
30522,
13366,
2203,
8400,
1006,
2707,
1010,
5825,
1010,
3292,
1010,
7047,
1027,
1063,
1065,
1007,
12177,
1027,
3011,
1035,
12177,
1006,
7047,
1031,
1024,
3197,
1033,
1007,
2707,
1027,
14817,
1035,
12093,
1006,
2707,
1007,
1001,
10463,
5445,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
rails/rails | railties/lib/rails/source_annotation_extractor.rb | Rails.SourceAnnotationExtractor.find | def find(dirs)
dirs.inject({}) { |h, dir| h.update(find_in(dir)) }
end | ruby | def find(dirs)
dirs.inject({}) { |h, dir| h.update(find_in(dir)) }
end | [
"def",
"find",
"(",
"dirs",
")",
"dirs",
".",
"inject",
"(",
"{",
"}",
")",
"{",
"|",
"h",
",",
"dir",
"|",
"h",
".",
"update",
"(",
"find_in",
"(",
"dir",
")",
")",
"}",
"end"
] | Returns a hash that maps filenames under +dirs+ (recursively) to arrays
with their annotations. | [
"Returns",
"a",
"hash",
"that",
"maps",
"filenames",
"under",
"+",
"dirs",
"+",
"(",
"recursively",
")",
"to",
"arrays",
"with",
"their",
"annotations",
"."
] | 85a8bc644be69908f05740a5886ec19cd3679df5 | https://github.com/rails/rails/blob/85a8bc644be69908f05740a5886ec19cd3679df5/railties/lib/rails/source_annotation_extractor.rb#L105-L107 | train | Find the first file in the given directories. | [
30522,
13366,
2424,
1006,
16101,
2015,
1007,
16101,
2015,
1012,
1999,
20614,
1006,
1063,
1065,
1007,
1063,
1064,
1044,
1010,
16101,
1064,
1044,
1012,
10651,
1006,
2424,
1035,
1999,
1006,
16101,
1007,
1007,
1065,
2203,
102,
0,
0,
0,
0,
0... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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.update_worker_pool_with_http_info | def update_worker_pool_with_http_info(resource_group_name, name, worker_pool_name, worker_pool_envelope, custom_headers:nil)
update_worker_pool_async(resource_group_name, name, worker_pool_name, worker_pool_envelope, custom_headers:custom_headers).value!
end | ruby | def update_worker_pool_with_http_info(resource_group_name, name, worker_pool_name, worker_pool_envelope, custom_headers:nil)
update_worker_pool_async(resource_group_name, name, worker_pool_name, worker_pool_envelope, custom_headers:custom_headers).value!
end | [
"def",
"update_worker_pool_with_http_info",
"(",
"resource_group_name",
",",
"name",
",",
"worker_pool_name",
",",
"worker_pool_envelope",
",",
"custom_headers",
":",
"nil",
")",
"update_worker_pool_async",
"(",
"resource_group_name",
",",
"name",
",",
"worker_pool_name",
... | Create or update a worker pool.
Create or update a worker pool.
@param resource_group_name [String] Name of the resource group to which the
resource belongs.
@param name [String] Name of the App Service Environment.
@param worker_pool_name [String] Name of the worker pool.
@param worker_pool_envelope [WorkerPoo... | [
"Create",
"or",
"update",
"a",
"worker",
"pool",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_web/lib/2018-02-01/generated/azure_mgmt_web/app_service_environments.rb#L3332-L3334 | train | Updates a worker pool. | [
30522,
13366,
10651,
1035,
7309,
1035,
4770,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2171,
1010,
7309,
1035,
4770,
1035,
2171,
1010,
7309,
1035,
4770,
1035,
11255,
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... |
vcr/vcr | lib/vcr/configuration.rb | VCR.Configuration.around_http_request | def around_http_request(*filters, &block)
unless VCR.fibers_available?
raise Errors::NotSupportedError.new \
"VCR::Configuration#around_http_request requires fibers, " +
"which are not available on your ruby intepreter."
end
fibers = {}
fiber_errors = {}
hook_a... | ruby | def around_http_request(*filters, &block)
unless VCR.fibers_available?
raise Errors::NotSupportedError.new \
"VCR::Configuration#around_http_request requires fibers, " +
"which are not available on your ruby intepreter."
end
fibers = {}
fiber_errors = {}
hook_a... | [
"def",
"around_http_request",
"(",
"*",
"filters",
",",
"&",
"block",
")",
"unless",
"VCR",
".",
"fibers_available?",
"raise",
"Errors",
"::",
"NotSupportedError",
".",
"new",
"\"VCR::Configuration#around_http_request requires fibers, \"",
"+",
"\"which are not available on... | Adds a callback that will be executed around each HTTP request.
@example
VCR.configure do |c|
c.around_http_request(lambda {|r| r.uri =~ /api.geocoder.com/}) do |request|
# extract an address like "1700 E Pine St, Seattle, WA"
# from a query like "address=1700+E+Pine+St%2C+Seattle%2C+WA"
addre... | [
"Adds",
"a",
"callback",
"that",
"will",
"be",
"executed",
"around",
"each",
"HTTP",
"request",
"."
] | 945ca793a4b25c7ffc406b9fd7da1e94cbbb8141 | https://github.com/vcr/vcr/blob/945ca793a4b25c7ffc406b9fd7da1e94cbbb8141/lib/vcr/configuration.rb#L395-L414 | train | A wrapper around the HTTP request. | [
30522,
13366,
2105,
1035,
8299,
1035,
5227,
1006,
1008,
17736,
1010,
1004,
3796,
1007,
4983,
18315,
2099,
1012,
16662,
1035,
2800,
1029,
5333,
10697,
1024,
1024,
2025,
6342,
9397,
15613,
2121,
29165,
1012,
2047,
1032,
1000,
18315,
2099,
102... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_compute/lib/2018-09-30/generated/azure_mgmt_compute/disks.rb | Azure::Compute::Mgmt::V2018_09_30.Disks.create_or_update_async | def create_or_update_async(resource_group_name, disk_name, disk, custom_headers:nil)
# Send request
promise = begin_create_or_update_async(resource_group_name, disk_name, disk, custom_headers:custom_headers)
promise = promise.then do |response|
# Defining deserialization method.
deser... | ruby | def create_or_update_async(resource_group_name, disk_name, disk, custom_headers:nil)
# Send request
promise = begin_create_or_update_async(resource_group_name, disk_name, disk, custom_headers:custom_headers)
promise = promise.then do |response|
# Defining deserialization method.
deser... | [
"def",
"create_or_update_async",
"(",
"resource_group_name",
",",
"disk_name",
",",
"disk",
",",
"custom_headers",
":",
"nil",
")",
"# Send request",
"promise",
"=",
"begin_create_or_update_async",
"(",
"resource_group_name",
",",
"disk_name",
",",
"disk",
",",
"custo... | @param resource_group_name [String] The name of the resource group.
@param disk_name [String] The name of the managed disk that is being created.
The name can't be changed after the disk is created. Supported characters for
the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters.
@param disk [Dis... | [
"@param",
"resource_group_name",
"[",
"String",
"]",
"The",
"name",
"of",
"the",
"resource",
"group",
".",
"@param",
"disk_name",
"[",
"String",
"]",
"The",
"name",
"of",
"the",
"managed",
"disk",
"that",
"is",
"being",
"created",
".",
"The",
"name",
"can"... | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_compute/lib/2018-09-30/generated/azure_mgmt_compute/disks.rb#L56-L72 | train | Creates or updates a disk in the specified resource group. | [
30522,
13366,
3443,
1035,
2030,
1035,
10651,
1035,
2004,
6038,
2278,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
9785,
1035,
2171,
1010,
9785,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
1001,
4604,
5227,
4872,
1027,
4088,
1035,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
puppetlabs/puppet | lib/puppet/functions.rb | Puppet::Functions.DispatcherBuilder.block_param | def block_param(*type_and_name)
case type_and_name.size
when 0
type = @all_callables
name = :block
when 1
type = @all_callables
name = type_and_name[0]
when 2
type, name = type_and_name
type = Puppet::Pops::Types::TypeParser.singleton.parse(type, l... | ruby | def block_param(*type_and_name)
case type_and_name.size
when 0
type = @all_callables
name = :block
when 1
type = @all_callables
name = type_and_name[0]
when 2
type, name = type_and_name
type = Puppet::Pops::Types::TypeParser.singleton.parse(type, l... | [
"def",
"block_param",
"(",
"*",
"type_and_name",
")",
"case",
"type_and_name",
".",
"size",
"when",
"0",
"type",
"=",
"@all_callables",
"name",
"=",
":block",
"when",
"1",
"type",
"=",
"@all_callables",
"name",
"=",
"type_and_name",
"[",
"0",
"]",
"when",
... | Defines one required block parameter that may appear last. If type and name is missing the
default type is "Callable", and the name is "block". If only one
parameter is given, then that is the name and the type is "Callable".
@api public | [
"Defines",
"one",
"required",
"block",
"parameter",
"that",
"may",
"appear",
"last",
".",
"If",
"type",
"and",
"name",
"is",
"missing",
"the",
"default",
"type",
"is",
"Callable",
"and",
"the",
"name",
"is",
"block",
".",
"If",
"only",
"one",
"parameter",
... | 4baeed97cbb7571ddc6635f0a24debe2e8b22cd3 | https://github.com/puppetlabs/puppet/blob/4baeed97cbb7571ddc6635f0a24debe2e8b22cd3/lib/puppet/functions.rb#L473-L502 | train | Returns the block parameter for the given type and name. | [
30522,
13366,
3796,
1035,
11498,
2213,
1006,
1008,
2828,
1035,
1998,
1035,
2171,
1007,
2553,
2828,
1035,
1998,
1035,
2171,
1012,
2946,
2043,
1014,
2828,
1027,
1030,
2035,
1035,
2655,
3085,
2015,
2171,
1027,
1024,
3796,
2043,
1015,
2828,
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... |
piotrmurach/github | lib/github_api/client/repos/deployments.rb | Github.Client::Repos::Deployments.create_status | def create_status(*args)
arguments(args, required: [:user, :repo, :id]) do
assert_required %w[ state ]
permit VALID_STATUS_OPTIONS
end
params = arguments.params
params['accept'] ||= PREVIEW_MEDIA
post_request("repos/#{arguments.user}/#{arguments.repo}/deployments/#{argumen... | ruby | def create_status(*args)
arguments(args, required: [:user, :repo, :id]) do
assert_required %w[ state ]
permit VALID_STATUS_OPTIONS
end
params = arguments.params
params['accept'] ||= PREVIEW_MEDIA
post_request("repos/#{arguments.user}/#{arguments.repo}/deployments/#{argumen... | [
"def",
"create_status",
"(",
"*",
"args",
")",
"arguments",
"(",
"args",
",",
"required",
":",
"[",
":user",
",",
":repo",
",",
":id",
"]",
")",
"do",
"assert_required",
"%w[",
"state",
"]",
"permit",
"VALID_STATUS_OPTIONS",
"end",
"params",
"=",
"argument... | Create a deployment status
@param [Hash] params
@option params [String] :id
Required string. Id of the deployment being referenced.
@option params [String] :state
Required string. State of the deployment. Can be one of:
pending, success, error, or failure.
@option params [String] :target_url
Optional s... | [
"Create",
"a",
"deployment",
"status"
] | 8702452c66bea33c9388550aed9e9974f76aaef1 | https://github.com/piotrmurach/github/blob/8702452c66bea33c9388550aed9e9974f76aaef1/lib/github_api/client/repos/deployments.rb#L127-L136 | train | Create a status of a deployment | [
30522,
13366,
3443,
1035,
3570,
1006,
1008,
12098,
5620,
1007,
9918,
1006,
12098,
5620,
1010,
3223,
1024,
1031,
1024,
5310,
1010,
1024,
16360,
2080,
1010,
1024,
8909,
1033,
1007,
2079,
20865,
1035,
3223,
1003,
1059,
1031,
2110,
1033,
9146,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
GetStream/stream-rails | lib/stream_rails/utils/view_helpers.rb | StreamRails.ViewHelpers.render_activities | def render_activities(activities, options = {})
activities.map { |activity| Renderable.render(activity, self, options.dup) }.join.html_safe
end | ruby | def render_activities(activities, options = {})
activities.map { |activity| Renderable.render(activity, self, options.dup) }.join.html_safe
end | [
"def",
"render_activities",
"(",
"activities",
",",
"options",
"=",
"{",
"}",
")",
"activities",
".",
"map",
"{",
"|",
"activity",
"|",
"Renderable",
".",
"render",
"(",
"activity",
",",
"self",
",",
"options",
".",
"dup",
")",
"}",
".",
"join",
".",
... | View helper for rendering many activities | [
"View",
"helper",
"for",
"rendering",
"many",
"activities"
] | 8ffa4f144169f1f31465c83f0401bad473630994 | https://github.com/GetStream/stream-rails/blob/8ffa4f144169f1f31465c83f0401bad473630994/lib/stream_rails/utils/view_helpers.rb#L11-L13 | train | Renders the given list of activities. | [
30522,
13366,
17552,
1035,
3450,
1006,
3450,
1010,
7047,
1027,
1063,
1065,
1007,
3450,
1012,
4949,
1063,
1064,
4023,
1064,
17552,
3085,
1012,
17552,
1006,
4023,
1010,
2969,
1010,
7047,
1012,
4241,
2361,
1007,
1065,
1012,
3693,
1012,
16129,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
meew0/discordrb | lib/discordrb/data/channel.rb | Discordrb.Channel.create_group | def create_group(user_ids)
raise 'Attempted to create group channel on a non-pm channel!' unless pm?
response = API::Channel.create_group(@bot.token, @id, user_ids.shift)
channel = Channel.new(JSON.parse(response), @bot)
channel.add_group_users(user_ids)
end | ruby | def create_group(user_ids)
raise 'Attempted to create group channel on a non-pm channel!' unless pm?
response = API::Channel.create_group(@bot.token, @id, user_ids.shift)
channel = Channel.new(JSON.parse(response), @bot)
channel.add_group_users(user_ids)
end | [
"def",
"create_group",
"(",
"user_ids",
")",
"raise",
"'Attempted to create group channel on a non-pm channel!'",
"unless",
"pm?",
"response",
"=",
"API",
"::",
"Channel",
".",
"create_group",
"(",
"@bot",
".",
"token",
",",
"@id",
",",
"user_ids",
".",
"shift",
"... | Creates a Group channel
@param user_ids [Array<Integer>] Array of user IDs to add to the new group channel (Excluding
the recipient of the PM channel).
@return [Channel] the created channel. | [
"Creates",
"a",
"Group",
"channel"
] | 764298a1ff0be69a1853b510d736f21c2b91a2fe | https://github.com/meew0/discordrb/blob/764298a1ff0be69a1853b510d736f21c2b91a2fe/lib/discordrb/data/channel.rb#L653-L659 | train | Creates a group channel on this channel. | [
30522,
13366,
3443,
1035,
2177,
1006,
5310,
1035,
8909,
2015,
1007,
5333,
1005,
4692,
2000,
3443,
2177,
3149,
2006,
1037,
2512,
1011,
7610,
3149,
999,
1005,
4983,
7610,
1029,
3433,
1027,
17928,
1024,
1024,
3149,
1012,
3443,
1035,
2177,
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... |
david942j/one_gadget | lib/one_gadget/helper.rb | OneGadget.Helper.url_request | def url_request(url)
uri = URI.parse(url)
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
http.verify_mode = ::OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Get.new(uri.request_uri)
response = http.request(request)
raise ArgumentError, "Fail to get response of #... | ruby | def url_request(url)
uri = URI.parse(url)
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
http.verify_mode = ::OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Get.new(uri.request_uri)
response = http.request(request)
raise ArgumentError, "Fail to get response of #... | [
"def",
"url_request",
"(",
"url",
")",
"uri",
"=",
"URI",
".",
"parse",
"(",
"url",
")",
"http",
"=",
"Net",
"::",
"HTTP",
".",
"new",
"(",
"uri",
".",
"host",
",",
"uri",
".",
"port",
")",
"http",
".",
"use_ssl",
"=",
"true",
"http",
".",
"ver... | Get request.
@param [String] url The url.
@return [String]
The request response body.
If the response is +302 Found+, returns the location in header. | [
"Get",
"request",
"."
] | ff6ef04541e83441bfe3c2664a6febd1640f4263 | https://github.com/david942j/one_gadget/blob/ff6ef04541e83441bfe3c2664a6febd1640f4263/lib/one_gadget/helper.rb#L173-L188 | train | Get the response of a URL | [
30522,
13366,
24471,
2140,
1035,
5227,
1006,
24471,
2140,
1007,
24471,
2072,
1027,
24471,
2072,
1012,
11968,
3366,
1006,
24471,
2140,
1007,
8299,
1027,
5658,
1024,
1024,
8299,
1012,
2047,
1006,
24471,
2072,
1012,
3677,
1010,
24471,
2072,
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... |
puppetlabs/bolt | lib/bolt/pal.rb | Bolt.PAL.in_bolt_compiler | def in_bolt_compiler
r = Puppet::Pal.in_tmp_environment('bolt', modulepath: @modulepath, facts: {}) do |pal|
pal.with_script_compiler do |compiler|
alias_types(compiler)
begin
Puppet.override(yaml_plan_instantiator: Bolt::PAL::YamlPlan::Loader) do
yield compil... | ruby | def in_bolt_compiler
r = Puppet::Pal.in_tmp_environment('bolt', modulepath: @modulepath, facts: {}) do |pal|
pal.with_script_compiler do |compiler|
alias_types(compiler)
begin
Puppet.override(yaml_plan_instantiator: Bolt::PAL::YamlPlan::Loader) do
yield compil... | [
"def",
"in_bolt_compiler",
"r",
"=",
"Puppet",
"::",
"Pal",
".",
"in_tmp_environment",
"(",
"'bolt'",
",",
"modulepath",
":",
"@modulepath",
",",
"facts",
":",
"{",
"}",
")",
"do",
"|",
"pal",
"|",
"pal",
".",
"with_script_compiler",
"do",
"|",
"compiler",... | Runs a block in a PAL script compiler configured for Bolt. Catches
exceptions thrown by the block and re-raises them ensuring they are
Bolt::Errors since the script compiler block will squash all exceptions. | [
"Runs",
"a",
"block",
"in",
"a",
"PAL",
"script",
"compiler",
"configured",
"for",
"Bolt",
".",
"Catches",
"exceptions",
"thrown",
"by",
"the",
"block",
"and",
"re",
"-",
"raises",
"them",
"ensuring",
"they",
"are",
"Bolt",
"::",
"Errors",
"since",
"the",
... | 50689a33699939d262ea7c822a4b24fd8c4f8d8a | https://github.com/puppetlabs/bolt/blob/50689a33699939d262ea7c822a4b24fd8c4f8d8a/lib/bolt/pal.rb#L106-L129 | train | Returns the result of the in_bolt_compiler method. | [
30522,
13366,
1999,
1035,
10053,
1035,
21624,
1054,
1027,
13997,
1024,
1024,
14412,
1012,
1999,
1035,
1056,
8737,
1035,
4044,
1006,
1005,
10053,
1005,
1010,
11336,
15069,
1024,
1030,
11336,
15069,
1010,
8866,
1024,
1063,
1065,
1007,
2079,
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_compute/lib/2017-12-01/generated/azure_mgmt_compute/virtual_machines.rb | Azure::Compute::Mgmt::V2017_12_01.VirtualMachines.instance_view | def instance_view(resource_group_name, vm_name, custom_headers:nil)
response = instance_view_async(resource_group_name, vm_name, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def instance_view(resource_group_name, vm_name, custom_headers:nil)
response = instance_view_async(resource_group_name, vm_name, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"instance_view",
"(",
"resource_group_name",
",",
"vm_name",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"instance_view_async",
"(",
"resource_group_name",
",",
"vm_name",
",",
"custom_headers",
":custom_headers",
")",
".",
"value!",
"response",
... | Retrieves information about the run-time state of a virtual machine.
@param resource_group_name [String] The name of the resource group.
@param vm_name [String] The name of the virtual machine.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request.
@return... | [
"Retrieves",
"information",
"about",
"the",
"run",
"-",
"time",
"state",
"of",
"a",
"virtual",
"machine",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_compute/lib/2017-12-01/generated/azure_mgmt_compute/virtual_machines.rb#L509-L512 | train | Gets the index of the virtual machine in a resource group. | [
30522,
13366,
6013,
1035,
3193,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
1058,
2213,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
6013,
1035,
3193,
1035,
2004,
6038,
2278,
1006,
7692,
1035,
2177,
1035,
2... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
deivid-rodriguez/byebug | lib/byebug/interface.rb | Byebug.Interface.read_input | def read_input(prompt, save_hist = true)
line = prepare_input(prompt)
return unless line
history.push(line) if save_hist
command_queue.concat(split_commands(line))
command_queue.shift
end | ruby | def read_input(prompt, save_hist = true)
line = prepare_input(prompt)
return unless line
history.push(line) if save_hist
command_queue.concat(split_commands(line))
command_queue.shift
end | [
"def",
"read_input",
"(",
"prompt",
",",
"save_hist",
"=",
"true",
")",
"line",
"=",
"prepare_input",
"(",
"prompt",
")",
"return",
"unless",
"line",
"history",
".",
"push",
"(",
"line",
")",
"if",
"save_hist",
"command_queue",
".",
"concat",
"(",
"split_c... | Reads a new line from the interface's input stream, parses it into
commands and saves it to history.
@return [String] Representing something to be run by the debugger. | [
"Reads",
"a",
"new",
"line",
"from",
"the",
"interface",
"s",
"input",
"stream",
"parses",
"it",
"into",
"commands",
"and",
"saves",
"it",
"to",
"history",
"."
] | bf41a63858a648baa7fb621600d6451786d1572a | https://github.com/deivid-rodriguez/byebug/blob/bf41a63858a648baa7fb621600d6451786d1572a/lib/byebug/interface.rb#L54-L62 | train | Read input from the command line | [
30522,
13366,
3191,
1035,
7953,
1006,
25732,
1010,
3828,
1035,
2010,
2102,
1027,
2995,
1007,
2240,
1027,
7374,
1035,
7953,
1006,
25732,
1007,
2709,
4983,
2240,
2381,
1012,
5245,
1006,
2240,
1007,
2065,
3828,
1035,
2010,
2102,
3094,
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... |
magnusvk/counter_culture | lib/counter_culture/counter.rb | CounterCulture.Counter.first_level_relation_foreign_key | def first_level_relation_foreign_key
first_relation = relation.first if relation.is_a?(Enumerable)
relation_reflect(first_relation).foreign_key
end | ruby | def first_level_relation_foreign_key
first_relation = relation.first if relation.is_a?(Enumerable)
relation_reflect(first_relation).foreign_key
end | [
"def",
"first_level_relation_foreign_key",
"first_relation",
"=",
"relation",
".",
"first",
"if",
"relation",
".",
"is_a?",
"(",
"Enumerable",
")",
"relation_reflect",
"(",
"first_relation",
")",
".",
"foreign_key",
"end"
] | gets the foreign key name of the relation. will look at the first
level only -- i.e., if passed an array will consider only its
first element
relation: a symbol or array of symbols; specifies the relation
that has the counter cache column | [
"gets",
"the",
"foreign",
"key",
"name",
"of",
"the",
"relation",
".",
"will",
"look",
"at",
"the",
"first",
"level",
"only",
"--",
"i",
".",
"e",
".",
"if",
"passed",
"an",
"array",
"will",
"consider",
"only",
"its",
"first",
"element"
] | 6b5bd4d6e1ee4f10f262ace7cfed5776af9520ba | https://github.com/magnusvk/counter_culture/blob/6b5bd4d6e1ee4f10f262ace7cfed5776af9520ba/lib/counter_culture/counter.rb#L264-L267 | train | Returns the foreign key of the first level relation | [
30522,
13366,
2034,
1035,
2504,
1035,
7189,
1035,
3097,
1035,
3145,
2034,
1035,
7189,
1027,
7189,
1012,
2034,
2065,
7189,
1012,
2003,
1035,
1037,
1029,
1006,
4372,
30524,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_compute/lib/2018-04-01/generated/azure_mgmt_compute/snapshots.rb | Azure::Compute::Mgmt::V2018_04_01.Snapshots.begin_create_or_update | def begin_create_or_update(resource_group_name, snapshot_name, snapshot, custom_headers:nil)
response = begin_create_or_update_async(resource_group_name, snapshot_name, snapshot, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def begin_create_or_update(resource_group_name, snapshot_name, snapshot, custom_headers:nil)
response = begin_create_or_update_async(resource_group_name, snapshot_name, snapshot, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"begin_create_or_update",
"(",
"resource_group_name",
",",
"snapshot_name",
",",
"snapshot",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"begin_create_or_update_async",
"(",
"resource_group_name",
",",
"snapshot_name",
",",
"snapshot",
",",
"custom_h... | Creates or updates a snapshot.
@param resource_group_name [String] The name of the resource group.
@param snapshot_name [String] The name of the snapshot that is being created.
The name can't be changed after the snapshot is created. Supported characters
for the name are a-z, A-Z, 0-9 and _. The max name length is... | [
"Creates",
"or",
"updates",
"a",
"snapshot",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_compute/lib/2018-04-01/generated/azure_mgmt_compute/snapshots.rb#L542-L545 | train | Creates or updates a snapshot. | [
30522,
13366,
4088,
1035,
3443,
1035,
2030,
1035,
10651,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
20057,
12326,
1035,
2171,
1010,
20057,
12326,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
4088,
1035,
3443,
1035,
2030... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_service_bus/lib/2017-04-01/generated/azure_mgmt_service_bus/disaster_recovery_configs.rb | Azure::ServiceBus::Mgmt::V2017_04_01.DisasterRecoveryConfigs.check_name_availability_method | def check_name_availability_method(resource_group_name, namespace_name, parameters, custom_headers:nil)
response = check_name_availability_method_async(resource_group_name, namespace_name, parameters, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def check_name_availability_method(resource_group_name, namespace_name, parameters, custom_headers:nil)
response = check_name_availability_method_async(resource_group_name, namespace_name, parameters, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"check_name_availability_method",
"(",
"resource_group_name",
",",
"namespace_name",
",",
"parameters",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"check_name_availability_method_async",
"(",
"resource_group_name",
",",
"namespace_name",
",",
"parameter... | Check the give namespace name availability.
@param resource_group_name [String] Name of the Resource group within the
Azure subscription.
@param namespace_name [String] The namespace name
@param parameters [CheckNameAvailability] Parameters to check availability of
the given namespace name
@param custom_headers ... | [
"Check",
"the",
"give",
"namespace",
"name",
"availability",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_service_bus/lib/2017-04-01/generated/azure_mgmt_service_bus/disaster_recovery_configs.rb#L37-L40 | train | Check the name availability of the namespace. | [
30522,
13366,
4638,
1035,
2171,
1035,
11343,
1035,
4118,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
3415,
15327,
1035,
2171,
1010,
30524,
1035,
2177,
1035,
2171,
1010,
3415,
15327,
1035,
2171,
1010,
11709,
1010,
7661,
1035,
20346,
2015,
1024... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
kpumuk/meta-tags | lib/meta_tags/renderer.rb | MetaTags.Renderer.render_hashes | def render_hashes(tags, **opts)
meta_tags.meta_tags.each_key do |property|
render_hash(tags, property, **opts)
end
end | ruby | def render_hashes(tags, **opts)
meta_tags.meta_tags.each_key do |property|
render_hash(tags, property, **opts)
end
end | [
"def",
"render_hashes",
"(",
"tags",
",",
"**",
"opts",
")",
"meta_tags",
".",
"meta_tags",
".",
"each_key",
"do",
"|",
"property",
"|",
"render_hash",
"(",
"tags",
",",
"property",
",",
"**",
"opts",
")",
"end",
"end"
] | Renders complex hash objects.
@param [Array<Tag>] tags a buffer object to store tag in. | [
"Renders",
"complex",
"hash",
"objects",
"."
] | 03585f95edf96cd17024c5c155ce46ec8bc47232 | https://github.com/kpumuk/meta-tags/blob/03585f95edf96cd17024c5c155ce46ec8bc47232/lib/meta_tags/renderer.rb#L166-L170 | train | Render the hash of the meta tags | [
30522,
13366,
17552,
1035,
23325,
2229,
1006,
22073,
1010,
1008,
1008,
23569,
2015,
1007,
18804,
1035,
22073,
1012,
18804,
1035,
22073,
1012,
2169,
1035,
3145,
2079,
1064,
3200,
1064,
17552,
1035,
23325,
1006,
22073,
1010,
3200,
1010,
1008,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_compute/lib/2016-04-30-preview/generated/azure_mgmt_compute/virtual_machines.rb | Azure::Compute::Mgmt::V2016_04_30_preview.VirtualMachines.begin_redeploy | def begin_redeploy(resource_group_name, vm_name, custom_headers:nil)
response = begin_redeploy_async(resource_group_name, vm_name, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def begin_redeploy(resource_group_name, vm_name, custom_headers:nil)
response = begin_redeploy_async(resource_group_name, vm_name, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"begin_redeploy",
"(",
"resource_group_name",
",",
"vm_name",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"begin_redeploy_async",
"(",
"resource_group_name",
",",
"vm_name",
",",
"custom_headers",
":custom_headers",
")",
".",
"value!",
"response",
... | The operation to redeploy a virtual machine.
@param resource_group_name [String] The name of the resource group.
@param vm_name [String] The name of the virtual machine.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request.
@return [OperationStatusRespons... | [
"The",
"operation",
"to",
"redeploy",
"a",
"virtual",
"machine",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_compute/lib/2016-04-30-preview/generated/azure_mgmt_compute/virtual_machines.rb#L1778-L1781 | train | Redeploy a virtual machine. | [
30522,
13366,
4088,
1035,
2417,
13699,
4135,
2100,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
1058,
2213,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
4088,
1035,
2417,
13699,
4135,
2100,
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... |
rails/rails | activerecord/lib/active_record/attribute_methods.rb | ActiveRecord.AttributeMethods.respond_to? | def respond_to?(name, include_private = false)
return false unless super
# If the result is true then check for the select case.
# For queries selecting a subset of columns, return false for unselected columns.
# We check defined?(@attributes) not to issue warnings if called on objects that
... | ruby | def respond_to?(name, include_private = false)
return false unless super
# If the result is true then check for the select case.
# For queries selecting a subset of columns, return false for unselected columns.
# We check defined?(@attributes) not to issue warnings if called on objects that
... | [
"def",
"respond_to?",
"(",
"name",
",",
"include_private",
"=",
"false",
")",
"return",
"false",
"unless",
"super",
"# If the result is true then check for the select case.",
"# For queries selecting a subset of columns, return false for unselected columns.",
"# We check defined?(@attr... | A Person object with a name attribute can ask <tt>person.respond_to?(:name)</tt>,
<tt>person.respond_to?(:name=)</tt>, and <tt>person.respond_to?(:name?)</tt>
which will all return +true+. It also defines the attribute methods if they have
not been generated.
class Person < ActiveRecord::Base
end
person =... | [
"A",
"Person",
"object",
"with",
"a",
"name",
"attribute",
"can",
"ask",
"<tt",
">",
"person",
".",
"respond_to?",
"(",
":",
"name",
")",
"<",
"/",
"tt",
">",
"<tt",
">",
"person",
".",
"respond_to?",
"(",
":",
"name",
"=",
")",
"<",
"/",
"tt",
"... | 85a8bc644be69908f05740a5886ec19cd3679df5 | https://github.com/rails/rails/blob/85a8bc644be69908f05740a5886ec19cd3679df5/activerecord/lib/active_record/attribute_methods.rb#L262-L276 | train | Returns true if the object respond to the given column. | [
30522,
13366,
6869,
1035,
2000,
1029,
1006,
2171,
1010,
2421,
1035,
2797,
1027,
6270,
1007,
2709,
6270,
4983,
3565,
1001,
2065,
1996,
2765,
2003,
2995,
2059,
4638,
2005,
1996,
7276,
2553,
1012,
1001,
2005,
10861,
5134,
17739,
1037,
16745,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/large_person_group_person.rb | Azure::CognitiveServices::Face::V1_0.LargePersonGroupPerson.delete_face_with_http_info | def delete_face_with_http_info(large_person_group_id, person_id, persisted_face_id, custom_headers:nil)
delete_face_async(large_person_group_id, person_id, persisted_face_id, custom_headers:custom_headers).value!
end | ruby | def delete_face_with_http_info(large_person_group_id, person_id, persisted_face_id, custom_headers:nil)
delete_face_async(large_person_group_id, person_id, persisted_face_id, custom_headers:custom_headers).value!
end | [
"def",
"delete_face_with_http_info",
"(",
"large_person_group_id",
",",
"person_id",
",",
"persisted_face_id",
",",
"custom_headers",
":",
"nil",
")",
"delete_face_async",
"(",
"large_person_group_id",
",",
"person_id",
",",
"persisted_face_id",
",",
"custom_headers",
":c... | Delete a face from a person. Relative feature for the persisted face will
also be deleted.
@param large_person_group_id [String] Id referencing a particular large
person group.
@param person_id Id referencing a particular person.
@param persisted_face_id Id referencing a particular persistedFaceId of an
existing... | [
"Delete",
"a",
"face",
"from",
"a",
"person",
".",
"Relative",
"feature",
"for",
"the",
"persisted",
"face",
"will",
"also",
"be",
"deleted",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_cognitiveservices_face/lib/1.0/generated/azure_cognitiveservices_face/large_person_group_person.rb#L589-L591 | train | Deletes a persisted face from a person. | [
30522,
13366,
3972,
12870,
1035,
2227,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
2312,
1035,
2711,
1035,
2177,
1035,
8909,
1010,
2711,
1035,
8909,
1010,
19035,
30524,
9152,
2140,
1007,
3972,
12870,
1035,
2227,
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... |
meew0/discordrb | lib/discordrb/bot.rb | Discordrb.Bot.process_token | def process_token(type, token)
# Remove the "Bot " prefix if it exists
token = token[4..-1] if token.start_with? 'Bot '
token = 'Bot ' + token unless type == :user
token
end | ruby | def process_token(type, token)
# Remove the "Bot " prefix if it exists
token = token[4..-1] if token.start_with? 'Bot '
token = 'Bot ' + token unless type == :user
token
end | [
"def",
"process_token",
"(",
"type",
",",
"token",
")",
"# Remove the \"Bot \" prefix if it exists",
"token",
"=",
"token",
"[",
"4",
"..",
"-",
"1",
"]",
"if",
"token",
".",
"start_with?",
"'Bot '",
"token",
"=",
"'Bot '",
"+",
"token",
"unless",
"type",
"=... | ####### ###### #### ##
## ## ## ## ## ###
## ## ## ## ####
## ## ## #### ## ## ##
## ## ## ## ## ##
## ## ## ## ## ##
####### ###### #### ## | [
"#######",
"######",
"####",
"##",
"##",
"##",
"##",
"##",
"##",
"###",
"##",
"##",
"##",
"##",
"####",
"##",
"##",
"##",
"####",
"##",
"##",
"##",
"##",
"##",
"##",
"##",
"##",
"##",
"##",
"##",
"##",
"##",
"##",
"##",
"#######",
"######",
"##... | 764298a1ff0be69a1853b510d736f21c2b91a2fe | https://github.com/meew0/discordrb/blob/764298a1ff0be69a1853b510d736f21c2b91a2fe/lib/discordrb/bot.rb#L984-L990 | train | Process the token | [
30522,
13366,
2832,
1035,
19204,
1006,
2828,
1010,
19204,
1007,
1001,
6366,
1996,
1000,
28516,
1000,
17576,
2065,
2009,
6526,
19204,
1027,
19204,
1031,
1018,
1012,
1012,
1011,
1015,
1033,
2065,
19204,
1012,
2707,
1035,
2007,
1029,
1005,
285... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
libgit2/rugged | lib/rugged/submodule_collection.rb | Rugged.SubmoduleCollection.add | def add(url, path, options = {})
submodule = setup_add(url, path, options)
clone_submodule(submodule.repository, options)
submodule.finalize_add
end | ruby | def add(url, path, options = {})
submodule = setup_add(url, path, options)
clone_submodule(submodule.repository, options)
submodule.finalize_add
end | [
"def",
"add",
"(",
"url",
",",
"path",
",",
"options",
"=",
"{",
"}",
")",
"submodule",
"=",
"setup_add",
"(",
"url",
",",
"path",
",",
"options",
")",
"clone_submodule",
"(",
"submodule",
".",
"repository",
",",
"options",
")",
"submodule",
".",
"fina... | call-seq:
submodules.setup_add(url, path[, options]) -> submodule
Add a new +submodule+.
This does <tt>"git submodule add"</tt> incuding fetch and checkout of the
submodule contents.
- +url+: URL for the submodule's remote
- +path+: path at which the submodule should be created
The +options+ hash accepts a... | [
"call",
"-",
"seq",
":",
"submodules",
".",
"setup_add",
"(",
"url",
"path",
"[",
"options",
"]",
")",
"-",
">",
"submodule"
] | 33873e5df2bd38501814182ff79609ed4bd88012 | https://github.com/libgit2/rugged/blob/33873e5df2bd38501814182ff79609ed4bd88012/lib/rugged/submodule_collection.rb#L28-L32 | train | Add a submodule to the repository | [
30522,
13366,
5587,
1006,
24471,
2140,
1010,
4130,
1010,
7047,
1027,
1063,
1065,
1007,
4942,
5302,
8566,
2571,
1027,
16437,
1035,
5587,
1006,
24471,
2140,
1010,
4130,
1010,
7047,
1007,
17598,
1035,
4942,
5302,
8566,
2571,
1006,
4942,
5302,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
libgit2/rugged | lib/rugged/commit.rb | Rugged.Commit.diff | def diff(*args)
args.unshift(parents.first) if args.size == 1 && args.first.is_a?(Hash)
self.tree.diff(*args)
end | ruby | def diff(*args)
args.unshift(parents.first) if args.size == 1 && args.first.is_a?(Hash)
self.tree.diff(*args)
end | [
"def",
"diff",
"(",
"*",
"args",
")",
"args",
".",
"unshift",
"(",
"parents",
".",
"first",
")",
"if",
"args",
".",
"size",
"==",
"1",
"&&",
"args",
".",
"first",
".",
"is_a?",
"(",
"Hash",
")",
"self",
".",
"tree",
".",
"diff",
"(",
"args",
")... | Return a diff between this commit and its first parent or another commit or tree.
See Rugged::Tree#diff for more details. | [
"Return",
"a",
"diff",
"between",
"this",
"commit",
"and",
"its",
"first",
"parent",
"or",
"another",
"commit",
"or",
"tree",
"."
] | 33873e5df2bd38501814182ff79609ed4bd88012 | https://github.com/libgit2/rugged/blob/33873e5df2bd38501814182ff79609ed4bd88012/lib/rugged/commit.rb#L24-L27 | train | Returns the diff of the current object and its parents. | [
30522,
13366,
4487,
4246,
1006,
1008,
12098,
5620,
1007,
12098,
5620,
1012,
4895,
6182,
6199,
1006,
3008,
1012,
2034,
1007,
2065,
12098,
5620,
1012,
2946,
1027,
1027,
1015,
1004,
1004,
12098,
5620,
1012,
2034,
1012,
2003,
1035,
1037,
1029,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
mongodb/mongoid | lib/mongoid/changeable.rb | Mongoid.Changeable.reset_attribute! | def reset_attribute!(attr)
attr = database_field_name(attr)
attributes[attr] = changed_attributes.delete(attr) if attribute_changed?(attr)
end | ruby | def reset_attribute!(attr)
attr = database_field_name(attr)
attributes[attr] = changed_attributes.delete(attr) if attribute_changed?(attr)
end | [
"def",
"reset_attribute!",
"(",
"attr",
")",
"attr",
"=",
"database_field_name",
"(",
"attr",
")",
"attributes",
"[",
"attr",
"]",
"=",
"changed_attributes",
".",
"delete",
"(",
"attr",
")",
"if",
"attribute_changed?",
"(",
"attr",
")",
"end"
] | Set the attribute back to its old value.
@example Reset the attribute.
model.reset_attribute!("name")
@param [ String ] attr The name of the attribute.
@return [ Object ] The old value.
@since 2.4.0 | [
"Set",
"the",
"attribute",
"back",
"to",
"its",
"old",
"value",
"."
] | 56976e32610f4c2450882b0bfe14da099f0703f4 | https://github.com/mongodb/mongoid/blob/56976e32610f4c2450882b0bfe14da099f0703f4/lib/mongoid/changeable.rb#L245-L248 | train | Reset the attribute to the original value | [
30522,
13366,
25141,
1035,
17961,
999,
1006,
2012,
16344,
1007,
2012,
16344,
1027,
7809,
1035,
2492,
1035,
2171,
1006,
2012,
16344,
1007,
12332,
1031,
2012,
16344,
1033,
1027,
2904,
1035,
12332,
1012,
3972,
12870,
1006,
2012,
16344,
1007,
2... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
danger/danger | lib/danger/danger_core/plugins/dangerfile_messaging_plugin.rb | Danger.DangerfileMessagingPlugin.message | def message(*messages, **options)
sticky = options.fetch(:sticky, false)
file = options.fetch(:file, nil)
line = options.fetch(:line, nil)
messages.flatten.each do |message|
@messages << Violation.new(message, sticky, file, line) if message
end
end | ruby | def message(*messages, **options)
sticky = options.fetch(:sticky, false)
file = options.fetch(:file, nil)
line = options.fetch(:line, nil)
messages.flatten.each do |message|
@messages << Violation.new(message, sticky, file, line) if message
end
end | [
"def",
"message",
"(",
"*",
"messages",
",",
"**",
"options",
")",
"sticky",
"=",
"options",
".",
"fetch",
"(",
":sticky",
",",
"false",
")",
"file",
"=",
"options",
".",
"fetch",
"(",
":file",
",",
"nil",
")",
"line",
"=",
"options",
".",
"fetch",
... | @!group Core
Print out a generate message on the PR
@param [String, Array<String>] message
The message to present to the user
@param [Boolean] sticky
Whether the message should be kept after it was fixed,
defaults to `false`.
@param [String] file
Optional. Path ... | [
"@!group",
"Core",
"Print",
"out",
"a",
"generate",
"message",
"on",
"the",
"PR"
] | 0d6d09f2d949c287fe75202d947374042b0679f4 | https://github.com/danger/danger/blob/0d6d09f2d949c287fe75202d947374042b0679f4/lib/danger/danger_core/plugins/dangerfile_messaging_plugin.rb#L121-L129 | train | Add a message to the message list. | [
30522,
13366,
4471,
1006,
1008,
7696,
1010,
1008,
1008,
7047,
1007,
15875,
1027,
7047,
1012,
18584,
1006,
1024,
15875,
1010,
6270,
1007,
5371,
1027,
7047,
1012,
18584,
1006,
1024,
5371,
1010,
9152,
2140,
1007,
2240,
1027,
7047,
1012,
18584,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/tag.rb | Azure::ApiManagement::Mgmt::V2018_01_01.Tag.get_by_operation | def get_by_operation(resource_group_name, service_name, api_id, operation_id, tag_id, custom_headers:nil)
response = get_by_operation_async(resource_group_name, service_name, api_id, operation_id, tag_id, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def get_by_operation(resource_group_name, service_name, api_id, operation_id, tag_id, custom_headers:nil)
response = get_by_operation_async(resource_group_name, service_name, api_id, operation_id, tag_id, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"get_by_operation",
"(",
"resource_group_name",
",",
"service_name",
",",
"api_id",
",",
"operation_id",
",",
"tag_id",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"get_by_operation_async",
"(",
"resource_group_name",
",",
"service_name",
",",
"a... | Get tag associated with the Operation.
@param resource_group_name [String] The name of the resource group.
@param service_name [String] The name of the API Management service.
@param api_id [String] API revision identifier. Must be unique in the current
API Management service instance. Non-current revision has ;re... | [
"Get",
"tag",
"associated",
"with",
"the",
"Operation",
"."
] | 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/tag.rb#L1608-L1611 | train | Gets the tag for the specified API. | [
30522,
13366,
2131,
1035,
2011,
1035,
3169,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2326,
1035,
2171,
1010,
17928,
1035,
8909,
1010,
3169,
1035,
8909,
1010,
6415,
1035,
8909,
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... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_recovery_services_site_recovery/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/replicationv_centers.rb | Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10.ReplicationvCenters.create | def create(fabric_name, v_center_name, add_vcenter_request, custom_headers:nil)
response = create_async(fabric_name, v_center_name, add_vcenter_request, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def create(fabric_name, v_center_name, add_vcenter_request, custom_headers:nil)
response = create_async(fabric_name, v_center_name, add_vcenter_request, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"create",
"(",
"fabric_name",
",",
"v_center_name",
",",
"add_vcenter_request",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"create_async",
"(",
"fabric_name",
",",
"v_center_name",
",",
"add_vcenter_request",
",",
"custom_headers",
":custom_header... | Add vCenter.
The operation to create a vCenter object..
@param fabric_name [String] Fabric name.
@param v_center_name [String] vCenter name.
@param add_vcenter_request [AddVCenterRequest] The input to the add vCenter
operation.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will b... | [
"Add",
"vCenter",
"."
] | 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/replicationv_centers.rb#L234-L237 | train | Creates a virtual network vCenter. | [
30522,
13366,
3443,
1006,
8313,
1035,
2171,
1010,
1058,
1035,
2415,
1035,
2171,
1010,
5587,
1035,
18315,
29110,
1035,
5227,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
3443,
1035,
2004,
6038,
2278,
1006,
8313,
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_resources_management/lib/2018-03-01-preview/generated/azure_mgmt_resources_management/management_groups.rb | Azure::ResourcesManagement::Mgmt::V2018_03_01_preview.ManagementGroups.delete | def delete(group_id, cache_control:'no-cache', custom_headers:nil)
response = delete_async(group_id, cache_control:cache_control, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def delete(group_id, cache_control:'no-cache', custom_headers:nil)
response = delete_async(group_id, cache_control:cache_control, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"delete",
"(",
"group_id",
",",
"cache_control",
":",
"'no-cache'",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"delete_async",
"(",
"group_id",
",",
"cache_control",
":cache_control",
",",
"custom_headers",
":custom_headers",
")",
".",
"value!... | Delete management group. If a management group contains child resources, the
request will fail.
@param group_id [String] Management Group ID.
@param cache_control [String] Indicates that the request shouldn't utilize
any caches.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be... | [
"Delete",
"management",
"group",
".",
"If",
"a",
"management",
"group",
"contains",
"child",
"resources",
"the",
"request",
"will",
"fail",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_resources_management/lib/2018-03-01-preview/generated/azure_mgmt_resources_management/management_groups.rb#L423-L426 | train | Deletes the specified group. | [
30522,
13366,
3972,
12870,
1006,
2177,
1035,
8909,
1010,
17053,
1035,
2491,
1024,
1005,
2053,
1011,
17053,
1005,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
3972,
12870,
1035,
2004,
6038,
2278,
1006,
2177,
1035,
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... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_stor_simple8000_series/lib/2017-06-01/generated/azure_mgmt_stor_simple8000_series/devices.rb | Azure::StorSimple8000Series::Mgmt::V2017_06_01.Devices.begin_scan_for_updates | def begin_scan_for_updates(device_name, resource_group_name, manager_name, custom_headers:nil)
response = begin_scan_for_updates_async(device_name, resource_group_name, manager_name, custom_headers:custom_headers).value!
nil
end | ruby | def begin_scan_for_updates(device_name, resource_group_name, manager_name, custom_headers:nil)
response = begin_scan_for_updates_async(device_name, resource_group_name, manager_name, custom_headers:custom_headers).value!
nil
end | [
"def",
"begin_scan_for_updates",
"(",
"device_name",
",",
"resource_group_name",
",",
"manager_name",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"begin_scan_for_updates_async",
"(",
"device_name",
",",
"resource_group_name",
",",
"manager_name",
",",
"cust... | Scans for updates on the device.
@param device_name [String] The device name
@param resource_group_name [String] The resource group name
@param manager_name [String] The manager name
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request. | [
"Scans",
"for",
"updates",
"on",
"the",
"device",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_stor_simple8000_series/lib/2017-06-01/generated/azure_mgmt_stor_simple8000_series/devices.rb#L1576-L1579 | train | Gets the list of all the available Azure Central Hubs and the associated Azure Central Hubs. | [
30522,
13366,
4088,
1035,
13594,
1035,
2005,
1035,
14409,
1006,
5080,
1035,
2171,
1010,
7692,
1035,
2177,
1035,
30524,
13594,
1035,
2005,
1035,
14409,
1035,
2004,
6038,
2278,
1006,
5080,
1035,
2171,
1010,
7692,
1035,
2177,
1035,
2171,
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... |
mikel/mail | lib/mail/message.rb | Mail.Message.add_part | def add_part(part)
if !body.multipart? && !Utilities.blank?(self.body.decoded)
@text_part = Mail::Part.new('Content-Type: text/plain;')
@text_part.body = body.decoded
self.body << @text_part
add_multipart_alternate_header
end
add_boundary
self.body << part
end | ruby | def add_part(part)
if !body.multipart? && !Utilities.blank?(self.body.decoded)
@text_part = Mail::Part.new('Content-Type: text/plain;')
@text_part.body = body.decoded
self.body << @text_part
add_multipart_alternate_header
end
add_boundary
self.body << part
end | [
"def",
"add_part",
"(",
"part",
")",
"if",
"!",
"body",
".",
"multipart?",
"&&",
"!",
"Utilities",
".",
"blank?",
"(",
"self",
".",
"body",
".",
"decoded",
")",
"@text_part",
"=",
"Mail",
"::",
"Part",
".",
"new",
"(",
"'Content-Type: text/plain;'",
")",... | Adds a part to the parts list or creates the part list | [
"Adds",
"a",
"part",
"to",
"the",
"parts",
"list",
"or",
"creates",
"the",
"part",
"list"
] | fb53fb369eb2bf0494ac70675970c90cdcc3f495 | https://github.com/mikel/mail/blob/fb53fb369eb2bf0494ac70675970c90cdcc3f495/lib/mail/message.rb#L1699-L1708 | train | Add a part to the message. | [
30522,
13366,
5587,
1035,
2112,
1006,
2112,
1007,
2065,
999,
2303,
1012,
4800,
19362,
2102,
1029,
1004,
1004,
999,
16548,
1012,
8744,
1029,
1006,
2969,
1012,
2303,
1012,
21933,
5732,
1007,
1030,
3793,
1035,
2112,
1027,
5653,
1024,
1024,
2... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
puppetlabs/puppet | lib/puppet/module_tool/metadata.rb | Puppet::ModuleTool.Metadata.add_dependency | def add_dependency(name, version_requirement=nil, repository=nil)
validate_name(name)
validate_version_range(version_requirement) if version_requirement
if dup = @data['dependencies'].find { |d| d.full_module_name == name && d.version_requirement != version_requirement }
raise ArgumentError, ... | ruby | def add_dependency(name, version_requirement=nil, repository=nil)
validate_name(name)
validate_version_range(version_requirement) if version_requirement
if dup = @data['dependencies'].find { |d| d.full_module_name == name && d.version_requirement != version_requirement }
raise ArgumentError, ... | [
"def",
"add_dependency",
"(",
"name",
",",
"version_requirement",
"=",
"nil",
",",
"repository",
"=",
"nil",
")",
"validate_name",
"(",
"name",
")",
"validate_version_range",
"(",
"version_requirement",
")",
"if",
"version_requirement",
"if",
"dup",
"=",
"@data",
... | Validates the name and version_requirement for a dependency, then creates
the Dependency and adds it.
Returns the Dependency that was added. | [
"Validates",
"the",
"name",
"and",
"version_requirement",
"for",
"a",
"dependency",
"then",
"creates",
"the",
"Dependency",
"and",
"adds",
"it",
".",
"Returns",
"the",
"Dependency",
"that",
"was",
"added",
"."
] | 4baeed97cbb7571ddc6635f0a24debe2e8b22cd3 | https://github.com/puppetlabs/puppet/blob/4baeed97cbb7571ddc6635f0a24debe2e8b22cd3/lib/puppet/module_tool/metadata.rb#L65-L77 | train | Add a dependency to the metadata. json | [
30522,
13366,
5587,
1035,
24394,
1006,
2171,
1010,
2544,
1035,
9095,
1027,
9152,
2140,
1010,
22409,
1027,
9152,
2140,
1007,
9398,
3686,
1035,
2171,
1006,
2171,
1007,
9398,
3686,
1035,
2544,
1035,
2846,
1006,
2544,
1035,
9095,
1007,
2065,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
sporkmonger/addressable | lib/addressable/template.rb | Addressable.Template.partial_expand | def partial_expand(mapping, processor=nil, normalize_values=true)
result = self.pattern.dup
mapping = normalize_keys(mapping)
result.gsub!( EXPRESSION ) do |capture|
transform_partial_capture(mapping, capture, processor, normalize_values)
end
return Addressable::Template.new(result... | ruby | def partial_expand(mapping, processor=nil, normalize_values=true)
result = self.pattern.dup
mapping = normalize_keys(mapping)
result.gsub!( EXPRESSION ) do |capture|
transform_partial_capture(mapping, capture, processor, normalize_values)
end
return Addressable::Template.new(result... | [
"def",
"partial_expand",
"(",
"mapping",
",",
"processor",
"=",
"nil",
",",
"normalize_values",
"=",
"true",
")",
"result",
"=",
"self",
".",
"pattern",
".",
"dup",
"mapping",
"=",
"normalize_keys",
"(",
"mapping",
")",
"result",
".",
"gsub!",
"(",
"EXPRES... | Expands a URI template into another URI template.
@param [Hash] mapping The mapping that corresponds to the pattern.
@param [#validate, #transform] processor
An optional processor object may be supplied.
@param [Boolean] normalize_values
Optional flag to enable/disable unicode normalization. Default: true
T... | [
"Expands",
"a",
"URI",
"template",
"into",
"another",
"URI",
"template",
"."
] | 5894c95a7768435cb46d1355954611dbd194832e | https://github.com/sporkmonger/addressable/blob/5894c95a7768435cb46d1355954611dbd194832e/lib/addressable/template.rb#L525-L532 | train | Expand a partial template | [
30522,
13366,
7704,
1035,
7818,
1006,
12375,
1010,
13151,
1027,
9152,
2140,
1010,
3671,
4697,
1035,
5300,
1027,
2995,
1007,
2765,
1027,
2969,
1012,
5418,
1012,
4241,
2361,
12375,
1027,
3671,
4697,
1035,
6309,
1006,
12375,
1007,
2765,
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... |
interagent/committee | lib/committee/drivers/hyper_schema.rb | Committee::Drivers.HyperSchema.parse | def parse(schema)
# Really we'd like to only have data hashes passed into drivers these
# days, but here we handle a JsonSchema::Schema for now to maintain
# backward compatibility (this library used to be hyper-schema only).
if schema.is_a?(JsonSchema::Schema)
hyper_schema = schema
... | ruby | def parse(schema)
# Really we'd like to only have data hashes passed into drivers these
# days, but here we handle a JsonSchema::Schema for now to maintain
# backward compatibility (this library used to be hyper-schema only).
if schema.is_a?(JsonSchema::Schema)
hyper_schema = schema
... | [
"def",
"parse",
"(",
"schema",
")",
"# Really we'd like to only have data hashes passed into drivers these",
"# days, but here we handle a JsonSchema::Schema for now to maintain",
"# backward compatibility (this library used to be hyper-schema only).",
"if",
"schema",
".",
"is_a?",
"(",
"J... | Parses an API schema and builds a set of route definitions for use with
Committee.
The expected input format is a data hash with keys as strings (as opposed
to symbols) like the kind produced by JSON.parse or YAML.load. | [
"Parses",
"an",
"API",
"schema",
"and",
"builds",
"a",
"set",
"of",
"route",
"definitions",
"for",
"use",
"with",
"Committee",
"."
] | 810fadcea1bc1c529627d47325c1008b5c33b0a4 | https://github.com/interagent/committee/blob/810fadcea1bc1c529627d47325c1008b5c33b0a4/lib/committee/drivers/hyper_schema.rb#L41-L56 | train | Parse a schema and return a new schema object. | [
30522,
30524,
2069,
2031,
2951,
23325,
2229,
2979,
2046,
6853,
2122,
1001,
2420,
1010,
2021,
2182,
2057,
5047,
1037,
1046,
23345,
5403,
2863,
1024,
1024,
8040,
28433,
2005,
2085,
2000,
5441,
1001,
8848,
21778,
1006,
2023,
3075,
2109,
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 | management/azure_mgmt_sql/lib/2017-10-01-preview/generated/azure_mgmt_sql/managed_database_vulnerability_assessment_rule_baselines.rb | Azure::SQL::Mgmt::V2017_10_01_preview.ManagedDatabaseVulnerabilityAssessmentRuleBaselines.delete_with_http_info | def delete_with_http_info(resource_group_name, managed_instance_name, database_name, rule_id, baseline_name, custom_headers:nil)
delete_async(resource_group_name, managed_instance_name, database_name, rule_id, baseline_name, custom_headers:custom_headers).value!
end | ruby | def delete_with_http_info(resource_group_name, managed_instance_name, database_name, rule_id, baseline_name, custom_headers:nil)
delete_async(resource_group_name, managed_instance_name, database_name, rule_id, baseline_name, custom_headers:custom_headers).value!
end | [
"def",
"delete_with_http_info",
"(",
"resource_group_name",
",",
"managed_instance_name",
",",
"database_name",
",",
"rule_id",
",",
"baseline_name",
",",
"custom_headers",
":",
"nil",
")",
"delete_async",
"(",
"resource_group_name",
",",
"managed_instance_name",
",",
"... | Removes the database's vulnerability assessment rule baseline.
@param resource_group_name [String] The name of the resource group that
contains the resource. You can obtain this value from the Azure Resource
Manager API or the portal.
@param managed_instance_name [String] The name of the managed instance.
@param ... | [
"Removes",
"the",
"database",
"s",
"vulnerability",
"assessment",
"rule",
"baseline",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_sql/lib/2017-10-01-preview/generated/azure_mgmt_sql/managed_database_vulnerability_assessment_rule_baselines.rb#L329-L331 | train | Deletes a rule from the managed database. | [
30522,
13366,
3972,
12870,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
3266,
1035,
6013,
1035,
2171,
1010,
7809,
1035,
2171,
1010,
3627,
1035,
8909,
1010,
26163,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
fastlane/fastlane | spaceship/lib/spaceship/client.rb | Spaceship.Client.login | def login(user = nil, password = nil)
if user.to_s.empty? || password.to_s.empty?
require 'credentials_manager/account_manager'
puts("Reading keychain entry, because either user or password were empty") if Spaceship::Globals.verbose?
keychain_entry = CredentialsManager::AccountManager.ne... | ruby | def login(user = nil, password = nil)
if user.to_s.empty? || password.to_s.empty?
require 'credentials_manager/account_manager'
puts("Reading keychain entry, because either user or password were empty") if Spaceship::Globals.verbose?
keychain_entry = CredentialsManager::AccountManager.ne... | [
"def",
"login",
"(",
"user",
"=",
"nil",
",",
"password",
"=",
"nil",
")",
"if",
"user",
".",
"to_s",
".",
"empty?",
"||",
"password",
".",
"to_s",
".",
"empty?",
"require",
"'credentials_manager/account_manager'",
"puts",
"(",
"\"Reading keychain entry, because... | Authenticates with Apple's web services. This method has to be called once
to generate a valid session. The session will automatically be used from then
on.
This method will automatically use the username from the Appfile (if available)
and fetch the password from the Keychain (if available)
@param user (String)... | [
"Authenticates",
"with",
"Apple",
"s",
"web",
"services",
".",
"This",
"method",
"has",
"to",
"be",
"called",
"once",
"to",
"generate",
"a",
"valid",
"session",
".",
"The",
"session",
"will",
"automatically",
"be",
"used",
"from",
"then",
"on",
"."
] | 457c5d647c77f0e078dafa5129da616914e002c5 | https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/spaceship/lib/spaceship/client.rb#L366-L394 | train | This method is used to login to the server | [
30522,
13366,
8833,
2378,
1006,
5310,
1027,
9152,
2140,
1010,
20786,
1027,
9152,
2140,
1007,
2065,
5310,
1012,
2000,
1035,
1055,
1012,
4064,
1029,
1064,
1064,
20786,
1012,
2000,
1035,
1055,
1012,
4064,
1029,
5478,
1005,
22496,
1035,
3208,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/agreements.rb | Azure::Logic::Mgmt::V2016_06_01.Agreements.create_or_update_with_http_info | def create_or_update_with_http_info(resource_group_name, integration_account_name, agreement_name, agreement, custom_headers:nil)
create_or_update_async(resource_group_name, integration_account_name, agreement_name, agreement, custom_headers:custom_headers).value!
end | ruby | def create_or_update_with_http_info(resource_group_name, integration_account_name, agreement_name, agreement, custom_headers:nil)
create_or_update_async(resource_group_name, integration_account_name, agreement_name, agreement, custom_headers:custom_headers).value!
end | [
"def",
"create_or_update_with_http_info",
"(",
"resource_group_name",
",",
"integration_account_name",
",",
"agreement_name",
",",
"agreement",
",",
"custom_headers",
":",
"nil",
")",
"create_or_update_async",
"(",
"resource_group_name",
",",
"integration_account_name",
",",
... | Creates or updates an integration account agreement.
@param resource_group_name [String] The resource group name.
@param integration_account_name [String] The integration account name.
@param agreement_name [String] The integration account agreement name.
@param agreement [IntegrationAccountAgreement] The integrat... | [
"Creates",
"or",
"updates",
"an",
"integration",
"account",
"agreement",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_logic/lib/2016-06-01/generated/azure_mgmt_logic/agreements.rb#L252-L254 | train | Creates or updates an integration account agreement. | [
30522,
13366,
3443,
1035,
2030,
1035,
10651,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
8346,
1035,
4070,
1035,
2171,
1010,
3820,
1035,
2171,
1010,
3820,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_stor_simple8000_series/lib/2017-06-01/generated/azure_mgmt_stor_simple8000_series/jobs.rb | Azure::StorSimple8000Series::Mgmt::V2017_06_01.Jobs.list_by_manager_as_lazy | def list_by_manager_as_lazy(resource_group_name, manager_name, filter:nil, custom_headers:nil)
response = list_by_manager_async(resource_group_name, manager_name, filter:filter, custom_headers:custom_headers).value!
unless response.nil?
page = response.body
page.next_method = Proc.new do |ne... | ruby | def list_by_manager_as_lazy(resource_group_name, manager_name, filter:nil, custom_headers:nil)
response = list_by_manager_async(resource_group_name, manager_name, filter:filter, custom_headers:custom_headers).value!
unless response.nil?
page = response.body
page.next_method = Proc.new do |ne... | [
"def",
"list_by_manager_as_lazy",
"(",
"resource_group_name",
",",
"manager_name",
",",
"filter",
":",
"nil",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"list_by_manager_async",
"(",
"resource_group_name",
",",
"manager_name",
",",
"filter",
":",
"filt... | Gets all the jobs for the specified manager. With optional OData query
parameters, a filtered set of jobs is returned.
@param resource_group_name [String] The resource group name
@param manager_name [String] The manager name
@param filter [String] OData Filter options
@param custom_headers [Hash{String => String}... | [
"Gets",
"all",
"the",
"jobs",
"for",
"the",
"specified",
"manager",
".",
"With",
"optional",
"OData",
"query",
"parameters",
"a",
"filtered",
"set",
"of",
"jobs",
"is",
"returned",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_stor_simple8000_series/lib/2017-06-01/generated/azure_mgmt_stor_simple8000_series/jobs.rb#L683-L692 | train | Gets the list of all the managed database versions. | [
30522,
13366,
2862,
1035,
2011,
1035,
3208,
1035,
2004,
1035,
13971,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
3208,
1035,
2171,
1010,
11307,
1024,
9152,
2140,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
2862,
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_recovery_services_site_recovery/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/replication_protection_containers.rb | Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10.ReplicationProtectionContainers.list_by_replication_fabrics_as_lazy | def list_by_replication_fabrics_as_lazy(fabric_name, custom_headers:nil)
response = list_by_replication_fabrics_async(fabric_name, custom_headers:custom_headers).value!
unless response.nil?
page = response.body
page.next_method = Proc.new do |next_page_link|
list_by_replication_fab... | ruby | def list_by_replication_fabrics_as_lazy(fabric_name, custom_headers:nil)
response = list_by_replication_fabrics_async(fabric_name, custom_headers:custom_headers).value!
unless response.nil?
page = response.body
page.next_method = Proc.new do |next_page_link|
list_by_replication_fab... | [
"def",
"list_by_replication_fabrics_as_lazy",
"(",
"fabric_name",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"list_by_replication_fabrics_async",
"(",
"fabric_name",
",",
"custom_headers",
":custom_headers",
")",
".",
"value!",
"unless",
"response",
".",
"... | Gets the list of protection container for a fabric.
Lists the protection containers in the specified fabric.
@param fabric_name [String] Fabric name.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request.
@return [ProtectionContainerCollection] which prov... | [
"Gets",
"the",
"list",
"of",
"protection",
"container",
"for",
"a",
"fabric",
"."
] | 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_containers.rb#L1144-L1153 | train | Gets all the fabrics in a service registry. | [
30522,
13366,
2862,
1035,
2011,
1035,
21647,
1035,
25123,
1035,
2004,
1035,
13971,
1006,
8313,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
2862,
1035,
2011,
1035,
21647,
1035,
25123,
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... |
googleapis/google-cloud-ruby | google-cloud-datastore/lib/google-cloud-datastore.rb | Google.Cloud.datastore | def datastore scope: nil, timeout: nil, client_config: nil
Google::Cloud.datastore @project, @keyfile,
scope: scope, timeout: (timeout || @timeout),
client_config: client_config
end | ruby | def datastore scope: nil, timeout: nil, client_config: nil
Google::Cloud.datastore @project, @keyfile,
scope: scope, timeout: (timeout || @timeout),
client_config: client_config
end | [
"def",
"datastore",
"scope",
":",
"nil",
",",
"timeout",
":",
"nil",
",",
"client_config",
":",
"nil",
"Google",
"::",
"Cloud",
".",
"datastore",
"@project",
",",
"@keyfile",
",",
"scope",
":",
"scope",
",",
"timeout",
":",
"(",
"timeout",
"||",
"@timeou... | Creates a new object for connecting to the Datastore service.
Each call creates a new connection.
For more information on connecting to Google Cloud see the
{file:AUTHENTICATION.md Authentication Guide}.
@param [String, Array<String>] scope The OAuth 2.0 scopes controlling the
set of resources and operations t... | [
"Creates",
"a",
"new",
"object",
"for",
"connecting",
"to",
"the",
"Datastore",
"service",
".",
"Each",
"call",
"creates",
"a",
"new",
"connection",
"."
] | 846c1a57250ac860ef4de1b54853a480ab2ff702 | https://github.com/googleapis/google-cloud-ruby/blob/846c1a57250ac860ef4de1b54853a480ab2ff702/google-cloud-datastore/lib/google-cloud-datastore.rb#L72-L76 | train | Create a datastore | [
30522,
13366,
2951,
23809,
2063,
9531,
1024,
9152,
2140,
1010,
2051,
5833,
1024,
9152,
2140,
1010,
7396,
1035,
9530,
8873,
2290,
1024,
9152,
2140,
8224,
1024,
1024,
6112,
1012,
2951,
23809,
2063,
1030,
2622,
1010,
1030,
3145,
8873,
2571,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/jobs.rb | Azure::RecoveryServicesBackup::Mgmt::V2016_06_01.Jobs.export | def export(vault_name, resource_group_name, filter:nil, custom_headers:nil)
response = export_async(vault_name, resource_group_name, filter:filter, custom_headers:custom_headers).value!
nil
end | ruby | def export(vault_name, resource_group_name, filter:nil, custom_headers:nil)
response = export_async(vault_name, resource_group_name, filter:filter, custom_headers:custom_headers).value!
nil
end | [
"def",
"export",
"(",
"vault_name",
",",
"resource_group_name",
",",
"filter",
":",
"nil",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"export_async",
"(",
"vault_name",
",",
"resource_group_name",
",",
"filter",
":",
"filter",
",",
"custom_headers"... | Exports all jobs for a given Shared Access Signatures (SAS) URL. The SAS URL
expires within 15 minutes of its creation.
@param vault_name [String] The name of the Recovery Services vault.
@param resource_group_name [String] The name of the resource group associated
with the Recovery Services vault.
@param filter ... | [
"Exports",
"all",
"jobs",
"for",
"a",
"given",
"Shared",
"Access",
"Signatures",
"(",
"SAS",
")",
"URL",
".",
"The",
"SAS",
"URL",
"expires",
"within",
"15",
"minutes",
"of",
"its",
"creation",
"."
] | 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/jobs.rb#L45-L48 | train | Export a list of documents to a vault. | [
30522,
13366,
9167,
1006,
11632,
1035,
2171,
1010,
7692,
1035,
2177,
1035,
2171,
1010,
11307,
1024,
9152,
2140,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
9167,
1035,
2004,
6038,
2278,
1006,
11632,
1035,
2171,
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... |
kmuto/review | lib/epubmaker/producer.rb | EPUBMaker.Producer.ncx | def ncx(wobj, indentarray = [])
s = @epub.ncx(indentarray)
if !s.nil? && !wobj.nil?
wobj.puts s
end
end | ruby | def ncx(wobj, indentarray = [])
s = @epub.ncx(indentarray)
if !s.nil? && !wobj.nil?
wobj.puts s
end
end | [
"def",
"ncx",
"(",
"wobj",
",",
"indentarray",
"=",
"[",
"]",
")",
"s",
"=",
"@epub",
".",
"ncx",
"(",
"indentarray",
")",
"if",
"!",
"s",
".",
"nil?",
"&&",
"!",
"wobj",
".",
"nil?",
"wobj",
".",
"puts",
"s",
"end",
"end"
] | Write ncx file to IO object +wobj+. +indentarray+ defines prefix
string for each level. | [
"Write",
"ncx",
"file",
"to",
"IO",
"object",
"+",
"wobj",
"+",
".",
"+",
"indentarray",
"+",
"defines",
"prefix",
"string",
"for",
"each",
"level",
"."
] | 77d1273e671663f05db2992281fd891b776badf0 | https://github.com/kmuto/review/blob/77d1273e671663f05db2992281fd891b776badf0/lib/epubmaker/producer.rb#L115-L120 | train | Return the NCX of the EPUB | [
30522,
13366,
13316,
2595,
1006,
24185,
2497,
3501,
1010,
27427,
4765,
2906,
9447,
1027,
1031,
1033,
1007,
1055,
1027,
1030,
4958,
12083,
1012,
13316,
2595,
1006,
27427,
4765,
2906,
9447,
1007,
2065,
999,
1055,
1012,
9152,
2140,
1029,
1004,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
zipmark/rspec_api_documentation | lib/rspec_api_documentation/configuration.rb | RspecApiDocumentation.Configuration.define_group | def define_group(name, &block)
subconfig = self.class.new(self)
subconfig.filter = name
subconfig.docs_dir = self.docs_dir.join(name.to_s)
yield subconfig
groups << subconfig
end | ruby | def define_group(name, &block)
subconfig = self.class.new(self)
subconfig.filter = name
subconfig.docs_dir = self.docs_dir.join(name.to_s)
yield subconfig
groups << subconfig
end | [
"def",
"define_group",
"(",
"name",
",",
"&",
"block",
")",
"subconfig",
"=",
"self",
".",
"class",
".",
"new",
"(",
"self",
")",
"subconfig",
".",
"filter",
"=",
"name",
"subconfig",
".",
"docs_dir",
"=",
"self",
".",
"docs_dir",
".",
"join",
"(",
"... | Defines a new sub configuration
Automatically sets the `filter` to the group name, and the `docs_dir` to
a subfolder of the parent's `doc_dir` named the group name.
RspecApiDocumentation.configure do |config|
config.docs_dir = "doc/api"
config.define_group(:public) do |config|
# Default values
... | [
"Defines",
"a",
"new",
"sub",
"configuration"
] | 54fbfda3ec8ede5b3d871700ff69aabe89eafb2f | https://github.com/zipmark/rspec_api_documentation/blob/54fbfda3ec8ede5b3d871700ff69aabe89eafb2f/lib/rspec_api_documentation/configuration.rb#L33-L39 | train | Define a new group | [
30522,
13366,
9375,
1035,
2177,
1006,
2171,
1010,
1004,
3796,
1007,
4942,
8663,
8873,
2290,
1027,
2969,
1012,
2465,
1012,
2047,
1006,
2969,
1007,
4942,
8663,
8873,
2290,
1012,
11307,
1027,
2171,
4942,
8663,
8873,
2290,
1012,
9986,
2015,
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_sql/lib/2017-10-01-preview/generated/azure_mgmt_sql/elastic_pools.rb | Azure::SQL::Mgmt::V2017_10_01_preview.ElasticPools.list_by_server_next | def list_by_server_next(next_page_link, custom_headers:nil)
response = list_by_server_next_async(next_page_link, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def list_by_server_next(next_page_link, custom_headers:nil)
response = list_by_server_next_async(next_page_link, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"list_by_server_next",
"(",
"next_page_link",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"list_by_server_next_async",
"(",
"next_page_link",
",",
"custom_headers",
":custom_headers",
")",
".",
"value!",
"response",
".",
"body",
"unless",
"response... | Gets all elastic pools in a server.
@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 [ElasticPoolListResult] operation results. | [
"Gets",
"all",
"elastic",
"pools",
"in",
"a",
"server",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_sql/lib/2017-10-01-preview/generated/azure_mgmt_sql/elastic_pools.rb#L711-L714 | train | Gets the list of the elastic network interfaces in a server. | [
30522,
13366,
2862,
1035,
2011,
1035,
8241,
1035,
2279,
1006,
2279,
1035,
3931,
1035,
4957,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
2862,
1035,
2011,
1035,
8241,
1035,
2279,
1035,
2004,
6038,
2278,
1006,
2279,
1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
aws/aws-sdk-ruby | gems/aws-sdk-cloudwatch/lib/aws-sdk-cloudwatch/alarm.rb | Aws::CloudWatch.Alarm.set_state | def set_state(options = {})
options = options.merge(alarm_name: @name)
resp = @client.set_alarm_state(options)
resp.data
end | ruby | def set_state(options = {})
options = options.merge(alarm_name: @name)
resp = @client.set_alarm_state(options)
resp.data
end | [
"def",
"set_state",
"(",
"options",
"=",
"{",
"}",
")",
"options",
"=",
"options",
".",
"merge",
"(",
"alarm_name",
":",
"@name",
")",
"resp",
"=",
"@client",
".",
"set_alarm_state",
"(",
"options",
")",
"resp",
".",
"data",
"end"
] | @example Request syntax with placeholder values
alarm.set_state({
state_value: "OK", # required, accepts OK, ALARM, INSUFFICIENT_DATA
state_reason: "StateReason", # required
state_reason_data: "StateReasonData",
})
@param [Hash] options ({})
@option options [required, String] :state_value
The... | [
"@example",
"Request",
"syntax",
"with",
"placeholder",
"values"
] | e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d | https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-cloudwatch/lib/aws-sdk-cloudwatch/alarm.rb#L442-L446 | train | Set the state of the alarm | [
30522,
13366,
2275,
1035,
2110,
1006,
7047,
1027,
1063,
1065,
1007,
7047,
1027,
7047,
1012,
13590,
1006,
8598,
1035,
2171,
1024,
1030,
2171,
1007,
24501,
2361,
1027,
1030,
7396,
1012,
2275,
1035,
8598,
1035,
2110,
1006,
7047,
1007,
24501,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | data/azure_service_fabric/lib/6.4.0.36/generated/azure_service_fabric/mesh_code_package.rb | Azure::ServiceFabric::V6_4_0_36.MeshCodePackage.get_container_logs | def get_container_logs(application_resource_name, service_resource_name, replica_name, code_package_name, tail:nil, custom_headers:nil)
response = get_container_logs_async(application_resource_name, service_resource_name, replica_name, code_package_name, tail:tail, custom_headers:custom_headers).value!
resp... | ruby | def get_container_logs(application_resource_name, service_resource_name, replica_name, code_package_name, tail:nil, custom_headers:nil)
response = get_container_logs_async(application_resource_name, service_resource_name, replica_name, code_package_name, tail:tail, custom_headers:custom_headers).value!
resp... | [
"def",
"get_container_logs",
"(",
"application_resource_name",
",",
"service_resource_name",
",",
"replica_name",
",",
"code_package_name",
",",
"tail",
":",
"nil",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"get_container_logs_async",
"(",
"application_re... | Gets the logs from the container.
Gets the logs for the container of the specified code package of the service
replica.
@param application_resource_name [String] The identity of the application.
@param service_resource_name [String] The identity of the service.
@param replica_name [String] Service Fabric replica... | [
"Gets",
"the",
"logs",
"from",
"the",
"container",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_service_fabric/lib/6.4.0.36/generated/azure_service_fabric/mesh_code_package.rb#L42-L45 | train | Gets the logs for the container. | [
30522,
13366,
2131,
1035,
11661,
1035,
15664,
1006,
4646,
1035,
7692,
1035,
2171,
1010,
2326,
1035,
7692,
1035,
2171,
1010,
15059,
1035,
2171,
1010,
3642,
1035,
7427,
1035,
2171,
1010,
5725,
1024,
9152,
2140,
1010,
7661,
1035,
20346,
2015,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_recovery_services_site_recovery/lib/2016-08-10/generated/azure_mgmt_recovery_services_site_recovery/recovery_points.rb | Azure::RecoveryServicesSiteRecovery::Mgmt::V2016_08_10.RecoveryPoints.list_by_replication_protected_items_with_http_info | def list_by_replication_protected_items_with_http_info(fabric_name, protection_container_name, replicated_protected_item_name, custom_headers:nil)
list_by_replication_protected_items_async(fabric_name, protection_container_name, replicated_protected_item_name, custom_headers:custom_headers).value!
end | ruby | def list_by_replication_protected_items_with_http_info(fabric_name, protection_container_name, replicated_protected_item_name, custom_headers:nil)
list_by_replication_protected_items_async(fabric_name, protection_container_name, replicated_protected_item_name, custom_headers:custom_headers).value!
end | [
"def",
"list_by_replication_protected_items_with_http_info",
"(",
"fabric_name",
",",
"protection_container_name",
",",
"replicated_protected_item_name",
",",
"custom_headers",
":",
"nil",
")",
"list_by_replication_protected_items_async",
"(",
"fabric_name",
",",
"protection_contai... | Get recovery points for a replication protected item.
Lists the available recovery points for a replication protected item.
@param fabric_name [String] The fabric name.
@param protection_container_name [String] The protection container name.
@param replicated_protected_item_name [String] The replication protected... | [
"Get",
"recovery",
"points",
"for",
"a",
"replication",
"protected",
"item",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_recovery_services_site_recovery/lib/2016-08-10/generated/azure_mgmt_recovery_services_site_recovery/recovery_points.rb#L168-L170 | train | Gets the list of all the protection items in a fabric. | [
30522,
13366,
2862,
1035,
2011,
1035,
21647,
1035,
5123,
1035,
5167,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
8313,
1035,
2171,
1010,
3860,
1035,
11661,
1035,
2171,
1010,
28024,
2094,
1035,
5123,
1035,
8875,
1035,
2171,
1010,
7661,
1035,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
aws/aws-sdk-ruby | gems/aws-sdk-ec2/lib/aws-sdk-ec2/volume.rb | Aws::EC2.Volume.describe_attribute | def describe_attribute(options = {})
options = options.merge(volume_id: @id)
resp = @client.describe_volume_attribute(options)
resp.data
end | ruby | def describe_attribute(options = {})
options = options.merge(volume_id: @id)
resp = @client.describe_volume_attribute(options)
resp.data
end | [
"def",
"describe_attribute",
"(",
"options",
"=",
"{",
"}",
")",
"options",
"=",
"options",
".",
"merge",
"(",
"volume_id",
":",
"@id",
")",
"resp",
"=",
"@client",
".",
"describe_volume_attribute",
"(",
"options",
")",
"resp",
".",
"data",
"end"
] | @example Request syntax with placeholder values
volume.describe_attribute({
attribute: "autoEnableIO", # required, accepts autoEnableIO, productCodes
dry_run: false,
})
@param [Hash] options ({})
@option options [required, String] :attribute
The attribute of the volume. This parameter is required.... | [
"@example",
"Request",
"syntax",
"with",
"placeholder",
"values"
] | e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d | https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-ec2/lib/aws-sdk-ec2/volume.rb#L388-L392 | train | Describe the attributes of a volume | [
30522,
13366,
6235,
1035,
17961,
1006,
7047,
1027,
1063,
1065,
1007,
7047,
1027,
7047,
1012,
13590,
1006,
3872,
1035,
8909,
1024,
1030,
8909,
1007,
24501,
2361,
1027,
1030,
7396,
1012,
6235,
1035,
3872,
1035,
17961,
1006,
7047,
1007,
24501,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
github/linguist | samples/Ruby/sinatra.rb | Sinatra.Base.indifferent_hash | def indifferent_hash
Hash.new {|hash,key| hash[key.to_s] if Symbol === key }
end | ruby | def indifferent_hash
Hash.new {|hash,key| hash[key.to_s] if Symbol === key }
end | [
"def",
"indifferent_hash",
"Hash",
".",
"new",
"{",
"|",
"hash",
",",
"key",
"|",
"hash",
"[",
"key",
".",
"to_s",
"]",
"if",
"Symbol",
"===",
"key",
"}",
"end"
] | Creates a Hash with indifferent access. | [
"Creates",
"a",
"Hash",
"with",
"indifferent",
"access",
"."
] | 9116c90fcbb82ac03b4b33c58cfbde1fcf745e99 | https://github.com/github/linguist/blob/9116c90fcbb82ac03b4b33c58cfbde1fcf745e99/samples/Ruby/sinatra.rb#L926-L928 | train | Returns a hash of the indifferent symbols in the array | [
30522,
13366,
24436,
1035,
23325,
23325,
1012,
2047,
1063,
1064,
23325,
1010,
3145,
1064,
23325,
1031,
3145,
1012,
2000,
1035,
1055,
1033,
2065,
6454,
1027,
1027,
1027,
3145,
1065,
2203,
102,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_labservices/lib/2018-10-15/generated/azure_mgmt_labservices/global_users.rb | Azure::Labservices::Mgmt::V2018_10_15.GlobalUsers.begin_start_environment | def begin_start_environment(user_name, environment_operations_payload, custom_headers:nil)
response = begin_start_environment_async(user_name, environment_operations_payload, custom_headers:custom_headers).value!
nil
end | ruby | def begin_start_environment(user_name, environment_operations_payload, custom_headers:nil)
response = begin_start_environment_async(user_name, environment_operations_payload, custom_headers:custom_headers).value!
nil
end | [
"def",
"begin_start_environment",
"(",
"user_name",
",",
"environment_operations_payload",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"begin_start_environment_async",
"(",
"user_name",
",",
"environment_operations_payload",
",",
"custom_headers",
":custom_header... | Starts an environment by starting all resources inside the environment. This
operation can take a while to complete
@param user_name [String] The name of the user.
@param environment_operations_payload [EnvironmentOperationsPayload]
Represents payload for any Environment operations like get, start, stop,
connect
... | [
"Starts",
"an",
"environment",
"by",
"starting",
"all",
"resources",
"inside",
"the",
"environment",
".",
"This",
"operation",
"can",
"take",
"a",
"while",
"to",
"complete"
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_labservices/lib/2018-10-15/generated/azure_mgmt_labservices/global_users.rb#L950-L953 | train | Starts an environment. | [
30522,
13366,
4088,
1035,
2707,
1035,
4044,
1006,
5310,
1035,
2171,
1010,
4044,
1035,
3136,
1035,
18093,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
4088,
1035,
2707,
1035,
4044,
1035,
2004,
6038,
2278,
1006,
5310,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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_media_services/lib/2018-07-01/generated/azure_mgmt_media_services/live_events.rb | Azure::MediaServices::Mgmt::V2018_07_01.LiveEvents.stop | def stop(resource_group_name, account_name, live_event_name, parameters, custom_headers:nil)
response = stop_async(resource_group_name, account_name, live_event_name, parameters, custom_headers:custom_headers).value!
nil
end | ruby | def stop(resource_group_name, account_name, live_event_name, parameters, custom_headers:nil)
response = stop_async(resource_group_name, account_name, live_event_name, parameters, custom_headers:custom_headers).value!
nil
end | [
"def",
"stop",
"(",
"resource_group_name",
",",
"account_name",
",",
"live_event_name",
",",
"parameters",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"stop_async",
"(",
"resource_group_name",
",",
"account_name",
",",
"live_event_name",
",",
"parameter... | Stop Live Event
Stops an existing Live Event.
@param resource_group_name [String] The name of the resource group within the
Azure subscription.
@param account_name [String] The Media Services account name.
@param live_event_name [String] The name of the Live Event.
@param parameters [LiveEventActionInput] LiveE... | [
"Stop",
"Live",
"Event"
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_media_services/lib/2018-07-01/generated/azure_mgmt_media_services/live_events.rb#L436-L439 | train | Stops the live event. | [
30522,
13366,
2644,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
4070,
1035,
2171,
1010,
2444,
1035,
2724,
1035,
2171,
1010,
11709,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
2644,
1035,
2004,
6038,
2278,
1006,
7692,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
etewiah/property_web_builder | app/models/pwb/website.rb | Pwb.Website.get_element_class | def get_element_class(element_name)
style_details = style_variables_for_theme["vic"] || Pwb::PresetStyle.default_values
style_associations = style_details["associations"] || []
style_associations[element_name] || ""
end | ruby | def get_element_class(element_name)
style_details = style_variables_for_theme["vic"] || Pwb::PresetStyle.default_values
style_associations = style_details["associations"] || []
style_associations[element_name] || ""
end | [
"def",
"get_element_class",
"(",
"element_name",
")",
"style_details",
"=",
"style_variables_for_theme",
"[",
"\"vic\"",
"]",
"||",
"Pwb",
"::",
"PresetStyle",
".",
"default_values",
"style_associations",
"=",
"style_details",
"[",
"\"associations\"",
"]",
"||",
"[",
... | spt 2017 - above 2 will be redundant once vic becomes default layout
below used when rendering to decide which class names
to use for which elements | [
"spt",
"2017",
"-",
"above",
"2",
"will",
"be",
"redundant",
"once",
"vic",
"becomes",
"default",
"layout",
"below",
"used",
"when",
"rendering",
"to",
"decide",
"which",
"class",
"names",
"to",
"use",
"for",
"which",
"elements"
] | fba4e6d4ffa7bc1f4d3b50dfa5a6a9fbfee23f21 | https://github.com/etewiah/property_web_builder/blob/fba4e6d4ffa7bc1f4d3b50dfa5a6a9fbfee23f21/app/models/pwb/website.rb#L152-L156 | train | Returns the class of the element with the given name. | [
30522,
13366,
2131,
1035,
5783,
1035,
2465,
1006,
5783,
1035,
2171,
1007,
2806,
1035,
4751,
1027,
2806,
1035,
10857,
1035,
2005,
1035,
4323,
1031,
1000,
10967,
1000,
1033,
1064,
1064,
1052,
2860,
2497,
1024,
1024,
3653,
13462,
21756,
2571,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_container_registry/lib/2017-06-01-preview/generated/azure_mgmt_container_registry/webhooks.rb | Azure::ContainerRegistry::Mgmt::V2017_06_01_preview.Webhooks.update | def update(resource_group_name, registry_name, webhook_name, webhook_update_parameters, custom_headers:nil)
response = update_async(resource_group_name, registry_name, webhook_name, webhook_update_parameters, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def update(resource_group_name, registry_name, webhook_name, webhook_update_parameters, custom_headers:nil)
response = update_async(resource_group_name, registry_name, webhook_name, webhook_update_parameters, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"update",
"(",
"resource_group_name",
",",
"registry_name",
",",
"webhook_name",
",",
"webhook_update_parameters",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"update_async",
"(",
"resource_group_name",
",",
"registry_name",
",",
"webhook_name",
",... | Updates a webhook with the specified parameters.
@param resource_group_name [String] The name of the resource group to which
the container registry belongs.
@param registry_name [String] The name of the container registry.
@param webhook_name [String] The name of the webhook.
@param webhook_update_parameters [Web... | [
"Updates",
"a",
"webhook",
"with",
"the",
"specified",
"parameters",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_container_registry/lib/2017-06-01-preview/generated/azure_mgmt_container_registry/webhooks.rb#L235-L238 | train | Updates a webhook. | [
30522,
13366,
10651,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
15584,
1035,
2171,
1010,
4773,
6806,
6559,
1035,
2171,
1010,
4773,
6806,
6559,
1035,
10651,
1035,
11709,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
10651... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | data/azure_service_fabric/lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb | Azure::ServiceFabric::V6_2_0_9.ServiceFabricClientAPIs.invoke_infrastructure_command_with_http_info | def invoke_infrastructure_command_with_http_info(command, service_id:nil, timeout:60, custom_headers:nil)
invoke_infrastructure_command_async(command, service_id:service_id, timeout:timeout, custom_headers:custom_headers).value!
end | ruby | def invoke_infrastructure_command_with_http_info(command, service_id:nil, timeout:60, custom_headers:nil)
invoke_infrastructure_command_async(command, service_id:service_id, timeout:timeout, custom_headers:custom_headers).value!
end | [
"def",
"invoke_infrastructure_command_with_http_info",
"(",
"command",
",",
"service_id",
":",
"nil",
",",
"timeout",
":",
"60",
",",
"custom_headers",
":",
"nil",
")",
"invoke_infrastructure_command_async",
"(",
"command",
",",
"service_id",
":service_id",
",",
"time... | Invokes an administrative command on the given Infrastructure Service
instance.
For clusters that have one or more instances of the Infrastructure Service
configured,
this API provides a way to send infrastructure-specific commands to a
particular
instance of the Infrastructure Service.
Available commands and ... | [
"Invokes",
"an",
"administrative",
"command",
"on",
"the",
"given",
"Infrastructure",
"Service",
"instance",
"."
] | 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#L20384-L20386 | train | Invoke an infrastructure command. | [
30522,
13366,
1999,
6767,
3489,
1035,
6502,
1035,
3094,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
3094,
1010,
2326,
1035,
8909,
1024,
9152,
2140,
1010,
2051,
5833,
1024,
3438,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
1999,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/user.rb | Azure::ApiManagement::Mgmt::V2018_01_01.User.generate_sso_url_with_http_info | def generate_sso_url_with_http_info(resource_group_name, service_name, uid, custom_headers:nil)
generate_sso_url_async(resource_group_name, service_name, uid, custom_headers:custom_headers).value!
end | ruby | def generate_sso_url_with_http_info(resource_group_name, service_name, uid, custom_headers:nil)
generate_sso_url_async(resource_group_name, service_name, uid, custom_headers:custom_headers).value!
end | [
"def",
"generate_sso_url_with_http_info",
"(",
"resource_group_name",
",",
"service_name",
",",
"uid",
",",
"custom_headers",
":",
"nil",
")",
"generate_sso_url_async",
"(",
"resource_group_name",
",",
"service_name",
",",
"uid",
",",
"custom_headers",
":custom_headers",
... | Retrieves a redirection URL containing an authentication token for signing a
given user into the developer portal.
@param resource_group_name [String] The name of the resource group.
@param service_name [String] The name of the API Management service.
@param uid [String] User identifier. Must be unique in the curr... | [
"Retrieves",
"a",
"redirection",
"URL",
"containing",
"an",
"authentication",
"token",
"for",
"signing",
"a",
"given",
"user",
"into",
"the",
"developer",
"portal",
"."
] | 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/user.rb#L869-L871 | train | Generate SSO URL for the specified App Service plan. | [
30522,
13366,
9699,
1035,
7020,
2080,
1035,
24471,
2140,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2326,
1035,
2171,
1010,
21318,
2094,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
9699,
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... |
Katello/katello | app/models/katello/pulp_sync_status.rb | Katello.PulpSyncProgress.format_errors | def format_errors(details)
errors = {messages: [], details: []}
if details && !details.key?(:finished_count)
details.each do |step, report|
if step == "content"
parse_content(report, errors)
else
parse_generic(report, errors)
end
end
... | ruby | def format_errors(details)
errors = {messages: [], details: []}
if details && !details.key?(:finished_count)
details.each do |step, report|
if step == "content"
parse_content(report, errors)
else
parse_generic(report, errors)
end
end
... | [
"def",
"format_errors",
"(",
"details",
")",
"errors",
"=",
"{",
"messages",
":",
"[",
"]",
",",
"details",
":",
"[",
"]",
"}",
"if",
"details",
"&&",
"!",
"details",
".",
"key?",
"(",
":finished_count",
")",
"details",
".",
"each",
"do",
"|",
"step"... | Possible formats coming from pulp
We ignore this case:
{'finished_count' => {}}
We extract from this case:
{'content' => {'error' => ''},
'errata' => {'error' => ''},
'packages' => {'error' => ''},
'metadata' => {'error_details => ''}
} | [
"Possible",
"formats",
"coming",
"from",
"pulp"
] | a1c9280067607999cae43bab89b53ba870856b76 | https://github.com/Katello/katello/blob/a1c9280067607999cae43bab89b53ba870856b76/app/models/katello/pulp_sync_status.rb#L68-L82 | train | Format errors | [
30522,
13366,
4289,
1035,
10697,
1006,
4751,
1007,
10697,
1027,
1063,
7696,
1024,
1031,
1033,
1010,
4751,
1024,
1031,
1033,
1065,
2065,
4751,
1004,
1004,
999,
4751,
1012,
3145,
1029,
1006,
1024,
2736,
1035,
4175,
1007,
4751,
1012,
2169,
2... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
meew0/discordrb | lib/discordrb/logger.rb | Discordrb.Logger.mode= | def mode=(value)
case value
when :debug
@enabled_modes = %i[debug good info warn error out in ratelimit]
when :verbose
@enabled_modes = %i[good info warn error out in ratelimit]
when :normal
@enabled_modes = %i[info warn error ratelimit]
when :quiet
@enabled... | ruby | def mode=(value)
case value
when :debug
@enabled_modes = %i[debug good info warn error out in ratelimit]
when :verbose
@enabled_modes = %i[good info warn error out in ratelimit]
when :normal
@enabled_modes = %i[info warn error ratelimit]
when :quiet
@enabled... | [
"def",
"mode",
"=",
"(",
"value",
")",
"case",
"value",
"when",
":debug",
"@enabled_modes",
"=",
"%i[",
"debug",
"good",
"info",
"warn",
"error",
"out",
"in",
"ratelimit",
"]",
"when",
":verbose",
"@enabled_modes",
"=",
"%i[",
"good",
"info",
"warn",
"erro... | Sets the logging mode
Possible modes are:
* :debug logs everything
* :verbose logs everything except for debug messages
* :normal logs useful information, warnings and errors
* :quiet only logs warnings and errors
* :silent logs nothing
@param value [Symbol] What logging mode to use | [
"Sets",
"the",
"logging",
"mode",
"Possible",
"modes",
"are",
":",
"*",
":",
"debug",
"logs",
"everything",
"*",
":",
"verbose",
"logs",
"everything",
"except",
"for",
"debug",
"messages",
"*",
":",
"normal",
"logs",
"useful",
"information",
"warnings",
"and... | 764298a1ff0be69a1853b510d736f21c2b91a2fe | https://github.com/meew0/discordrb/blob/764298a1ff0be69a1853b510d736f21c2b91a2fe/lib/discordrb/logger.rb#L66-L79 | train | Set the mode of the object. | [
30522,
13366,
5549,
1027,
1006,
3643,
1007,
2553,
3643,
2043,
1024,
2139,
8569,
2290,
1030,
9124,
1035,
11583,
1027,
1003,
1045,
1031,
2139,
8569,
2290,
2204,
18558,
11582,
7561,
2041,
1999,
3446,
17960,
4183,
1033,
2043,
1024,
12034,
9232,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
mikel/mail | lib/mail/network/retriever_methods/base.rb | Mail.Retriever.last | def last(options = nil, &block)
options = options ? Hash[options] : {}
options[:what] = :last
options[:count] ||= 1
find(options, &block)
end | ruby | def last(options = nil, &block)
options = options ? Hash[options] : {}
options[:what] = :last
options[:count] ||= 1
find(options, &block)
end | [
"def",
"last",
"(",
"options",
"=",
"nil",
",",
"&",
"block",
")",
"options",
"=",
"options",
"?",
"Hash",
"[",
"options",
"]",
":",
"{",
"}",
"options",
"[",
":what",
"]",
"=",
":last",
"options",
"[",
":count",
"]",
"||=",
"1",
"find",
"(",
"op... | Get the most recent received email(s)
Possible options:
count: number of emails to retrieve. The default value is 1.
order: order of emails returned. Possible values are :asc or :desc. Default value is :asc. | [
"Get",
"the",
"most",
"recent",
"received",
"email",
"(",
"s",
")"
] | fb53fb369eb2bf0494ac70675970c90cdcc3f495 | https://github.com/mikel/mail/blob/fb53fb369eb2bf0494ac70675970c90cdcc3f495/lib/mail/network/retriever_methods/base.rb#L27-L32 | train | Returns the last element in the list | [
30522,
13366,
2197,
1006,
7047,
1027,
9152,
2140,
1010,
1004,
3796,
1007,
7047,
1027,
7047,
1029,
23325,
1031,
7047,
1033,
1024,
1063,
1065,
7047,
1031,
1024,
2054,
1033,
1027,
1024,
2197,
7047,
1031,
1024,
4175,
1033,
1064,
1064,
1027,
1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
sunspot/sunspot | sunspot/lib/sunspot/schema.rb | Sunspot.Schema.to_xml | def to_xml
template_path = File.join(File.dirname(__FILE__), '..', '..', 'templates', 'schema.xml.erb')
template_text = File.read(template_path)
erb = if RUBY_VERSION >= '2.6'
ERB.new(template_text, trim_mode: '-')
else
ERB.new(template_text, nil, '-')
end
erb.resul... | ruby | def to_xml
template_path = File.join(File.dirname(__FILE__), '..', '..', 'templates', 'schema.xml.erb')
template_text = File.read(template_path)
erb = if RUBY_VERSION >= '2.6'
ERB.new(template_text, trim_mode: '-')
else
ERB.new(template_text, nil, '-')
end
erb.resul... | [
"def",
"to_xml",
"template_path",
"=",
"File",
".",
"join",
"(",
"File",
".",
"dirname",
"(",
"__FILE__",
")",
",",
"'..'",
",",
"'..'",
",",
"'templates'",
",",
"'schema.xml.erb'",
")",
"template_text",
"=",
"File",
".",
"read",
"(",
"template_path",
")",... | Return an XML representation of this schema using the ERB template | [
"Return",
"an",
"XML",
"representation",
"of",
"this",
"schema",
"using",
"the",
"ERB",
"template"
] | 31dd76cd7a14a4ef7bd541de97483d8cd72ff685 | https://github.com/sunspot/sunspot/blob/31dd76cd7a14a4ef7bd541de97483d8cd72ff685/sunspot/lib/sunspot/schema.rb#L90-L101 | train | Convert the schema to an XML object. | [
30522,
13366,
2000,
1035,
20950,
23561,
1035,
4130,
1027,
5371,
1012,
3693,
1006,
5371,
1012,
16101,
18442,
1006,
1035,
1035,
5371,
1035,
1035,
1007,
1010,
1005,
1012,
1012,
1005,
1010,
1005,
1012,
1012,
1005,
1010,
1005,
23561,
2015,
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_resources/lib/2016-02-01/generated/azure_mgmt_resources/tags.rb | Azure::Resources::Mgmt::V2016_02_01.Tags.delete_value | def delete_value(tag_name, tag_value, custom_headers:nil)
response = delete_value_async(tag_name, tag_value, custom_headers:custom_headers).value!
nil
end | ruby | def delete_value(tag_name, tag_value, custom_headers:nil)
response = delete_value_async(tag_name, tag_value, custom_headers:custom_headers).value!
nil
end | [
"def",
"delete_value",
"(",
"tag_name",
",",
"tag_value",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"delete_value_async",
"(",
"tag_name",
",",
"tag_value",
",",
"custom_headers",
":custom_headers",
")",
".",
"value!",
"nil",
"end"
] | Delete a subscription resource tag value.
@param tag_name [String] The name of the tag.
@param tag_value [String] The value of the tag.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request. | [
"Delete",
"a",
"subscription",
"resource",
"tag",
"value",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_resources/lib/2016-02-01/generated/azure_mgmt_resources/tags.rb#L33-L36 | train | Deletes a tag value. | [
30522,
13366,
3972,
12870,
1035,
3643,
1006,
6415,
1035,
2171,
1010,
6415,
1035,
3643,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
3972,
12870,
1035,
3643,
1035,
2004,
6038,
2278,
1006,
6415,
1035,
2171,
1010,
6415,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/server_endpoints.rb | Azure::StorageSync::Mgmt::V2018_07_01.ServerEndpoints.list_by_sync_group | def list_by_sync_group(resource_group_name, storage_sync_service_name, sync_group_name, custom_headers:nil)
response = list_by_sync_group_async(resource_group_name, storage_sync_service_name, sync_group_name, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def list_by_sync_group(resource_group_name, storage_sync_service_name, sync_group_name, custom_headers:nil)
response = list_by_sync_group_async(resource_group_name, storage_sync_service_name, sync_group_name, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"list_by_sync_group",
"(",
"resource_group_name",
",",
"storage_sync_service_name",
",",
"sync_group_name",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"list_by_sync_group_async",
"(",
"resource_group_name",
",",
"storage_sync_service_name",
",",
"sync_g... | Get a ServerEndpoint list.
@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 sync_group_name [String] Name of Sync Group resource.
@param custom_headers [Hash{String => String}]... | [
"Get",
"a",
"ServerEndpoint",
"list",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_storagesync/lib/2018-07-01/generated/azure_mgmt_storagesync/server_endpoints.rb#L302-L305 | train | Gets the list of all the image documents in a sync group. | [
30522,
13366,
2862,
1035,
2011,
1035,
26351,
1035,
2177,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
5527,
1035,
26351,
1035,
2326,
1035,
2171,
1010,
26351,
1035,
2177,
1035,
2171,
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... |
aws/aws-sdk-ruby | gems/aws-sdk-dynamodb/lib/aws-sdk-dynamodb/table.rb | Aws::DynamoDB.Table.query | def query(options = {})
options = options.merge(table_name: @name)
resp = @client.query(options)
resp.data
end | ruby | def query(options = {})
options = options.merge(table_name: @name)
resp = @client.query(options)
resp.data
end | [
"def",
"query",
"(",
"options",
"=",
"{",
"}",
")",
"options",
"=",
"options",
".",
"merge",
"(",
"table_name",
":",
"@name",
")",
"resp",
"=",
"@client",
".",
"query",
"(",
"options",
")",
"resp",
".",
"data",
"end"
] | @example Request syntax with placeholder values
table.query({
index_name: "IndexName",
select: "ALL_ATTRIBUTES", # accepts ALL_ATTRIBUTES, ALL_PROJECTED_ATTRIBUTES, SPECIFIC_ATTRIBUTES, COUNT
attributes_to_get: ["AttributeName"],
limit: 1,
consistent_read: false,
key_conditions: {
... | [
"@example",
"Request",
"syntax",
"with",
"placeholder",
"values"
] | e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d | https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-dynamodb/lib/aws-sdk-dynamodb/table.rb#L1357-L1361 | train | Returns the number of rows in the table | [
30522,
13366,
23032,
1006,
7047,
1027,
1063,
1065,
1007,
7047,
1027,
7047,
1012,
13590,
1006,
2795,
1035,
2171,
1024,
1030,
2171,
1007,
24501,
2361,
1027,
1030,
7396,
1012,
23032,
1006,
7047,
1007,
24501,
2361,
1012,
2951,
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... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_storagesync/lib/2018-07-01/generated/azure_mgmt_storagesync/registered_servers.rb | Azure::StorageSync::Mgmt::V2018_07_01.RegisteredServers.begin_trigger_rollover_with_http_info | def begin_trigger_rollover_with_http_info(resource_group_name, storage_sync_service_name, server_id, parameters, custom_headers:nil)
begin_trigger_rollover_async(resource_group_name, storage_sync_service_name, server_id, parameters, custom_headers:custom_headers).value!
end | ruby | def begin_trigger_rollover_with_http_info(resource_group_name, storage_sync_service_name, server_id, parameters, custom_headers:nil)
begin_trigger_rollover_async(resource_group_name, storage_sync_service_name, server_id, parameters, custom_headers:custom_headers).value!
end | [
"def",
"begin_trigger_rollover_with_http_info",
"(",
"resource_group_name",
",",
"storage_sync_service_name",
",",
"server_id",
",",
"parameters",
",",
"custom_headers",
":",
"nil",
")",
"begin_trigger_rollover_async",
"(",
"resource_group_name",
",",
"storage_sync_service_name... | Triggers Server certificate rollover.
@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 R... | [
"Triggers",
"Server",
"certificate",
"rollover",
"."
] | 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#L625-L627 | train | Trigger rollover of a server. | [
30522,
13366,
4088,
1035,
9495,
1035,
4897,
7840,
1035,
2007,
1035,
8299,
1035,
18558,
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,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
cheezy/page-object | lib/page-object/accessors.rb | PageObject.Accessors.text_field | def text_field(name, identifier={:index => 0}, &block)
standard_methods(name, identifier, 'text_field_for', &block)
define_method(name) do
return platform.text_field_value_for identifier.clone unless block_given?
self.send("#{name}_element").value
end
define_method("#{name}=") do... | ruby | def text_field(name, identifier={:index => 0}, &block)
standard_methods(name, identifier, 'text_field_for', &block)
define_method(name) do
return platform.text_field_value_for identifier.clone unless block_given?
self.send("#{name}_element").value
end
define_method("#{name}=") do... | [
"def",
"text_field",
"(",
"name",
",",
"identifier",
"=",
"{",
":index",
"=>",
"0",
"}",
",",
"&",
"block",
")",
"standard_methods",
"(",
"name",
",",
"identifier",
",",
"'text_field_for'",
",",
"block",
")",
"define_method",
"(",
"name",
")",
"do",
"ret... | adds four methods to the page object - one to set text in a text field,
another to retrieve text from a text field, another to return the text
field element, another to check the text field's existence.
@example
text_field(:first_name, :id => "first_name")
# will generate 'first_name', 'first_name=', 'first_n... | [
"adds",
"four",
"methods",
"to",
"the",
"page",
"object",
"-",
"one",
"to",
"set",
"text",
"in",
"a",
"text",
"field",
"another",
"to",
"retrieve",
"text",
"from",
"a",
"text",
"field",
"another",
"to",
"return",
"the",
"text",
"field",
"element",
"anoth... | 850d775bf63768fbb1551a34480195785fe8e193 | https://github.com/cheezy/page-object/blob/850d775bf63768fbb1551a34480195785fe8e193/lib/page-object/accessors.rb#L196-L206 | train | Creates a text field. | [
30522,
13366,
3793,
1035,
2492,
1006,
2171,
1010,
8909,
4765,
18095,
1027,
1063,
1024,
5950,
1027,
1028,
1014,
1065,
1010,
1004,
3796,
1007,
3115,
1035,
4725,
1006,
2171,
1010,
8909,
4765,
18095,
1010,
1005,
3793,
1035,
2492,
1035,
2005,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/replicationv_centers.rb | Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10.ReplicationvCenters.delete | def delete(fabric_name, v_center_name, custom_headers:nil)
response = delete_async(fabric_name, v_center_name, custom_headers:custom_headers).value!
nil
end | ruby | def delete(fabric_name, v_center_name, custom_headers:nil)
response = delete_async(fabric_name, v_center_name, custom_headers:custom_headers).value!
nil
end | [
"def",
"delete",
"(",
"fabric_name",
",",
"v_center_name",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"delete_async",
"(",
"fabric_name",
",",
"v_center_name",
",",
"custom_headers",
":custom_headers",
")",
".",
"value!",
"nil",
"end"
] | Remove vCenter operation.
The operation to remove(unregister) a registered vCenter server from the
vault.
@param fabric_name [String] Fabric name.
@param v_center_name [String] vCenter name.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request. | [
"Remove",
"vCenter",
"operation",
"."
] | 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/replicationv_centers.rb#L279-L282 | train | Deletes a virtual network in a fabric. | [
30522,
13366,
3972,
12870,
1006,
8313,
1035,
2171,
1010,
1058,
1035,
2415,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
3972,
12870,
1035,
2004,
6038,
2278,
1006,
8313,
1035,
2171,
1010,
1058,
1035,
2415,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
aws/aws-sdk-ruby | gems/aws-sdk-rds/lib/aws-sdk-rds/db_snapshot.rb | Aws::RDS.DBSnapshot.restore | def restore(options = {})
options = options.merge(db_snapshot_identifier: @snapshot_id)
resp = @client.restore_db_instance_from_db_snapshot(options)
DBInstance.new(
id: resp.data.db_instance.db_instance_identifier,
data: resp.data.db_instance,
client: @client
)
end | ruby | def restore(options = {})
options = options.merge(db_snapshot_identifier: @snapshot_id)
resp = @client.restore_db_instance_from_db_snapshot(options)
DBInstance.new(
id: resp.data.db_instance.db_instance_identifier,
data: resp.data.db_instance,
client: @client
)
end | [
"def",
"restore",
"(",
"options",
"=",
"{",
"}",
")",
"options",
"=",
"options",
".",
"merge",
"(",
"db_snapshot_identifier",
":",
"@snapshot_id",
")",
"resp",
"=",
"@client",
".",
"restore_db_instance_from_db_snapshot",
"(",
"options",
")",
"DBInstance",
".",
... | @example Request syntax with placeholder values
dbinstance = db_snapshot.restore({
db_instance_identifier: "String", # required
db_instance_class: "String",
port: 1,
availability_zone: "String",
db_subnet_group_name: "String",
multi_az: false,
publicly_accessible: false,
auto... | [
"@example",
"Request",
"syntax",
"with",
"placeholder",
"values"
] | e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d | https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-rds/lib/aws-sdk-rds/db_snapshot.rb#L796-L804 | train | Restore the DB Instance from a snapshot | [
30522,
13366,
9239,
1006,
7047,
1027,
1063,
1065,
1007,
7047,
1027,
7047,
1012,
13590,
1006,
16962,
1035,
20057,
12326,
1035,
8909,
4765,
18095,
1024,
1030,
20057,
12326,
1035,
8909,
1007,
24501,
2361,
1027,
1030,
7396,
1012,
9239,
1035,
16... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
sds/overcommit | lib/overcommit/hook_loader/base.rb | Overcommit::HookLoader.Base.create_hook | def create_hook(hook_name)
Overcommit::Hook.const_get(@context.hook_class_name).
const_get(hook_name).
new(@config, @context)
rescue LoadError, NameError => error
raise Overcommit::Exceptions::HookLoadError,
"Unable to load hook '#{hook_name}': #... | ruby | def create_hook(hook_name)
Overcommit::Hook.const_get(@context.hook_class_name).
const_get(hook_name).
new(@config, @context)
rescue LoadError, NameError => error
raise Overcommit::Exceptions::HookLoadError,
"Unable to load hook '#{hook_name}': #... | [
"def",
"create_hook",
"(",
"hook_name",
")",
"Overcommit",
"::",
"Hook",
".",
"const_get",
"(",
"@context",
".",
"hook_class_name",
")",
".",
"const_get",
"(",
"hook_name",
")",
".",
"new",
"(",
"@config",
",",
"@context",
")",
"rescue",
"LoadError",
",",
... | Load and return a {Hook} from a CamelCase hook name. | [
"Load",
"and",
"return",
"a",
"{",
"Hook",
"}",
"from",
"a",
"CamelCase",
"hook",
"name",
"."
] | 35d60adb41da942178b789560968e3ad030b0ac7 | https://github.com/sds/overcommit/blob/35d60adb41da942178b789560968e3ad030b0ac7/lib/overcommit/hook_loader/base.rb#L28-L36 | train | Create a hook | [
30522,
13366,
3443,
1035,
8103,
1006,
8103,
1035,
2171,
1007,
2058,
9006,
22930,
1024,
1024,
8103,
1012,
9530,
3367,
1035,
2131,
1006,
1030,
6123,
1012,
8103,
1035,
2465,
1035,
2171,
1007,
1012,
9530,
3367,
1035,
2131,
1006,
8103,
1035,
2... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_redis/lib/2017-10-01/generated/azure_mgmt_redis/redis.rb | Azure::Redis::Mgmt::V2017_10_01.Redis.list_upgrade_notifications | def list_upgrade_notifications(resource_group_name, name, history, custom_headers:nil)
response = list_upgrade_notifications_async(resource_group_name, name, history, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def list_upgrade_notifications(resource_group_name, name, history, custom_headers:nil)
response = list_upgrade_notifications_async(resource_group_name, name, history, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"list_upgrade_notifications",
"(",
"resource_group_name",
",",
"name",
",",
"history",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"list_upgrade_notifications_async",
"(",
"resource_group_name",
",",
"name",
",",
"history",
",",
"custom_headers",
"... | Gets any upgrade notifications for a Redis cache.
@param resource_group_name [String] The name of the resource group.
@param name [String] The name of the Redis cache.
@param history [Float] how many minutes in past to look for upgrade
notifications
@param custom_headers [Hash{String => String}] A hash of custom ... | [
"Gets",
"any",
"upgrade",
"notifications",
"for",
"a",
"Redis",
"cache",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_redis/lib/2017-10-01/generated/azure_mgmt_redis/redis.rb#L126-L129 | train | Gets the list of upgrade notifications for a resource group. | [
30522,
13366,
2862,
1035,
12200,
1035,
26828,
2015,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2171,
1010,
2381,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
2862,
1035,
12200,
1035,
26828,
2015,
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_web/lib/2018-02-01/generated/azure_mgmt_web/recommendations.rb | Azure::Web::Mgmt::V2018_02_01.Recommendations.list_recommended_rules_for_web_app_as_lazy | def list_recommended_rules_for_web_app_as_lazy(resource_group_name, site_name, featured:nil, filter:nil, custom_headers:nil)
response = list_recommended_rules_for_web_app_async(resource_group_name, site_name, featured:featured, filter:filter, custom_headers:custom_headers).value!
unless response.nil?
... | ruby | def list_recommended_rules_for_web_app_as_lazy(resource_group_name, site_name, featured:nil, filter:nil, custom_headers:nil)
response = list_recommended_rules_for_web_app_async(resource_group_name, site_name, featured:featured, filter:filter, custom_headers:custom_headers).value!
unless response.nil?
... | [
"def",
"list_recommended_rules_for_web_app_as_lazy",
"(",
"resource_group_name",
",",
"site_name",
",",
"featured",
":",
"nil",
",",
"filter",
":",
"nil",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"list_recommended_rules_for_web_app_async",
"(",
"resource... | Get all recommendations for an app.
Get all recommendations for an app.
@param resource_group_name [String] Name of the resource group to which the
resource belongs.
@param site_name [String] Name of the app.
@param featured [Boolean] Specify <code>true</code> to return only the most
critical recommendations. T... | [
"Get",
"all",
"recommendations",
"for",
"an",
"app",
"."
] | 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#L1319-L1328 | train | Gets the list of recommended rules for an App Service Environment. | [
30522,
13366,
2862,
1035,
6749,
1035,
3513,
1035,
2005,
1035,
4773,
1035,
10439,
1035,
2004,
1035,
13971,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2609,
1035,
2171,
1010,
2956,
1024,
9152,
2140,
1010,
11307,
1024,
9152,
2140,
1010,
7661,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
piotrmurach/github | lib/github_api/client/projects/columns.rb | Github.Client::Projects::Columns.get | def get(*args)
arguments(args, required: [:column_id])
params = arguments.params
params["accept"] ||= ::Github::Client::Projects::PREVIEW_MEDIA
get_request("/projects/columns/#{arguments.column_id}", params)
end | ruby | def get(*args)
arguments(args, required: [:column_id])
params = arguments.params
params["accept"] ||= ::Github::Client::Projects::PREVIEW_MEDIA
get_request("/projects/columns/#{arguments.column_id}", params)
end | [
"def",
"get",
"(",
"*",
"args",
")",
"arguments",
"(",
"args",
",",
"required",
":",
"[",
":column_id",
"]",
")",
"params",
"=",
"arguments",
".",
"params",
"params",
"[",
"\"accept\"",
"]",
"||=",
"::",
"Github",
"::",
"Client",
"::",
"Projects",
"::"... | Get a project columns
@example
github = Github.new
github.projects.columns.get :column_id
@see https://developer.github.com/v3/projects/columns/#get-a-project-column
@api public | [
"Get",
"a",
"project",
"columns"
] | 8702452c66bea33c9388550aed9e9974f76aaef1 | https://github.com/piotrmurach/github/blob/8702452c66bea33c9388550aed9e9974f76aaef1/lib/github_api/client/projects/columns.rb#L42-L49 | train | Get a column s segmentation | [
30522,
13366,
2131,
1006,
1008,
12098,
5620,
1007,
9918,
1006,
12098,
5620,
1010,
3223,
1024,
1031,
1024,
5930,
1035,
8909,
1033,
1007,
11498,
5244,
1027,
9918,
1012,
11498,
5244,
11498,
5244,
1031,
1000,
5138,
1000,
1033,
1064,
1064,
1027,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
fastlane/fastlane | fastlane/lib/fastlane/swift_fastlane_api_generator.rb | Fastlane.SwiftFastlaneAPIGenerator.generate_swift | def generate_swift
self.generated_paths = [] # reset generated paths in case we're called multiple times
file_content = []
file_content << "import Foundation"
tool_details = []
ActionsList.all_actions do |action|
next if self.actions_not_supported.include?(action.action_name)
... | ruby | def generate_swift
self.generated_paths = [] # reset generated paths in case we're called multiple times
file_content = []
file_content << "import Foundation"
tool_details = []
ActionsList.all_actions do |action|
next if self.actions_not_supported.include?(action.action_name)
... | [
"def",
"generate_swift",
"self",
".",
"generated_paths",
"=",
"[",
"]",
"# reset generated paths in case we're called multiple times",
"file_content",
"=",
"[",
"]",
"file_content",
"<<",
"\"import Foundation\"",
"tool_details",
"=",
"[",
"]",
"ActionsList",
".",
"all_act... | stores all file names of generated files (as they are generated) | [
"stores",
"all",
"file",
"names",
"of",
"generated",
"files",
"(",
"as",
"they",
"are",
"generated",
")"
] | 457c5d647c77f0e078dafa5129da616914e002c5 | https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/fastlane/lib/fastlane/swift_fastlane_api_generator.rb#L54-L107 | train | Generate the file content for the Swift file | [
30522,
13366,
9699,
1035,
9170,
2969,
1012,
7013,
1035,
10425,
1027,
1031,
1033,
1001,
25141,
7013,
10425,
1999,
2553,
2057,
1005,
2128,
2170,
3674,
2335,
5371,
1035,
4180,
1027,
1031,
1033,
5371,
1035,
4180,
1026,
1026,
1000,
12324,
3192,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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_property_info_list | def get_property_info_list(name_id, include_values:false, continuation_token:nil, timeout:60, custom_headers:nil)
response = get_property_info_list_async(name_id, include_values:include_values, continuation_token:continuation_token, timeout:timeout, custom_headers:custom_headers).value!
response.body unless... | ruby | def get_property_info_list(name_id, include_values:false, continuation_token:nil, timeout:60, custom_headers:nil)
response = get_property_info_list_async(name_id, include_values:include_values, continuation_token:continuation_token, timeout:timeout, custom_headers:custom_headers).value!
response.body unless... | [
"def",
"get_property_info_list",
"(",
"name_id",
",",
"include_values",
":",
"false",
",",
"continuation_token",
":",
"nil",
",",
"timeout",
":",
"60",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"get_property_info_list_async",
"(",
"name_id",
",",
... | Gets information on all Service Fabric properties under a given name.
A Service Fabric name can have one or more named properties that stores
custom information. This operation gets the information about these
properties in a paged list. The information include name, value and metadata
about each of the properties... | [
"Gets",
"information",
"on",
"all",
"Service",
"Fabric",
"properties",
"under",
"a",
"given",
"name",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_service_fabric/lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb#L26590-L26593 | train | Gets the property info list for a given App Service Environment. | [
30522,
13366,
2131,
1035,
3200,
1035,
18558,
1035,
2862,
1006,
2171,
1035,
8909,
1010,
2421,
1035,
5300,
1024,
6270,
1010,
13633,
1035,
19204,
1024,
9152,
2140,
1010,
2051,
5833,
1024,
3438,
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... |
mongodb/mongo-ruby-driver | lib/mongo/collection.rb | Mongo.Collection.insert_one | def insert_one(document, opts = {})
client.send(:with_session, opts) do |session|
write_with_retry(session, write_concern) do |server, txn_num|
Operation::Insert.new(
:documents => [ document ],
:db_name => database.name,
:coll_name => name,
... | ruby | def insert_one(document, opts = {})
client.send(:with_session, opts) do |session|
write_with_retry(session, write_concern) do |server, txn_num|
Operation::Insert.new(
:documents => [ document ],
:db_name => database.name,
:coll_name => name,
... | [
"def",
"insert_one",
"(",
"document",
",",
"opts",
"=",
"{",
"}",
")",
"client",
".",
"send",
"(",
":with_session",
",",
"opts",
")",
"do",
"|",
"session",
"|",
"write_with_retry",
"(",
"session",
",",
"write_concern",
")",
"do",
"|",
"server",
",",
"t... | Insert a single document into the collection.
@example Insert a document into the collection.
collection.insert_one({ name: 'test' })
@param [ Hash ] document The document to insert.
@param [ Hash ] opts The insert options.
@option opts [ Session ] :session The session to use for the operation.
@return [ Re... | [
"Insert",
"a",
"single",
"document",
"into",
"the",
"collection",
"."
] | dca26d0870cb3386fad9ccc1d17228097c1fe1c8 | https://github.com/mongodb/mongo-ruby-driver/blob/dca26d0870cb3386fad9ccc1d17228097c1fe1c8/lib/mongo/collection.rb#L476-L492 | train | Insert one document into the collection | [
30522,
13366,
19274,
1035,
2028,
1006,
6254,
1010,
23569,
2015,
1027,
1063,
1065,
1007,
7396,
1012,
4604,
1006,
1024,
2007,
1035,
5219,
30524,
1035,
2171,
1027,
1028,
7809,
1012,
2171,
1010,
1024,
8902,
2140,
1035,
2171,
1027,
1028,
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_service_fabric/lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb | Azure::ServiceFabric::V6_2_0_9.ServiceFabricClientAPIs.restart_deployed_code_package | def restart_deployed_code_package(node_name, application_id, restart_deployed_code_package_description, timeout:60, custom_headers:nil)
response = restart_deployed_code_package_async(node_name, application_id, restart_deployed_code_package_description, timeout:timeout, custom_headers:custom_headers).value!
... | ruby | def restart_deployed_code_package(node_name, application_id, restart_deployed_code_package_description, timeout:60, custom_headers:nil)
response = restart_deployed_code_package_async(node_name, application_id, restart_deployed_code_package_description, timeout:timeout, custom_headers:custom_headers).value!
... | [
"def",
"restart_deployed_code_package",
"(",
"node_name",
",",
"application_id",
",",
"restart_deployed_code_package_description",
",",
"timeout",
":",
"60",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"restart_deployed_code_package_async",
"(",
"node_name",
... | Restarts a code package deployed on a Service Fabric node in a cluster.
Restarts a code package deployed on a Service Fabric node in a cluster. This
aborts the code package process, which will restart all the user service
replicas hosted in that process.
@param node_name [String] The name of the node.
@param app... | [
"Restarts",
"a",
"code",
"package",
"deployed",
"on",
"a",
"Service",
"Fabric",
"node",
"in",
"a",
"cluster",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_service_fabric/lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb#L17251-L17254 | train | Restarts the code package deployed on the node. | [
30522,
13366,
23818,
1035,
7333,
1035,
3642,
1035,
7427,
1006,
13045,
1035,
2171,
1010,
4646,
1035,
8909,
1010,
23818,
1035,
7333,
1035,
3642,
1035,
7427,
1035,
6412,
1010,
2051,
5833,
1024,
3438,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
kpumuk/meta-tags | lib/meta_tags/renderer.rb | MetaTags.Renderer.render_links | def render_links(tags)
[ :amphtml, :canonical, :prev, :next, :image_src ].each do |tag_name|
href = meta_tags.extract(tag_name)
if href.present?
@normalized_meta_tags[tag_name] = href
tags << Tag.new(:link, rel: tag_name, href: href)
end
end
end | ruby | def render_links(tags)
[ :amphtml, :canonical, :prev, :next, :image_src ].each do |tag_name|
href = meta_tags.extract(tag_name)
if href.present?
@normalized_meta_tags[tag_name] = href
tags << Tag.new(:link, rel: tag_name, href: href)
end
end
end | [
"def",
"render_links",
"(",
"tags",
")",
"[",
":amphtml",
",",
":canonical",
",",
":prev",
",",
":next",
",",
":image_src",
"]",
".",
"each",
"do",
"|",
"tag_name",
"|",
"href",
"=",
"meta_tags",
".",
"extract",
"(",
"tag_name",
")",
"if",
"href",
".",... | Renders links.
@param [Array<Tag>] tags a buffer object to store tag in. | [
"Renders",
"links",
"."
] | 03585f95edf96cd17024c5c155ce46ec8bc47232 | https://github.com/kpumuk/meta-tags/blob/03585f95edf96cd17024c5c155ce46ec8bc47232/lib/meta_tags/renderer.rb#L152-L160 | train | render links | [
30522,
13366,
17552,
1035,
6971,
1006,
22073,
1007,
1031,
1024,
23713,
11039,
19968,
1010,
1024,
18562,
1010,
1024,
3653,
2615,
1010,
1024,
2279,
1010,
1024,
3746,
1035,
5034,
2278,
1033,
1012,
2169,
2079,
1064,
6415,
1035,
2171,
1064,
1785... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_labservices/lib/2018-10-15/generated/azure_mgmt_labservices/lab_accounts.rb | Azure::Labservices::Mgmt::V2018_10_15.LabAccounts.list_by_resource_group_with_http_info | def list_by_resource_group_with_http_info(resource_group_name, expand:nil, filter:nil, top:nil, orderby:nil, custom_headers:nil)
list_by_resource_group_async(resource_group_name, expand:expand, filter:filter, top:top, orderby:orderby, custom_headers:custom_headers).value!
end | ruby | def list_by_resource_group_with_http_info(resource_group_name, expand:nil, filter:nil, top:nil, orderby:nil, custom_headers:nil)
list_by_resource_group_async(resource_group_name, expand:expand, filter:filter, top:top, orderby:orderby, custom_headers:custom_headers).value!
end | [
"def",
"list_by_resource_group_with_http_info",
"(",
"resource_group_name",
",",
"expand",
":",
"nil",
",",
"filter",
":",
"nil",
",",
"top",
":",
"nil",
",",
"orderby",
":",
"nil",
",",
"custom_headers",
":",
"nil",
")",
"list_by_resource_group_async",
"(",
"re... | List lab accounts in a resource group.
@param resource_group_name [String] The name of the resource group.
@param expand [String] Specify the $expand query. Example:
'properties($expand=sizeConfiguration)'
@param filter [String] The filter to apply to the operation.
@param top [Integer] The maximum number of reso... | [
"List",
"lab",
"accounts",
"in",
"a",
"resource",
"group",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_labservices/lib/2018-10-15/generated/azure_mgmt_labservices/lab_accounts.rb#L166-L168 | train | Gets the list of all the segmentation elements in a resource group. | [
30522,
13366,
2862,
1035,
2011,
1035,
7692,
1035,
2177,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
7818,
1024,
9152,
2140,
1010,
11307,
1024,
9152,
2140,
1010,
2327,
1024,
9152,
2140,
1010,
2344,
3762,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/forge/errors.rb | Puppet::Forge::Errors.SSLVerifyError.multiline | def multiline
message = []
message << _('Could not connect via HTTPS to %{uri}') % { uri: @uri }
message << _(' Unable to verify the SSL certificate')
message << _(' The certificate may not be signed by a valid CA')
message << _(' The CA bundle included with OpenSSL may not be valid... | ruby | def multiline
message = []
message << _('Could not connect via HTTPS to %{uri}') % { uri: @uri }
message << _(' Unable to verify the SSL certificate')
message << _(' The certificate may not be signed by a valid CA')
message << _(' The CA bundle included with OpenSSL may not be valid... | [
"def",
"multiline",
"message",
"=",
"[",
"]",
"message",
"<<",
"_",
"(",
"'Could not connect via HTTPS to %{uri}'",
")",
"%",
"{",
"uri",
":",
"@uri",
"}",
"message",
"<<",
"_",
"(",
"' Unable to verify the SSL certificate'",
")",
"message",
"<<",
"_",
"(",
"... | @option options [String] :uri The URI that failed
@option options [String] :original the original exception
Return a multiline version of the error message
@return [String] the multiline version of the error message | [
"@option",
"options",
"[",
"String",
"]",
":",
"uri",
"The",
"URI",
"that",
"failed",
"@option",
"options",
"[",
"String",
"]",
":",
"original",
"the",
"original",
"exception",
"Return",
"a",
"multiline",
"version",
"of",
"the",
"error",
"message"
] | 4baeed97cbb7571ddc6635f0a24debe2e8b22cd3 | https://github.com/puppetlabs/puppet/blob/4baeed97cbb7571ddc6635f0a24debe2e8b22cd3/lib/puppet/forge/errors.rb#L34-L41 | train | Returns a multiline list of the errors that occurred. | [
30522,
13366,
4800,
4179,
4471,
1027,
1031,
1033,
4471,
1026,
1026,
1035,
1006,
1005,
2071,
2025,
7532,
3081,
16770,
2000,
1003,
1063,
24471,
2072,
1065,
1005,
1007,
1003,
1063,
24471,
2072,
1024,
1030,
24471,
2072,
1065,
4471,
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... |
rails/rails | activesupport/lib/active_support/array_inquirer.rb | ActiveSupport.ArrayInquirer.any? | def any?(*candidates)
if candidates.none?
super
else
candidates.any? do |candidate|
include?(candidate.to_sym) || include?(candidate.to_s)
end
end
end | ruby | def any?(*candidates)
if candidates.none?
super
else
candidates.any? do |candidate|
include?(candidate.to_sym) || include?(candidate.to_s)
end
end
end | [
"def",
"any?",
"(",
"*",
"candidates",
")",
"if",
"candidates",
".",
"none?",
"super",
"else",
"candidates",
".",
"any?",
"do",
"|",
"candidate",
"|",
"include?",
"(",
"candidate",
".",
"to_sym",
")",
"||",
"include?",
"(",
"candidate",
".",
"to_s",
")",... | Passes each element of +candidates+ collection to ArrayInquirer collection.
The method returns true if any element from the ArrayInquirer collection
is equal to the stringified or symbolized form of any element in the +candidates+ collection.
If +candidates+ collection is not given, method returns true.
variant... | [
"Passes",
"each",
"element",
"of",
"+",
"candidates",
"+",
"collection",
"to",
"ArrayInquirer",
"collection",
".",
"The",
"method",
"returns",
"true",
"if",
"any",
"element",
"from",
"the",
"ArrayInquirer",
"collection",
"is",
"equal",
"to",
"the",
"stringified"... | 85a8bc644be69908f05740a5886ec19cd3679df5 | https://github.com/rails/rails/blob/85a8bc644be69908f05740a5886ec19cd3679df5/activesupport/lib/active_support/array_inquirer.rb#L25-L33 | train | Returns true if any of the given candidates are available. | [
30522,
13366,
2151,
1029,
1006,
1008,
5347,
1007,
2065,
5347,
1012,
3904,
1029,
3565,
2842,
5347,
1012,
2151,
1029,
2079,
1064,
4018,
1064,
2421,
1029,
1006,
4018,
1012,
2000,
1035,
25353,
2213,
1007,
1064,
1064,
2421,
1029,
1006,
4018,
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... |
cheezy/page-object | lib/page-object/accessors.rb | PageObject.Accessors.h5 | def h5(name, identifier={:index => 0}, &block)
standard_methods(name, identifier, 'h5_for', &block)
define_method(name) do
return platform.h5_text_for identifier.clone unless block_given?
self.send("#{name}_element").text
end
end | ruby | def h5(name, identifier={:index => 0}, &block)
standard_methods(name, identifier, 'h5_for', &block)
define_method(name) do
return platform.h5_text_for identifier.clone unless block_given?
self.send("#{name}_element").text
end
end | [
"def",
"h5",
"(",
"name",
",",
"identifier",
"=",
"{",
":index",
"=>",
"0",
"}",
",",
"&",
"block",
")",
"standard_methods",
"(",
"name",
",",
"identifier",
",",
"'h5_for'",
",",
"block",
")",
"define_method",
"(",
"name",
")",
"do",
"return",
"platfor... | adds three methods - one to retrieve the text of a h5 element,
another to return a h5 element, and another to check for it's existence.
@example
h5(:title, :id => 'title')
# will generate 'title', 'title_element', and 'title?' methods
@param [Symbol] the name used for the generated methods
@param [Hash] ide... | [
"adds",
"three",
"methods",
"-",
"one",
"to",
"retrieve",
"the",
"text",
"of",
"a",
"h5",
"element",
"another",
"to",
"return",
"a",
"h5",
"element",
"and",
"another",
"to",
"check",
"for",
"it",
"s",
"existence",
"."
] | 850d775bf63768fbb1551a34480195785fe8e193 | https://github.com/cheezy/page-object/blob/850d775bf63768fbb1551a34480195785fe8e193/lib/page-object/accessors.rb#L742-L748 | train | Creates a new H5 object. | [
30522,
13366,
1044,
2629,
1006,
2171,
1010,
8909,
4765,
18095,
1027,
1063,
1024,
5950,
1027,
1028,
1014,
1065,
1010,
1004,
3796,
1007,
3115,
1035,
4725,
1006,
2171,
1010,
8909,
4765,
18095,
1010,
1005,
1044,
2629,
1035,
2005,
1005,
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... |
appium/ruby_lib | lib/appium_lib/android/common/helper.rb | Appium.Android.ele_index | def ele_index(class_name, index)
results = tags(class_name)
if index == 'last()'
index = results.length
index -= 1 if index >= 0
else
raise 'Index must be >= 1' unless index >= 1
index -= 1 if index >= 1
end
# uiautomator has issues with index/instance so ... | ruby | def ele_index(class_name, index)
results = tags(class_name)
if index == 'last()'
index = results.length
index -= 1 if index >= 0
else
raise 'Index must be >= 1' unless index >= 1
index -= 1 if index >= 1
end
# uiautomator has issues with index/instance so ... | [
"def",
"ele_index",
"(",
"class_name",
",",
"index",
")",
"results",
"=",
"tags",
"(",
"class_name",
")",
"if",
"index",
"==",
"'last()'",
"index",
"=",
"results",
".",
"length",
"index",
"-=",
"1",
"if",
"index",
">=",
"0",
"else",
"raise",
"'Index must... | Find the element of type class_name at matching index.
@param class_name [String] the class name to find
@param index [Integer] the index
@return [Element] the found element of type class_name | [
"Find",
"the",
"element",
"of",
"type",
"class_name",
"at",
"matching",
"index",
"."
] | 1f5898400dd1928bfe42ddd5f842d1f8738f2f76 | https://github.com/appium/ruby_lib/blob/1f5898400dd1928bfe42ddd5f842d1f8738f2f76/lib/appium_lib/android/common/helper.rb#L147-L161 | train | Returns the index of the element in the list of tags | [
30522,
13366,
3449,
2063,
1035,
5950,
1006,
2465,
1035,
2171,
1010,
5950,
1007,
3463,
1027,
22073,
1006,
2465,
1035,
2171,
1007,
2065,
5950,
1027,
1027,
1005,
2197,
1006,
1007,
30524,
1015,
1005,
4983,
5950,
1028,
1027,
1015,
5950,
1011,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/model_break.rb | SquareConnect.ModelBreak.break_type_id= | def break_type_id=(break_type_id)
if break_type_id.nil?
fail ArgumentError, "break_type_id cannot be nil"
end
if break_type_id.to_s.length < 1
fail ArgumentError, "invalid value for 'break_type_id', the character length must be great than or equal to 1."
end
@break_type_i... | ruby | def break_type_id=(break_type_id)
if break_type_id.nil?
fail ArgumentError, "break_type_id cannot be nil"
end
if break_type_id.to_s.length < 1
fail ArgumentError, "invalid value for 'break_type_id', the character length must be great than or equal to 1."
end
@break_type_i... | [
"def",
"break_type_id",
"=",
"(",
"break_type_id",
")",
"if",
"break_type_id",
".",
"nil?",
"fail",
"ArgumentError",
",",
"\"break_type_id cannot be nil\"",
"end",
"if",
"break_type_id",
".",
"to_s",
".",
"length",
"<",
"1",
"fail",
"ArgumentError",
",",
"\"invali... | Custom attribute writer method with validation
@param [Object] break_type_id Value to be assigned | [
"Custom",
"attribute",
"writer",
"method",
"with",
"validation"
] | 798eb9ded716f23b9f1518386f1c311a34bca8bf | https://github.com/square/connect-ruby-sdk/blob/798eb9ded716f23b9f1518386f1c311a34bca8bf/lib/square_connect/models/model_break.rb#L175-L185 | train | Set the break type id. | [
30522,
13366,
3338,
1035,
2828,
1035,
8909,
1027,
1006,
3338,
1035,
2828,
1035,
8909,
1007,
2065,
3338,
1035,
2828,
30524,
8246,
6685,
2121,
29165,
1010,
1000,
3338,
1035,
2828,
1035,
8909,
3685,
2022,
9152,
2140,
1000,
2203,
2065,
3338,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/review/latexbuilder.rb | ReVIEW.LATEXBuilder.inline_i | def inline_i(str)
if @book.config.check_version('2', exception: false)
macro('textit', escape(str))
else
macro('reviewit', escape(str))
end
end | ruby | def inline_i(str)
if @book.config.check_version('2', exception: false)
macro('textit', escape(str))
else
macro('reviewit', escape(str))
end
end | [
"def",
"inline_i",
"(",
"str",
")",
"if",
"@book",
".",
"config",
".",
"check_version",
"(",
"'2'",
",",
"exception",
":",
"false",
")",
"macro",
"(",
"'textit'",
",",
"escape",
"(",
"str",
")",
")",
"else",
"macro",
"(",
"'reviewit'",
",",
"escape",
... | index -> italic | [
"index",
"-",
">",
"italic"
] | 77d1273e671663f05db2992281fd891b776badf0 | https://github.com/kmuto/review/blob/77d1273e671663f05db2992281fd891b776badf0/lib/review/latexbuilder.rb#L1022-L1028 | train | inline_i | [
30522,
13366,
23881,
1035,
1045,
1006,
2358,
2099,
1007,
2065,
1030,
2338,
1012,
9530,
8873,
2290,
1012,
4638,
1035,
2544,
1006,
1005,
1016,
1005,
1010,
6453,
1024,
6270,
1007,
26632,
1006,
1005,
3793,
4183,
1005,
1010,
4019,
1006,
2358,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/object_data_types.rb | Azure::Automation::Mgmt::V2015_10_31.ObjectDataTypes.list_fields_by_module_and_type_with_http_info | def list_fields_by_module_and_type_with_http_info(resource_group_name, automation_account_name, module_name, type_name, custom_headers:nil)
list_fields_by_module_and_type_async(resource_group_name, automation_account_name, module_name, type_name, custom_headers:custom_headers).value!
end | ruby | def list_fields_by_module_and_type_with_http_info(resource_group_name, automation_account_name, module_name, type_name, custom_headers:nil)
list_fields_by_module_and_type_async(resource_group_name, automation_account_name, module_name, type_name, custom_headers:custom_headers).value!
end | [
"def",
"list_fields_by_module_and_type_with_http_info",
"(",
"resource_group_name",
",",
"automation_account_name",
",",
"module_name",
",",
"type_name",
",",
"custom_headers",
":",
"nil",
")",
"list_fields_by_module_and_type_async",
"(",
"resource_group_name",
",",
"automation... | Retrieve a list of fields of a given type identified by module name.
@param resource_group_name [String] Name of an Azure Resource group.
@param automation_account_name [String] The name of the automation account.
@param module_name [String] The name of module.
@param type_name [String] The name of type.
@param c... | [
"Retrieve",
"a",
"list",
"of",
"fields",
"of",
"a",
"given",
"type",
"identified",
"by",
"module",
"name",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_automation/lib/2015-10-31/generated/azure_mgmt_automation/object_data_types.rb#L53-L55 | train | Gets the list of fields of a module and type. | [
30522,
13366,
2862,
1035,
4249,
1035,
2011,
1035,
11336,
1035,
1998,
1035,
2828,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
19309,
1035,
4070,
1035,
2171,
1010,
11336,
1035,
2171,
1010,
2828,
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_key_vault/lib/2016-10-01/generated/azure_key_vault/key_vault_client.rb | Azure::KeyVault::V2016_10_01.KeyVaultClient.delete_sas_definition_with_http_info | def delete_sas_definition_with_http_info(vault_base_url, storage_account_name, sas_definition_name, custom_headers:nil)
delete_sas_definition_async(vault_base_url, storage_account_name, sas_definition_name, custom_headers:custom_headers).value!
end | ruby | def delete_sas_definition_with_http_info(vault_base_url, storage_account_name, sas_definition_name, custom_headers:nil)
delete_sas_definition_async(vault_base_url, storage_account_name, sas_definition_name, custom_headers:custom_headers).value!
end | [
"def",
"delete_sas_definition_with_http_info",
"(",
"vault_base_url",
",",
"storage_account_name",
",",
"sas_definition_name",
",",
"custom_headers",
":",
"nil",
")",
"delete_sas_definition_async",
"(",
"vault_base_url",
",",
"storage_account_name",
",",
"sas_definition_name",
... | Deletes a SAS definition from a specified storage account. This operation
requires the storage/deletesas permission.
@param vault_base_url [String] The vault name, for example
https://myvault.vault.azure.net.
@param storage_account_name [String] The name of the storage account.
@param sas_definition_name [String]... | [
"Deletes",
"a",
"SAS",
"definition",
"from",
"a",
"specified",
"storage",
"account",
".",
"This",
"operation",
"requires",
"the",
"storage",
"/",
"deletesas",
"permission",
"."
] | 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#L7797-L7799 | train | Deletes the specified SAS definition. | [
30522,
13366,
3972,
12870,
1035,
21871,
1035,
6210,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
11632,
1035,
2918,
1035,
24471,
2140,
1010,
5527,
1035,
4070,
1035,
2171,
1010,
21871,
1035,
6210,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
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... |
Anthony-Gaudino/jekyll-multiple-languages-plugin | lib/jekyll-multiple-languages-plugin.rb | Jekyll.Site.process | def process
# Check if plugin settings are set, if not, set a default or quit.
#-------------------------------------------------------------------------
self.parsed_translations ||= {}
self.config['exclude_from_localizations'] ||= []
if ( !self.config['languages'] or... | ruby | def process
# Check if plugin settings are set, if not, set a default or quit.
#-------------------------------------------------------------------------
self.parsed_translations ||= {}
self.config['exclude_from_localizations'] ||= []
if ( !self.config['languages'] or... | [
"def",
"process",
"# Check if plugin settings are set, if not, set a default or quit.",
"#-------------------------------------------------------------------------",
"self",
".",
"parsed_translations",
"||=",
"{",
"}",
"self",
".",
"config",
"[",
"'exclude_from_localizations'",
"]",
... | ======================================
process
Reads Jekyll and plugin configuration parameters set on _config.yml, sets
main parameters and processes the website for each language.
====================================== | [
"======================================",
"process"
] | 85e0e7972e6a4f94d5e7ab470ff0360905e11e4a | https://github.com/Anthony-Gaudino/jekyll-multiple-languages-plugin/blob/85e0e7972e6a4f94d5e7ab470ff0360905e11e4a/lib/jekyll-multiple-languages-plugin.rb#L80-L144 | train | Process the configuration file | [
30522,
13366,
2832,
1001,
4638,
2065,
13354,
2378,
10906,
2024,
2275,
1010,
2065,
2025,
1010,
2275,
1037,
12398,
2030,
8046,
1012,
1001,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_network/lib/2018-08-01/generated/azure_mgmt_network/network_watchers.rb | Azure::Network::Mgmt::V2018_08_01.NetworkWatchers.update_tags_with_http_info | def update_tags_with_http_info(resource_group_name, network_watcher_name, parameters, custom_headers:nil)
update_tags_async(resource_group_name, network_watcher_name, parameters, custom_headers:custom_headers).value!
end | ruby | def update_tags_with_http_info(resource_group_name, network_watcher_name, parameters, custom_headers:nil)
update_tags_async(resource_group_name, network_watcher_name, parameters, custom_headers:custom_headers).value!
end | [
"def",
"update_tags_with_http_info",
"(",
"resource_group_name",
",",
"network_watcher_name",
",",
"parameters",
",",
"custom_headers",
":",
"nil",
")",
"update_tags_async",
"(",
"resource_group_name",
",",
"network_watcher_name",
",",
"parameters",
",",
"custom_headers",
... | Updates a network watcher tags.
@param resource_group_name [String] The name of the resource group.
@param network_watcher_name [String] The name of the network watcher.
@param parameters [TagsObject] Parameters supplied to update network watcher
tags.
@param custom_headers [Hash{String => String}] A hash of cust... | [
"Updates",
"a",
"network",
"watcher",
"tags",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_network/lib/2018-08-01/generated/azure_mgmt_network/network_watchers.rb#L299-L301 | train | Updates a network pool s tags. | [
30522,
13366,
10651,
1035,
22073,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2897,
1035,
3422,
2121,
1035,
2171,
1010,
11709,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
10651,
1035,
22073,
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_machine_learning/lib/2017-01-01/generated/azure_mgmt_machine_learning/web_services.rb | Azure::MachineLearning::Mgmt::V2017_01_01.WebServices.patch | def patch(resource_group_name, web_service_name, patch_payload, custom_headers:nil)
response = patch_async(resource_group_name, web_service_name, patch_payload, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def patch(resource_group_name, web_service_name, patch_payload, custom_headers:nil)
response = patch_async(resource_group_name, web_service_name, patch_payload, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"patch",
"(",
"resource_group_name",
",",
"web_service_name",
",",
"patch_payload",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"patch_async",
"(",
"resource_group_name",
",",
"web_service_name",
",",
"patch_payload",
",",
"custom_headers",
":custo... | Modifies an existing web service resource. The PATCH API call is an
asynchronous operation. To determine whether it has completed successfully,
you must perform a Get operation.
@param resource_group_name [String] Name of the resource group in which the
web service is located.
@param web_service_name [String] The... | [
"Modifies",
"an",
"existing",
"web",
"service",
"resource",
".",
"The",
"PATCH",
"API",
"call",
"is",
"an",
"asynchronous",
"operation",
".",
"To",
"determine",
"whether",
"it",
"has",
"completed",
"successfully",
"you",
"must",
"perform",
"a",
"Get",
"operati... | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_machine_learning/lib/2017-01-01/generated/azure_mgmt_machine_learning/web_services.rb#L205-L208 | train | Patch a specified Web Service. | [
30522,
13366,
8983,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
4773,
1035,
2326,
1035,
2171,
1010,
8983,
1035,
18093,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
8983,
1035,
2004,
6038,
2278,
1006,
7692,
1035,
2177,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.