repo stringclasses 235
values | path stringlengths 11 168 | func_name stringlengths 12 143 | original_string stringlengths 83 6.91k | language stringclasses 1
value | code stringlengths 83 6.91k | code_tokens listlengths 15 1.01k | docstring stringlengths 5 25.7k | docstring_tokens listlengths 1 427 | sha stringclasses 235
values | url stringlengths 99 268 | partition stringclasses 1
value | summary stringlengths 7 202 | input_ids listlengths 502 502 | token_type_ids listlengths 502 502 | attention_mask listlengths 502 502 | labels listlengths 502 502 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
aws/aws-sdk-ruby | gems/aws-sdk-ec2/lib/aws-sdk-ec2/instance.rb | Aws::EC2.Instance.attach_classic_link_vpc | def attach_classic_link_vpc(options = {})
options = options.merge(instance_id: @id)
resp = @client.attach_classic_link_vpc(options)
resp.data
end | ruby | def attach_classic_link_vpc(options = {})
options = options.merge(instance_id: @id)
resp = @client.attach_classic_link_vpc(options)
resp.data
end | [
"def",
"attach_classic_link_vpc",
"(",
"options",
"=",
"{",
"}",
")",
"options",
"=",
"options",
".",
"merge",
"(",
"instance_id",
":",
"@id",
")",
"resp",
"=",
"@client",
".",
"attach_classic_link_vpc",
"(",
"options",
")",
"resp",
".",
"data",
"end"
] | @!group Actions
@example Request syntax with placeholder values
instance.attach_classic_link_vpc({
dry_run: false,
groups: ["String"], # required
vpc_id: "String", # required
})
@param [Hash] options ({})
@option options [Boolean] :dry_run
Checks whether you have the required permissions for... | [
"@!group",
"Actions",
"@example",
"Request",
"syntax",
"with",
"placeholder",
"values"
] | e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d | https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-ec2/lib/aws-sdk-ec2/instance.rb#L559-L563 | train | Attach a VPC to a VPC | [
30522,
13366,
22476,
1035,
4438,
1035,
4957,
1035,
21210,
2278,
1006,
7047,
1027,
1063,
1065,
1007,
7047,
1027,
7047,
1012,
13590,
1006,
6013,
1035,
8909,
1024,
1030,
8909,
1007,
24501,
2361,
1027,
1030,
7396,
1012,
22476,
1035,
4438,
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... |
randym/axlsx | lib/axlsx/package.rb | Axlsx.Package.validate_single_doc | def validate_single_doc(schema, doc)
schema = Nokogiri::XML::Schema(File.open(schema))
doc = Nokogiri::XML(doc)
errors = []
schema.validate(doc).each do |error|
errors << error
end
errors
end | ruby | def validate_single_doc(schema, doc)
schema = Nokogiri::XML::Schema(File.open(schema))
doc = Nokogiri::XML(doc)
errors = []
schema.validate(doc).each do |error|
errors << error
end
errors
end | [
"def",
"validate_single_doc",
"(",
"schema",
",",
"doc",
")",
"schema",
"=",
"Nokogiri",
"::",
"XML",
"::",
"Schema",
"(",
"File",
".",
"open",
"(",
"schema",
")",
")",
"doc",
"=",
"Nokogiri",
"::",
"XML",
"(",
"doc",
")",
"errors",
"=",
"[",
"]",
... | Performs xsd validation for a signle document
@param [String] schema path to the xsd schema to be used in validation.
@param [String] doc The xml text to be validated
@return [Array] An array of all validation errors encountered.
@private | [
"Performs",
"xsd",
"validation",
"for",
"a",
"signle",
"document"
] | c593a08b2a929dac7aa8dc418b55e26b4c49dc34 | https://github.com/randym/axlsx/blob/c593a08b2a929dac7aa8dc418b55e26b4c49dc34/lib/axlsx/package.rb#L256-L264 | train | Validate a single document | [
30522,
13366,
9398,
3686,
1035,
2309,
1035,
9986,
1006,
8040,
28433,
1010,
9986,
1007,
8040,
28433,
1027,
2053,
3683,
23243,
1024,
1024,
20950,
1024,
1024,
8040,
28433,
1006,
5371,
1012,
2330,
1006,
8040,
28433,
1007,
1007,
9986,
1027,
2053... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_container_registry/lib/2018-02-01-preview/generated/azure_mgmt_container_registry/build_tasks.rb | Azure::ContainerRegistry::Mgmt::V2018_02_01_preview.BuildTasks.begin_update_with_http_info | def begin_update_with_http_info(resource_group_name, registry_name, build_task_name, build_task_update_parameters, custom_headers:nil)
begin_update_async(resource_group_name, registry_name, build_task_name, build_task_update_parameters, custom_headers:custom_headers).value!
end | ruby | def begin_update_with_http_info(resource_group_name, registry_name, build_task_name, build_task_update_parameters, custom_headers:nil)
begin_update_async(resource_group_name, registry_name, build_task_name, build_task_update_parameters, custom_headers:custom_headers).value!
end | [
"def",
"begin_update_with_http_info",
"(",
"resource_group_name",
",",
"registry_name",
",",
"build_task_name",
",",
"build_task_update_parameters",
",",
"custom_headers",
":",
"nil",
")",
"begin_update_async",
"(",
"resource_group_name",
",",
"registry_name",
",",
"build_t... | Updates a build task with the specified parameters.
@param resource_group_name [String] The name of the resource group to which
the container registry belongs.
@param registry_name [String] The name of the container registry.
@param build_task_name [String] The name of the container registry build
task.
@param b... | [
"Updates",
"a",
"build",
"task",
"with",
"the",
"specified",
"parameters",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_container_registry/lib/2018-02-01-preview/generated/azure_mgmt_container_registry/build_tasks.rb#L759-L761 | train | Updates a build task. | [
30522,
13366,
4088,
1035,
10651,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
15584,
1035,
2171,
1010,
3857,
1035,
4708,
1035,
2171,
1010,
3857,
1035,
4708,
1035,
10651,
1035,
11709,
1010,
7661,
1035,
20346... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
kmuto/review | lib/epubmaker/producer.rb | EPUBMaker.Producer.coverimage | def coverimage
return nil unless config['coverimage']
@contents.each do |item|
if item.media.start_with?('image') && item.file =~ /#{config['coverimage']}\Z/
return item.file
end
end
nil
end | ruby | def coverimage
return nil unless config['coverimage']
@contents.each do |item|
if item.media.start_with?('image') && item.file =~ /#{config['coverimage']}\Z/
return item.file
end
end
nil
end | [
"def",
"coverimage",
"return",
"nil",
"unless",
"config",
"[",
"'coverimage'",
"]",
"@contents",
".",
"each",
"do",
"|",
"item",
"|",
"if",
"item",
".",
"media",
".",
"start_with?",
"(",
"'image'",
")",
"&&",
"item",
".",
"file",
"=~",
"/",
"#{",
"conf... | Construct producer object.
+config+ takes initial parameter hash. This parameters can be overriden by EPUBMaker#load or EPUBMaker#merge_config.
+version+ takes EPUB version (default is 2). | [
"Construct",
"producer",
"object",
".",
"+",
"config",
"+",
"takes",
"initial",
"parameter",
"hash",
".",
"This",
"parameters",
"can",
"be",
"overriden",
"by",
"EPUBMaker#load",
"or",
"EPUBMaker#merge_config",
".",
"+",
"version",
"+",
"takes",
"EPUB",
"version"... | 77d1273e671663f05db2992281fd891b776badf0 | https://github.com/kmuto/review/blob/77d1273e671663f05db2992281fd891b776badf0/lib/epubmaker/producer.rb#L66-L74 | train | Returns the file containing the cover image. | [
30522,
13366,
3104,
9581,
3351,
2709,
9152,
2140,
4983,
9530,
8873,
2290,
1031,
1005,
3104,
9581,
3351,
1005,
1033,
1030,
8417,
1012,
2169,
2079,
1064,
8875,
1064,
2065,
8875,
1012,
2865,
1012,
2707,
1035,
2007,
1029,
1006,
1005,
3746,
10... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
rails/sprockets | lib/sprockets/manifest.rb | Sprockets.Manifest.exporters_for_asset | def exporters_for_asset(asset)
exporters = [Exporters::FileExporter]
environment.exporters.each do |mime_type, exporter_list|
next unless asset.content_type
next unless environment.match_mime_type? asset.content_type, mime_type
exporter_list.each do |exporter|
... | ruby | def exporters_for_asset(asset)
exporters = [Exporters::FileExporter]
environment.exporters.each do |mime_type, exporter_list|
next unless asset.content_type
next unless environment.match_mime_type? asset.content_type, mime_type
exporter_list.each do |exporter|
... | [
"def",
"exporters_for_asset",
"(",
"asset",
")",
"exporters",
"=",
"[",
"Exporters",
"::",
"FileExporter",
"]",
"environment",
".",
"exporters",
".",
"each",
"do",
"|",
"mime_type",
",",
"exporter_list",
"|",
"next",
"unless",
"asset",
".",
"content_type",
"ne... | Given an asset, finds all exporters that
match its mime-type.
Will yield each expoter to the passed in block.
array = []
puts asset.content_type # => "application/javascript"
exporters_for_asset(asset) do |exporter|
array << exporter
end
# puts array => [Exporters::FileExporter, Expo... | [
"Given",
"an",
"asset",
"finds",
"all",
"exporters",
"that",
"match",
"its",
"mime",
"-",
"type",
"."
] | 9e3f0d8e98c44f57e67bc138db87bb8469bf5ddd | https://github.com/rails/sprockets/blob/9e3f0d8e98c44f57e67bc138db87bb8469bf5ddd/lib/sprockets/manifest.rb#L298-L314 | train | Returns an array of exporters for the given asset | [
30522,
13366,
9167,
2545,
1035,
2005,
1035,
11412,
1006,
11412,
1007,
9167,
2545,
1027,
1031,
9167,
2545,
1024,
1024,
5371,
10288,
6442,
2121,
1033,
4044,
1012,
9167,
2545,
1012,
2169,
2079,
1064,
2771,
4168,
1035,
2828,
1010,
9167,
2121,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_logic/lib/2016-06-01/generated/azure_mgmt_logic/workflows.rb | Azure::Logic::Mgmt::V2016_06_01.Workflows.enable | def enable(resource_group_name, workflow_name, custom_headers:nil)
response = enable_async(resource_group_name, workflow_name, custom_headers:custom_headers).value!
nil
end | ruby | def enable(resource_group_name, workflow_name, custom_headers:nil)
response = enable_async(resource_group_name, workflow_name, custom_headers:custom_headers).value!
nil
end | [
"def",
"enable",
"(",
"resource_group_name",
",",
"workflow_name",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"enable_async",
"(",
"resource_group_name",
",",
"workflow_name",
",",
"custom_headers",
":custom_headers",
")",
".",
"value!",
"nil",
"end"
] | Enables a workflow.
@param resource_group_name [String] The resource group name.
@param workflow_name [String] The workflow name.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request. | [
"Enables",
"a",
"workflow",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_logic/lib/2016-06-01/generated/azure_mgmt_logic/workflows.rb#L693-L696 | train | Enables a workflow. | [
30522,
13366,
9585,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2147,
12314,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
9585,
1035,
2004,
6038,
2278,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2147,
12314,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Shopify/liquid | lib/liquid/standardfilters.rb | Liquid.StandardFilters.divided_by | def divided_by(input, operand)
apply_operation(input, operand, :/)
rescue ::ZeroDivisionError => e
raise Liquid::ZeroDivisionError, e.message
end | ruby | def divided_by(input, operand)
apply_operation(input, operand, :/)
rescue ::ZeroDivisionError => e
raise Liquid::ZeroDivisionError, e.message
end | [
"def",
"divided_by",
"(",
"input",
",",
"operand",
")",
"apply_operation",
"(",
"input",
",",
"operand",
",",
":/",
")",
"rescue",
"::",
"ZeroDivisionError",
"=>",
"e",
"raise",
"Liquid",
"::",
"ZeroDivisionError",
",",
"e",
".",
"message",
"end"
] | division | [
"division"
] | b3b63a683f6daaea7e70f1602ee829abdf970ef3 | https://github.com/Shopify/liquid/blob/b3b63a683f6daaea7e70f1602ee829abdf970ef3/lib/liquid/standardfilters.rb#L373-L377 | train | Divide the array by the given number of elements. | [
30522,
13366,
4055,
1035,
2011,
1006,
7953,
1010,
3850,
4859,
1007,
6611,
1035,
3169,
1006,
7953,
1010,
3850,
4859,
1010,
1024,
1013,
1007,
5343,
1024,
1024,
5717,
4305,
17084,
2121,
29165,
1027,
1028,
1041,
5333,
6381,
1024,
1024,
5717,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_container_registry/lib/2018-02-01-preview/generated/azure_mgmt_container_registry/build_tasks.rb | Azure::ContainerRegistry::Mgmt::V2018_02_01_preview.BuildTasks.list_source_repository_properties | def list_source_repository_properties(resource_group_name, registry_name, build_task_name, custom_headers:nil)
response = list_source_repository_properties_async(resource_group_name, registry_name, build_task_name, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def list_source_repository_properties(resource_group_name, registry_name, build_task_name, custom_headers:nil)
response = list_source_repository_properties_async(resource_group_name, registry_name, build_task_name, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"list_source_repository_properties",
"(",
"resource_group_name",
",",
"registry_name",
",",
"build_task_name",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"list_source_repository_properties_async",
"(",
"resource_group_name",
",",
"registry_name",
",",
"... | Get the source control properties for a build task.
@param resource_group_name [String] The name of the resource group to which
the container registry belongs.
@param registry_name [String] The name of the container registry.
@param build_task_name [String] The name of the container registry build
task.
@param c... | [
"Get",
"the",
"source",
"control",
"properties",
"for",
"a",
"build",
"task",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_container_registry/lib/2018-02-01-preview/generated/azure_mgmt_container_registry/build_tasks.rb#L400-L403 | train | Gets the properties of the source repository. | [
30522,
13366,
2862,
1035,
3120,
1035,
22409,
1035,
5144,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
15584,
1035,
2171,
1010,
3857,
1035,
4708,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
2862,
1035,
3120,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
grpc/grpc | src/ruby/lib/grpc/generic/rpc_server.rb | GRPC.RpcServer.handle | def handle(service)
@run_mutex.synchronize do
unless @running_state == :not_started
fail 'cannot add services if the server has been started'
end
cls = service.is_a?(Class) ? service : service.class
assert_valid_service_class(cls)
add_rpc_descs_for(service)
... | ruby | def handle(service)
@run_mutex.synchronize do
unless @running_state == :not_started
fail 'cannot add services if the server has been started'
end
cls = service.is_a?(Class) ? service : service.class
assert_valid_service_class(cls)
add_rpc_descs_for(service)
... | [
"def",
"handle",
"(",
"service",
")",
"@run_mutex",
".",
"synchronize",
"do",
"unless",
"@running_state",
"==",
":not_started",
"fail",
"'cannot add services if the server has been started'",
"end",
"cls",
"=",
"service",
".",
"is_a?",
"(",
"Class",
")",
"?",
"servi... | handle registration of classes
service is either a class that includes GRPC::GenericService and whose
#new function can be called without argument or any instance of such a
class.
E.g, after
class Divider
include GRPC::GenericService
rpc :div DivArgs, DivReply # single request, single response
def i... | [
"handle",
"registration",
"of",
"classes"
] | f3937f0e55227a4ef3a23f895d3b204a947610f8 | https://github.com/grpc/grpc/blob/f3937f0e55227a4ef3a23f895d3b204a947610f8/src/ruby/lib/grpc/generic/rpc_server.rb#L333-L342 | train | Add the given service to the cluster. | [
30522,
13366,
5047,
1006,
2326,
1007,
1030,
30524,
1027,
1027,
1024,
2025,
1035,
2318,
8246,
1005,
3685,
5587,
2578,
2065,
1996,
8241,
2038,
2042,
2318,
1005,
2203,
18856,
2015,
1027,
2326,
1012,
2003,
1035,
1037,
1029,
1006,
2465,
1007,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_automation/lib/2015-10-31/generated/azure_mgmt_automation/variable_operations.rb | Azure::Automation::Mgmt::V2015_10_31.VariableOperations.create_or_update_with_http_info | def create_or_update_with_http_info(resource_group_name, automation_account_name, variable_name, parameters, custom_headers:nil)
create_or_update_async(resource_group_name, automation_account_name, variable_name, parameters, custom_headers:custom_headers).value!
end | ruby | def create_or_update_with_http_info(resource_group_name, automation_account_name, variable_name, parameters, custom_headers:nil)
create_or_update_async(resource_group_name, automation_account_name, variable_name, parameters, custom_headers:custom_headers).value!
end | [
"def",
"create_or_update_with_http_info",
"(",
"resource_group_name",
",",
"automation_account_name",
",",
"variable_name",
",",
"parameters",
",",
"custom_headers",
":",
"nil",
")",
"create_or_update_async",
"(",
"resource_group_name",
",",
"automation_account_name",
",",
... | Create a variable.
@param resource_group_name [String] Name of an Azure Resource group.
@param automation_account_name [String] The name of the automation account.
@param variable_name [String] The variable name.
@param parameters [VariableCreateOrUpdateParameters] The parameters supplied
to the create or update ... | [
"Create",
"a",
"variable",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_automation/lib/2015-10-31/generated/azure_mgmt_automation/variable_operations.rb#L55-L57 | train | Creates or updates a variable in the specified automation account. | [
30522,
13366,
3443,
1035,
2030,
1035,
10651,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
19309,
1035,
4070,
1035,
2171,
1010,
8023,
1035,
2171,
1010,
11709,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
jnunemaker/httparty | lib/httparty.rb | HTTParty.ClassMethods.default_params | def default_params(h = {})
raise ArgumentError, 'Default params must be an object which responds to #to_hash' unless h.respond_to?(:to_hash)
default_options[:default_params] ||= {}
default_options[:default_params].merge!(h)
end | ruby | def default_params(h = {})
raise ArgumentError, 'Default params must be an object which responds to #to_hash' unless h.respond_to?(:to_hash)
default_options[:default_params] ||= {}
default_options[:default_params].merge!(h)
end | [
"def",
"default_params",
"(",
"h",
"=",
"{",
"}",
")",
"raise",
"ArgumentError",
",",
"'Default params must be an object which responds to #to_hash'",
"unless",
"h",
".",
"respond_to?",
"(",
":to_hash",
")",
"default_options",
"[",
":default_params",
"]",
"||=",
"{",
... | Allows setting default parameters to be appended to each request.
Great for api keys and such.
class Foo
include HTTParty
default_params api_key: 'secret', another: 'foo'
end | [
"Allows",
"setting",
"default",
"parameters",
"to",
"be",
"appended",
"to",
"each",
"request",
".",
"Great",
"for",
"api",
"keys",
"and",
"such",
"."
] | b4099defba01231d2faaaa2660476f867e096bfb | https://github.com/jnunemaker/httparty/blob/b4099defba01231d2faaaa2660476f867e096bfb/lib/httparty.rb#L163-L167 | train | Sets default params for the request | [
30522,
13366,
12398,
1035,
11498,
5244,
1006,
1044,
1027,
1063,
1065,
1007,
5333,
6685,
2121,
29165,
1010,
1005,
12398,
11498,
5244,
2442,
2022,
2019,
4874,
2029,
16412,
2000,
1001,
2000,
1035,
23325,
1005,
4983,
1044,
1012,
6869,
1035,
200... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_authorization/lib/2018-09-01-preview/generated/azure_mgmt_authorization/role_assignments.rb | Azure::Authorization::Mgmt::V2018_09_01_preview.RoleAssignments.list_for_scope_with_http_info | def list_for_scope_with_http_info(scope, filter:nil, custom_headers:nil)
list_for_scope_async(scope, filter:filter, custom_headers:custom_headers).value!
end | ruby | def list_for_scope_with_http_info(scope, filter:nil, custom_headers:nil)
list_for_scope_async(scope, filter:filter, custom_headers:custom_headers).value!
end | [
"def",
"list_for_scope_with_http_info",
"(",
"scope",
",",
"filter",
":",
"nil",
",",
"custom_headers",
":",
"nil",
")",
"list_for_scope_async",
"(",
"scope",
",",
"filter",
":",
"filter",
",",
"custom_headers",
":custom_headers",
")",
".",
"value!",
"end"
] | Gets role assignments for a scope.
@param scope [String] The scope of the role assignments.
@param filter [String] The filter to apply on the operation. Use
$filter=atScope() to return all role assignments at or above the scope. Use
$filter=principalId eq {id} to return all role assignments at, above or below
the... | [
"Gets",
"role",
"assignments",
"for",
"a",
"scope",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_authorization/lib/2018-09-01-preview/generated/azure_mgmt_authorization/role_assignments.rb#L966-L968 | train | Gets the list of the image documents for the scope. | [
30522,
13366,
2862,
1035,
2005,
1035,
9531,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
9531,
1010,
11307,
1024,
9152,
2140,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
2862,
1035,
2005,
1035,
9531,
1035,
2004,
6038,
2278,
1006,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_resources/lib/2016-02-01/generated/azure_mgmt_resources/resources.rb | Azure::Resources::Mgmt::V2016_02_01.Resources.update | def update(resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, api_version, parameters, custom_headers:nil)
response = update_async(resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, api_version, parameters, custo... | ruby | def update(resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, api_version, parameters, custom_headers:nil)
response = update_async(resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, api_version, parameters, custo... | [
"def",
"update",
"(",
"resource_group_name",
",",
"resource_provider_namespace",
",",
"parent_resource_path",
",",
"resource_type",
",",
"resource_name",
",",
"api_version",
",",
"parameters",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"update_async",
"(... | Updates a resource.
@param resource_group_name [String] The name of the resource group for the
resource. The name is case insensitive.
@param resource_provider_namespace [String] The namespace of the resource
provider.
@param parent_resource_path [String] The parent resource identity.
@param resource_type [Strin... | [
"Updates",
"a",
"resource",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_resources/lib/2016-02-01/generated/azure_mgmt_resources/resources.rb#L519-L522 | train | Updates a resource in a resource group. | [
30522,
13366,
10651,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
7692,
1035,
10802,
1035,
3415,
15327,
1010,
6687,
1035,
7692,
1035,
4130,
1010,
7692,
1035,
2828,
1010,
7692,
1035,
2171,
1010,
17928,
1035,
2544,
1010,
11709,
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... |
jekyll/jekyll-feed | lib/jekyll-feed/generator.rb | JekyllFeed.Generator.normalize_posts_meta | def normalize_posts_meta(hash)
hash["posts"] ||= {}
hash["posts"]["path"] ||= config["path"]
hash["posts"]["categories"] ||= config["categories"]
config["path"] ||= hash["posts"]["path"]
hash
end | ruby | def normalize_posts_meta(hash)
hash["posts"] ||= {}
hash["posts"]["path"] ||= config["path"]
hash["posts"]["categories"] ||= config["categories"]
config["path"] ||= hash["posts"]["path"]
hash
end | [
"def",
"normalize_posts_meta",
"(",
"hash",
")",
"hash",
"[",
"\"posts\"",
"]",
"||=",
"{",
"}",
"hash",
"[",
"\"posts\"",
"]",
"[",
"\"path\"",
"]",
"||=",
"config",
"[",
"\"path\"",
"]",
"hash",
"[",
"\"posts\"",
"]",
"[",
"\"categories\"",
"]",
"||=",... | Special case the "posts" collection, which, for ease of use and backwards
compatability, can be configured via top-level keys or directly as a collection | [
"Special",
"case",
"the",
"posts",
"collection",
"which",
"for",
"ease",
"of",
"use",
"and",
"backwards",
"compatability",
"can",
"be",
"configured",
"via",
"top",
"-",
"level",
"keys",
"or",
"directly",
"as",
"a",
"collection"
] | 6885a7637e40a663667ea4f6399d203b95c2c434 | https://github.com/jekyll/jekyll-feed/blob/6885a7637e40a663667ea4f6399d203b95c2c434/lib/jekyll-feed/generator.rb#L104-L110 | train | Normalize posts meta | [
30522,
13366,
3671,
4697,
1035,
8466,
1035,
18804,
1006,
23325,
1007,
23325,
1031,
1000,
8466,
1000,
1033,
1064,
1064,
1027,
1063,
1065,
23325,
1031,
1000,
8466,
1000,
1033,
1031,
1000,
4130,
1000,
1033,
1064,
1064,
1027,
9530,
8873,
2290,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
comfy/comfortable-mexican-sofa | lib/comfortable_mexican_sofa/extensions/has_revisions.rb | ComfortableMexicanSofa::HasRevisions.InstanceMethods.prepare_revision | def prepare_revision
return if new_record?
if (respond_to?(:fragments_attributes_changed) && fragments_attributes_changed) ||
!(changed & revision_fields).empty?
self.revision_data = revision_fields.each_with_object({}) do |field, c|
c[field] = send("#{field}_was")
end
... | ruby | def prepare_revision
return if new_record?
if (respond_to?(:fragments_attributes_changed) && fragments_attributes_changed) ||
!(changed & revision_fields).empty?
self.revision_data = revision_fields.each_with_object({}) do |field, c|
c[field] = send("#{field}_was")
end
... | [
"def",
"prepare_revision",
"return",
"if",
"new_record?",
"if",
"(",
"respond_to?",
"(",
":fragments_attributes_changed",
")",
"&&",
"fragments_attributes_changed",
")",
"||",
"!",
"(",
"changed",
"&",
"revision_fields",
")",
".",
"empty?",
"self",
".",
"revision_da... | Preparing revision data. A bit of a special thing to grab page blocks | [
"Preparing",
"revision",
"data",
".",
"A",
"bit",
"of",
"a",
"special",
"thing",
"to",
"grab",
"page",
"blocks"
] | 38a31428f6e2c07d5bda64f0371eebfb29a3abc4 | https://github.com/comfy/comfortable-mexican-sofa/blob/38a31428f6e2c07d5bda64f0371eebfb29a3abc4/lib/comfortable_mexican_sofa/extensions/has_revisions.rb#L34-L42 | train | Prepare the revision_data hash for the record | [
30522,
13366,
7374,
1035,
13921,
2709,
2065,
2047,
1035,
2501,
1029,
2065,
1006,
6869,
1035,
2000,
1029,
1006,
1024,
10341,
1035,
12332,
1035,
2904,
1007,
1004,
1004,
10341,
1035,
12332,
1035,
2904,
1007,
1064,
1064,
999,
1006,
2904,
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... |
samvera/hyrax | app/presenters/hyrax/member_presenter_factory.rb | Hyrax.MemberPresenterFactory.ordered_ids | def ordered_ids
@ordered_ids ||= begin
ActiveFedora::SolrService.query("proxy_in_ssi:#{id}",
rows: 10_000,
fl: "ordered_targets_ssim")
... | ruby | def ordered_ids
@ordered_ids ||= begin
ActiveFedora::SolrService.query("proxy_in_ssi:#{id}",
rows: 10_000,
fl: "ordered_targets_ssim")
... | [
"def",
"ordered_ids",
"@ordered_ids",
"||=",
"begin",
"ActiveFedora",
"::",
"SolrService",
".",
"query",
"(",
"\"proxy_in_ssi:#{id}\"",
",",
"rows",
":",
"10_000",
",",
"fl",
":",
"\"ordered_targets_ssim\"",
")",
".",
"flat_map",
"{",
"|",
"x",
"|",
"x",
".",
... | TODO: Extract this to ActiveFedora::Aggregations::ListSource | [
"TODO",
":",
"Extract",
"this",
"to",
"ActiveFedora",
"::",
"Aggregations",
"::",
"ListSource"
] | e2b4f56e829a53b1f11296324736e9d5b8c9ee5f | https://github.com/samvera/hyrax/blob/e2b4f56e829a53b1f11296324736e9d5b8c9ee5f/app/presenters/hyrax/member_presenter_factory.rb#L40-L47 | train | Returns the ordered ids of the proxy in the Solr server. | [
30522,
13366,
3641,
1035,
8909,
2015,
1030,
3641,
1035,
8909,
2015,
1064,
1064,
1027,
4088,
3161,
25031,
6525,
1024,
1024,
14017,
22573,
2099,
7903,
2063,
1012,
23032,
1006,
1000,
24540,
1035,
1999,
1035,
7020,
2072,
1024,
1001,
1063,
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... |
hashicorp/vault-ruby | lib/vault/api/sys/policy.rb | Vault.Sys.put_policy | def put_policy(name, rules)
client.put("/v1/sys/policy/#{encode_path(name)}", JSON.fast_generate(
rules: rules,
))
return true
end | ruby | def put_policy(name, rules)
client.put("/v1/sys/policy/#{encode_path(name)}", JSON.fast_generate(
rules: rules,
))
return true
end | [
"def",
"put_policy",
"(",
"name",
",",
"rules",
")",
"client",
".",
"put",
"(",
"\"/v1/sys/policy/#{encode_path(name)}\"",
",",
"JSON",
".",
"fast_generate",
"(",
"rules",
":",
"rules",
",",
")",
")",
"return",
"true",
"end"
] | Create a new policy with the given name and rules.
@example
policy = <<-EOH
path "sys" {
policy = "deny"
}
EOH
Vault.sys.put_policy("dev", policy) #=> true
It is recommend that you load policy rules from a file:
@example
policy = File.read("/path/to/my/policy.hcl")
Vault.sys.put_po... | [
"Create",
"a",
"new",
"policy",
"with",
"the",
"given",
"name",
"and",
"rules",
"."
] | 02f0532a802ba1a2a0d8703a4585dab76eb9d864 | https://github.com/hashicorp/vault-ruby/blob/02f0532a802ba1a2a0d8703a4585dab76eb9d864/lib/vault/api/sys/policy.rb#L72-L77 | train | Put policy | [
30522,
13366,
2404,
1035,
3343,
1006,
2171,
1010,
3513,
1007,
7396,
1012,
2404,
1006,
1000,
1013,
1058,
2487,
1013,
25353,
2015,
1013,
3343,
1013,
1001,
1063,
4372,
16044,
1035,
4130,
1006,
2171,
1007,
1065,
1000,
1010,
1046,
3385,
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... |
refinery/refinerycms | core/app/helpers/refinery/html_truncation_helper.rb | Refinery.HtmlTruncationHelper.truncate | def truncate(text, options = {})
return unless text.present?
return super unless options.delete(:preserve_html_tags) == true # ensure preserve_html_tags doesn't pass through
max_length = options[:length] || 30
omission = options[:omission] || "..."
return truncate_html(text,
... | ruby | def truncate(text, options = {})
return unless text.present?
return super unless options.delete(:preserve_html_tags) == true # ensure preserve_html_tags doesn't pass through
max_length = options[:length] || 30
omission = options[:omission] || "..."
return truncate_html(text,
... | [
"def",
"truncate",
"(",
"text",
",",
"options",
"=",
"{",
"}",
")",
"return",
"unless",
"text",
".",
"present?",
"return",
"super",
"unless",
"options",
".",
"delete",
"(",
":preserve_html_tags",
")",
"==",
"true",
"# ensure preserve_html_tags doesn't pass through... | Like the Rails _truncate_ helper but doesn't break HTML tags, entities, and words.
<script> tags pass through and are not counted in the total.
the omission specified _does_ count toward the total length count.
use :link => link_to('more', post_path), or something to that effect | [
"Like",
"the",
"Rails",
"_truncate_",
"helper",
"but",
"doesn",
"t",
"break",
"HTML",
"tags",
"entities",
"and",
"words",
".",
"<script",
">",
"tags",
"pass",
"through",
"and",
"are",
"not",
"counted",
"in",
"the",
"total",
".",
"the",
"omission",
"specifi... | 67f117f937c5264ec0aeabe8e7eac1d562c5bc7b | https://github.com/refinery/refinerycms/blob/67f117f937c5264ec0aeabe8e7eac1d562c5bc7b/core/app/helpers/refinery/html_truncation_helper.rb#L10-L21 | train | Truncate text to max_length characters | [
30522,
13366,
19817,
4609,
16280,
1006,
3793,
1010,
7047,
1027,
1063,
1065,
1007,
2709,
4983,
3793,
1012,
2556,
1029,
2709,
3565,
4983,
7047,
1012,
3972,
12870,
1006,
1024,
7969,
1035,
16129,
1035,
22073,
1007,
1027,
1027,
2995,
1001,
5676,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
puppetlabs/puppet | lib/puppet/util/logging.rb | Puppet::Util.Logging.warn_once | def warn_once(kind, key, message, file = nil, line = nil, level = :warning)
return if Puppet[:disable_warnings].include?(kind)
$unique_warnings ||= {}
if $unique_warnings.length < 100 then
if (! $unique_warnings.has_key?(key)) then
$unique_warnings[key] = message
call_trace = if file =... | ruby | def warn_once(kind, key, message, file = nil, line = nil, level = :warning)
return if Puppet[:disable_warnings].include?(kind)
$unique_warnings ||= {}
if $unique_warnings.length < 100 then
if (! $unique_warnings.has_key?(key)) then
$unique_warnings[key] = message
call_trace = if file =... | [
"def",
"warn_once",
"(",
"kind",
",",
"key",
",",
"message",
",",
"file",
"=",
"nil",
",",
"line",
"=",
"nil",
",",
"level",
"=",
":warning",
")",
"return",
"if",
"Puppet",
"[",
":disable_warnings",
"]",
".",
"include?",
"(",
"kind",
")",
"$unique_warn... | Logs a (non deprecation) warning once for a given key.
@param kind [String] The kind of warning. The
kind must be one of the defined kinds for the Puppet[:disable_warnings] setting.
@param message [String] The message to log (logs via warning)
@param key [String] Key used to make this warning unique
@param file... | [
"Logs",
"a",
"(",
"non",
"deprecation",
")",
"warning",
"once",
"for",
"a",
"given",
"key",
"."
] | 4baeed97cbb7571ddc6635f0a24debe2e8b22cd3 | https://github.com/puppetlabs/puppet/blob/4baeed97cbb7571ddc6635f0a24debe2e8b22cd3/lib/puppet/util/logging.rb#L168-L188 | train | This method is called once for every warning. | [
30522,
13366,
11582,
1035,
2320,
1006,
2785,
1010,
3145,
1010,
4471,
1010,
5371,
1027,
9152,
2140,
1010,
2240,
1027,
9152,
2140,
1010,
2504,
1027,
1024,
5432,
1007,
2709,
2065,
13997,
1031,
1024,
4487,
19150,
1035,
16234,
1033,
1012,
2421,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
lynndylanhurley/devise_token_auth | app/controllers/devise_token_auth/omniauth_callbacks_controller.rb | DeviseTokenAuth.OmniauthCallbacksController.redirect_callbacks | def redirect_callbacks
# derive target redirect route from 'resource_class' param, which was set
# before authentication.
devise_mapping = get_devise_mapping
redirect_route = get_redirect_route(devise_mapping)
# preserve omniauth info for success route. ignore 'extra' in twitter
# ... | ruby | def redirect_callbacks
# derive target redirect route from 'resource_class' param, which was set
# before authentication.
devise_mapping = get_devise_mapping
redirect_route = get_redirect_route(devise_mapping)
# preserve omniauth info for success route. ignore 'extra' in twitter
# ... | [
"def",
"redirect_callbacks",
"# derive target redirect route from 'resource_class' param, which was set",
"# before authentication.",
"devise_mapping",
"=",
"get_devise_mapping",
"redirect_route",
"=",
"get_redirect_route",
"(",
"devise_mapping",
")",
"# preserve omniauth info for success ... | intermediary route for successful omniauth authentication. omniauth does
not support multiple models, so we must resort to this terrible hack. | [
"intermediary",
"route",
"for",
"successful",
"omniauth",
"authentication",
".",
"omniauth",
"does",
"not",
"support",
"multiple",
"models",
"so",
"we",
"must",
"resort",
"to",
"this",
"terrible",
"hack",
"."
] | 0727ac77e5d1cf8c065faa81ca6ddbba9cc0fe44 | https://github.com/lynndylanhurley/devise_token_auth/blob/0727ac77e5d1cf8c065faa81ca6ddbba9cc0fe44/app/controllers/devise_token_auth/omniauth_callbacks_controller.rb#L11-L24 | train | get the next callback for the next callback | [
30522,
13366,
2417,
7442,
6593,
1035,
2655,
12221,
1001,
18547,
4539,
2417,
7442,
6593,
2799,
2013,
1005,
7692,
1035,
2465,
1005,
11498,
2213,
1010,
2029,
2001,
2275,
1001,
2077,
27280,
1012,
14386,
3366,
1035,
12375,
1027,
2131,
1035,
1438... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/session.rb | Mongo.Session.add_txn_opts! | def add_txn_opts!(command, read)
command.tap do |c|
# The read preference should be added for all read operations.
if read && txn_read_pref = txn_read_preference
Mongo::Lint.validate_underscore_read_preference(txn_read_pref)
txn_read_pref = txn_read_pref.dup
txn_read_... | ruby | def add_txn_opts!(command, read)
command.tap do |c|
# The read preference should be added for all read operations.
if read && txn_read_pref = txn_read_preference
Mongo::Lint.validate_underscore_read_preference(txn_read_pref)
txn_read_pref = txn_read_pref.dup
txn_read_... | [
"def",
"add_txn_opts!",
"(",
"command",
",",
"read",
")",
"command",
".",
"tap",
"do",
"|",
"c",
"|",
"# The read preference should be added for all read operations.",
"if",
"read",
"&&",
"txn_read_pref",
"=",
"txn_read_preference",
"Mongo",
"::",
"Lint",
".",
"vali... | Add the transactions options if applicable.
@example
session.add_txn_opts!(cmd)
@return [ Hash, BSON::Document ] The command document.
@since 2.6.0
@api private | [
"Add",
"the",
"transactions",
"options",
"if",
"applicable",
"."
] | dca26d0870cb3386fad9ccc1d17228097c1fe1c8 | https://github.com/mongodb/mongo-ruby-driver/blob/dca26d0870cb3386fad9ccc1d17228097c1fe1c8/lib/mongo/session.rb#L263-L321 | train | Adds the read preference and read concern to the command. | [
30522,
13366,
5587,
1035,
19067,
2078,
1035,
23569,
2015,
999,
1006,
3094,
1010,
3191,
1007,
3094,
1012,
11112,
2079,
1064,
1039,
1064,
1001,
1996,
3191,
12157,
2323,
2022,
2794,
2005,
2035,
3191,
3136,
1012,
2065,
3191,
1004,
1004,
19067,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/policy.rb | Azure::ApiManagement::Mgmt::V2018_01_01.Policy.list_by_service | def list_by_service(resource_group_name, service_name, scope:nil, custom_headers:nil)
response = list_by_service_async(resource_group_name, service_name, scope:scope, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def list_by_service(resource_group_name, service_name, scope:nil, custom_headers:nil)
response = list_by_service_async(resource_group_name, service_name, scope:scope, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"list_by_service",
"(",
"resource_group_name",
",",
"service_name",
",",
"scope",
":",
"nil",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"list_by_service_async",
"(",
"resource_group_name",
",",
"service_name",
",",
"scope",
":",
"scope",
",",... | Lists all the Global Policy definitions of the 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 scope [PolicyScopeContract] Policy scope. Possible values include:
'Tenant', 'Product', 'Api', 'Oper... | [
"Lists",
"all",
"the",
"Global",
"Policy",
"definitions",
"of",
"the",
"Api",
"Management",
"service",
"."
] | 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/policy.rb#L36-L39 | train | Gets the list of all the available advisors. | [
30522,
13366,
2862,
1035,
2011,
1035,
2326,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2326,
1035,
2171,
1010,
9531,
1024,
9152,
2140,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
2862,
1035,
2011,
1035,
2326,
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/linked_server.rb | Azure::Redis::Mgmt::V2017_10_01.LinkedServer.list | def list(resource_group_name, name, custom_headers:nil)
first_page = list_as_lazy(resource_group_name, name, custom_headers:custom_headers)
first_page.get_all_items
end | ruby | def list(resource_group_name, name, custom_headers:nil)
first_page = list_as_lazy(resource_group_name, name, custom_headers:custom_headers)
first_page.get_all_items
end | [
"def",
"list",
"(",
"resource_group_name",
",",
"name",
",",
"custom_headers",
":",
"nil",
")",
"first_page",
"=",
"list_as_lazy",
"(",
"resource_group_name",
",",
"name",
",",
"custom_headers",
":custom_headers",
")",
"first_page",
".",
"get_all_items",
"end"
] | Gets the list of linked servers associated with this redis cache (requires
Premium SKU).
@param resource_group_name [String] The name of the resource group.
@param name [String] The name of the redis cache.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP requ... | [
"Gets",
"the",
"list",
"of",
"linked",
"servers",
"associated",
"with",
"this",
"redis",
"cache",
"(",
"requires",
"Premium",
"SKU",
")",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_redis/lib/2017-10-01/generated/azure_mgmt_redis/linked_server.rb#L272-L275 | train | Gets all the elastic advisor information. | [
30522,
13366,
2862,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
2034,
1035,
3931,
1027,
2862,
1035,
2004,
1035,
13971,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2171,
1010,
7661,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/api.rb | Azure::ApiManagement::Mgmt::V2018_01_01.Api.list_by_tags | def list_by_tags(resource_group_name, service_name, filter:nil, top:nil, skip:nil, custom_headers:nil)
first_page = list_by_tags_as_lazy(resource_group_name, service_name, filter:filter, top:top, skip:skip, custom_headers:custom_headers)
first_page.get_all_items
end | ruby | def list_by_tags(resource_group_name, service_name, filter:nil, top:nil, skip:nil, custom_headers:nil)
first_page = list_by_tags_as_lazy(resource_group_name, service_name, filter:filter, top:top, skip:skip, custom_headers:custom_headers)
first_page.get_all_items
end | [
"def",
"list_by_tags",
"(",
"resource_group_name",
",",
"service_name",
",",
"filter",
":",
"nil",
",",
"top",
":",
"nil",
",",
"skip",
":",
"nil",
",",
"custom_headers",
":",
"nil",
")",
"first_page",
"=",
"list_by_tags_as_lazy",
"(",
"resource_group_name",
"... | Lists a collection of apis associated with tags.
@param resource_group_name [String] The name of the resource group.
@param service_name [String] The name of the API Management service.
@param filter [String] | Field | Supported operators | Supported
functions |
|-------------|---... | [
"Lists",
"a",
"collection",
"of",
"apis",
"associated",
"with",
"tags",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/api.rb#L762-L765 | train | Gets all the segmentation products under the specified service. | [
30522,
13366,
2862,
1035,
2011,
1035,
22073,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2326,
1035,
2171,
1010,
11307,
1024,
9152,
2140,
1010,
2327,
1024,
9152,
2140,
1010,
13558,
1024,
9152,
2140,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
plataformatec/simple_form | lib/simple_form/form_builder.rb | SimpleForm.FormBuilder.association | def association(association, options = {}, &block)
options = options.dup
return simple_fields_for(*[association,
options.delete(:collection), options].compact, &block) if block_given?
raise ArgumentError, "Association cannot be used in forms not associated with an object" unless @object
... | ruby | def association(association, options = {}, &block)
options = options.dup
return simple_fields_for(*[association,
options.delete(:collection), options].compact, &block) if block_given?
raise ArgumentError, "Association cannot be used in forms not associated with an object" unless @object
... | [
"def",
"association",
"(",
"association",
",",
"options",
"=",
"{",
"}",
",",
"&",
"block",
")",
"options",
"=",
"options",
".",
"dup",
"return",
"simple_fields_for",
"(",
"[",
"association",
",",
"options",
".",
"delete",
"(",
":collection",
")",
",",
"... | Helper for dealing with association selects/radios, generating the
collection automatically. It's just a wrapper to input, so all options
supported in input are also supported by association. Some extra options
can also be given:
== Examples
simple_form_for @user do |f|
f.association :company # C... | [
"Helper",
"for",
"dealing",
"with",
"association",
"selects",
"/",
"radios",
"generating",
"the",
"collection",
"automatically",
".",
"It",
"s",
"just",
"a",
"wrapper",
"to",
"input",
"so",
"all",
"options",
"supported",
"in",
"input",
"are",
"also",
"supporte... | 4dd9261ebb392e46a9beeefe8d83081e7c6e56b5 | https://github.com/plataformatec/simple_form/blob/4dd9261ebb392e46a9beeefe8d83081e7c6e56b5/lib/simple_form/form_builder.rb#L206-L223 | train | Returns a new object with the given association. | [
30522,
13366,
2523,
1006,
2523,
1010,
7047,
1027,
1063,
1065,
1010,
1004,
3796,
1007,
7047,
1027,
7047,
1012,
4241,
2361,
2709,
3722,
1035,
4249,
1035,
2005,
1006,
1008,
1031,
2523,
1010,
7047,
1012,
3972,
12870,
1006,
1024,
3074,
1007,
1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_network/lib/2018-07-01/generated/azure_mgmt_network/virtual_network_gateway_connections.rb | Azure::Network::Mgmt::V2018_07_01.VirtualNetworkGatewayConnections.begin_update_tags_with_http_info | def begin_update_tags_with_http_info(resource_group_name, virtual_network_gateway_connection_name, parameters, custom_headers:nil)
begin_update_tags_async(resource_group_name, virtual_network_gateway_connection_name, parameters, custom_headers:custom_headers).value!
end | ruby | def begin_update_tags_with_http_info(resource_group_name, virtual_network_gateway_connection_name, parameters, custom_headers:nil)
begin_update_tags_async(resource_group_name, virtual_network_gateway_connection_name, parameters, custom_headers:custom_headers).value!
end | [
"def",
"begin_update_tags_with_http_info",
"(",
"resource_group_name",
",",
"virtual_network_gateway_connection_name",
",",
"parameters",
",",
"custom_headers",
":",
"nil",
")",
"begin_update_tags_async",
"(",
"resource_group_name",
",",
"virtual_network_gateway_connection_name",
... | Updates a virtual network gateway connection tags.
@param resource_group_name [String] The name of the resource group.
@param virtual_network_gateway_connection_name [String] The name of the
virtual network gateway connection.
@param parameters [TagsObject] Parameters supplied to update virtual network
gateway co... | [
"Updates",
"a",
"virtual",
"network",
"gateway",
"connection",
"tags",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_network/lib/2018-07-01/generated/azure_mgmt_network/virtual_network_gateway_connections.rb#L790-L792 | train | Updates a virtual network gateway connection tags. | [
30522,
13366,
4088,
1035,
10651,
1035,
22073,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
7484,
1035,
2897,
1035,
11909,
1035,
4434,
1035,
2171,
1010,
11709,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
RailsEventStore/rails_event_store | ruby_event_store/lib/ruby_event_store/client.rb | RubyEventStore.Client.deserialize | def deserialize(event_type:, event_id:, data:, metadata:)
mapper.serialized_record_to_event(SerializedRecord.new(event_type: event_type, event_id: event_id, data: data, metadata: metadata))
end | ruby | def deserialize(event_type:, event_id:, data:, metadata:)
mapper.serialized_record_to_event(SerializedRecord.new(event_type: event_type, event_id: event_id, data: data, metadata: metadata))
end | [
"def",
"deserialize",
"(",
"event_type",
":",
",",
"event_id",
":",
",",
"data",
":",
",",
"metadata",
":",
")",
"mapper",
".",
"serialized_record_to_event",
"(",
"SerializedRecord",
".",
"new",
"(",
"event_type",
":",
"event_type",
",",
"event_id",
":",
"ev... | Deserialize event which was serialized for async event handlers
{http://railseventstore.org/docs/subscribe/#async-handlers Read more}
@return [Event, Proto] deserialized event | [
"Deserialize",
"event",
"which",
"was",
"serialized",
"for",
"async",
"event",
"handlers",
"{",
"http",
":",
"//",
"railseventstore",
".",
"org",
"/",
"docs",
"/",
"subscribe",
"/",
"#async",
"-",
"handlers",
"Read",
"more",
"}"
] | 3ee4f3148499794154ee6fec74ccf6d4670d85ac | https://github.com/RailsEventStore/rails_event_store/blob/3ee4f3148499794154ee6fec74ccf6d4670d85ac/ruby_event_store/lib/ruby_event_store/client.rb#L223-L225 | train | Deserialize a serialized record to an event | [
30522,
13366,
4078,
11610,
3669,
4371,
1006,
2724,
1035,
2828,
1024,
1010,
2724,
1035,
8909,
1024,
1010,
2951,
1024,
1010,
27425,
1024,
1007,
4949,
4842,
1012,
27289,
1035,
2501,
1035,
2000,
1035,
2724,
1006,
27289,
2890,
27108,
2094,
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... |
ruby-git/ruby-git | lib/git/base.rb | Git.Base.add_remote | def add_remote(name, url, opts = {})
url = url.repo.path if url.is_a?(Git::Base)
self.lib.remote_add(name, url, opts)
Git::Remote.new(self, name)
end | ruby | def add_remote(name, url, opts = {})
url = url.repo.path if url.is_a?(Git::Base)
self.lib.remote_add(name, url, opts)
Git::Remote.new(self, name)
end | [
"def",
"add_remote",
"(",
"name",
",",
"url",
",",
"opts",
"=",
"{",
"}",
")",
"url",
"=",
"url",
".",
"repo",
".",
"path",
"if",
"url",
".",
"is_a?",
"(",
"Git",
"::",
"Base",
")",
"self",
".",
"lib",
".",
"remote_add",
"(",
"name",
",",
"url"... | adds a new remote to this repository
url can be a git url or a Git::Base object if it's a local reference
@git.add_remote('scotts_git', 'git://repo.or.cz/rubygit.git')
@git.fetch('scotts_git')
@git.merge('scotts_git/master')
Options:
:fetch => true
:track => <branch_name> | [
"adds",
"a",
"new",
"remote",
"to",
"this",
"repository",
"url",
"can",
"be",
"a",
"git",
"url",
"or",
"a",
"Git",
"::",
"Base",
"object",
"if",
"it",
"s",
"a",
"local",
"reference"
] | 9bd4407c56068e1604f14a1b6c0c5a84868e6378 | https://github.com/ruby-git/ruby-git/blob/9bd4407c56068e1604f14a1b6c0c5a84868e6378/lib/git/base.rb#L369-L373 | train | Add a remote to the repository | [
30522,
13366,
5587,
1035,
6556,
1006,
2171,
1010,
24471,
2140,
1010,
23569,
2015,
1027,
1063,
1065,
1007,
24471,
2140,
1027,
24471,
2140,
1012,
16360,
2080,
1012,
4130,
2065,
24471,
2140,
1012,
2003,
1035,
1037,
1029,
1006,
21025,
2102,
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_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/user_identities.rb | Azure::ApiManagement::Mgmt::V2016_07_07.UserIdentities.list_by_user_with_http_info | def list_by_user_with_http_info(resource_group_name, service_name, uid, custom_headers:nil)
list_by_user_async(resource_group_name, service_name, uid, custom_headers:custom_headers).value!
end | ruby | def list_by_user_with_http_info(resource_group_name, service_name, uid, custom_headers:nil)
list_by_user_async(resource_group_name, service_name, uid, custom_headers:custom_headers).value!
end | [
"def",
"list_by_user_with_http_info",
"(",
"resource_group_name",
",",
"service_name",
",",
"uid",
",",
"custom_headers",
":",
"nil",
")",
"list_by_user_async",
"(",
"resource_group_name",
",",
"service_name",
",",
"uid",
",",
"custom_headers",
":custom_headers",
")",
... | Lists all user identities.
@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 current API
Management service instance.
@param custom_headers [Hash{String => String}] A h... | [
"Lists",
"all",
"user",
"identities",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/user_identities.rb#L53-L55 | train | Gets the list of the segmentation of the user. | [
30522,
13366,
2862,
1035,
2011,
1035,
5310,
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,
2862,
1035,
2011,
1035,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_container_service/lib/2017-07-01/generated/azure_mgmt_container_service/container_services.rb | Azure::ContainerService::Mgmt::V2017_07_01.ContainerServices.begin_create_or_update_with_http_info | def begin_create_or_update_with_http_info(resource_group_name, container_service_name, parameters, custom_headers:nil)
begin_create_or_update_async(resource_group_name, container_service_name, parameters, custom_headers:custom_headers).value!
end | ruby | def begin_create_or_update_with_http_info(resource_group_name, container_service_name, parameters, custom_headers:nil)
begin_create_or_update_async(resource_group_name, container_service_name, parameters, custom_headers:custom_headers).value!
end | [
"def",
"begin_create_or_update_with_http_info",
"(",
"resource_group_name",
",",
"container_service_name",
",",
"parameters",
",",
"custom_headers",
":",
"nil",
")",
"begin_create_or_update_async",
"(",
"resource_group_name",
",",
"container_service_name",
",",
"parameters",
... | Creates or updates a container service.
Creates or updates a container service with the specified configuration of
orchestrator, masters, and agents.
@param resource_group_name [String] The name of the resource group.
@param container_service_name [String] The name of the container service in
the specified subsc... | [
"Creates",
"or",
"updates",
"a",
"container",
"service",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_container_service/lib/2017-07-01/generated/azure_mgmt_container_service/container_services.rb#L467-L469 | train | Creates or updates a container service. | [
30522,
13366,
4088,
1035,
3443,
1035,
2030,
1035,
10651,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
11661,
1035,
2326,
1035,
2171,
1010,
11709,
1010,
7661,
1035,
30524,
1035,
20346,
2015,
1007,
1012,
3643... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
intridea/hashie | lib/hashie/rash.rb | Hashie.Rash.all | def all(query)
return to_enum(:all, query) unless block_given?
if @hash.include? query
yield @hash[query]
return
end
case query
when String
optimize_if_necessary!
# see if any of the regexps match the string
@regexes.each do |regex|
matc... | ruby | def all(query)
return to_enum(:all, query) unless block_given?
if @hash.include? query
yield @hash[query]
return
end
case query
when String
optimize_if_necessary!
# see if any of the regexps match the string
@regexes.each do |regex|
matc... | [
"def",
"all",
"(",
"query",
")",
"return",
"to_enum",
"(",
":all",
",",
"query",
")",
"unless",
"block_given?",
"if",
"@hash",
".",
"include?",
"query",
"yield",
"@hash",
"[",
"query",
"]",
"return",
"end",
"case",
"query",
"when",
"String",
"optimize_if_n... | Return everything that matches the query. | [
"Return",
"everything",
"that",
"matches",
"the",
"query",
"."
] | da9fd39a0e551e09c1441cb7453c969a4afbfd7f | https://github.com/intridea/hashie/blob/da9fd39a0e551e09c1441cb7453c969a4afbfd7f/lib/hashie/rash.rb#L88-L125 | train | Returns all the values matching the given query. | [
30522,
13366,
2035,
1006,
23032,
1007,
2709,
2000,
1035,
4372,
2819,
1006,
1024,
2035,
1010,
23032,
1007,
4983,
3796,
1035,
2445,
1029,
2065,
1030,
23325,
1012,
2421,
1029,
23032,
10750,
1030,
23325,
1031,
23032,
1033,
2709,
2203,
2553,
230... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
javan/whenever | lib/whenever/job_list.rb | Whenever.JobList.pre_set | def pre_set(variable_string = nil)
return if variable_string.nil? || variable_string == ""
pairs = variable_string.split('&')
pairs.each do |pair|
next unless pair.index('=')
variable, value = *pair.split('=')
unless variable.nil? || variable == "" || value.nil? || value == ""... | ruby | def pre_set(variable_string = nil)
return if variable_string.nil? || variable_string == ""
pairs = variable_string.split('&')
pairs.each do |pair|
next unless pair.index('=')
variable, value = *pair.split('=')
unless variable.nil? || variable == "" || value.nil? || value == ""... | [
"def",
"pre_set",
"(",
"variable_string",
"=",
"nil",
")",
"return",
"if",
"variable_string",
".",
"nil?",
"||",
"variable_string",
"==",
"\"\"",
"pairs",
"=",
"variable_string",
".",
"split",
"(",
"'&'",
")",
"pairs",
".",
"each",
"do",
"|",
"pair",
"|",
... | Takes a string like: "variable1=something&variable2=somethingelse"
and breaks it into variable/value pairs. Used for setting variables at runtime from the command line.
Only works for setting values as strings. | [
"Takes",
"a",
"string",
"like",
":",
"variable1",
"=",
"something&variable2",
"=",
"somethingelse",
"and",
"breaks",
"it",
"into",
"variable",
"/",
"value",
"pairs",
".",
"Used",
"for",
"setting",
"variables",
"at",
"runtime",
"from",
"the",
"command",
"line",... | e1a3ffe571f5b948a97d609a7d983b214dc41160 | https://github.com/javan/whenever/blob/e1a3ffe571f5b948a97d609a7d983b214dc41160/lib/whenever/job_list.rb#L85-L98 | train | Set the pre_set variables | [
30522,
13366,
3653,
1035,
2275,
1006,
8023,
1035,
5164,
1027,
9152,
2140,
1007,
30524,
1064,
3940,
1064,
2279,
4983,
3940,
1012,
5950,
1006,
1005,
1027,
1005,
1007,
8023,
1010,
3643,
1027,
1008,
3940,
1012,
3975,
1006,
1005,
1027,
1005,
1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
sunspot/sunspot | sunspot/lib/sunspot/session.rb | Sunspot.Session.more_like_this | def more_like_this(object, *types, &block)
mlt = new_more_like_this(object, *types, &block)
mlt.execute
end | ruby | def more_like_this(object, *types, &block)
mlt = new_more_like_this(object, *types, &block)
mlt.execute
end | [
"def",
"more_like_this",
"(",
"object",
",",
"*",
"types",
",",
"&",
"block",
")",
"mlt",
"=",
"new_more_like_this",
"(",
"object",
",",
"types",
",",
"block",
")",
"mlt",
".",
"execute",
"end"
] | See Sunspot.more_like_this | [
"See",
"Sunspot",
".",
"more_like_this"
] | 31dd76cd7a14a4ef7bd541de97483d8cd72ff685 | https://github.com/sunspot/sunspot/blob/31dd76cd7a14a4ef7bd541de97483d8cd72ff685/sunspot/lib/sunspot/session.rb#L80-L83 | train | Create a new more like this object. | [
30522,
13366,
2062,
1035,
2066,
1035,
2023,
1006,
4874,
1010,
1008,
4127,
1010,
1004,
3796,
1007,
19875,
2102,
1027,
2047,
1035,
2062,
1035,
2066,
1035,
2023,
1006,
4874,
1010,
1008,
4127,
1010,
1004,
3796,
1007,
19875,
2102,
1012,
15389,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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.change_vnet | def change_vnet(resource_group_name, name, vnet_info, custom_headers:nil)
response = change_vnet_async(resource_group_name, name, vnet_info, custom_headers:custom_headers).value!
unless response.nil?
page = response.body
page.next_method = Proc.new do |next_page_link|
change_vnet_n... | ruby | def change_vnet(resource_group_name, name, vnet_info, custom_headers:nil)
response = change_vnet_async(resource_group_name, name, vnet_info, custom_headers:custom_headers).value!
unless response.nil?
page = response.body
page.next_method = Proc.new do |next_page_link|
change_vnet_n... | [
"def",
"change_vnet",
"(",
"resource_group_name",
",",
"name",
",",
"vnet_info",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"change_vnet_async",
"(",
"resource_group_name",
",",
"name",
",",
"vnet_info",
",",
"custom_headers",
":custom_headers",
")",
... | Move an App Service Environment to a different VNET.
Move an App Service Environment to a different VNET.
@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 vnet_info [VirtualNetworkProfile] Details for th... | [
"Move",
"an",
"App",
"Service",
"Environment",
"to",
"a",
"different",
"VNET",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_web/lib/2018-02-01/generated/azure_mgmt_web/app_service_environments.rb#L772-L781 | train | Changes the virtual network. | [
30522,
13366,
2689,
1035,
1058,
7159,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2171,
1010,
1058,
7159,
1035,
18558,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
2689,
1035,
1058,
7159,
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... |
aws/aws-sdk-ruby | gems/aws-sdk-ec2/lib/aws-sdk-ec2/instance.rb | Aws::EC2.Instance.reboot | def reboot(options = {})
options = Aws::Util.deep_merge(options, instance_ids: [@id])
resp = @client.reboot_instances(options)
resp.data
end | ruby | def reboot(options = {})
options = Aws::Util.deep_merge(options, instance_ids: [@id])
resp = @client.reboot_instances(options)
resp.data
end | [
"def",
"reboot",
"(",
"options",
"=",
"{",
"}",
")",
"options",
"=",
"Aws",
"::",
"Util",
".",
"deep_merge",
"(",
"options",
",",
"instance_ids",
":",
"[",
"@id",
"]",
")",
"resp",
"=",
"@client",
".",
"reboot_instances",
"(",
"options",
")",
"resp",
... | @example Request syntax with placeholder values
instance.reboot({
dry_run: false,
})
@param [Hash] options ({})
@option options [Boolean] :dry_run
Checks whether you have the required permissions for the action,
without actually making the request, and provides an error response.
If you have the ... | [
"@example",
"Request",
"syntax",
"with",
"placeholder",
"values"
] | e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d | https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-ec2/lib/aws-sdk-ec2/instance.rb#L973-L977 | train | Reboot the instance | [
30522,
13366,
2128,
27927,
1006,
7047,
1027,
1063,
1065,
1007,
7047,
1027,
22091,
2015,
1024,
1024,
21183,
4014,
1012,
2784,
1035,
13590,
1006,
7047,
1010,
6013,
1035,
8909,
2015,
1024,
1031,
1030,
8909,
1033,
1007,
24501,
2361,
1027,
1030,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | data/azure_cognitiveservices_luisauthoring/lib/2.0/generated/azure_cognitiveservices_luisauthoring/model.rb | Azure::CognitiveServices::LuisAuthoring::V2_0.Model.update_entity_with_http_info | def update_entity_with_http_info(app_id, version_id, entity_id, model_update_object, custom_headers:nil)
update_entity_async(app_id, version_id, entity_id, model_update_object, custom_headers:custom_headers).value!
end | ruby | def update_entity_with_http_info(app_id, version_id, entity_id, model_update_object, custom_headers:nil)
update_entity_async(app_id, version_id, entity_id, model_update_object, custom_headers:custom_headers).value!
end | [
"def",
"update_entity_with_http_info",
"(",
"app_id",
",",
"version_id",
",",
"entity_id",
",",
"model_update_object",
",",
"custom_headers",
":",
"nil",
")",
"update_entity_async",
"(",
"app_id",
",",
"version_id",
",",
"entity_id",
",",
"model_update_object",
",",
... | Updates the name of an 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 extractor ID.
@param model_update_object [ModelUpdateObject] A model object containing the
new entity extractor name.
@param custom_headers [Hash... | [
"Updates",
"the",
"name",
"of",
"an",
"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#L2247-L2249 | train | Updates an existing entity in a version of the application. | [
30522,
13366,
10651,
1035,
9178,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
10439,
1035,
8909,
1010,
2544,
1035,
8909,
1010,
9178,
1035,
8909,
1010,
2944,
1035,
10651,
1035,
4874,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
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... |
puppetlabs/puppet | lib/puppet/util/windows/sid.rb | Puppet::Util::Windows.SID.sid_ptr_to_string | def sid_ptr_to_string(psid)
if ! psid.kind_of?(FFI::Pointer) || IsValidSid(psid) == FFI::WIN32_FALSE
raise Puppet::Util::Windows::Error.new(_("Invalid SID"))
end
sid_string = nil
FFI::MemoryPointer.new(:pointer, 1) do |buffer_ptr|
if ConvertSidToStringSidW(psid, buffer_ptr) == F... | ruby | def sid_ptr_to_string(psid)
if ! psid.kind_of?(FFI::Pointer) || IsValidSid(psid) == FFI::WIN32_FALSE
raise Puppet::Util::Windows::Error.new(_("Invalid SID"))
end
sid_string = nil
FFI::MemoryPointer.new(:pointer, 1) do |buffer_ptr|
if ConvertSidToStringSidW(psid, buffer_ptr) == F... | [
"def",
"sid_ptr_to_string",
"(",
"psid",
")",
"if",
"!",
"psid",
".",
"kind_of?",
"(",
"FFI",
"::",
"Pointer",
")",
"||",
"IsValidSid",
"(",
"psid",
")",
"==",
"FFI",
"::",
"WIN32_FALSE",
"raise",
"Puppet",
"::",
"Util",
"::",
"Windows",
"::",
"Error",
... | Convert a SID pointer to a SID string, e.g. "S-1-5-32-544". | [
"Convert",
"a",
"SID",
"pointer",
"to",
"a",
"SID",
"string",
"e",
".",
"g",
".",
"S",
"-",
"1",
"-",
"5",
"-",
"32",
"-",
"544",
"."
] | 4baeed97cbb7571ddc6635f0a24debe2e8b22cd3 | https://github.com/puppetlabs/puppet/blob/4baeed97cbb7571ddc6635f0a24debe2e8b22cd3/lib/puppet/util/windows/sid.rb#L152-L173 | train | Convert a SID pointer to a string | [
30522,
13366,
15765,
1035,
13866,
2099,
1035,
2000,
1035,
5164,
1006,
17816,
2094,
1007,
2065,
999,
17816,
2094,
1012,
2785,
1035,
1997,
1029,
1006,
21461,
2072,
1024,
1024,
20884,
1007,
1064,
1064,
2003,
10175,
9821,
3593,
1006,
17816,
209... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
chaps-io/public_activity | lib/public_activity/common.rb | PublicActivity.Common.prepare_key | def prepare_key(action, options = {})
(
options[:key] ||
self.activity_key ||
((self.class.name.underscore.gsub('/', '_') + "." + action.to_s) if action)
).try(:to_s)
end | ruby | def prepare_key(action, options = {})
(
options[:key] ||
self.activity_key ||
((self.class.name.underscore.gsub('/', '_') + "." + action.to_s) if action)
).try(:to_s)
end | [
"def",
"prepare_key",
"(",
"action",
",",
"options",
"=",
"{",
"}",
")",
"(",
"options",
"[",
":key",
"]",
"||",
"self",
".",
"activity_key",
"||",
"(",
"(",
"self",
".",
"class",
".",
"name",
".",
"underscore",
".",
"gsub",
"(",
"'/'",
",",
"'_'",... | Helper method to serialize class name into relevant key
@return [String] the resulted key
@param [Symbol] or [String] the name of the operation to be done on class
@param [Hash] options to be used on key generation, defaults to {} | [
"Helper",
"method",
"to",
"serialize",
"class",
"name",
"into",
"relevant",
"key"
] | e4357cd14db67299e0cbbd656300f51b7069ea9b | https://github.com/chaps-io/public_activity/blob/e4357cd14db67299e0cbbd656300f51b7069ea9b/lib/public_activity/common.rb#L343-L349 | train | Returns the key for the given action | [
30522,
13366,
7374,
1035,
3145,
1006,
2895,
1010,
7047,
1027,
1063,
1065,
1007,
1006,
7047,
1031,
1024,
3145,
1033,
1064,
1064,
2969,
1012,
4023,
1035,
3145,
1064,
1064,
1006,
1006,
2969,
1012,
2465,
1012,
2171,
1012,
2104,
9363,
2890,
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... |
thoughtbot/clearance | lib/clearance/authentication.rb | Clearance.Authentication.sign_in | def sign_in(user, &block)
clearance_session.sign_in(user, &block)
if signed_in? && Clearance.configuration.rotate_csrf_on_sign_in?
session.delete(:_csrf_token)
form_authenticity_token
end
end | ruby | def sign_in(user, &block)
clearance_session.sign_in(user, &block)
if signed_in? && Clearance.configuration.rotate_csrf_on_sign_in?
session.delete(:_csrf_token)
form_authenticity_token
end
end | [
"def",
"sign_in",
"(",
"user",
",",
"&",
"block",
")",
"clearance_session",
".",
"sign_in",
"(",
"user",
",",
"block",
")",
"if",
"signed_in?",
"&&",
"Clearance",
".",
"configuration",
".",
"rotate_csrf_on_sign_in?",
"session",
".",
"delete",
"(",
":_csrf_toke... | Sign in the provided user.
@param [User] user
Signing in will run the stack of {Configuration#sign_in_guards}.
You can provide a block to this method to handle the result of that stack.
Your block will receive either a {SuccessStatus} or {FailureStatus}
sign_in(user) do |status|
if status.success?
... | [
"Sign",
"in",
"the",
"provided",
"user",
".",
"@param",
"[",
"User",
"]",
"user"
] | 1623cdeb648f33a55f0eb7be17e8f19a4291e1f2 | https://github.com/thoughtbot/clearance/blob/1623cdeb648f33a55f0eb7be17e8f19a4291e1f2/lib/clearance/authentication.rb#L63-L70 | train | Sign in the user | [
30522,
13366,
3696,
1035,
1999,
1006,
5310,
1010,
1004,
3796,
1007,
14860,
1035,
5219,
1012,
3696,
1035,
1999,
1006,
5310,
1010,
1004,
3796,
1007,
2065,
2772,
1035,
1999,
1029,
1004,
1004,
14860,
1012,
9563,
1012,
24357,
1035,
20116,
12881,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_web/lib/2018-02-01/generated/azure_mgmt_web/diagnostics.rb | Azure::Web::Mgmt::V2018_02_01.Diagnostics.get_site_detector_slot_with_http_info | def get_site_detector_slot_with_http_info(resource_group_name, site_name, diagnostic_category, detector_name, slot, custom_headers:nil)
get_site_detector_slot_async(resource_group_name, site_name, diagnostic_category, detector_name, slot, custom_headers:custom_headers).value!
end | ruby | def get_site_detector_slot_with_http_info(resource_group_name, site_name, diagnostic_category, detector_name, slot, custom_headers:nil)
get_site_detector_slot_async(resource_group_name, site_name, diagnostic_category, detector_name, slot, custom_headers:custom_headers).value!
end | [
"def",
"get_site_detector_slot_with_http_info",
"(",
"resource_group_name",
",",
"site_name",
",",
"diagnostic_category",
",",
"detector_name",
",",
"slot",
",",
"custom_headers",
":",
"nil",
")",
"get_site_detector_slot_async",
"(",
"resource_group_name",
",",
"site_name",... | Get Detector
Get Detector
@param resource_group_name [String] Name of the resource group to which the
resource belongs.
@param site_name [String] Site Name
@param diagnostic_category [String] Diagnostic Category
@param detector_name [String] Detector Name
@param slot [String] Slot Name
@param custom_headers [... | [
"Get",
"Detector"
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_web/lib/2018-02-01/generated/azure_mgmt_web/diagnostics.rb#L2317-L2319 | train | Gets the specified detector in a site. | [
30522,
13366,
2131,
1035,
2609,
1035,
19034,
1035,
10453,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2609,
1035,
2171,
1010,
16474,
1035,
4696,
1010,
19034,
1035,
2171,
1010,
10453,
1010,
7661,
1035,
2034... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
oauth-xx/oauth2 | lib/oauth2/client.rb | OAuth2.Client.request | def request(verb, url, opts = {}) # rubocop:disable CyclomaticComplexity, MethodLength, Metrics/AbcSize
url = connection.build_url(url, opts[:params]).to_s
response = connection.run_request(verb, url, opts[:body], opts[:headers]) do |req|
yield(req) if block_given?
end
response = Respons... | ruby | def request(verb, url, opts = {}) # rubocop:disable CyclomaticComplexity, MethodLength, Metrics/AbcSize
url = connection.build_url(url, opts[:params]).to_s
response = connection.run_request(verb, url, opts[:body], opts[:headers]) do |req|
yield(req) if block_given?
end
response = Respons... | [
"def",
"request",
"(",
"verb",
",",
"url",
",",
"opts",
"=",
"{",
"}",
")",
"# rubocop:disable CyclomaticComplexity, MethodLength, Metrics/AbcSize",
"url",
"=",
"connection",
".",
"build_url",
"(",
"url",
",",
"opts",
"[",
":params",
"]",
")",
".",
"to_s",
"re... | Makes a request relative to the specified site root.
@param [Symbol] verb one of :get, :post, :put, :delete
@param [String] url URL path of request
@param [Hash] opts the options to make the request with
@option opts [Hash] :params additional query parameters for the URL of the request
@option opts [Hash, String]... | [
"Makes",
"a",
"request",
"relative",
"to",
"the",
"specified",
"site",
"root",
"."
] | f08ff9da169136ab133aa2faab0d74a4407deffb | https://github.com/oauth-xx/oauth2/blob/f08ff9da169136ab133aa2faab0d74a4407deffb/lib/oauth2/client.rb#L97-L125 | train | This method is used to make requests to the server | [
30522,
13366,
5227,
1006,
12034,
1010,
24471,
2140,
1010,
23569,
2015,
1027,
1063,
1065,
1007,
1001,
14548,
24163,
2361,
1024,
4487,
19150,
22330,
20464,
9626,
4588,
9006,
19386,
3012,
1010,
4118,
7770,
13512,
2232,
1010,
12046,
2015,
1013,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
rmosolgo/graphql-ruby | lib/graphql/base_type.rb | GraphQL.BaseType.to_definition | def to_definition(schema, printer: nil, **args)
printer ||= GraphQL::Schema::Printer.new(schema, **args)
printer.print_type(self)
end | ruby | def to_definition(schema, printer: nil, **args)
printer ||= GraphQL::Schema::Printer.new(schema, **args)
printer.print_type(self)
end | [
"def",
"to_definition",
"(",
"schema",
",",
"printer",
":",
"nil",
",",
"**",
"args",
")",
"printer",
"||=",
"GraphQL",
"::",
"Schema",
"::",
"Printer",
".",
"new",
"(",
"schema",
",",
"**",
"args",
")",
"printer",
".",
"print_type",
"(",
"self",
")",
... | Return a GraphQL string for the type definition
@param schema [GraphQL::Schema]
@param printer [GraphQL::Schema::Printer]
@see {GraphQL::Schema::Printer#initialize for additional options}
@return [String] type definition | [
"Return",
"a",
"GraphQL",
"string",
"for",
"the",
"type",
"definition"
] | d5be13a816f220b9efbabeaa69a3e56fedf311f5 | https://github.com/rmosolgo/graphql-ruby/blob/d5be13a816f220b9efbabeaa69a3e56fedf311f5/lib/graphql/base_type.rb#L205-L208 | train | Returns a definition for this type. | [
30522,
13366,
2000,
1035,
6210,
1006,
8040,
28433,
1010,
15041,
1024,
9152,
2140,
1010,
1008,
1008,
12098,
5620,
1007,
15041,
1064,
1064,
1027,
10629,
4160,
2140,
1024,
1024,
8040,
28433,
1024,
1024,
15041,
1012,
2047,
1006,
8040,
28433,
10... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_recovery_services_backup/lib/2016-06-01/generated/azure_mgmt_recovery_services_backup/recovery_points.rb | Azure::RecoveryServicesBackup::Mgmt::V2016_06_01.RecoveryPoints.list | def list(vault_name, resource_group_name, fabric_name, container_name, protected_item_name, filter:nil, custom_headers:nil)
response = list_async(vault_name, resource_group_name, fabric_name, container_name, protected_item_name, filter:filter, custom_headers:custom_headers).value!
response.body unless respo... | ruby | def list(vault_name, resource_group_name, fabric_name, container_name, protected_item_name, filter:nil, custom_headers:nil)
response = list_async(vault_name, resource_group_name, fabric_name, container_name, protected_item_name, filter:filter, custom_headers:custom_headers).value!
response.body unless respo... | [
"def",
"list",
"(",
"vault_name",
",",
"resource_group_name",
",",
"fabric_name",
",",
"container_name",
",",
"protected_item_name",
",",
"filter",
":",
"nil",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"list_async",
"(",
"vault_name",
",",
"resour... | Lists the recovery points, or backup copies, for the specified backup item.
@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 fabric_name [String] The fabric name associated with... | [
"Lists",
"the",
"recovery",
"points",
"or",
"backup",
"copies",
"for",
"the",
"specified",
"backup",
"item",
"."
] | 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/recovery_points.rb#L172-L175 | train | Gets the list of all the protected item versions of the container. | [
30522,
13366,
2862,
1006,
11632,
1035,
2171,
1010,
7692,
1035,
2177,
1035,
2171,
1010,
8313,
1035,
2171,
1010,
11661,
1035,
2171,
1010,
5123,
1035,
8875,
1035,
2171,
1010,
11307,
1024,
9152,
2140,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_policy_insights/lib/2018-07-01-preview/generated/azure_mgmt_policy_insights/remediations.rb | Azure::PolicyInsights::Mgmt::V2018_07_01_preview.Remediations.cancel_at_resource_group | def cancel_at_resource_group(resource_group_name, remediation_name, custom_headers:nil)
response = cancel_at_resource_group_async(resource_group_name, remediation_name, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def cancel_at_resource_group(resource_group_name, remediation_name, custom_headers:nil)
response = cancel_at_resource_group_async(resource_group_name, remediation_name, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"cancel_at_resource_group",
"(",
"resource_group_name",
",",
"remediation_name",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"cancel_at_resource_group_async",
"(",
"resource_group_name",
",",
"remediation_name",
",",
"custom_headers",
":custom_headers",
... | Cancels a remediation at resource group scope.
@param resource_group_name [String] Resource group name.
@param remediation_name [String] The name of the remediation.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request.
@return [Remediation] operation res... | [
"Cancels",
"a",
"remediation",
"at",
"resource",
"group",
"scope",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_policy_insights/lib/2018-07-01-preview/generated/azure_mgmt_policy_insights/remediations.rb#L1283-L1286 | train | Cancels a remediation at resource group scope. | [
30522,
13366,
17542,
1035,
2012,
1035,
7692,
1035,
2177,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2128,
16969,
3508,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
17542,
1035,
2012,
1035,
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... |
samvera/hyrax | app/controllers/concerns/hyrax/embargoes_controller_behavior.rb | Hyrax.EmbargoesControllerBehavior.update | def update
filter_docs_with_edit_access!
copy_visibility = params[:embargoes].values.map { |h| h[:copy_visibility] }
ActiveFedora::Base.find(batch).each do |curation_concern|
Hyrax::Actors::EmbargoActor.new(curation_concern).destroy
# if the concern is a FileSet, set its visibility and... | ruby | def update
filter_docs_with_edit_access!
copy_visibility = params[:embargoes].values.map { |h| h[:copy_visibility] }
ActiveFedora::Base.find(batch).each do |curation_concern|
Hyrax::Actors::EmbargoActor.new(curation_concern).destroy
# if the concern is a FileSet, set its visibility and... | [
"def",
"update",
"filter_docs_with_edit_access!",
"copy_visibility",
"=",
"params",
"[",
":embargoes",
"]",
".",
"values",
".",
"map",
"{",
"|",
"h",
"|",
"h",
"[",
":copy_visibility",
"]",
"}",
"ActiveFedora",
"::",
"Base",
".",
"find",
"(",
"batch",
")",
... | Updates a batch of embargos | [
"Updates",
"a",
"batch",
"of",
"embargos"
] | e2b4f56e829a53b1f11296324736e9d5b8c9ee5f | https://github.com/samvera/hyrax/blob/e2b4f56e829a53b1f11296324736e9d5b8c9ee5f/app/controllers/concerns/hyrax/embargoes_controller_behavior.rb#L26-L40 | train | update the embargoes | [
30522,
13366,
10651,
11307,
1035,
9986,
2015,
1035,
2007,
1035,
10086,
1035,
3229,
999,
6100,
1035,
16476,
1027,
11498,
5244,
1031,
1024,
7861,
8237,
3995,
2229,
1033,
1012,
5300,
1012,
4949,
1063,
1064,
1044,
1064,
1044,
1031,
1024,
6100,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
chanks/que | lib/que/job_methods.rb | Que.JobMethods.handle_error | def handle_error(error)
return unless que_target
max = resolve_que_setting(:maximum_retry_count)
if max && error_count > max
expire
else
retry_in_default_interval
end
end | ruby | def handle_error(error)
return unless que_target
max = resolve_que_setting(:maximum_retry_count)
if max && error_count > max
expire
else
retry_in_default_interval
end
end | [
"def",
"handle_error",
"(",
"error",
")",
"return",
"unless",
"que_target",
"max",
"=",
"resolve_que_setting",
"(",
":maximum_retry_count",
")",
"if",
"max",
"&&",
"error_count",
">",
"max",
"expire",
"else",
"retry_in_default_interval",
"end",
"end"
] | To be overridden in subclasses. | [
"To",
"be",
"overridden",
"in",
"subclasses",
"."
] | c7ae049db0ca13056a28c71ae610f8900f21feb4 | https://github.com/chanks/que/blob/c7ae049db0ca13056a28c71ae610f8900f21feb4/lib/que/job_methods.rb#L124-L134 | train | Handle the error | [
30522,
13366,
5047,
1035,
7561,
1006,
7561,
1007,
2709,
4983,
10861,
1035,
4539,
4098,
1027,
10663,
1035,
10861,
1035,
4292,
1006,
1024,
4555,
1035,
2128,
11129,
1035,
4175,
1007,
2065,
4098,
1004,
1004,
7561,
1035,
4175,
1028,
4098,
4654,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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.remove_node_state_with_http_info | def remove_node_state_with_http_info(node_name, timeout:60, custom_headers:nil)
remove_node_state_async(node_name, timeout:timeout, custom_headers:custom_headers).value!
end | ruby | def remove_node_state_with_http_info(node_name, timeout:60, custom_headers:nil)
remove_node_state_async(node_name, timeout:timeout, custom_headers:custom_headers).value!
end | [
"def",
"remove_node_state_with_http_info",
"(",
"node_name",
",",
"timeout",
":",
"60",
",",
"custom_headers",
":",
"nil",
")",
"remove_node_state_async",
"(",
"node_name",
",",
"timeout",
":",
"timeout",
",",
"custom_headers",
":custom_headers",
")",
".",
"value!",... | Notifies Service Fabric that the persisted state on a node has been
permanently removed or lost.
Notifies Service Fabric that the persisted state on a node has been
permanently removed or lost. This implies that it is not possible to recover
the persisted state of that node. This generally happens if a hard disk ... | [
"Notifies",
"Service",
"Fabric",
"that",
"the",
"persisted",
"state",
"on",
"a",
"node",
"has",
"been",
"permanently",
"removed",
"or",
"lost",
"."
] | 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#L4443-L4445 | train | Remove the node state of the specified App Service Environment. | [
30522,
13366,
6366,
1035,
13045,
1035,
2110,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
13045,
1035,
2171,
1010,
2051,
5833,
1024,
3438,
1010,
7661,
1035,
30524,
13045,
1035,
2110,
1035,
2004,
6038,
2278,
1006,
13045,
1035,
2171,
1010,
2051... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
aws/aws-sdk-ruby | gems/aws-sdk-autoscaling/lib/aws-sdk-autoscaling/auto_scaling_group.rb | Aws::AutoScaling.AutoScalingGroup.put_scaling_policy | def put_scaling_policy(options = {})
options = options.merge(auto_scaling_group_name: @name)
resp = @client.put_scaling_policy(options)
ScalingPolicy.new(
name: options[:policy_name],
client: @client
)
end | ruby | def put_scaling_policy(options = {})
options = options.merge(auto_scaling_group_name: @name)
resp = @client.put_scaling_policy(options)
ScalingPolicy.new(
name: options[:policy_name],
client: @client
)
end | [
"def",
"put_scaling_policy",
"(",
"options",
"=",
"{",
"}",
")",
"options",
"=",
"options",
".",
"merge",
"(",
"auto_scaling_group_name",
":",
"@name",
")",
"resp",
"=",
"@client",
".",
"put_scaling_policy",
"(",
"options",
")",
"ScalingPolicy",
".",
"new",
... | @example Request syntax with placeholder values
scalingpolicy = auto_scaling_group.put_scaling_policy({
policy_name: "XmlStringMaxLen255", # required
policy_type: "XmlStringMaxLen64",
adjustment_type: "XmlStringMaxLen255",
min_adjustment_step: 1,
min_adjustment_magnitude: 1,
scaling_ad... | [
"@example",
"Request",
"syntax",
"with",
"placeholder",
"values"
] | e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d | https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-autoscaling/lib/aws-sdk-autoscaling/auto_scaling_group.rb#L619-L626 | train | Put a scaling policy | [
30522,
13366,
2404,
1035,
25169,
1035,
3343,
1006,
7047,
1027,
1063,
1065,
1007,
7047,
1027,
7047,
1012,
13590,
1006,
8285,
1035,
25169,
1035,
2177,
1035,
2171,
1024,
1030,
2171,
1007,
24501,
2361,
1027,
1030,
7396,
1012,
2404,
1035,
25169,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
aws/aws-sdk-ruby | gems/aws-sdk-iam/lib/aws-sdk-iam/signing_certificate.rb | Aws::IAM.SigningCertificate.activate | def activate(options = {})
options = options.merge(
user_name: @user_name,
certificate_id: @id,
status: "Active"
)
resp = @client.update_signing_certificate(options)
resp.data
end | ruby | def activate(options = {})
options = options.merge(
user_name: @user_name,
certificate_id: @id,
status: "Active"
)
resp = @client.update_signing_certificate(options)
resp.data
end | [
"def",
"activate",
"(",
"options",
"=",
"{",
"}",
")",
"options",
"=",
"options",
".",
"merge",
"(",
"user_name",
":",
"@user_name",
",",
"certificate_id",
":",
"@id",
",",
"status",
":",
"\"Active\"",
")",
"resp",
"=",
"@client",
".",
"update_signing_cert... | @!group Actions
@example Request syntax with placeholder values
signing_certificate.activate()
@param [Hash] options ({})
@return [EmptyStructure] | [
"@!group",
"Actions",
"@example",
"Request",
"syntax",
"with",
"placeholder",
"values"
] | e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d | https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-iam/lib/aws-sdk-iam/signing_certificate.rb#L193-L201 | train | Activate the certificate | [
30522,
13366,
20544,
1006,
7047,
1027,
1063,
1065,
1007,
7047,
1027,
7047,
1012,
13590,
1006,
5310,
1035,
2171,
1024,
1030,
5310,
1035,
2171,
1010,
8196,
1035,
8909,
1024,
1030,
8909,
1010,
3570,
1024,
1000,
3161,
1000,
1007,
24501,
2361,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_network/lib/2019-02-01/generated/azure_mgmt_network/vpn_connections.rb | Azure::Network::Mgmt::V2019_02_01.VpnConnections.begin_create_or_update | def begin_create_or_update(resource_group_name, gateway_name, connection_name, vpn_connection_parameters, custom_headers:nil)
response = begin_create_or_update_async(resource_group_name, gateway_name, connection_name, vpn_connection_parameters, custom_headers:custom_headers).value!
response.body unless resp... | ruby | def begin_create_or_update(resource_group_name, gateway_name, connection_name, vpn_connection_parameters, custom_headers:nil)
response = begin_create_or_update_async(resource_group_name, gateway_name, connection_name, vpn_connection_parameters, custom_headers:custom_headers).value!
response.body unless resp... | [
"def",
"begin_create_or_update",
"(",
"resource_group_name",
",",
"gateway_name",
",",
"connection_name",
",",
"vpn_connection_parameters",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"begin_create_or_update_async",
"(",
"resource_group_name",
",",
"gateway_nam... | Creates a vpn connection to a scalable vpn gateway if it doesn't exist else
updates the existing connection.
@param resource_group_name [String] The resource group name of the
VpnGateway.
@param gateway_name [String] The name of the gateway.
@param connection_name [String] The name of the connection.
@param vpn_... | [
"Creates",
"a",
"vpn",
"connection",
"to",
"a",
"scalable",
"vpn",
"gateway",
"if",
"it",
"doesn",
"t",
"exist",
"else",
"updates",
"the",
"existing",
"connection",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_network/lib/2019-02-01/generated/azure_mgmt_network/vpn_connections.rb#L326-L329 | train | Creates or updates a virtual wan vpn connection. | [
30522,
13366,
4088,
1035,
3443,
1035,
2030,
1035,
10651,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
11909,
1035,
2171,
1010,
4434,
1035,
2171,
1010,
21210,
2078,
1035,
4434,
1035,
11709,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/replication_links.rb | Azure::SQL::Mgmt::V2014_04_01.ReplicationLinks.begin_failover_allow_data_loss | def begin_failover_allow_data_loss(resource_group_name, server_name, database_name, link_id, custom_headers:nil)
response = begin_failover_allow_data_loss_async(resource_group_name, server_name, database_name, link_id, custom_headers:custom_headers).value!
nil
end | ruby | def begin_failover_allow_data_loss(resource_group_name, server_name, database_name, link_id, custom_headers:nil)
response = begin_failover_allow_data_loss_async(resource_group_name, server_name, database_name, link_id, custom_headers:custom_headers).value!
nil
end | [
"def",
"begin_failover_allow_data_loss",
"(",
"resource_group_name",
",",
"server_name",
",",
"database_name",
",",
"link_id",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"begin_failover_allow_data_loss_async",
"(",
"resource_group_name",
",",
"server_name",
... | Sets which replica database is primary by failing over from the current
primary replica database. This operation might result in data loss.
@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.
@p... | [
"Sets",
"which",
"replica",
"database",
"is",
"primary",
"by",
"failing",
"over",
"from",
"the",
"current",
"primary",
"replica",
"database",
".",
"This",
"operation",
"might",
"result",
"in",
"data",
"loss",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/replication_links.rb#L547-L550 | train | Gets the next set of documents that have failed to loss. | [
30522,
13366,
4088,
1035,
8246,
7840,
1035,
3499,
1035,
2951,
1035,
3279,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
8241,
1035,
2171,
1010,
7809,
1035,
2171,
1010,
4957,
1035,
8909,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
jekyll/jekyll | lib/jekyll/reader.rb | Jekyll.Reader.retrieve_pages | def retrieve_pages(dir, dot_pages)
site.pages.concat(PageReader.new(site, dir).read(dot_pages))
end | ruby | def retrieve_pages(dir, dot_pages)
site.pages.concat(PageReader.new(site, dir).read(dot_pages))
end | [
"def",
"retrieve_pages",
"(",
"dir",
",",
"dot_pages",
")",
"site",
".",
"pages",
".",
"concat",
"(",
"PageReader",
".",
"new",
"(",
"site",
",",
"dir",
")",
".",
"read",
"(",
"dot_pages",
")",
")",
"end"
] | Retrieve all the pages from the current directory,
add them to the site and sort them.
dir - The String representing the directory retrieve the pages from.
dot_pages - The Array of pages in the dir.
Returns nothing. | [
"Retrieve",
"all",
"the",
"pages",
"from",
"the",
"current",
"directory",
"add",
"them",
"to",
"the",
"site",
"and",
"sort",
"them",
"."
] | fd74fe3e93a1fb506fa6621a2e271d7b9c5c3e3b | https://github.com/jekyll/jekyll/blob/fd74fe3e93a1fb506fa6621a2e271d7b9c5c3e3b/lib/jekyll/reader.rb#L100-L102 | train | Retrieve the pages from the specified directory. | [
30522,
13366,
12850,
1035,
5530,
1006,
16101,
1010,
11089,
1035,
5530,
1007,
2609,
1012,
5530,
1012,
9530,
11266,
1006,
3931,
16416,
4063,
1012,
2047,
1006,
2609,
1010,
16101,
1007,
1012,
3191,
1006,
11089,
1035,
5530,
1007,
1007,
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... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
cucumber/aruba | lib/aruba/command.rb | Aruba.Command.terminate | def terminate(*)
return if __getobj__.stopped?
__getobj__.terminate
event_bus.notify Events::CommandStopped.new(self)
self
end | ruby | def terminate(*)
return if __getobj__.stopped?
__getobj__.terminate
event_bus.notify Events::CommandStopped.new(self)
self
end | [
"def",
"terminate",
"(",
"*",
")",
"return",
"if",
"__getobj__",
".",
"stopped?",
"__getobj__",
".",
"terminate",
"event_bus",
".",
"notify",
"Events",
"::",
"CommandStopped",
".",
"new",
"(",
"self",
")",
"self",
"end"
] | Terminate command | [
"Terminate",
"command"
] | add17615322f575588aef1fccce875396cdf36e9 | https://github.com/cucumber/aruba/blob/add17615322f575588aef1fccce875396cdf36e9/lib/aruba/command.rb#L60-L67 | train | Terminate the command | [
30522,
13366,
20320,
1006,
1008,
1007,
2709,
2065,
1035,
1035,
2131,
16429,
3501,
1035,
1035,
1012,
3030,
1029,
1035,
1035,
2131,
16429,
3501,
1035,
1035,
1012,
20320,
2724,
1035,
3902,
1012,
2025,
8757,
2824,
1024,
1024,
10954,
14399,
5669... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | data/azure_cognitiveservices_contentmoderator/lib/1.0/generated/azure_cognitiveservices_contentmoderator/reviews.rb | Azure::CognitiveServices::ContentModerator::V1_0.Reviews.get_review | def get_review(team_name, review_id, custom_headers:nil)
response = get_review_async(team_name, review_id, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def get_review(team_name, review_id, custom_headers:nil)
response = get_review_async(team_name, review_id, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"get_review",
"(",
"team_name",
",",
"review_id",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"get_review_async",
"(",
"team_name",
",",
"review_id",
",",
"custom_headers",
":custom_headers",
")",
".",
"value!",
"response",
".",
"body",
"unle... | Returns review details for the review Id passed.
@param team_name [String] Your Team Name.
@param review_id [String] Id of the review.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request.
@return [Review] operation results. | [
"Returns",
"review",
"details",
"for",
"the",
"review",
"Id",
"passed",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_cognitiveservices_contentmoderator/lib/1.0/generated/azure_cognitiveservices_contentmoderator/reviews.rb#L44-L47 | train | Gets the review for a team. | [
30522,
13366,
2131,
1035,
3319,
1006,
2136,
1035,
2171,
1010,
3319,
1035,
8909,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
2131,
1035,
3319,
1035,
2004,
6038,
2278,
1006,
2136,
1035,
2171,
1010,
3319,
1035,
8909,
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... |
sds/scss-lint | lib/scss_lint/linter/space_after_comma.rb | SCSSLint.Linter::SpaceAfterComma.check_commas_after_args | def check_commas_after_args(args, arg_type)
# For each arg except the last, check the character following the comma
args[0..-2].each do |arg|
# Sometimes the line we're looking at doesn't even contain a comma!
next unless engine.lines[arg.line - 1].include?(',')
comma_position = fin... | ruby | def check_commas_after_args(args, arg_type)
# For each arg except the last, check the character following the comma
args[0..-2].each do |arg|
# Sometimes the line we're looking at doesn't even contain a comma!
next unless engine.lines[arg.line - 1].include?(',')
comma_position = fin... | [
"def",
"check_commas_after_args",
"(",
"args",
",",
"arg_type",
")",
"# For each arg except the last, check the character following the comma",
"args",
"[",
"0",
"..",
"-",
"2",
"]",
".",
"each",
"do",
"|",
"arg",
"|",
"# Sometimes the line we're looking at doesn't even con... | Check the comma after each argument in a list for a space following it,
reporting a lint using the given [arg_type]. | [
"Check",
"the",
"comma",
"after",
"each",
"argument",
"in",
"a",
"list",
"for",
"a",
"space",
"following",
"it",
"reporting",
"a",
"lint",
"using",
"the",
"given",
"[",
"arg_type",
"]",
"."
] | e99afe4ede041a431a06e585c12ce82f6ad50116 | https://github.com/sds/scss-lint/blob/e99afe4ede041a431a06e585c12ce82f6ad50116/lib/scss_lint/linter/space_after_comma.rb#L75-L95 | train | Check the comma after the arguments | [
30522,
13366,
4638,
1035,
4012,
30524,
2290,
1035,
2828,
1007,
1001,
2005,
2169,
12098,
2290,
3272,
1996,
2197,
1010,
4638,
1996,
2839,
2206,
1996,
4012,
2863,
12098,
5620,
1031,
1014,
1012,
1012,
1011,
1016,
1033,
1012,
2169,
2079,
1064,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Shopify/active_utils | lib/active_utils/requires_parameters.rb | ActiveUtils.RequiresParameters.requires! | def requires!(hash, *params)
params.each do |param|
if param.is_a?(Array)
raise ArgumentError.new("Missing required parameter: #{param.first}") unless hash.has_key?(param.first)
valid_options = param[1..-1]
raise ArgumentError.new("Parameter: #{param.first} must be one of #{... | ruby | def requires!(hash, *params)
params.each do |param|
if param.is_a?(Array)
raise ArgumentError.new("Missing required parameter: #{param.first}") unless hash.has_key?(param.first)
valid_options = param[1..-1]
raise ArgumentError.new("Parameter: #{param.first} must be one of #{... | [
"def",
"requires!",
"(",
"hash",
",",
"*",
"params",
")",
"params",
".",
"each",
"do",
"|",
"param",
"|",
"if",
"param",
".",
"is_a?",
"(",
"Array",
")",
"raise",
"ArgumentError",
".",
"new",
"(",
"\"Missing required parameter: #{param.first}\"",
")",
"unles... | :nodoc: | [
":",
"nodoc",
":"
] | 2f3a2187fa32230242639bc922a3c22e659d896f | https://github.com/Shopify/active_utils/blob/2f3a2187fa32230242639bc922a3c22e659d896f/lib/active_utils/requires_parameters.rb#L3-L14 | train | Checks if the hash contains all required parameters | [
30522,
13366,
5942,
999,
1006,
23325,
1010,
1008,
11498,
5244,
1007,
11498,
5244,
1012,
2169,
2079,
1064,
11498,
2213,
1064,
2065,
11498,
2213,
1012,
2003,
1035,
1037,
1029,
1006,
9140,
1007,
5333,
6685,
2121,
29165,
1012,
2047,
1006,
1000,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_datalake_analytics/lib/2015-10-01-preview/generated/azure_mgmt_datalake_analytics/account.rb | Azure::DataLakeAnalytics::Mgmt::V2015_10_01_preview.Account.get_storage_account_with_http_info | def get_storage_account_with_http_info(resource_group_name, account_name, storage_account_name, custom_headers:nil)
get_storage_account_async(resource_group_name, account_name, storage_account_name, custom_headers:custom_headers).value!
end | ruby | def get_storage_account_with_http_info(resource_group_name, account_name, storage_account_name, custom_headers:nil)
get_storage_account_async(resource_group_name, account_name, storage_account_name, custom_headers:custom_headers).value!
end | [
"def",
"get_storage_account_with_http_info",
"(",
"resource_group_name",
",",
"account_name",
",",
"storage_account_name",
",",
"custom_headers",
":",
"nil",
")",
"get_storage_account_async",
"(",
"resource_group_name",
",",
"account_name",
",",
"storage_account_name",
",",
... | Gets the specified Azure Storage account linked to the given Data Lake
Analytics account.
@param resource_group_name [String] The name of the Azure resource group that
contains the Data Lake Analytics account.
@param account_name [String] The name of the Data Lake Analytics account from
which to retrieve Azure st... | [
"Gets",
"the",
"specified",
"Azure",
"Storage",
"account",
"linked",
"to",
"the",
"given",
"Data",
"Lake",
"Analytics",
"account",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_datalake_analytics/lib/2015-10-01-preview/generated/azure_mgmt_datalake_analytics/account.rb#L59-L61 | train | Gets the specified storage account. | [
30522,
13366,
2131,
1035,
5527,
1035,
4070,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
4070,
1035,
2171,
1010,
5527,
1035,
4070,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
2131,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_iot_hub/lib/2017-01-19/generated/azure_mgmt_iot_hub/iot_hub_resource.rb | Azure::IotHub::Mgmt::V2017_01_19.IotHubResource.get_job | def get_job(resource_group_name, resource_name, job_id, custom_headers:nil)
response = get_job_async(resource_group_name, resource_name, job_id, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def get_job(resource_group_name, resource_name, job_id, custom_headers:nil)
response = get_job_async(resource_group_name, resource_name, job_id, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"get_job",
"(",
"resource_group_name",
",",
"resource_name",
",",
"job_id",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"get_job_async",
"(",
"resource_group_name",
",",
"resource_name",
",",
"job_id",
",",
"custom_headers",
":custom_headers",
")... | Get the details of a job from an IoT hub. For more information, see:
https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry.
Get the details of a job from an IoT hub. For more information, see:
https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry.
@param resource_group_... | [
"Get",
"the",
"details",
"of",
"a",
"job",
"from",
"an",
"IoT",
"hub",
".",
"For",
"more",
"information",
"see",
":",
"https",
":",
"//",
"docs",
".",
"microsoft",
".",
"com",
"/",
"azure",
"/",
"iot",
"-",
"hub",
"/",
"iot",
"-",
"hub",
"-",
"de... | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_iot_hub/lib/2017-01-19/generated/azure_mgmt_iot_hub/iot_hub_resource.rb#L1187-L1190 | train | Gets the specified job. | [
30522,
13366,
2131,
1035,
3105,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
7692,
1035,
2171,
1010,
3105,
1035,
8909,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
2131,
1035,
3105,
1035,
2004,
6038,
2278,
1006,
7692,
1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
pythonicrubyist/creek | lib/creek/sheet.rb | Creek.Creek::Sheet.extract_drawing_filepath | def extract_drawing_filepath
# Read drawing relationship ID from the sheet.
sheet_filepath = "xl/#{@sheetfile}"
drawing = parse_xml(sheet_filepath).css('drawing').first
return if drawing.nil?
drawing_rid = drawing.attributes['id'].value
# Read sheet rels to find drawing file's loca... | ruby | def extract_drawing_filepath
# Read drawing relationship ID from the sheet.
sheet_filepath = "xl/#{@sheetfile}"
drawing = parse_xml(sheet_filepath).css('drawing').first
return if drawing.nil?
drawing_rid = drawing.attributes['id'].value
# Read sheet rels to find drawing file's loca... | [
"def",
"extract_drawing_filepath",
"# Read drawing relationship ID from the sheet.",
"sheet_filepath",
"=",
"\"xl/#{@sheetfile}\"",
"drawing",
"=",
"parse_xml",
"(",
"sheet_filepath",
")",
".",
"css",
"(",
"'drawing'",
")",
".",
"first",
"return",
"if",
"drawing",
".",
... | Find drawing filepath for the current sheet.
Sheet xml contains drawing relationship ID.
Sheet relationships xml contains drawing file's location. | [
"Find",
"drawing",
"filepath",
"for",
"the",
"current",
"sheet",
".",
"Sheet",
"xml",
"contains",
"drawing",
"relationship",
"ID",
".",
"Sheet",
"relationships",
"xml",
"contains",
"drawing",
"file",
"s",
"location",
"."
] | 1a5c99032ee736e8f24ebd524adffba068d236b4 | https://github.com/pythonicrubyist/creek/blob/1a5c99032ee736e8f24ebd524adffba068d236b4/lib/creek/sheet.rb#L163-L174 | train | Extract drawing file path | [
30522,
13366,
14817,
1035,
5059,
1035,
5371,
15069,
1001,
3191,
5059,
3276,
8909,
2013,
1996,
7123,
1012,
7123,
1035,
5371,
15069,
1027,
1000,
28712,
1013,
1001,
1063,
1030,
7123,
8873,
2571,
1065,
1000,
5059,
1027,
11968,
3366,
1035,
20950... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
square/connect-ruby-sdk | lib/square_connect/api/customers_api.rb | SquareConnect.CustomersApi.retrieve_customer | def retrieve_customer(customer_id, opts = {})
data, _status_code, _headers = retrieve_customer_with_http_info(customer_id, opts)
return data
end | ruby | def retrieve_customer(customer_id, opts = {})
data, _status_code, _headers = retrieve_customer_with_http_info(customer_id, opts)
return data
end | [
"def",
"retrieve_customer",
"(",
"customer_id",
",",
"opts",
"=",
"{",
"}",
")",
"data",
",",
"_status_code",
",",
"_headers",
"=",
"retrieve_customer_with_http_info",
"(",
"customer_id",
",",
"opts",
")",
"return",
"data",
"end"
] | RetrieveCustomer
Returns details for a single customer.
@param customer_id The ID of the customer to retrieve.
@param [Hash] opts the optional parameters
@return [RetrieveCustomerResponse] | [
"RetrieveCustomer",
"Returns",
"details",
"for",
"a",
"single",
"customer",
"."
] | 798eb9ded716f23b9f1518386f1c311a34bca8bf | https://github.com/square/connect-ruby-sdk/blob/798eb9ded716f23b9f1518386f1c311a34bca8bf/lib/square_connect/api/customers_api.rb#L319-L322 | train | Retrieve a customer Returns a list of all the data of a customer. | [
30522,
13366,
12850,
1035,
8013,
1006,
8013,
1035,
8909,
1010,
23569,
2015,
1027,
1063,
1065,
1007,
2951,
1010,
1035,
3570,
1035,
3642,
1010,
1035,
20346,
2015,
1027,
12850,
1035,
8013,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
8013,
1035,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | data/azure_service_fabric/lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb | Azure::ServiceFabric::V6_2_0_9.ServiceFabricClientAPIs.delete_service | def delete_service(service_id, force_remove:nil, timeout:60, custom_headers:nil)
response = delete_service_async(service_id, force_remove:force_remove, timeout:timeout, custom_headers:custom_headers).value!
nil
end | ruby | def delete_service(service_id, force_remove:nil, timeout:60, custom_headers:nil)
response = delete_service_async(service_id, force_remove:force_remove, timeout:timeout, custom_headers:custom_headers).value!
nil
end | [
"def",
"delete_service",
"(",
"service_id",
",",
"force_remove",
":",
"nil",
",",
"timeout",
":",
"60",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"delete_service_async",
"(",
"service_id",
",",
"force_remove",
":force_remove",
",",
"timeout",
":",... | Deletes an existing Service Fabric service.
Deletes an existing Service Fabric service. A service must be created before
it can be deleted. By default, Service Fabric will try to close service
replicas in a graceful manner and then delete the service. However, if the
service is having issues closing the replica gr... | [
"Deletes",
"an",
"existing",
"Service",
"Fabric",
"service",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_service_fabric/lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb#L10404-L10407 | train | Deletes the specified service. | [
30522,
13366,
3972,
12870,
1035,
2326,
1006,
2326,
1035,
8909,
1010,
2486,
1035,
6366,
1024,
9152,
2140,
1010,
2051,
5833,
1024,
3438,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
3972,
12870,
1035,
2326,
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... |
rails/spring | lib/spring/json.rb | Spring.OkJson.textparse | def textparse(ts)
if ts.length <= 0
raise Error, 'empty'
end
typ, _, val = ts[0]
case typ
when '{' then objparse(ts)
when '[' then arrparse(ts)
else
raise Error, "unexpected #{val.inspect}"
end
end | ruby | def textparse(ts)
if ts.length <= 0
raise Error, 'empty'
end
typ, _, val = ts[0]
case typ
when '{' then objparse(ts)
when '[' then arrparse(ts)
else
raise Error, "unexpected #{val.inspect}"
end
end | [
"def",
"textparse",
"(",
"ts",
")",
"if",
"ts",
".",
"length",
"<=",
"0",
"raise",
"Error",
",",
"'empty'",
"end",
"typ",
",",
"_",
",",
"val",
"=",
"ts",
"[",
"0",
"]",
"case",
"typ",
"when",
"'{'",
"then",
"objparse",
"(",
"ts",
")",
"when",
... | Parses a "json text" in the sense of RFC 4627.
Returns the parsed value and any trailing tokens.
Note: this is almost the same as valparse,
except that it does not accept atomic values. | [
"Parses",
"a",
"json",
"text",
"in",
"the",
"sense",
"of",
"RFC",
"4627",
".",
"Returns",
"the",
"parsed",
"value",
"and",
"any",
"trailing",
"tokens",
".",
"Note",
":",
"this",
"is",
"almost",
"the",
"same",
"as",
"valparse",
"except",
"that",
"it",
"... | e7a36afa436fcc59b6945f68dbc08f1076e65585 | https://github.com/rails/spring/blob/e7a36afa436fcc59b6945f68dbc08f1076e65585/lib/spring/json.rb#L119-L131 | train | Parse a text string into a node object. | [
30522,
13366,
3793,
19362,
3366,
1006,
24529,
1007,
2065,
24529,
1012,
3091,
1026,
1027,
1014,
5333,
7561,
1010,
1005,
4064,
1005,
2203,
5939,
2361,
1010,
1035,
1010,
11748,
1027,
24529,
1031,
1014,
1033,
2553,
5939,
2361,
2043,
1005,
1063,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_resources/lib/2018-05-01/generated/azure_mgmt_resources/deployment_operations.rb | Azure::Resources::Mgmt::V2018_05_01.DeploymentOperations.get_with_http_info | def get_with_http_info(resource_group_name, deployment_name, operation_id, custom_headers:nil)
get_async(resource_group_name, deployment_name, operation_id, custom_headers:custom_headers).value!
end | ruby | def get_with_http_info(resource_group_name, deployment_name, operation_id, custom_headers:nil)
get_async(resource_group_name, deployment_name, operation_id, custom_headers:custom_headers).value!
end | [
"def",
"get_with_http_info",
"(",
"resource_group_name",
",",
"deployment_name",
",",
"operation_id",
",",
"custom_headers",
":",
"nil",
")",
"get_async",
"(",
"resource_group_name",
",",
"deployment_name",
",",
"operation_id",
",",
"custom_headers",
":custom_headers",
... | Gets a deployments operation.
@param resource_group_name [String] The name of the resource group. The name
is case insensitive.
@param deployment_name [String] The name of the deployment.
@param operation_id [String] The ID of the operation to get.
@param custom_headers [Hash{String => String}] A hash of custom h... | [
"Gets",
"a",
"deployments",
"operation",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_resources/lib/2018-05-01/generated/azure_mgmt_resources/deployment_operations.rb#L245-L247 | train | Gets the specified resource group deployment operation. | [
30522,
13366,
2131,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
10813,
1035,
2171,
1010,
3169,
1035,
8909,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
2131,
1035,
2004,
6038,
2278,
1006,
7692,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | data/azure_cognitiveservices_luisauthoring/lib/2.0/generated/azure_cognitiveservices_luisauthoring/model.rb | Azure::CognitiveServices::LuisAuthoring::V2_0.Model.list_models_with_http_info | def list_models_with_http_info(app_id, version_id, skip:0, take:100, custom_headers:nil)
list_models_async(app_id, version_id, skip:skip, take:take, custom_headers:custom_headers).value!
end | ruby | def list_models_with_http_info(app_id, version_id, skip:0, take:100, custom_headers:nil)
list_models_async(app_id, version_id, skip:skip, take:take, custom_headers:custom_headers).value!
end | [
"def",
"list_models_with_http_info",
"(",
"app_id",
",",
"version_id",
",",
"skip",
":",
"0",
",",
"take",
":",
"100",
",",
"custom_headers",
":",
"nil",
")",
"list_models_async",
"(",
"app_id",
",",
"version_id",
",",
"skip",
":",
"skip",
",",
"take",
":"... | Gets information about all the intent and entity models in a version of the
application.
@param app_id The application ID.
@param version_id [String] The version ID.
@param skip [Integer] The number of entries to skip. Default value is 0.
@param take [Integer] The number of entries to return. Maximum page size is... | [
"Gets",
"information",
"about",
"all",
"the",
"intent",
"and",
"entity",
"models",
"in",
"a",
"version",
"of",
"the",
"application",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_cognitiveservices_luisauthoring/lib/2.0/generated/azure_cognitiveservices_luisauthoring/model.rb#L1595-L1597 | train | Gets the list of models for the application version. | [
30522,
13366,
2862,
1035,
4275,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
10439,
1035,
8909,
1010,
2544,
1035,
8909,
1010,
13558,
1024,
1014,
1010,
2202,
1024,
2531,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
2862,
1035,
4275,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_api_management/lib/2017-03-01/generated/azure_mgmt_api_management/tenant_configuration.rb | Azure::ApiManagement::Mgmt::V2017_03_01.TenantConfiguration.begin_deploy_with_http_info | def begin_deploy_with_http_info(resource_group_name, service_name, parameters, custom_headers:nil)
begin_deploy_async(resource_group_name, service_name, parameters, custom_headers:custom_headers).value!
end | ruby | def begin_deploy_with_http_info(resource_group_name, service_name, parameters, custom_headers:nil)
begin_deploy_async(resource_group_name, service_name, parameters, custom_headers:custom_headers).value!
end | [
"def",
"begin_deploy_with_http_info",
"(",
"resource_group_name",
",",
"service_name",
",",
"parameters",
",",
"custom_headers",
":",
"nil",
")",
"begin_deploy_async",
"(",
"resource_group_name",
",",
"service_name",
",",
"parameters",
",",
"custom_headers",
":custom_head... | This operation applies changes from the specified Git branch to the
configuration database. This is a long running operation and could take
several minutes to complete.
@param resource_group_name [String] The name of the resource group.
@param service_name [String] The name of the API Management service.
@param p... | [
"This",
"operation",
"applies",
"changes",
"from",
"the",
"specified",
"Git",
"branch",
"to",
"the",
"configuration",
"database",
".",
"This",
"is",
"a",
"long",
"running",
"operation",
"and",
"could",
"take",
"several",
"minutes",
"to",
"complete",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_api_management/lib/2017-03-01/generated/azure_mgmt_api_management/tenant_configuration.rb#L297-L299 | train | Creates a new service deployment. | [
30522,
13366,
4088,
1035,
21296,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2326,
1035,
2171,
1010,
11709,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
4088,
1035,
21296,
1035,
2004,
6038,
2278,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_reservations/lib/2017-11-01/generated/azure_mgmt_reservations/reservation.rb | Azure::Reservations::Mgmt::V2017_11_01.Reservation.update_async | def update_async(reservation_order_id, reservation_id, parameters, custom_headers:nil)
# Send request
promise = begin_update_async(reservation_order_id, reservation_id, parameters, custom_headers:custom_headers)
promise = promise.then do |response|
# Defining deserialization method.
d... | ruby | def update_async(reservation_order_id, reservation_id, parameters, custom_headers:nil)
# Send request
promise = begin_update_async(reservation_order_id, reservation_id, parameters, custom_headers:custom_headers)
promise = promise.then do |response|
# Defining deserialization method.
d... | [
"def",
"update_async",
"(",
"reservation_order_id",
",",
"reservation_id",
",",
"parameters",
",",
"custom_headers",
":",
"nil",
")",
"# Send request",
"promise",
"=",
"begin_update_async",
"(",
"reservation_order_id",
",",
"reservation_id",
",",
"parameters",
",",
"c... | @param reservation_order_id [String] Order Id of the reservation
@param reservation_id [String] Id of the Reservation Item
@param parameters [Patch] Information needed to patch a reservation item
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request.
@retu... | [
"@param",
"reservation_order_id",
"[",
"String",
"]",
"Order",
"Id",
"of",
"the",
"reservation"
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_reservations/lib/2017-11-01/generated/azure_mgmt_reservations/reservation.rb#L379-L395 | train | Updates a reservation order. | [
30522,
13366,
10651,
1035,
2004,
6038,
2278,
1006,
11079,
1035,
2344,
1035,
8909,
1010,
11079,
1035,
8909,
1010,
11709,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
1001,
4604,
5227,
4872,
1027,
4088,
1035,
10651,
1035,
2004,
6038... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_datalake_store/lib/2015-10-01-preview/generated/azure_mgmt_datalake_store/account.rb | Azure::DataLakeStore::Mgmt::V2015_10_01_preview.Account.list_firewall_rules_as_lazy | def list_firewall_rules_as_lazy(resource_group_name, account_name, custom_headers:nil)
response = list_firewall_rules_async(resource_group_name, account_name, custom_headers:custom_headers).value!
unless response.nil?
page = response.body
page.next_method = Proc.new do |next_page_link|
... | ruby | def list_firewall_rules_as_lazy(resource_group_name, account_name, custom_headers:nil)
response = list_firewall_rules_async(resource_group_name, account_name, custom_headers:custom_headers).value!
unless response.nil?
page = response.body
page.next_method = Proc.new do |next_page_link|
... | [
"def",
"list_firewall_rules_as_lazy",
"(",
"resource_group_name",
",",
"account_name",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"list_firewall_rules_async",
"(",
"resource_group_name",
",",
"account_name",
",",
"custom_headers",
":custom_headers",
")",
"."... | Lists the Data Lake Store firewall rules within the specified Data Lake Store
account.
@param resource_group_name [String] The name of the Azure resource group that
contains the Data Lake Store account.
@param account_name [String] The name of the Data Lake Store account from
which to get the firewall rules.
@pa... | [
"Lists",
"the",
"Data",
"Lake",
"Store",
"firewall",
"rules",
"within",
"the",
"specified",
"Data",
"Lake",
"Store",
"account",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_datalake_store/lib/2015-10-01-preview/generated/azure_mgmt_datalake_store/account.rb#L1694-L1703 | train | Gets the firewall rules for the specified Data Lake Store account. | [
30522,
13366,
2862,
1035,
2543,
9628,
1035,
3513,
1035,
2004,
1035,
13971,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
4070,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
2862,
1035,
2543,
9628,
1035,
3513,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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.begin_delete_with_http_info | def begin_delete_with_http_info(resource_group_name, server_name, elastic_pool_name, custom_headers:nil)
begin_delete_async(resource_group_name, server_name, elastic_pool_name, custom_headers:custom_headers).value!
end | ruby | def begin_delete_with_http_info(resource_group_name, server_name, elastic_pool_name, custom_headers:nil)
begin_delete_async(resource_group_name, server_name, elastic_pool_name, custom_headers:custom_headers).value!
end | [
"def",
"begin_delete_with_http_info",
"(",
"resource_group_name",
",",
"server_name",
",",
"elastic_pool_name",
",",
"custom_headers",
":",
"nil",
")",
"begin_delete_async",
"(",
"resource_group_name",
",",
"server_name",
",",
"elastic_pool_name",
",",
"custom_headers",
"... | Deletes an elastic pool.
@param resource_group_name [String] The name of the resource group that
contains the resource. You can obtain this value from the Azure Resource
Manager API or the portal.
@param server_name [String] The name of the server.
@param elastic_pool_name [String] The name of the elastic pool.
... | [
"Deletes",
"an",
"elastic",
"pool",
"."
] | 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#L527-L529 | train | Deletes the elastic pool. | [
30522,
13366,
4088,
1035,
3972,
12870,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
8241,
1035,
2171,
1010,
21274,
1035,
4770,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
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... |
intridea/hashie | lib/hashie/rash.rb | Hashie.Rash.fetch | def fetch(*args)
raise ArgumentError, "Expected 1-2 arguments, got #{args.length}" \
unless (1..2).cover?(args.length)
key, default = args
all(key) do |value|
return value
end
if block_given?
yield key
elsif default
default
else
raise ... | ruby | def fetch(*args)
raise ArgumentError, "Expected 1-2 arguments, got #{args.length}" \
unless (1..2).cover?(args.length)
key, default = args
all(key) do |value|
return value
end
if block_given?
yield key
elsif default
default
else
raise ... | [
"def",
"fetch",
"(",
"*",
"args",
")",
"raise",
"ArgumentError",
",",
"\"Expected 1-2 arguments, got #{args.length}\"",
"unless",
"(",
"1",
"..",
"2",
")",
".",
"cover?",
"(",
"args",
".",
"length",
")",
"key",
",",
"default",
"=",
"args",
"all",
"(",
"key... | Raise (or yield) unless something matches the key. | [
"Raise",
"(",
"or",
"yield",
")",
"unless",
"something",
"matches",
"the",
"key",
"."
] | da9fd39a0e551e09c1441cb7453c969a4afbfd7f | https://github.com/intridea/hashie/blob/da9fd39a0e551e09c1441cb7453c969a4afbfd7f/lib/hashie/rash.rb#L66-L83 | train | Fetch a value from the cache. | [
30522,
13366,
18584,
1006,
1008,
12098,
5620,
1007,
5333,
6685,
2121,
29165,
1010,
1000,
3517,
1015,
1011,
1016,
9918,
1010,
2288,
1001,
1063,
12098,
5620,
1012,
3091,
1065,
1000,
1032,
4983,
1006,
1015,
1012,
1012,
1016,
1007,
1012,
3104,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_network/lib/2019-02-01/generated/azure_mgmt_network/vpn_connections.rb | Azure::Network::Mgmt::V2019_02_01.VpnConnections.list_by_vpn_gateway | def list_by_vpn_gateway(resource_group_name, gateway_name, custom_headers:nil)
first_page = list_by_vpn_gateway_as_lazy(resource_group_name, gateway_name, custom_headers:custom_headers)
first_page.get_all_items
end | ruby | def list_by_vpn_gateway(resource_group_name, gateway_name, custom_headers:nil)
first_page = list_by_vpn_gateway_as_lazy(resource_group_name, gateway_name, custom_headers:custom_headers)
first_page.get_all_items
end | [
"def",
"list_by_vpn_gateway",
"(",
"resource_group_name",
",",
"gateway_name",
",",
"custom_headers",
":",
"nil",
")",
"first_page",
"=",
"list_by_vpn_gateway_as_lazy",
"(",
"resource_group_name",
",",
"gateway_name",
",",
"custom_headers",
":custom_headers",
")",
"first_... | Retrieves all vpn connections for a particular virtual wan vpn gateway.
@param resource_group_name [String] The resource group name of the
VpnGateway.
@param gateway_name [String] The name of the gateway.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP reques... | [
"Retrieves",
"all",
"vpn",
"connections",
"for",
"a",
"particular",
"virtual",
"wan",
"vpn",
"gateway",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_network/lib/2019-02-01/generated/azure_mgmt_network/vpn_connections.rb#L227-L230 | train | Gets all the virtual network gateway variants. | [
30522,
13366,
2862,
1035,
2011,
1035,
21210,
2078,
1035,
11909,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
11909,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
2034,
1035,
3931,
1027,
2862,
1035,
2011,
1035,
21210,
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... |
github-changelog-generator/github-changelog-generator | lib/github_changelog_generator/generator/generator_processor.rb | GitHubChangelogGenerator.Generator.find_issues_to_add | def find_issues_to_add(all_issues, tag_name)
all_issues.select do |issue|
if issue["milestone"].nil?
false
else
# check, that this milestone in tag list:
milestone_is_tag = @filtered_tags.find do |tag|
tag["name"] == issue["milestone"]["title"]
e... | ruby | def find_issues_to_add(all_issues, tag_name)
all_issues.select do |issue|
if issue["milestone"].nil?
false
else
# check, that this milestone in tag list:
milestone_is_tag = @filtered_tags.find do |tag|
tag["name"] == issue["milestone"]["title"]
e... | [
"def",
"find_issues_to_add",
"(",
"all_issues",
",",
"tag_name",
")",
"all_issues",
".",
"select",
"do",
"|",
"issue",
"|",
"if",
"issue",
"[",
"\"milestone\"",
"]",
".",
"nil?",
"false",
"else",
"# check, that this milestone in tag list:",
"milestone_is_tag",
"=",
... | Add all issues, that should be in that tag, according milestone
@param [Array] all_issues
@param [String] tag_name
@return [Array] issues with milestone #tag_name | [
"Add",
"all",
"issues",
"that",
"should",
"be",
"in",
"that",
"tag",
"according",
"milestone"
] | f18c64b5cc0d7473b059275b88385ac11ca8b564 | https://github.com/github-changelog-generator/github-changelog-generator/blob/f18c64b5cc0d7473b059275b88385ac11ca8b564/lib/github_changelog_generator/generator/generator_processor.rb#L47-L64 | train | find issues to add | [
30522,
13366,
2424,
1035,
3314,
1035,
2000,
1035,
5587,
1006,
2035,
1035,
3314,
1010,
6415,
1035,
2171,
1007,
2035,
1035,
3314,
1012,
7276,
2079,
1064,
3277,
1064,
2065,
3277,
1031,
1000,
19199,
1000,
1033,
1012,
9152,
2140,
1029,
6270,
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_network/lib/2019-02-01/generated/azure_mgmt_network/application_gateways.rb | Azure::Network::Mgmt::V2019_02_01.ApplicationGateways.update_tags | def update_tags(resource_group_name, application_gateway_name, parameters, custom_headers:nil)
response = update_tags_async(resource_group_name, application_gateway_name, parameters, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def update_tags(resource_group_name, application_gateway_name, parameters, custom_headers:nil)
response = update_tags_async(resource_group_name, application_gateway_name, parameters, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"update_tags",
"(",
"resource_group_name",
",",
"application_gateway_name",
",",
"parameters",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"update_tags_async",
"(",
"resource_group_name",
",",
"application_gateway_name",
",",
"parameters",
",",
"cust... | Updates the specified application gateway tags.
@param resource_group_name [String] The name of the resource group.
@param application_gateway_name [String] The name of the application gateway.
@param parameters [TagsObject] Parameters supplied to update application
gateway tags.
@param custom_headers [Hash{Strin... | [
"Updates",
"the",
"specified",
"application",
"gateway",
"tags",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_network/lib/2019-02-01/generated/azure_mgmt_network/application_gateways.rb#L212-L215 | train | Updates the tags of the specified application gateway. | [
30522,
13366,
10651,
1035,
22073,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
4646,
1035,
11909,
1035,
2171,
1010,
11709,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
10651,
1035,
22073,
1035,
2004,
6038,
2278,
1006,
769... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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.move_changes | def move_changes
@previous_changes = changes
Atomic::UPDATES.each do |update|
send(update).clear
end
changed_attributes.clear
end | ruby | def move_changes
@previous_changes = changes
Atomic::UPDATES.each do |update|
send(update).clear
end
changed_attributes.clear
end | [
"def",
"move_changes",
"@previous_changes",
"=",
"changes",
"Atomic",
"::",
"UPDATES",
".",
"each",
"do",
"|",
"update",
"|",
"send",
"(",
"update",
")",
".",
"clear",
"end",
"changed_attributes",
".",
"clear",
"end"
] | Call this method after save, so the changes can be properly switched.
This will unset the memoized children array, set new record to
false, set the document as validated, and move the dirty changes.
@example Move the changes to previous.
person.move_changes
@since 2.1.0 | [
"Call",
"this",
"method",
"after",
"save",
"so",
"the",
"changes",
"can",
"be",
"properly",
"switched",
"."
] | 56976e32610f4c2450882b0bfe14da099f0703f4 | https://github.com/mongodb/mongoid/blob/56976e32610f4c2450882b0bfe14da099f0703f4/lib/mongoid/changeable.rb#L85-L91 | train | Move the changes
to the new one | [
30522,
13366,
2693,
1035,
3431,
1030,
3025,
1035,
3431,
1027,
3431,
9593,
1024,
1024,
14409,
1012,
2169,
2079,
1064,
10651,
1064,
4604,
1006,
10651,
1007,
1012,
3154,
2203,
2904,
1035,
12332,
1012,
3154,
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... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
rails/sprockets | lib/sprockets/path_utils.rb | Sprockets.PathUtils.atomic_write | def atomic_write(filename)
dirname, basename = File.split(filename)
basename = [
basename,
Thread.current.object_id,
Process.pid,
rand(1000000)
].join('.'.freeze)
tmpname = File.join(dirname, basename)
File.open(tmpname, 'wb+') do |f|
yield f
... | ruby | def atomic_write(filename)
dirname, basename = File.split(filename)
basename = [
basename,
Thread.current.object_id,
Process.pid,
rand(1000000)
].join('.'.freeze)
tmpname = File.join(dirname, basename)
File.open(tmpname, 'wb+') do |f|
yield f
... | [
"def",
"atomic_write",
"(",
"filename",
")",
"dirname",
",",
"basename",
"=",
"File",
".",
"split",
"(",
"filename",
")",
"basename",
"=",
"[",
"basename",
",",
"Thread",
".",
"current",
".",
"object_id",
",",
"Process",
".",
"pid",
",",
"rand",
"(",
"... | Public: Write to a file atomically. Useful for situations where you
don't want other processes or threads to see half-written files.
Utils.atomic_write('important.file') do |file|
file.write('hello')
end
Returns nothing. | [
"Public",
":",
"Write",
"to",
"a",
"file",
"atomically",
".",
"Useful",
"for",
"situations",
"where",
"you",
"don",
"t",
"want",
"other",
"processes",
"or",
"threads",
"to",
"see",
"half",
"-",
"written",
"files",
"."
] | 9e3f0d8e98c44f57e67bc138db87bb8469bf5ddd | https://github.com/rails/sprockets/blob/9e3f0d8e98c44f57e67bc138db87bb8469bf5ddd/lib/sprockets/path_utils.rb#L348-L365 | train | Write a file to the cache. | [
30522,
13366,
9593,
1035,
4339,
1006,
5371,
18442,
1007,
16101,
18442,
1010,
2918,
18442,
1027,
5371,
1012,
3975,
1006,
5371,
18442,
1007,
2918,
18442,
1027,
1031,
2918,
18442,
1010,
11689,
1012,
2783,
1012,
4874,
1035,
8909,
1010,
2832,
10... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | data/azure_key_vault/lib/2016-10-01/generated/azure_key_vault/key_vault_client.rb | Azure::KeyVault::V2016_10_01.KeyVaultClient.merge_certificate | def merge_certificate(vault_base_url, certificate_name, x509certificates, certificate_attributes:nil, tags:nil, custom_headers:nil)
response = merge_certificate_async(vault_base_url, certificate_name, x509certificates, certificate_attributes:certificate_attributes, tags:tags, custom_headers:custom_headers).value!... | ruby | def merge_certificate(vault_base_url, certificate_name, x509certificates, certificate_attributes:nil, tags:nil, custom_headers:nil)
response = merge_certificate_async(vault_base_url, certificate_name, x509certificates, certificate_attributes:certificate_attributes, tags:tags, custom_headers:custom_headers).value!... | [
"def",
"merge_certificate",
"(",
"vault_base_url",
",",
"certificate_name",
",",
"x509certificates",
",",
"certificate_attributes",
":",
"nil",
",",
"tags",
":",
"nil",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"merge_certificate_async",
"(",
"vault_b... | Merges a certificate or a certificate chain with a key pair existing on the
server.
The MergeCertificate operation performs the merging of a certificate or
certificate chain with a key pair currently available in the service. This
operation requires the certificates/create permission.
@param vault_base_url [Stri... | [
"Merges",
"a",
"certificate",
"or",
"a",
"certificate",
"chain",
"with",
"a",
"key",
"pair",
"existing",
"on",
"the",
"server",
"."
] | 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#L6393-L6396 | train | Merge a certificate into a single key vault. | [
30522,
13366,
13590,
1035,
8196,
1006,
11632,
1035,
2918,
1035,
24471,
2140,
1010,
8196,
1035,
2171,
1010,
1060,
12376,
2683,
17119,
3775,
8873,
16280,
2015,
1010,
8196,
1035,
12332,
1024,
9152,
2140,
1010,
22073,
1024,
9152,
2140,
1010,
76... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/persistence.rb | ActiveRecord.Persistence.increment! | def increment!(attribute, by = 1, touch: nil)
increment(attribute, by)
change = public_send(attribute) - (attribute_in_database(attribute.to_s) || 0)
self.class.update_counters(id, attribute => change, touch: touch)
clear_attribute_change(attribute) # eww
self
end | ruby | def increment!(attribute, by = 1, touch: nil)
increment(attribute, by)
change = public_send(attribute) - (attribute_in_database(attribute.to_s) || 0)
self.class.update_counters(id, attribute => change, touch: touch)
clear_attribute_change(attribute) # eww
self
end | [
"def",
"increment!",
"(",
"attribute",
",",
"by",
"=",
"1",
",",
"touch",
":",
"nil",
")",
"increment",
"(",
"attribute",
",",
"by",
")",
"change",
"=",
"public_send",
"(",
"attribute",
")",
"-",
"(",
"attribute_in_database",
"(",
"attribute",
".",
"to_s... | Wrapper around #increment that writes the update to the database.
Only +attribute+ is updated; the record itself is not saved.
This means that any other modified attributes will still be dirty.
Validations and callbacks are skipped. Supports the +touch+ option from
+update_counters+, see that for more.
Returns +se... | [
"Wrapper",
"around",
"#increment",
"that",
"writes",
"the",
"update",
"to",
"the",
"database",
".",
"Only",
"+",
"attribute",
"+",
"is",
"updated",
";",
"the",
"record",
"itself",
"is",
"not",
"saved",
".",
"This",
"means",
"that",
"any",
"other",
"modifie... | 85a8bc644be69908f05740a5886ec19cd3679df5 | https://github.com/rails/rails/blob/85a8bc644be69908f05740a5886ec19cd3679df5/activerecord/lib/active_record/persistence.rb#L704-L710 | train | Increment the value of an attribute. | [
30522,
13366,
4297,
28578,
4765,
999,
1006,
17961,
1010,
2011,
1027,
1015,
1010,
3543,
1024,
9152,
2140,
1007,
4297,
28578,
4765,
1006,
17961,
1010,
2011,
1007,
2689,
1027,
2270,
1035,
4604,
1006,
17961,
1007,
1011,
1006,
17961,
1035,
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... |
fastlane/fastlane | fastlane/lib/fastlane/swift_fastlane_api_generator.rb | Fastlane.SwiftFastlaneAPIGenerator.determine_api_version | def determine_api_version(new_file_content: nil, old_file_content: nil)
# we know 100% there is a difference, so no need to compare
unless old_file_content.length >= new_file_content.length
old_api_version = find_api_version_string(content: old_file_content)
return DEFAULT_API_VERSION_STRIN... | ruby | def determine_api_version(new_file_content: nil, old_file_content: nil)
# we know 100% there is a difference, so no need to compare
unless old_file_content.length >= new_file_content.length
old_api_version = find_api_version_string(content: old_file_content)
return DEFAULT_API_VERSION_STRIN... | [
"def",
"determine_api_version",
"(",
"new_file_content",
":",
"nil",
",",
"old_file_content",
":",
"nil",
")",
"# we know 100% there is a difference, so no need to compare",
"unless",
"old_file_content",
".",
"length",
">=",
"new_file_content",
".",
"length",
"old_api_version... | compares the new file content to the old and figures out what api_version the new content should be | [
"compares",
"the",
"new",
"file",
"content",
"to",
"the",
"old",
"and",
"figures",
"out",
"what",
"api_version",
"the",
"new",
"content",
"should",
"be"
] | 457c5d647c77f0e078dafa5129da616914e002c5 | https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/fastlane/lib/fastlane/swift_fastlane_api_generator.rb#L223-L246 | train | Determine the api version string | [
30522,
13366,
5646,
1035,
17928,
1035,
2544,
1006,
2047,
1035,
5371,
1035,
4180,
1024,
9152,
2140,
1010,
2214,
1035,
5371,
1035,
4180,
1024,
9152,
2140,
1007,
1001,
2057,
2113,
2531,
1003,
2045,
2003,
1037,
4489,
1010,
2061,
2053,
2342,
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... |
mongodb/mongo-ruby-driver | lib/mongo/monitoring.rb | Mongo.Monitoring.succeeded | def succeeded(topic, event)
subscribers_for(topic).each{ |subscriber| subscriber.succeeded(event) }
end | ruby | def succeeded(topic, event)
subscribers_for(topic).each{ |subscriber| subscriber.succeeded(event) }
end | [
"def",
"succeeded",
"(",
"topic",
",",
"event",
")",
"subscribers_for",
"(",
"topic",
")",
".",
"each",
"{",
"|",
"subscriber",
"|",
"subscriber",
".",
"succeeded",
"(",
"event",
")",
"}",
"end"
] | Publish a succeeded event.
@example Publish a succeeded event.
monitoring.succeeded(COMMAND, event)
@param [ String ] topic The event topic.
@param [ Event ] event The event to publish.
@since 2.1.0 | [
"Publish",
"a",
"succeeded",
"event",
"."
] | dca26d0870cb3386fad9ccc1d17228097c1fe1c8 | https://github.com/mongodb/mongo-ruby-driver/blob/dca26d0870cb3386fad9ccc1d17228097c1fe1c8/lib/mongo/monitoring.rb#L265-L267 | train | Called when a topic has been successfully subscribed to the event. | [
30522,
13366,
4594,
1006,
8476,
1010,
2724,
1007,
17073,
1035,
2005,
1006,
8476,
1007,
1012,
2169,
1063,
1064,
4942,
29234,
2099,
1064,
4942,
29234,
2099,
1012,
4594,
1006,
2724,
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,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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_sqlvirtualmachine/lib/2017-03-01-preview/generated/azure_mgmt_sqlvirtualmachine/availability_group_listeners.rb | Azure::Sqlvirtualmachine::Mgmt::V2017_03_01_preview.AvailabilityGroupListeners.get_with_http_info | def get_with_http_info(resource_group_name, sql_virtual_machine_group_name, availability_group_listener_name, custom_headers:nil)
get_async(resource_group_name, sql_virtual_machine_group_name, availability_group_listener_name, custom_headers:custom_headers).value!
end | ruby | def get_with_http_info(resource_group_name, sql_virtual_machine_group_name, availability_group_listener_name, custom_headers:nil)
get_async(resource_group_name, sql_virtual_machine_group_name, availability_group_listener_name, custom_headers:custom_headers).value!
end | [
"def",
"get_with_http_info",
"(",
"resource_group_name",
",",
"sql_virtual_machine_group_name",
",",
"availability_group_listener_name",
",",
"custom_headers",
":",
"nil",
")",
"get_async",
"(",
"resource_group_name",
",",
"sql_virtual_machine_group_name",
",",
"availability_gr... | Gets an availability group listener.
@param resource_group_name [String] Name of the resource group that contains
the resource. You can obtain this value from the Azure Resource Manager API
or the portal.
@param sql_virtual_machine_group_name [String] Name of the SQL virtual
machine group.
@param availability_gr... | [
"Gets",
"an",
"availability",
"group",
"listener",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_sqlvirtualmachine/lib/2017-03-01-preview/generated/azure_mgmt_sqlvirtualmachine/availability_group_listeners.rb#L63-L65 | train | Gets the specified SQL virtual machine group availability group listener. | [
30522,
13366,
2131,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
29296,
1035,
7484,
1035,
3698,
1035,
2177,
1035,
2171,
1010,
11343,
1035,
2177,
1035,
19373,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
GeorgeKaraszi/ActiveRecordExtended | lib/active_record_extended/utilities.rb | ActiveRecordExtended.Utilities.to_arel_sql | def to_arel_sql(value)
case value
when Arel::Node, Arel::Nodes::SqlLiteral, nil
value
when ActiveRecord::Relation
Arel.sql(value.spawn.to_sql)
else
Arel.sql(value.respond_to?(:to_sql) ? value.to_sql : value.to_s)
end
end | ruby | def to_arel_sql(value)
case value
when Arel::Node, Arel::Nodes::SqlLiteral, nil
value
when ActiveRecord::Relation
Arel.sql(value.spawn.to_sql)
else
Arel.sql(value.respond_to?(:to_sql) ? value.to_sql : value.to_s)
end
end | [
"def",
"to_arel_sql",
"(",
"value",
")",
"case",
"value",
"when",
"Arel",
"::",
"Node",
",",
"Arel",
"::",
"Nodes",
"::",
"SqlLiteral",
",",
"nil",
"value",
"when",
"ActiveRecord",
"::",
"Relation",
"Arel",
".",
"sql",
"(",
"value",
".",
"spawn",
".",
... | Converts a potential subquery into a compatible Arel SQL node.
Note:
We convert relations to SQL to maintain compatibility with Rails 5.[0/1].
Only Rails 5.2+ maintains bound attributes in Arel, so its better to be safe then sorry.
When we drop support for Rails 5.[0/1], we then can then drop the '.to_sql' convers... | [
"Converts",
"a",
"potential",
"subquery",
"into",
"a",
"compatible",
"Arel",
"SQL",
"node",
"."
] | aca74eebb64b9957a2c8765bef6e43c7d5736fd8 | https://github.com/GeorgeKaraszi/ActiveRecordExtended/blob/aca74eebb64b9957a2c8765bef6e43c7d5736fd8/lib/active_record_extended/utilities.rb#L140-L149 | train | Convert value to a SQL string | [
30522,
13366,
2000,
1035,
2024,
2140,
1035,
29296,
1006,
3643,
1007,
2553,
3643,
2043,
2024,
2140,
1024,
1024,
13045,
1010,
2024,
2140,
1024,
1024,
14164,
1024,
1024,
29296,
22779,
7941,
1010,
9152,
2140,
3643,
2043,
3161,
2890,
27108,
2094... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | data/azure_cognitiveservices_luisauthoring/lib/2.0/generated/azure_cognitiveservices_luisauthoring/model.rb | Azure::CognitiveServices::LuisAuthoring::V2_0.Model.list_hierarchical_entity_roles_with_http_info | def list_hierarchical_entity_roles_with_http_info(app_id, version_id, h_entity_id, custom_headers:nil)
list_hierarchical_entity_roles_async(app_id, version_id, h_entity_id, custom_headers:custom_headers).value!
end | ruby | def list_hierarchical_entity_roles_with_http_info(app_id, version_id, h_entity_id, custom_headers:nil)
list_hierarchical_entity_roles_async(app_id, version_id, h_entity_id, custom_headers:custom_headers).value!
end | [
"def",
"list_hierarchical_entity_roles_with_http_info",
"(",
"app_id",
",",
"version_id",
",",
"h_entity_id",
",",
"custom_headers",
":",
"nil",
")",
"list_hierarchical_entity_roles_async",
"(",
"app_id",
",",
"version_id",
",",
"h_entity_id",
",",
"custom_headers",
":cus... | Get all roles for a hierarchical entity in a version of the application
@param app_id The application ID.
@param version_id [String] The version ID.
@param h_entity_id The hierarchical entity extractor ID.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP reque... | [
"Get",
"all",
"roles",
"for",
"a",
"hierarchical",
"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#L7508-L7510 | train | Gets the roles of the specified hierarchical entity. | [
30522,
13366,
2862,
1035,
25835,
1035,
9178,
1035,
4395,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
10439,
1035,
8909,
1010,
2544,
1035,
8909,
1010,
1044,
1035,
9178,
1035,
8909,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
2862,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/open_id_connect_provider.rb | Azure::ApiManagement::Mgmt::V2018_01_01.OpenIdConnectProvider.update_with_http_info | def update_with_http_info(resource_group_name, service_name, opid, parameters, if_match, custom_headers:nil)
update_async(resource_group_name, service_name, opid, parameters, if_match, custom_headers:custom_headers).value!
end | ruby | def update_with_http_info(resource_group_name, service_name, opid, parameters, if_match, custom_headers:nil)
update_async(resource_group_name, service_name, opid, parameters, if_match, custom_headers:custom_headers).value!
end | [
"def",
"update_with_http_info",
"(",
"resource_group_name",
",",
"service_name",
",",
"opid",
",",
"parameters",
",",
"if_match",
",",
"custom_headers",
":",
"nil",
")",
"update_async",
"(",
"resource_group_name",
",",
"service_name",
",",
"opid",
",",
"parameters",... | Updates the specific OpenID Connect Provider.
@param resource_group_name [String] The name of the resource group.
@param service_name [String] The name of the API Management service.
@param opid [String] Identifier of the OpenID Connect Provider.
@param parameters [OpenidConnectProviderUpdateContract] Update param... | [
"Updates",
"the",
"specific",
"OpenID",
"Connect",
"Provider",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/open_id_connect_provider.rb#L505-L507 | train | Updates an existing Advisor Search Search | [
30522,
13366,
10651,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2326,
1035,
2171,
1010,
6728,
3593,
1010,
11709,
1010,
2065,
1035,
2674,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
10651,
1035,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | data/azure_cognitiveservices_computervision/lib/2.0/generated/azure_cognitiveservices_computervision/computer_vision_client.rb | Azure::CognitiveServices::ComputerVision::V2_0.ComputerVisionClient.analyze_image_by_domain_in_stream_with_http_info | def analyze_image_by_domain_in_stream_with_http_info(model, image, language:nil, custom_headers:nil)
analyze_image_by_domain_in_stream_async(model, image, language:language, custom_headers:custom_headers).value!
end | ruby | def analyze_image_by_domain_in_stream_with_http_info(model, image, language:nil, custom_headers:nil)
analyze_image_by_domain_in_stream_async(model, image, language:language, custom_headers:custom_headers).value!
end | [
"def",
"analyze_image_by_domain_in_stream_with_http_info",
"(",
"model",
",",
"image",
",",
"language",
":",
"nil",
",",
"custom_headers",
":",
"nil",
")",
"analyze_image_by_domain_in_stream_async",
"(",
"model",
",",
"image",
",",
"language",
":",
"language",
",",
... | This operation recognizes content within an image by applying a
domain-specific model. The list of domain-specific models that are supported
by the Computer Vision API can be retrieved using the /models GET request.
Currently, the API provides following domain-specific models: celebrities,
landmarks.
Two input met... | [
"This",
"operation",
"recognizes",
"content",
"within",
"an",
"image",
"by",
"applying",
"a",
"domain",
"-",
"specific",
"model",
".",
"The",
"list",
"of",
"domain",
"-",
"specific",
"models",
"that",
"are",
"supported",
"by",
"the",
"Computer",
"Vision",
"A... | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_cognitiveservices_computervision/lib/2.0/generated/azure_cognitiveservices_computervision/computer_vision_client.rb#L2572-L2574 | train | Analyze an image by domain in a stream. | [
30522,
13366,
17908,
1035,
3746,
1035,
2011,
1035,
5884,
1035,
1999,
1035,
5460,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
2944,
1010,
3746,
1010,
2653,
1024,
9152,
2140,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
17908,
1035,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_container_registry/lib/2018-09-01/generated/azure_mgmt_container_registry/runs.rb | Azure::ContainerRegistry::Mgmt::V2018_09_01.Runs.update_async | def update_async(resource_group_name, registry_name, run_id, run_update_parameters, custom_headers:nil)
# Send request
promise = begin_update_async(resource_group_name, registry_name, run_id, run_update_parameters, custom_headers:custom_headers)
promise = promise.then do |response|
# Defining... | ruby | def update_async(resource_group_name, registry_name, run_id, run_update_parameters, custom_headers:nil)
# Send request
promise = begin_update_async(resource_group_name, registry_name, run_id, run_update_parameters, custom_headers:custom_headers)
promise = promise.then do |response|
# Defining... | [
"def",
"update_async",
"(",
"resource_group_name",
",",
"registry_name",
",",
"run_id",
",",
"run_update_parameters",
",",
"custom_headers",
":",
"nil",
")",
"# Send request",
"promise",
"=",
"begin_update_async",
"(",
"resource_group_name",
",",
"registry_name",
",",
... | @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 run_id [String] The run ID.
@param run_update_parameters [RunUpdateParameters] The run update properties.
@param custom_headers [Hash{... | [
"@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",
"regist... | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_container_registry/lib/2018-09-01/generated/azure_mgmt_container_registry/runs.rb#L271-L287 | train | Updates a run. | [
30522,
13366,
10651,
1035,
2004,
30524,
2171,
1010,
2448,
1035,
8909,
1010,
2448,
1035,
10651,
1035,
11709,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
1001,
4604,
5227,
4872,
1027,
4088,
1035,
10651,
1035,
2004,
6038,
2278,
1006... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | data/azure_key_vault/lib/2016-10-01/generated/azure_key_vault/key_vault_client.rb | Azure::KeyVault::V2016_10_01.KeyVaultClient.get_secret_versions | def get_secret_versions(vault_base_url, secret_name, maxresults:nil, custom_headers:nil)
first_page = get_secret_versions_as_lazy(vault_base_url, secret_name, maxresults:maxresults, custom_headers:custom_headers)
first_page.get_all_items
end | ruby | def get_secret_versions(vault_base_url, secret_name, maxresults:nil, custom_headers:nil)
first_page = get_secret_versions_as_lazy(vault_base_url, secret_name, maxresults:maxresults, custom_headers:custom_headers)
first_page.get_all_items
end | [
"def",
"get_secret_versions",
"(",
"vault_base_url",
",",
"secret_name",
",",
"maxresults",
":",
"nil",
",",
"custom_headers",
":",
"nil",
")",
"first_page",
"=",
"get_secret_versions_as_lazy",
"(",
"vault_base_url",
",",
"secret_name",
",",
"maxresults",
":",
"maxr... | List all versions of the specified secret.
The full secret identifier and attributes are provided in the response. No
values are returned for the secrets. This operations requires the
secrets/list permission.
@param vault_base_url [String] The vault name, for example
https://myvault.vault.azure.net.
@param secr... | [
"List",
"all",
"versions",
"of",
"the",
"specified",
"secret",
"."
] | 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#L3270-L3273 | train | Gets the versions of the specified secret. | [
30522,
13366,
2131,
1035,
3595,
1035,
4617,
1006,
11632,
1035,
2918,
1035,
24471,
2140,
1010,
3595,
1035,
2171,
1010,
4098,
6072,
11314,
2015,
1024,
9152,
2140,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
2034,
1035,
3931,
1027,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
cheezy/page-object | lib/page-object/accessors.rb | PageObject.Accessors.link | def link(name, identifier={:index => 0}, &block)
standard_methods(name, identifier, 'link_for', &block)
define_method(name) do
return platform.click_link_for identifier.clone unless block_given?
self.send("#{name}_element").click
end
end | ruby | def link(name, identifier={:index => 0}, &block)
standard_methods(name, identifier, 'link_for', &block)
define_method(name) do
return platform.click_link_for identifier.clone unless block_given?
self.send("#{name}_element").click
end
end | [
"def",
"link",
"(",
"name",
",",
"identifier",
"=",
"{",
":index",
"=>",
"0",
"}",
",",
"&",
"block",
")",
"standard_methods",
"(",
"name",
",",
"identifier",
",",
"'link_for'",
",",
"block",
")",
"define_method",
"(",
"name",
")",
"do",
"return",
"pla... | adds three methods - one to select a link, another
to return a PageObject::Elements::Link object representing
the link, and another that checks the link's existence.
@example
link(:add_to_cart, :text => "Add to Cart")
# will generate 'add_to_cart', 'add_to_cart_element', and 'add_to_cart?' methods
@param [S... | [
"adds",
"three",
"methods",
"-",
"one",
"to",
"select",
"a",
"link",
"another",
"to",
"return",
"a",
"PageObject",
"::",
"Elements",
"::",
"Link",
"object",
"representing",
"the",
"link",
"and",
"another",
"that",
"checks",
"the",
"link",
"s",
"existence",
... | 850d775bf63768fbb1551a34480195785fe8e193 | https://github.com/cheezy/page-object/blob/850d775bf63768fbb1551a34480195785fe8e193/lib/page-object/accessors.rb#L302-L308 | train | Link to a particular element | [
30522,
13366,
4957,
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,
4957,
1035,
2005,
1005,
1010,
1004,
3796,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
projectcypress/health-data-standards | lib/hqmf-parser/converter/pass1/data_criteria_converter.rb | HQMF.DataCriteriaConverter.create_group_data_criteria | def create_group_data_criteria(preconditions, type, value, parent_id, id, standard_category, qds_data_type)
extract_group_data_criteria_tree(HQMF::DataCriteria::UNION,preconditions, type, parent_id)
end | ruby | def create_group_data_criteria(preconditions, type, value, parent_id, id, standard_category, qds_data_type)
extract_group_data_criteria_tree(HQMF::DataCriteria::UNION,preconditions, type, parent_id)
end | [
"def",
"create_group_data_criteria",
"(",
"preconditions",
",",
"type",
",",
"value",
",",
"parent_id",
",",
"id",
",",
"standard_category",
",",
"qds_data_type",
")",
"extract_group_data_criteria_tree",
"(",
"HQMF",
"::",
"DataCriteria",
"::",
"UNION",
",",
"precon... | grouping data criteria are used to allow a single reference off of a temporal reference or subset operator
grouping data criteria can reference either regular data criteria as children, or other grouping data criteria | [
"grouping",
"data",
"criteria",
"are",
"used",
"to",
"allow",
"a",
"single",
"reference",
"off",
"of",
"a",
"temporal",
"reference",
"or",
"subset",
"operator",
"grouping",
"data",
"criteria",
"can",
"reference",
"either",
"regular",
"data",
"criteria",
"as",
... | 252d4f0927c513eacde6b9ea41b76faa1423c34b | https://github.com/projectcypress/health-data-standards/blob/252d4f0927c513eacde6b9ea41b76faa1423c34b/lib/hqmf-parser/converter/pass1/data_criteria_converter.rb#L46-L48 | train | Create a group data criteria | [
30522,
13366,
3443,
1035,
2177,
1035,
2951,
1035,
9181,
1006,
3653,
8663,
20562,
2015,
1010,
2828,
1010,
3643,
1010,
6687,
1035,
8909,
1010,
8909,
1010,
3115,
1035,
4696,
1010,
1053,
5104,
1035,
2951,
1035,
2828,
1007,
14817,
1035,
2177,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | data/azure_service_fabric/lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb | Azure::ServiceFabric::V6_2_0_9.ServiceFabricClientAPIs.start_compose_deployment_upgrade | def start_compose_deployment_upgrade(deployment_name, compose_deployment_upgrade_description, timeout:60, custom_headers:nil)
response = start_compose_deployment_upgrade_async(deployment_name, compose_deployment_upgrade_description, timeout:timeout, custom_headers:custom_headers).value!
nil
end | ruby | def start_compose_deployment_upgrade(deployment_name, compose_deployment_upgrade_description, timeout:60, custom_headers:nil)
response = start_compose_deployment_upgrade_async(deployment_name, compose_deployment_upgrade_description, timeout:timeout, custom_headers:custom_headers).value!
nil
end | [
"def",
"start_compose_deployment_upgrade",
"(",
"deployment_name",
",",
"compose_deployment_upgrade_description",
",",
"timeout",
":",
"60",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"start_compose_deployment_upgrade_async",
"(",
"deployment_name",
",",
"comp... | Starts upgrading a compose deployment in the Service Fabric cluster.
Validates the supplied upgrade parameters and starts upgrading the deployment
if the parameters are valid.
@param deployment_name [String] The identity of the deployment.
@param compose_deployment_upgrade_description
[ComposeDeploymentUpgradeDe... | [
"Starts",
"upgrading",
"a",
"compose",
"deployment",
"in",
"the",
"Service",
"Fabric",
"cluster",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_service_fabric/lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb#L18310-L18313 | train | Starts a compose deployment upgrade. | [
30522,
13366,
2707,
1035,
17202,
1035,
10813,
1035,
12200,
1006,
10813,
1035,
2171,
1010,
17202,
1035,
10813,
1035,
12200,
1035,
6412,
1010,
2051,
5833,
1024,
3438,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
2707,
10... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_network/lib/2016-12-01/generated/azure_mgmt_network/virtual_network_gateways.rb | Azure::Network::Mgmt::V2016_12_01.VirtualNetworkGateways.get_bgp_peer_status | def get_bgp_peer_status(resource_group_name, virtual_network_gateway_name, peer:nil, custom_headers:nil)
response = get_bgp_peer_status_async(resource_group_name, virtual_network_gateway_name, peer:peer, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def get_bgp_peer_status(resource_group_name, virtual_network_gateway_name, peer:nil, custom_headers:nil)
response = get_bgp_peer_status_async(resource_group_name, virtual_network_gateway_name, peer:peer, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"get_bgp_peer_status",
"(",
"resource_group_name",
",",
"virtual_network_gateway_name",
",",
"peer",
":",
"nil",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"get_bgp_peer_status_async",
"(",
"resource_group_name",
",",
"virtual_network_gateway_name",
"... | The GetBgpPeerStatus operation retrieves the status of all BGP peers.
@param resource_group_name [String] The name of the resource group.
@param virtual_network_gateway_name [String] The name of the virtual network
gateway.
@param peer [String] The IP address of the peer to retrieve the status of.
@param custom_h... | [
"The",
"GetBgpPeerStatus",
"operation",
"retrieves",
"the",
"status",
"of",
"all",
"BGP",
"peers",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_network/lib/2016-12-01/generated/azure_mgmt_network/virtual_network_gateways.rb#L475-L478 | train | Gets the BGP peer status of the specified virtual network gateway. | [
30522,
13366,
2131,
1035,
1038,
21600,
1035,
8152,
1035,
3570,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
7484,
1035,
2897,
1035,
11909,
1035,
2171,
1010,
8152,
1024,
9152,
2140,
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... |
haml/haml | lib/haml/attribute_compiler.rb | Haml.AttributeCompiler.static_build | def static_build(values)
hash_content = values.group_by(&:key).map do |key, values_for_key|
"#{frozen_string(key)} => #{merged_value(key, values_for_key)}"
end.join(', ')
arguments = [@is_html, @attr_wrapper, @escape_attrs, @hyphenate_data_attrs]
code = "::Haml::AttributeBuilder.build_a... | ruby | def static_build(values)
hash_content = values.group_by(&:key).map do |key, values_for_key|
"#{frozen_string(key)} => #{merged_value(key, values_for_key)}"
end.join(', ')
arguments = [@is_html, @attr_wrapper, @escape_attrs, @hyphenate_data_attrs]
code = "::Haml::AttributeBuilder.build_a... | [
"def",
"static_build",
"(",
"values",
")",
"hash_content",
"=",
"values",
".",
"group_by",
"(",
":key",
")",
".",
"map",
"do",
"|",
"key",
",",
"values_for_key",
"|",
"\"#{frozen_string(key)} => #{merged_value(key, values_for_key)}\"",
"end",
".",
"join",
"(",
"',... | Renders attribute values statically.
@param values [Array<AttributeValue>]
@return [Array] Temple expression | [
"Renders",
"attribute",
"values",
"statically",
"."
] | 9aa0fbe4a91b999978927be569d2ad0cd39076f1 | https://github.com/haml/haml/blob/9aa0fbe4a91b999978927be569d2ad0cd39076f1/lib/haml/attribute_compiler.rb#L125-L134 | train | Build the static attribute | [
30522,
13366,
10763,
1035,
3857,
1006,
5300,
1007,
23325,
1035,
4180,
1027,
5300,
1012,
2177,
1035,
2011,
1006,
1004,
1024,
3145,
1007,
1012,
4949,
2079,
1064,
3145,
1010,
5300,
1035,
2005,
1035,
3145,
1064,
1000,
1001,
1063,
7708,
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_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/servers.rb | Azure::SQL::Mgmt::V2015_05_01_preview.Servers.begin_create_or_update_with_http_info | def begin_create_or_update_with_http_info(resource_group_name, server_name, parameters, custom_headers:nil)
begin_create_or_update_async(resource_group_name, server_name, parameters, custom_headers:custom_headers).value!
end | ruby | def begin_create_or_update_with_http_info(resource_group_name, server_name, parameters, custom_headers:nil)
begin_create_or_update_async(resource_group_name, server_name, parameters, custom_headers:custom_headers).value!
end | [
"def",
"begin_create_or_update_with_http_info",
"(",
"resource_group_name",
",",
"server_name",
",",
"parameters",
",",
"custom_headers",
":",
"nil",
")",
"begin_create_or_update_async",
"(",
"resource_group_name",
",",
"server_name",
",",
"parameters",
",",
"custom_headers... | Creates or updates a server.
@param resource_group_name [String] The name of the resource group that
contains the resource. You can obtain this value from the Azure Resource
Manager API or the portal.
@param server_name [String] The name of the server.
@param parameters [Server] The requested server resource stat... | [
"Creates",
"or",
"updates",
"a",
"server",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/servers.rb#L472-L474 | train | Creates or updates a managed server. | [
30522,
13366,
4088,
1035,
3443,
1035,
2030,
1035,
10651,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
8241,
1035,
2171,
1010,
11709,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
4088,
1035,
3443,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_media_services/lib/2018-07-01/generated/azure_mgmt_media_services/streaming_endpoints.rb | Azure::MediaServices::Mgmt::V2018_07_01.StreamingEndpoints.begin_start_with_http_info | def begin_start_with_http_info(resource_group_name, account_name, streaming_endpoint_name, custom_headers:nil)
begin_start_async(resource_group_name, account_name, streaming_endpoint_name, custom_headers:custom_headers).value!
end | ruby | def begin_start_with_http_info(resource_group_name, account_name, streaming_endpoint_name, custom_headers:nil)
begin_start_async(resource_group_name, account_name, streaming_endpoint_name, custom_headers:custom_headers).value!
end | [
"def",
"begin_start_with_http_info",
"(",
"resource_group_name",
",",
"account_name",
",",
"streaming_endpoint_name",
",",
"custom_headers",
":",
"nil",
")",
"begin_start_async",
"(",
"resource_group_name",
",",
"account_name",
",",
"streaming_endpoint_name",
",",
"custom_h... | Start StreamingEndpoint
Starts an existing StreamingEndpoint.
@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 streaming_endpoint_name [String] The name of the StreamingEndpoint.
@param custom_h... | [
"Start",
"StreamingEndpoint"
] | 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/streaming_endpoints.rb#L920-L922 | train | Starts a streaming endpoint. | [
30522,
13366,
4088,
1035,
2707,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
4070,
1035,
2171,
1010,
11058,
1035,
2203,
8400,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
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... |
opal/opal | opal/corelib/marshal/read_buffer.rb | Marshal.ReadBuffer.read_module | def read_module
mod_name = read_string(cache: false)
result = safe_const_get(mod_name)
unless result.class == Module
raise ArgumentError, "#{mod_name} does not refer to a Module"
end
@object_cache << result
result
end | ruby | def read_module
mod_name = read_string(cache: false)
result = safe_const_get(mod_name)
unless result.class == Module
raise ArgumentError, "#{mod_name} does not refer to a Module"
end
@object_cache << result
result
end | [
"def",
"read_module",
"mod_name",
"=",
"read_string",
"(",
"cache",
":",
"false",
")",
"result",
"=",
"safe_const_get",
"(",
"mod_name",
")",
"unless",
"result",
".",
"class",
"==",
"Module",
"raise",
"ArgumentError",
",",
"\"#{mod_name} does not refer to a Module\"... | Reads and returns a Module from an input stream
@example
Kernel
is encoded as
'm', 'Kernel' | [
"Reads",
"and",
"returns",
"a",
"Module",
"from",
"an",
"input",
"stream"
] | 41aedc0fd62aab00d3c117ba0caf00206bedd981 | https://github.com/opal/opal/blob/41aedc0fd62aab00d3c117ba0caf00206bedd981/opal/corelib/marshal/read_buffer.rb#L362-L370 | train | Read a module object from the file. | [
30522,
13366,
3191,
1035,
11336,
16913,
1035,
2171,
1027,
3191,
1035,
5164,
1006,
17053,
1024,
6270,
1007,
2765,
1027,
3647,
1035,
9530,
3367,
1035,
2131,
1006,
16913,
1035,
2171,
1007,
4983,
2765,
1012,
2465,
1027,
1027,
11336,
5333,
6685,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_policy_insights/lib/2018-04-04/generated/azure_mgmt_policy_insights/policy_states.rb | Azure::PolicyInsights::Mgmt::V2018_04_04.PolicyStates.list_query_results_for_management_group_with_http_info | def list_query_results_for_management_group_with_http_info(policy_states_resource, management_group_name, query_options:nil, custom_headers:nil)
list_query_results_for_management_group_async(policy_states_resource, management_group_name, query_options:query_options, custom_headers:custom_headers).value!
end | ruby | def list_query_results_for_management_group_with_http_info(policy_states_resource, management_group_name, query_options:nil, custom_headers:nil)
list_query_results_for_management_group_async(policy_states_resource, management_group_name, query_options:query_options, custom_headers:custom_headers).value!
end | [
"def",
"list_query_results_for_management_group_with_http_info",
"(",
"policy_states_resource",
",",
"management_group_name",
",",
"query_options",
":",
"nil",
",",
"custom_headers",
":",
"nil",
")",
"list_query_results_for_management_group_async",
"(",
"policy_states_resource",
... | Queries policy states for the resources under the management group.
@param policy_states_resource [PolicyStatesResource] The virtual resource
under PolicyStates resource type. In a given time range, 'latest' represents
the latest policy state(s), whereas 'default' represents all policy state(s).
Possible values in... | [
"Queries",
"policy",
"states",
"for",
"the",
"resources",
"under",
"the",
"management",
"group",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_policy_insights/lib/2018-04-04/generated/azure_mgmt_policy_insights/policy_states.rb#L57-L59 | train | Gets the list of policy states that are associated with the management group. | [
30522,
13366,
2862,
1035,
23032,
1035,
3463,
1035,
2005,
1035,
2968,
1035,
2177,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
3343,
1035,
2163,
1035,
7692,
1010,
2968,
1035,
2177,
1035,
2171,
1010,
23032,
1035,
7047,
1024,
9152,
2140,
1010,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
opal/opal | stdlib/open-uri.rb | OpenURI.OpenRead.read | def read(options={})
self.open(options) {|f|
str = f.read
Meta.init str, f
str
}
end | ruby | def read(options={})
self.open(options) {|f|
str = f.read
Meta.init str, f
str
}
end | [
"def",
"read",
"(",
"options",
"=",
"{",
"}",
")",
"self",
".",
"open",
"(",
"options",
")",
"{",
"|",
"f",
"|",
"str",
"=",
"f",
".",
"read",
"Meta",
".",
"init",
"str",
",",
"f",
"str",
"}",
"end"
] | OpenURI::OpenRead#read([options]) reads a content referenced by self and
returns the content as string.
The string is extended with OpenURI::Meta.
The argument +options+ is same as OpenURI::OpenRead#open. | [
"OpenURI",
"::",
"OpenRead#read",
"(",
"[",
"options",
"]",
")",
"reads",
"a",
"content",
"referenced",
"by",
"self",
"and",
"returns",
"the",
"content",
"as",
"string",
".",
"The",
"string",
"is",
"extended",
"with",
"OpenURI",
"::",
"Meta",
".",
"The",
... | 41aedc0fd62aab00d3c117ba0caf00206bedd981 | https://github.com/opal/opal/blob/41aedc0fd62aab00d3c117ba0caf00206bedd981/stdlib/open-uri.rb#L341-L347 | train | Reads the file into the array of objects. | [
30522,
13366,
3191,
1006,
7047,
1027,
1063,
1065,
1007,
2969,
1012,
2330,
1006,
7047,
1007,
1063,
1064,
1042,
1064,
2358,
2099,
1027,
1042,
1012,
3191,
18804,
1012,
1999,
4183,
2358,
2099,
1010,
1042,
2358,
2099,
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... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
castwide/solargraph | lib/solargraph/api_map.rb | Solargraph.ApiMap.super_and_sub? | def super_and_sub?(sup, sub)
fqsup = qualify(sup)
cls = qualify(store.get_superclass(sub), sub)
until cls.nil?
return true if cls == fqsup
cls = qualify(store.get_superclass(cls), cls)
end
false
end | ruby | def super_and_sub?(sup, sub)
fqsup = qualify(sup)
cls = qualify(store.get_superclass(sub), sub)
until cls.nil?
return true if cls == fqsup
cls = qualify(store.get_superclass(cls), cls)
end
false
end | [
"def",
"super_and_sub?",
"(",
"sup",
",",
"sub",
")",
"fqsup",
"=",
"qualify",
"(",
"sup",
")",
"cls",
"=",
"qualify",
"(",
"store",
".",
"get_superclass",
"(",
"sub",
")",
",",
"sub",
")",
"until",
"cls",
".",
"nil?",
"return",
"true",
"if",
"cls",
... | Check if a class is a superclass of another class.
@param sup [String] The superclass
@param sub [String] The subclass
@return [Boolean] | [
"Check",
"if",
"a",
"class",
"is",
"a",
"superclass",
"of",
"another",
"class",
"."
] | 47badb5d151aca775ccbe6c470236089eae7839d | https://github.com/castwide/solargraph/blob/47badb5d151aca775ccbe6c470236089eae7839d/lib/solargraph/api_map.rb#L638-L646 | train | Returns true if sup and sub are the same as the super class of the given class. | [
30522,
13366,
3565,
1035,
1998,
1035,
4942,
1029,
1006,
10514,
2361,
1010,
4942,
1007,
1042,
4160,
6342,
2361,
1027,
7515,
1006,
10514,
2361,
1007,
18856,
2015,
1027,
7515,
1006,
3573,
1012,
2131,
1035,
3565,
26266,
1006,
4942,
1007,
1010,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_machine_learning_services/lib/2018-03-01-preview/generated/azure_mgmt_machine_learning_services/machine_learning_compute.rb | Azure::MachineLearningServices::Mgmt::V2018_03_01_preview.MachineLearningCompute.get_with_http_info | def get_with_http_info(resource_group_name, workspace_name, compute_name, custom_headers:nil)
get_async(resource_group_name, workspace_name, compute_name, custom_headers:custom_headers).value!
end | ruby | def get_with_http_info(resource_group_name, workspace_name, compute_name, custom_headers:nil)
get_async(resource_group_name, workspace_name, compute_name, custom_headers:custom_headers).value!
end | [
"def",
"get_with_http_info",
"(",
"resource_group_name",
",",
"workspace_name",
",",
"compute_name",
",",
"custom_headers",
":",
"nil",
")",
"get_async",
"(",
"resource_group_name",
",",
"workspace_name",
",",
"compute_name",
",",
"custom_headers",
":custom_headers",
")... | Gets compute definition by its name. Any secrets (storage keys, service
credentials, etc) are not returned - use 'keys' nested resource to get them.
@param resource_group_name [String] Name of the resource group in which
workspace is located.
@param workspace_name [String] Name of Azure Machine Learning workspace.... | [
"Gets",
"compute",
"definition",
"by",
"its",
"name",
".",
"Any",
"secrets",
"(",
"storage",
"keys",
"service",
"credentials",
"etc",
")",
"are",
"not",
"returned",
"-",
"use",
"keys",
"nested",
"resource",
"to",
"get",
"them",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_machine_learning_services/lib/2018-03-01-preview/generated/azure_mgmt_machine_learning_services/machine_learning_compute.rb#L154-L156 | train | Gets the specified compute. | [
30522,
13366,
2131,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2573,
15327,
1035,
2171,
1010,
24134,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
2131,
1035,
2004,
6038,
2278,
1006,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_network/lib/2018-07-01/generated/azure_mgmt_network/routes.rb | Azure::Network::Mgmt::V2018_07_01.Routes.list | def list(resource_group_name, route_table_name, custom_headers:nil)
first_page = list_as_lazy(resource_group_name, route_table_name, custom_headers:custom_headers)
first_page.get_all_items
end | ruby | def list(resource_group_name, route_table_name, custom_headers:nil)
first_page = list_as_lazy(resource_group_name, route_table_name, custom_headers:custom_headers)
first_page.get_all_items
end | [
"def",
"list",
"(",
"resource_group_name",
",",
"route_table_name",
",",
"custom_headers",
":",
"nil",
")",
"first_page",
"=",
"list_as_lazy",
"(",
"resource_group_name",
",",
"route_table_name",
",",
"custom_headers",
":custom_headers",
")",
"first_page",
".",
"get_a... | Gets all routes in a route table.
@param resource_group_name [String] The name of the resource group.
@param route_table_name [String] The name of the route table.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request.
@return [Array<Route>] operation resu... | [
"Gets",
"all",
"routes",
"in",
"a",
"route",
"table",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_network/lib/2018-07-01/generated/azure_mgmt_network/routes.rb#L218-L221 | train | Gets all the segmentation rules in a route table. | [
30522,
13366,
2862,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2799,
1035,
2795,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
2034,
1035,
3931,
1027,
2862,
1035,
2004,
1035,
13971,
1006,
7692,
1035,
2177,
1035,
2171,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_storagesync/lib/2018-07-01/generated/azure_mgmt_storagesync/registered_servers.rb | Azure::StorageSync::Mgmt::V2018_07_01.RegisteredServers.begin_delete | def begin_delete(resource_group_name, storage_sync_service_name, server_id, custom_headers:nil)
response = begin_delete_async(resource_group_name, storage_sync_service_name, server_id, custom_headers:custom_headers).value!
nil
end | ruby | def begin_delete(resource_group_name, storage_sync_service_name, server_id, custom_headers:nil)
response = begin_delete_async(resource_group_name, storage_sync_service_name, server_id, custom_headers:custom_headers).value!
nil
end | [
"def",
"begin_delete",
"(",
"resource_group_name",
",",
"storage_sync_service_name",
",",
"server_id",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"begin_delete_async",
"(",
"resource_group_name",
",",
"storage_sync_service_name",
",",
"server_id",
",",
"cu... | Delete the given registered server.
@param resource_group_name [String] The name of the resource group. The name
is case insensitive.
@param storage_sync_service_name [String] Name of Storage Sync Service
resource.
@param server_id [String] GUID identifying the on-premises server.
@param custom_headers [Hash{Str... | [
"Delete",
"the",
"given",
"registered",
"server",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_storagesync/lib/2018-07-01/generated/azure_mgmt_storagesync/registered_servers.rb#L509-L512 | train | Deletes a server from the specified Data Lake Store account. | [
30522,
13366,
4088,
1035,
3972,
12870,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
5527,
1035,
26351,
1035,
2326,
1035,
2171,
1010,
8241,
1035,
8909,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
4088,
1035,
3972,
12870,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.