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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
github-changelog-generator/github-changelog-generator | lib/github_changelog_generator/task.rb | GitHubChangelogGenerator.RakeTask.define | def define(args, &task_block)
desc "Generate a Changelog from GitHub"
yield(*[self, args].slice(0, task_block.arity)) if task_block
# clear any (auto-)pre-existing task
Rake::Task[@name].clear if Rake::Task.task_defined?(@name)
task @name do
# mimick parse_options
option... | ruby | def define(args, &task_block)
desc "Generate a Changelog from GitHub"
yield(*[self, args].slice(0, task_block.arity)) if task_block
# clear any (auto-)pre-existing task
Rake::Task[@name].clear if Rake::Task.task_defined?(@name)
task @name do
# mimick parse_options
option... | [
"def",
"define",
"(",
"args",
",",
"&",
"task_block",
")",
"desc",
"\"Generate a Changelog from GitHub\"",
"yield",
"(",
"[",
"self",
",",
"args",
"]",
".",
"slice",
"(",
"0",
",",
"task_block",
".",
"arity",
")",
")",
"if",
"task_block",
"# clear any (auto-... | Public: Initialise a new GitHubChangelogGenerator::RakeTask.
Example
GitHubChangelogGenerator::RakeTask.new | [
"Public",
":",
"Initialise",
"a",
"new",
"GitHubChangelogGenerator",
"::",
"RakeTask",
"."
] | f18c64b5cc0d7473b059275b88385ac11ca8b564 | https://github.com/github-changelog-generator/github-changelog-generator/blob/f18c64b5cc0d7473b059275b88385ac11ca8b564/lib/github_changelog_generator/task.rb#L39-L65 | train | Define a Changelog task | [
30522,
13366,
9375,
1006,
12098,
5620,
1010,
1004,
4708,
1035,
3796,
1007,
4078,
2278,
1000,
9699,
1037,
2689,
21197,
2013,
21025,
2705,
12083,
1000,
10750,
1006,
1008,
1031,
2969,
1010,
12098,
5620,
1033,
1012,
14704,
1006,
1014,
1010,
470... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_service_bus/lib/2015-08-01/generated/azure_mgmt_service_bus/queues.rb | Azure::ServiceBus::Mgmt::V2015_08_01.Queues.list_authorization_rules_with_http_info | def list_authorization_rules_with_http_info(resource_group_name, namespace_name, queue_name, custom_headers:nil)
list_authorization_rules_async(resource_group_name, namespace_name, queue_name, custom_headers:custom_headers).value!
end | ruby | def list_authorization_rules_with_http_info(resource_group_name, namespace_name, queue_name, custom_headers:nil)
list_authorization_rules_async(resource_group_name, namespace_name, queue_name, custom_headers:custom_headers).value!
end | [
"def",
"list_authorization_rules_with_http_info",
"(",
"resource_group_name",
",",
"namespace_name",
",",
"queue_name",
",",
"custom_headers",
":",
"nil",
")",
"list_authorization_rules_async",
"(",
"resource_group_name",
",",
"namespace_name",
",",
"queue_name",
",",
"cust... | Gets all authorization rules for a queue.
@param resource_group_name [String] Name of the Resource group within the
Azure subscription.
@param namespace_name [String] The namespace name
@param queue_name [String] The queue name.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be... | [
"Gets",
"all",
"authorization",
"rules",
"for",
"a",
"queue",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_service_bus/lib/2015-08-01/generated/azure_mgmt_service_bus/queues.rb#L470-L472 | train | Gets the authorization rules for the specified queue. | [
30522,
13366,
2862,
1035,
20104,
1035,
3513,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
3415,
15327,
1035,
2171,
1010,
24240,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
2862,
1035,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
rmagick/rmagick | lib/rvg/rvg.rb | Magick.RVG.background_position= | def background_position=(pos)
warn 'background_position= has no effect in nested RVG objects' if @nested
bg_pos = pos.to_s.downcase
raise ArgumentError, "background position must be `scaled', `tiled', or `fit' (#{pos} given)" unless %w[scaled tiled fit].include?(bg_pos)
@background_position = b... | ruby | def background_position=(pos)
warn 'background_position= has no effect in nested RVG objects' if @nested
bg_pos = pos.to_s.downcase
raise ArgumentError, "background position must be `scaled', `tiled', or `fit' (#{pos} given)" unless %w[scaled tiled fit].include?(bg_pos)
@background_position = b... | [
"def",
"background_position",
"=",
"(",
"pos",
")",
"warn",
"'background_position= has no effect in nested RVG objects'",
"if",
"@nested",
"bg_pos",
"=",
"pos",
".",
"to_s",
".",
"downcase",
"raise",
"ArgumentError",
",",
"\"background position must be `scaled', `tiled', or `... | How to position the background image on the canvas. One of the following symbols:
[:scaled] Scale the image to the canvas width and height.
[:tiled] Tile the image across the canvas.
[:fit] Scale the image to fit within the canvas while retaining the
image proportions. Center the image on the canvas. Color ... | [
"How",
"to",
"position",
"the",
"background",
"image",
"on",
"the",
"canvas",
".",
"One",
"of",
"the",
"following",
"symbols",
":",
"[",
":",
"scaled",
"]",
"Scale",
"the",
"image",
"to",
"the",
"canvas",
"width",
"and",
"height",
".",
"[",
":",
"tiled... | ef6688ed9d76bf123c2ea1a483eff8635051adb7 | https://github.com/rmagick/rmagick/blob/ef6688ed9d76bf123c2ea1a483eff8635051adb7/lib/rvg/rvg.rb#L161-L167 | train | Sets the background position of the image. | [
30522,
13366,
4281,
1035,
2597,
1027,
1006,
13433,
2015,
1007,
11582,
1005,
4281,
1035,
2597,
1027,
2038,
2053,
3466,
1999,
9089,
2098,
27634,
2290,
5200,
1005,
2065,
1030,
9089,
2098,
1038,
2290,
1035,
13433,
2015,
1027,
13433,
2015,
1012,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
elastic/apm-agent-ruby | lib/elastic_apm/context_builder.rb | ElasticAPM.ContextBuilder.should_capture_body? | def should_capture_body?(for_type)
option = config.capture_body
return true if option == 'all'
return true if option == 'transactions' && for_type == :transaction
return true if option == 'errors' && for_type == :error
false
end | ruby | def should_capture_body?(for_type)
option = config.capture_body
return true if option == 'all'
return true if option == 'transactions' && for_type == :transaction
return true if option == 'errors' && for_type == :error
false
end | [
"def",
"should_capture_body?",
"(",
"for_type",
")",
"option",
"=",
"config",
".",
"capture_body",
"return",
"true",
"if",
"option",
"==",
"'all'",
"return",
"true",
"if",
"option",
"==",
"'transactions'",
"&&",
"for_type",
"==",
":transaction",
"return",
"true"... | rubocop:enable Metrics/MethodLength, Metrics/AbcSize | [
"rubocop",
":",
"enable",
"Metrics",
"/",
"MethodLength",
"Metrics",
"/",
"AbcSize"
] | 82190d1a9ba22af3b2c2c6fe6d23cc471f2e7ff6 | https://github.com/elastic/apm-agent-ruby/blob/82190d1a9ba22af3b2c2c6fe6d23cc471f2e7ff6/lib/elastic_apm/context_builder.rb#L45-L53 | train | Returns true if the body should be captured. | [
30522,
13366,
2323,
1035,
5425,
1035,
2303,
1029,
1006,
2005,
1035,
2828,
1007,
5724,
1027,
9530,
8873,
2290,
1012,
5425,
1035,
2303,
2709,
2995,
2065,
5724,
1027,
1027,
1005,
2035,
1005,
2709,
2995,
2065,
5724,
1027,
1027,
1005,
11817,
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... |
jekyll/jekyll | lib/jekyll/site.rb | Jekyll.Site.in_theme_dir | def in_theme_dir(*paths)
return nil unless theme
paths.reduce(theme.root) do |base, path|
Jekyll.sanitized_path(base, path)
end
end | ruby | def in_theme_dir(*paths)
return nil unless theme
paths.reduce(theme.root) do |base, path|
Jekyll.sanitized_path(base, path)
end
end | [
"def",
"in_theme_dir",
"(",
"*",
"paths",
")",
"return",
"nil",
"unless",
"theme",
"paths",
".",
"reduce",
"(",
"theme",
".",
"root",
")",
"do",
"|",
"base",
",",
"path",
"|",
"Jekyll",
".",
"sanitized_path",
"(",
"base",
",",
"path",
")",
"end",
"en... | Public: Prefix a given path with the theme directory.
paths - (optional) path elements to a file or directory within the
theme directory
Returns a path which is prefixed with the theme root directory. | [
"Public",
":",
"Prefix",
"a",
"given",
"path",
"with",
"the",
"theme",
"directory",
"."
] | fd74fe3e93a1fb506fa6621a2e271d7b9c5c3e3b | https://github.com/jekyll/jekyll/blob/fd74fe3e93a1fb506fa6621a2e271d7b9c5c3e3b/lib/jekyll/site.rb#L390-L396 | train | Returns the root of the theme directory in the current theme. | [
30522,
13366,
1999,
1035,
4323,
1035,
16101,
1006,
1008,
10425,
1007,
2709,
9152,
2140,
4983,
4323,
10425,
1012,
5547,
1006,
4323,
1012,
7117,
1007,
2079,
1064,
2918,
1010,
4130,
1064,
15333,
4801,
3363,
1012,
2624,
25090,
5422,
1035,
4130,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | data/azure_service_fabric/lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb | Azure::ServiceFabric::V6_2_0_9.ServiceFabricClientAPIs.get_partition_replicas_event_list | def get_partition_replicas_event_list(partition_id, start_time_utc, end_time_utc, timeout:60, events_types_filter:nil, exclude_analysis_events:nil, skip_correlation_lookup:nil, custom_headers:nil)
response = get_partition_replicas_event_list_async(partition_id, start_time_utc, end_time_utc, timeout:timeout, event... | ruby | def get_partition_replicas_event_list(partition_id, start_time_utc, end_time_utc, timeout:60, events_types_filter:nil, exclude_analysis_events:nil, skip_correlation_lookup:nil, custom_headers:nil)
response = get_partition_replicas_event_list_async(partition_id, start_time_utc, end_time_utc, timeout:timeout, event... | [
"def",
"get_partition_replicas_event_list",
"(",
"partition_id",
",",
"start_time_utc",
",",
"end_time_utc",
",",
"timeout",
":",
"60",
",",
"events_types_filter",
":",
"nil",
",",
"exclude_analysis_events",
":",
"nil",
",",
"skip_correlation_lookup",
":",
"nil",
",",... | Gets all Replicas-related events for a Partition.
The response is list of ReplicaEvent objects.
@param partition_id The identity of the partition.
@param start_time_utc [String] The start time of a lookup query in ISO UTC
yyyy-MM-ddTHH:mm:ssZ.
@param end_time_utc [String] The end time of a lookup query in ISO UT... | [
"Gets",
"all",
"Replicas",
"-",
"related",
"events",
"for",
"a",
"Partition",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_service_fabric/lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb#L29023-L29026 | train | Gets the replicas of the specified partition. | [
30522,
13366,
2131,
1035,
13571,
1035,
15059,
2015,
1035,
2724,
1035,
2862,
1006,
13571,
1035,
8909,
1010,
2707,
1035,
2051,
1035,
11396,
1010,
2203,
1035,
2051,
1035,
11396,
1010,
2051,
5833,
1024,
3438,
1010,
2824,
1035,
4127,
1035,
11307... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/config_wrapper.rb | Aruba.ConfigWrapper.method_missing | def method_missing(name, *args, &block)
event_bus.notify Events::ChangedConfiguration.new(changed: { name: name.to_s.gsub(/=$/, ''), value: args.first }) if name.to_s.end_with? '='
config.send(name, *args, &block)
end | ruby | def method_missing(name, *args, &block)
event_bus.notify Events::ChangedConfiguration.new(changed: { name: name.to_s.gsub(/=$/, ''), value: args.first }) if name.to_s.end_with? '='
config.send(name, *args, &block)
end | [
"def",
"method_missing",
"(",
"name",
",",
"*",
"args",
",",
"&",
"block",
")",
"event_bus",
".",
"notify",
"Events",
"::",
"ChangedConfiguration",
".",
"new",
"(",
"changed",
":",
"{",
"name",
":",
"name",
".",
"to_s",
".",
"gsub",
"(",
"/",
"/",
",... | Create proxy
@param [Config] config
An aruba config object.
@param [#notify] event_bus
The event queue which should be notified.
Proxy all methods
If one method ends with "=", e.g. ":option1=", then notify the event
queue, that the user changes the value of "option1" | [
"Create",
"proxy"
] | add17615322f575588aef1fccce875396cdf36e9 | https://github.com/cucumber/aruba/blob/add17615322f575588aef1fccce875396cdf36e9/lib/aruba/config_wrapper.rb#L32-L36 | train | Called by the configuration object. | [
30522,
13366,
4118,
30524,
2025,
8757,
2824,
1024,
1024,
2904,
8663,
8873,
27390,
3370,
1012,
2047,
1006,
2904,
1024,
1063,
2171,
1024,
2171,
1012,
2000,
1035,
1055,
1012,
28177,
12083,
1006,
1013,
1027,
1002,
1013,
1010,
1005,
1005,
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... |
braintree/braintree_ruby | lib/braintree/resource_collection.rb | Braintree.ResourceCollection.each | def each(&block)
@ids.each_slice(@page_size) do |page_of_ids|
resources = @paging_block.call(page_of_ids)
resources.each(&block)
end
end | ruby | def each(&block)
@ids.each_slice(@page_size) do |page_of_ids|
resources = @paging_block.call(page_of_ids)
resources.each(&block)
end
end | [
"def",
"each",
"(",
"&",
"block",
")",
"@ids",
".",
"each_slice",
"(",
"@page_size",
")",
"do",
"|",
"page_of_ids",
"|",
"resources",
"=",
"@paging_block",
".",
"call",
"(",
"page_of_ids",
")",
"resources",
".",
"each",
"(",
"block",
")",
"end",
"end"
] | Yields each item | [
"Yields",
"each",
"item"
] | 6e56c7099ea55bcdc4073cbea60b2688cef69663 | https://github.com/braintree/braintree_ruby/blob/6e56c7099ea55bcdc4073cbea60b2688cef69663/lib/braintree/resource_collection.rb#L14-L19 | train | Iterate over the resources in the page. | [
30522,
13366,
2169,
1006,
1004,
3796,
1007,
1030,
8909,
2015,
1012,
2169,
1035,
14704,
1006,
1030,
3931,
1035,
2946,
1007,
2079,
1064,
3931,
1035,
1997,
1035,
8909,
2015,
1064,
4219,
1027,
1030,
6643,
4726,
1035,
3796,
1012,
2655,
1006,
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... |
mongodb/mongoid | lib/mongoid/criteria.rb | Mongoid.Criteria.type_selection | def type_selection
klasses = klass._types
if klasses.size > 1
{ _type: { "$in" => klass._types }}
else
{ _type: klass._types[0] }
end
end | ruby | def type_selection
klasses = klass._types
if klasses.size > 1
{ _type: { "$in" => klass._types }}
else
{ _type: klass._types[0] }
end
end | [
"def",
"type_selection",
"klasses",
"=",
"klass",
".",
"_types",
"if",
"klasses",
".",
"size",
">",
"1",
"{",
"_type",
":",
"{",
"\"$in\"",
"=>",
"klass",
".",
"_types",
"}",
"}",
"else",
"{",
"_type",
":",
"klass",
".",
"_types",
"[",
"0",
"]",
"}... | Get the selector for type selection.
@api private
@example Get a type selection hash.
criteria.type_selection
@return [ Hash ] The type selection.
@since 3.0.3 | [
"Get",
"the",
"selector",
"for",
"type",
"selection",
"."
] | 56976e32610f4c2450882b0bfe14da099f0703f4 | https://github.com/mongodb/mongoid/blob/56976e32610f4c2450882b0bfe14da099f0703f4/lib/mongoid/criteria.rb#L552-L559 | train | Returns a sequence of unique identifiers for the given class. | [
30522,
13366,
2828,
1035,
4989,
1047,
27102,
2229,
1027,
1047,
27102,
1012,
1035,
4127,
2065,
1047,
27102,
2229,
1012,
2946,
1028,
1015,
1063,
1035,
2828,
1024,
1063,
1000,
1002,
1999,
1000,
1027,
1028,
1047,
27102,
1012,
1035,
4127,
1065,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
deivid-rodriguez/byebug | lib/byebug/processors/command_processor.rb | Byebug.CommandProcessor.repl | def repl
until @proceed
cmd = interface.read_command(prompt)
return if cmd.nil?
next if cmd == ""
run_cmd(cmd)
end
end | ruby | def repl
until @proceed
cmd = interface.read_command(prompt)
return if cmd.nil?
next if cmd == ""
run_cmd(cmd)
end
end | [
"def",
"repl",
"until",
"@proceed",
"cmd",
"=",
"interface",
".",
"read_command",
"(",
"prompt",
")",
"return",
"if",
"cmd",
".",
"nil?",
"next",
"if",
"cmd",
"==",
"\"\"",
"run_cmd",
"(",
"cmd",
")",
"end",
"end"
] | Main byebug's REPL | [
"Main",
"byebug",
"s",
"REPL"
] | bf41a63858a648baa7fb621600d6451786d1572a | https://github.com/deivid-rodriguez/byebug/blob/bf41a63858a648baa7fb621600d6451786d1572a/lib/byebug/processors/command_processor.rb#L126-L135 | train | Runs the command in the current thread. | [
30522,
13366,
16360,
2140,
2127,
1030,
10838,
4642,
2094,
1027,
8278,
1012,
3191,
1035,
3094,
1006,
25732,
1007,
2709,
2065,
4642,
2094,
1012,
9152,
2140,
1029,
2279,
2065,
4642,
2094,
1027,
1027,
1000,
1000,
2448,
1035,
4642,
2094,
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... |
mongodb/mongo-ruby-driver | lib/mongo/database.rb | Mongo.Database.command | def command(operation, opts = {})
txn_read_pref = if opts[:session] && opts[:session].in_transaction?
opts[:session].txn_read_preference
else
nil
end
txn_read_pref ||= opts[:read] || ServerSelector::PRIMARY
Lint.validate_underscore_read_preference(txn_read_pref)
prefe... | ruby | def command(operation, opts = {})
txn_read_pref = if opts[:session] && opts[:session].in_transaction?
opts[:session].txn_read_preference
else
nil
end
txn_read_pref ||= opts[:read] || ServerSelector::PRIMARY
Lint.validate_underscore_read_preference(txn_read_pref)
prefe... | [
"def",
"command",
"(",
"operation",
",",
"opts",
"=",
"{",
"}",
")",
"txn_read_pref",
"=",
"if",
"opts",
"[",
":session",
"]",
"&&",
"opts",
"[",
":session",
"]",
".",
"in_transaction?",
"opts",
"[",
":session",
"]",
".",
"txn_read_preference",
"else",
"... | Execute a command on the database.
@example Execute a command.
database.command(:ismaster => 1)
@param [ Hash ] operation The command to execute.
@param [ Hash ] opts The command options.
@option opts :read [ Hash ] The read preference for this command.
@option opts :session [ Session ] The session to use fo... | [
"Execute",
"a",
"command",
"on",
"the",
"database",
"."
] | dca26d0870cb3386fad9ccc1d17228097c1fe1c8 | https://github.com/mongodb/mongo-ruby-driver/blob/dca26d0870cb3386fad9ccc1d17228097c1fe1c8/lib/mongo/database.rb#L158-L178 | train | Execute a command on the database. | [
30522,
13366,
3094,
1006,
3169,
1010,
23569,
2015,
1027,
1063,
1065,
1007,
19067,
2078,
1035,
3191,
1035,
3653,
2546,
1027,
2065,
23569,
2015,
1031,
1024,
5219,
1033,
1004,
1004,
23569,
2015,
1031,
1024,
5219,
1033,
1012,
1999,
1035,
12598,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
appium/ruby_lib | lib/appium_lib/ios/element/textfield.rb | Appium.Ios._textfield_exact_string | def _textfield_exact_string(value)
exact = { target: value, substring: false, insensitive: false }
exact_obj = { name: exact, label: exact, value: exact }
_textfield_visible.merge(exact_obj)
end | ruby | def _textfield_exact_string(value)
exact = { target: value, substring: false, insensitive: false }
exact_obj = { name: exact, label: exact, value: exact }
_textfield_visible.merge(exact_obj)
end | [
"def",
"_textfield_exact_string",
"(",
"value",
")",
"exact",
"=",
"{",
"target",
":",
"value",
",",
"substring",
":",
"false",
",",
"insensitive",
":",
"false",
"}",
"exact_obj",
"=",
"{",
"name",
":",
"exact",
",",
"label",
":",
"exact",
",",
"value",
... | Appium | [
"Appium"
] | 1f5898400dd1928bfe42ddd5f842d1f8738f2f76 | https://github.com/appium/ruby_lib/blob/1f5898400dd1928bfe42ddd5f842d1f8738f2f76/lib/appium_lib/ios/element/textfield.rb#L104-L108 | train | Returns the textfield object that matches the given string. | [
30522,
13366,
1035,
3793,
3790,
1035,
6635,
1035,
5164,
1006,
3643,
1007,
6635,
1027,
1063,
4539,
1024,
3643,
1010,
4942,
3367,
4892,
1024,
6270,
1010,
16021,
6132,
13043,
1024,
6270,
1065,
6635,
1035,
27885,
3501,
1027,
1063,
2171,
1024,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
plataformatec/responders | lib/action_controller/responder.rb | ActionController.Responder.to_format | def to_format
if !get? && has_errors? && !response_overridden?
display_errors
elsif has_view_rendering? || response_overridden?
default_render
else
api_behavior
end
rescue ActionView::MissingTemplate
api_behavior
end | ruby | def to_format
if !get? && has_errors? && !response_overridden?
display_errors
elsif has_view_rendering? || response_overridden?
default_render
else
api_behavior
end
rescue ActionView::MissingTemplate
api_behavior
end | [
"def",
"to_format",
"if",
"!",
"get?",
"&&",
"has_errors?",
"&&",
"!",
"response_overridden?",
"display_errors",
"elsif",
"has_view_rendering?",
"||",
"response_overridden?",
"default_render",
"else",
"api_behavior",
"end",
"rescue",
"ActionView",
"::",
"MissingTemplate",... | All other formats follow the procedure below. First we try to render a
template, if the template is not available, we verify if the resource
responds to :to_format and display it. | [
"All",
"other",
"formats",
"follow",
"the",
"procedure",
"below",
".",
"First",
"we",
"try",
"to",
"render",
"a",
"template",
"if",
"the",
"template",
"is",
"not",
"available",
"we",
"verify",
"if",
"the",
"resource",
"responds",
"to",
":",
"to_format",
"a... | a1a2706091d4ffcbbe387407ddfc5671a59ad842 | https://github.com/plataformatec/responders/blob/a1a2706091d4ffcbbe387407ddfc5671a59ad842/lib/action_controller/responder.rb#L184-L194 | train | Returns the object to be formatted. | [
30522,
13366,
2000,
1035,
4289,
2065,
999,
2131,
1029,
1004,
1004,
2038,
1035,
10697,
1029,
1004,
1004,
999,
3433,
1035,
2058,
14615,
4181,
1029,
4653,
1035,
10697,
3449,
5332,
2546,
2038,
1035,
3193,
1035,
14259,
1029,
1064,
1064,
3433,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_web/lib/2018-02-01/generated/azure_mgmt_web/recommendations.rb | Azure::Web::Mgmt::V2018_02_01.Recommendations.list_history_for_web_app_as_lazy | def list_history_for_web_app_as_lazy(resource_group_name, site_name, expired_only:nil, filter:nil, custom_headers:nil)
response = list_history_for_web_app_async(resource_group_name, site_name, expired_only:expired_only, filter:filter, custom_headers:custom_headers).value!
unless response.nil?
page =... | ruby | def list_history_for_web_app_as_lazy(resource_group_name, site_name, expired_only:nil, filter:nil, custom_headers:nil)
response = list_history_for_web_app_async(resource_group_name, site_name, expired_only:expired_only, filter:filter, custom_headers:custom_headers).value!
unless response.nil?
page =... | [
"def",
"list_history_for_web_app_as_lazy",
"(",
"resource_group_name",
",",
"site_name",
",",
"expired_only",
":",
"nil",
",",
"filter",
":",
"nil",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"list_history_for_web_app_async",
"(",
"resource_group_name",
... | Get past recommendations for an app, optionally specified by the time range.
Get past recommendations for an app, optionally specified by the time range.
@param resource_group_name [String] Name of the resource group to which the
resource belongs.
@param site_name [String] Name of the app.
@param expired_only [B... | [
"Get",
"past",
"recommendations",
"for",
"an",
"app",
"optionally",
"specified",
"by",
"the",
"time",
"range",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_web/lib/2018-02-01/generated/azure_mgmt_web/recommendations.rb#L1288-L1297 | train | Gets the history for the specified App Service Environment. | [
30522,
13366,
2862,
1035,
2381,
1035,
2005,
1035,
4773,
1035,
10439,
1035,
30524,
6038,
2278,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2609,
1035,
2171,
1010,
13735,
1035,
2069,
1024,
13735,
1035,
2069,
1010,
11307,
1024,
11307,
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_network/lib/2016-12-01/generated/azure_mgmt_network/virtual_network_gateways.rb | Azure::Network::Mgmt::V2016_12_01.VirtualNetworkGateways.delete | def delete(resource_group_name, virtual_network_gateway_name, custom_headers:nil)
response = delete_async(resource_group_name, virtual_network_gateway_name, custom_headers:custom_headers).value!
nil
end | ruby | def delete(resource_group_name, virtual_network_gateway_name, custom_headers:nil)
response = delete_async(resource_group_name, virtual_network_gateway_name, custom_headers:custom_headers).value!
nil
end | [
"def",
"delete",
"(",
"resource_group_name",
",",
"virtual_network_gateway_name",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"delete_async",
"(",
"resource_group_name",
",",
"virtual_network_gateway_name",
",",
"custom_headers",
":custom_headers",
")",
".",
... | Deletes the specified virtual network gateway.
@param resource_group_name [String] The name of the resource group.
@param virtual_network_gateway_name [String] The name of the virtual network
gateway.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request. | [
"Deletes",
"the",
"specified",
"virtual",
"network",
"gateway",
"."
] | 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#L176-L179 | train | Deletes a virtual network gateway. | [
30522,
13366,
3972,
12870,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
7484,
1035,
2897,
1035,
11909,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
3972,
12870,
1035,
2004,
6038,
2278,
1006,
7692,
1035,
2177,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_web/lib/2018-02-01/generated/azure_mgmt_web/app_service_environments.rb | Azure::Web::Mgmt::V2018_02_01.AppServiceEnvironments.begin_create_or_update_multi_role_pool_with_http_info | def begin_create_or_update_multi_role_pool_with_http_info(resource_group_name, name, multi_role_pool_envelope, custom_headers:nil)
begin_create_or_update_multi_role_pool_async(resource_group_name, name, multi_role_pool_envelope, custom_headers:custom_headers).value!
end | ruby | def begin_create_or_update_multi_role_pool_with_http_info(resource_group_name, name, multi_role_pool_envelope, custom_headers:nil)
begin_create_or_update_multi_role_pool_async(resource_group_name, name, multi_role_pool_envelope, custom_headers:custom_headers).value!
end | [
"def",
"begin_create_or_update_multi_role_pool_with_http_info",
"(",
"resource_group_name",
",",
"name",
",",
"multi_role_pool_envelope",
",",
"custom_headers",
":",
"nil",
")",
"begin_create_or_update_multi_role_pool_async",
"(",
"resource_group_name",
",",
"name",
",",
"multi... | Create or update a multi-role pool.
Create or update a multi-role pool.
@param resource_group_name [String] Name of the resource group to which the
resource belongs.
@param name [String] Name of the App Service Environment.
@param multi_role_pool_envelope [WorkerPoolResource] Properties of the
multi-role pool.
... | [
"Create",
"or",
"update",
"a",
"multi",
"-",
"role",
"pool",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_web/lib/2018-02-01/generated/azure_mgmt_web/app_service_environments.rb#L4529-L4531 | train | Creates or updates a multi - role pool. | [
30522,
13366,
4088,
1035,
3443,
1035,
2030,
1035,
10651,
1035,
4800,
1035,
2535,
1035,
4770,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2171,
1010,
4800,
1035,
2535,
1035,
30524,
1035,
20346,
2015,
1024,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_logic/lib/2016-06-01/generated/azure_mgmt_logic/workflow_runs.rb | Azure::Logic::Mgmt::V2016_06_01.WorkflowRuns.cancel | def cancel(resource_group_name, workflow_name, run_name, custom_headers:nil)
response = cancel_async(resource_group_name, workflow_name, run_name, custom_headers:custom_headers).value!
nil
end | ruby | def cancel(resource_group_name, workflow_name, run_name, custom_headers:nil)
response = cancel_async(resource_group_name, workflow_name, run_name, custom_headers:custom_headers).value!
nil
end | [
"def",
"cancel",
"(",
"resource_group_name",
",",
"workflow_name",
",",
"run_name",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"cancel_async",
"(",
"resource_group_name",
",",
"workflow_name",
",",
"run_name",
",",
"custom_headers",
":custom_headers",
... | Cancels a workflow run.
@param resource_group_name [String] The resource group name.
@param workflow_name [String] The workflow name.
@param run_name [String] The workflow run name.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request. | [
"Cancels",
"a",
"workflow",
"run",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_logic/lib/2016-06-01/generated/azure_mgmt_logic/workflow_runs.rb#L231-L234 | train | Cancels a run. | [
30522,
13366,
17542,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2147,
12314,
1035,
2171,
1010,
2448,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
17542,
1035,
2004,
6038,
2278,
1006,
7692,
1035,
2177,
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... |
roo-rb/roo | lib/roo/excelx.rb | Roo.Excelx.method_missing | def method_missing(method, *args)
if (label = workbook.defined_names[method.to_s])
safe_send(sheet_for(label.sheet).cells[label.key], :value)
else
# call super for methods like #a1
super
end
end | ruby | def method_missing(method, *args)
if (label = workbook.defined_names[method.to_s])
safe_send(sheet_for(label.sheet).cells[label.key], :value)
else
# call super for methods like #a1
super
end
end | [
"def",
"method_missing",
"(",
"method",
",",
"*",
"args",
")",
"if",
"(",
"label",
"=",
"workbook",
".",
"defined_names",
"[",
"method",
".",
"to_s",
"]",
")",
"safe_send",
"(",
"sheet_for",
"(",
"label",
".",
"sheet",
")",
".",
"cells",
"[",
"label",
... | initialization and opening of a spreadsheet file
values for packed: :zip
optional cell_max (int) parameter for early aborting attempts to parse
enormous documents. | [
"initialization",
"and",
"opening",
"of",
"a",
"spreadsheet",
"file",
"values",
"for",
"packed",
":",
":",
"zip",
"optional",
"cell_max",
"(",
"int",
")",
"parameter",
"for",
"early",
"aborting",
"attempts",
"to",
"parse",
"enormous",
"documents",
"."
] | 4ec1104f0c3c2a29711c0c907371cd2be12bcc3c | https://github.com/roo-rb/roo/blob/4ec1104f0c3c2a29711c0c907371cd2be12bcc3c/lib/roo/excelx.rb#L85-L92 | train | This method is used to create a new object for the object. | [
30522,
13366,
4118,
1035,
4394,
1006,
4118,
1010,
1008,
12098,
5620,
1007,
2065,
1006,
3830,
1027,
2147,
8654,
1012,
4225,
1035,
3415,
1031,
4118,
1012,
2000,
1035,
1055,
1033,
1007,
3647,
1035,
4604,
1006,
7123,
1035,
2005,
1006,
3830,
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/overcommit | lib/overcommit/configuration.rb | Overcommit.Configuration.for_hook | def for_hook(hook, hook_type = nil)
unless hook_type
components = hook.class.name.split('::')
hook = components.last
hook_type = components[-2]
end
# Merge hook configuration with special 'ALL' config
hook_config = smart_merge(@hash[hook_type]['ALL'], @hash[hook_type][ho... | ruby | def for_hook(hook, hook_type = nil)
unless hook_type
components = hook.class.name.split('::')
hook = components.last
hook_type = components[-2]
end
# Merge hook configuration with special 'ALL' config
hook_config = smart_merge(@hash[hook_type]['ALL'], @hash[hook_type][ho... | [
"def",
"for_hook",
"(",
"hook",
",",
"hook_type",
"=",
"nil",
")",
"unless",
"hook_type",
"components",
"=",
"hook",
".",
"class",
".",
"name",
".",
"split",
"(",
"'::'",
")",
"hook",
"=",
"components",
".",
"last",
"hook_type",
"=",
"components",
"[",
... | Returns a non-modifiable configuration for a hook. | [
"Returns",
"a",
"non",
"-",
"modifiable",
"configuration",
"for",
"a",
"hook",
"."
] | 35d60adb41da942178b789560968e3ad030b0ac7 | https://github.com/sds/overcommit/blob/35d60adb41da942178b789560968e3ad030b0ac7/lib/overcommit/configuration.rb#L131-L146 | train | Returns a new instance of the class for the given hook. | [
30522,
13366,
2005,
1035,
8103,
1006,
8103,
1010,
8103,
1035,
2828,
1027,
9152,
2140,
1007,
4983,
8103,
1035,
2828,
6177,
1027,
8103,
1012,
2465,
1012,
2171,
1012,
3975,
1006,
1005,
1024,
1024,
1005,
1007,
8103,
1027,
6177,
1012,
2197,
81... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
meew0/discordrb | lib/discordrb/data/webhook.rb | Discordrb.Webhook.delete | def delete(reason = nil)
if token?
API::Webhook.token_delete_webhook(@token, @id, reason)
else
API::Webhook.delete_webhook(@bot.token, @id, reason)
end
end | ruby | def delete(reason = nil)
if token?
API::Webhook.token_delete_webhook(@token, @id, reason)
else
API::Webhook.delete_webhook(@bot.token, @id, reason)
end
end | [
"def",
"delete",
"(",
"reason",
"=",
"nil",
")",
"if",
"token?",
"API",
"::",
"Webhook",
".",
"token_delete_webhook",
"(",
"@token",
",",
"@id",
",",
"reason",
")",
"else",
"API",
"::",
"Webhook",
".",
"delete_webhook",
"(",
"@bot",
".",
"token",
",",
... | Deletes the webhook.
@param reason [String] The reason the invite is being deleted. | [
"Deletes",
"the",
"webhook",
"."
] | 764298a1ff0be69a1853b510d736f21c2b91a2fe | https://github.com/meew0/discordrb/blob/764298a1ff0be69a1853b510d736f21c2b91a2fe/lib/discordrb/data/webhook.rb#L87-L93 | train | Delete a webhook | [
30522,
13366,
3972,
12870,
1006,
3114,
1027,
9152,
2140,
1007,
2065,
19204,
1029,
17928,
1024,
1024,
4773,
6806,
6559,
1012,
19204,
1035,
3972,
12870,
1035,
4773,
6806,
6559,
1006,
1030,
19204,
1010,
1030,
8909,
1010,
3114,
1007,
2842,
1792... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
ankane/groupdate | lib/groupdate/relation_builder.rb | Groupdate.RelationBuilder.resolve_column | def resolve_column(relation, column)
node = relation.send(:relation).send(:arel_columns, [column]).first
node = Arel::Nodes::SqlLiteral.new(node) if node.is_a?(String)
relation.connection.visitor.accept(node, Arel::Collectors::SQLString.new).value
end | ruby | def resolve_column(relation, column)
node = relation.send(:relation).send(:arel_columns, [column]).first
node = Arel::Nodes::SqlLiteral.new(node) if node.is_a?(String)
relation.connection.visitor.accept(node, Arel::Collectors::SQLString.new).value
end | [
"def",
"resolve_column",
"(",
"relation",
",",
"column",
")",
"node",
"=",
"relation",
".",
"send",
"(",
":relation",
")",
".",
"send",
"(",
":arel_columns",
",",
"[",
"column",
"]",
")",
".",
"first",
"node",
"=",
"Arel",
"::",
"Nodes",
"::",
"SqlLite... | resolves eagerly
need to convert both where_clause (easy)
and group_clause (not easy) if want to avoid this | [
"resolves",
"eagerly",
"need",
"to",
"convert",
"both",
"where_clause",
"(",
"easy",
")",
"and",
"group_clause",
"(",
"not",
"easy",
")",
"if",
"want",
"to",
"avoid",
"this"
] | f9c824a9b7df479f64facd293e50bd47efb7c499 | https://github.com/ankane/groupdate/blob/f9c824a9b7df479f64facd293e50bd47efb7c499/lib/groupdate/relation_builder.rb#L180-L184 | train | Resolve column | [
30522,
13366,
10663,
1035,
5930,
1006,
7189,
1010,
5930,
1007,
13045,
1027,
7189,
1012,
4604,
1006,
1024,
7189,
1007,
1012,
4604,
1006,
1024,
2024,
2140,
1035,
7753,
1010,
1031,
5930,
1033,
1007,
1012,
2034,
13045,
1027,
2024,
2140,
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... |
david942j/one_gadget | lib/one_gadget/cli.rb | OneGadget.CLI.handle_gadgets | def handle_gadgets(gadgets, libc_file)
return false if gadgets.empty? # error occurs when fetching gadgets
return handle_script(gadgets, @options[:script]) if @options[:script]
return handle_near(libc_file, gadgets, @options[:near]) if @options[:near]
display_gadgets(gadgets, @options[:raw])
... | ruby | def handle_gadgets(gadgets, libc_file)
return false if gadgets.empty? # error occurs when fetching gadgets
return handle_script(gadgets, @options[:script]) if @options[:script]
return handle_near(libc_file, gadgets, @options[:near]) if @options[:near]
display_gadgets(gadgets, @options[:raw])
... | [
"def",
"handle_gadgets",
"(",
"gadgets",
",",
"libc_file",
")",
"return",
"false",
"if",
"gadgets",
".",
"empty?",
"# error occurs when fetching gadgets",
"return",
"handle_script",
"(",
"gadgets",
",",
"@options",
"[",
":script",
"]",
")",
"if",
"@options",
"[",
... | Decides how to display fetched gadgets according to options.
@param [Array<OneGadget::Gadget::Gadget>] gadgets
@param [String] libc_file
@return [Boolean] | [
"Decides",
"how",
"to",
"display",
"fetched",
"gadgets",
"according",
"to",
"options",
"."
] | ff6ef04541e83441bfe3c2664a6febd1640f4263 | https://github.com/david942j/one_gadget/blob/ff6ef04541e83441bfe3c2664a6febd1640f4263/lib/one_gadget/cli.rb#L63-L69 | train | Handles the gadgets | [
30522,
13366,
5047,
1035,
11721,
28682,
1006,
11721,
28682,
1010,
5622,
9818,
1035,
5371,
1007,
2709,
6270,
2065,
11721,
28682,
1012,
4064,
1029,
1001,
7561,
5158,
2043,
18584,
2075,
11721,
28682,
2709,
5047,
1035,
5896,
1006,
11721,
28682,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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.stop | def stop(options = {})
options = Aws::Util.deep_merge(options, instance_ids: [@id])
resp = @client.stop_instances(options)
resp.data
end | ruby | def stop(options = {})
options = Aws::Util.deep_merge(options, instance_ids: [@id])
resp = @client.stop_instances(options)
resp.data
end | [
"def",
"stop",
"(",
"options",
"=",
"{",
"}",
")",
"options",
"=",
"Aws",
"::",
"Util",
".",
"deep_merge",
"(",
"options",
",",
"instance_ids",
":",
"[",
"@id",
"]",
")",
"resp",
"=",
"@client",
".",
"stop_instances",
"(",
"options",
")",
"resp",
"."... | @example Request syntax with placeholder values
instance.stop({
hibernate: false,
dry_run: false,
force: false,
})
@param [Hash] options ({})
@option options [Boolean] :hibernate
Hibernates the instance if the instance was enabled for hibernation at
launch. If the instance cannot hibernate... | [
"@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#L1178-L1182 | train | Stops the instance | [
30522,
13366,
2644,
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,
7396,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
aasm/aasm | lib/aasm/core/event.rb | AASM::Core.Event.may_fire? | def may_fire?(obj, to_state=::AASM::NO_VALUE, *args)
_fire(obj, {:test_only => true}, to_state, *args) # true indicates test firing
end | ruby | def may_fire?(obj, to_state=::AASM::NO_VALUE, *args)
_fire(obj, {:test_only => true}, to_state, *args) # true indicates test firing
end | [
"def",
"may_fire?",
"(",
"obj",
",",
"to_state",
"=",
"::",
"AASM",
"::",
"NO_VALUE",
",",
"*",
"args",
")",
"_fire",
"(",
"obj",
",",
"{",
":test_only",
"=>",
"true",
"}",
",",
"to_state",
",",
"args",
")",
"# true indicates test firing",
"end"
] | a neutered version of fire - it doesn't actually fire the event, it just
executes the transition guards to determine if a transition is even
an option given current conditions. | [
"a",
"neutered",
"version",
"of",
"fire",
"-",
"it",
"doesn",
"t",
"actually",
"fire",
"the",
"event",
"it",
"just",
"executes",
"the",
"transition",
"guards",
"to",
"determine",
"if",
"a",
"transition",
"is",
"even",
"an",
"option",
"given",
"current",
"c... | 6a1000b489c6b2e205a7b142478a4b4e207c3dbd | https://github.com/aasm/aasm/blob/6a1000b489c6b2e205a7b142478a4b4e207c3dbd/lib/aasm/core/event.rb#L45-L47 | train | Returns true if the object may fire. | [
30522,
13366,
2089,
1035,
2543,
1029,
1006,
27885,
3501,
1010,
2000,
1035,
2110,
1027,
1024,
1024,
9779,
6491,
1024,
1024,
2053,
1035,
3643,
1010,
1008,
12098,
5620,
1007,
1035,
2543,
1006,
27885,
3501,
1010,
1063,
1024,
3231,
1035,
2069,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
square/connect-ruby-sdk | lib/square_connect/models/inventory_adjustment.rb | SquareConnect.InventoryAdjustment.valid? | def valid?
from_state_validator = EnumAttributeValidator.new('String', ["CUSTOM", "IN_STOCK", "SOLD", "RETURNED_BY_CUSTOMER", "RESERVED_FOR_SALE", "SOLD_ONLINE", "ORDERED_FROM_VENDOR", "RECEIVED_FROM_VENDOR", "IN_TRANSIT_TO", "NONE", "WASTE", "UNLINKED_RETURN"])
return false unless from_state_validator.vali... | ruby | def valid?
from_state_validator = EnumAttributeValidator.new('String', ["CUSTOM", "IN_STOCK", "SOLD", "RETURNED_BY_CUSTOMER", "RESERVED_FOR_SALE", "SOLD_ONLINE", "ORDERED_FROM_VENDOR", "RECEIVED_FROM_VENDOR", "IN_TRANSIT_TO", "NONE", "WASTE", "UNLINKED_RETURN"])
return false unless from_state_validator.vali... | [
"def",
"valid?",
"from_state_validator",
"=",
"EnumAttributeValidator",
".",
"new",
"(",
"'String'",
",",
"[",
"\"CUSTOM\"",
",",
"\"IN_STOCK\"",
",",
"\"SOLD\"",
",",
"\"RETURNED_BY_CUSTOMER\"",
",",
"\"RESERVED_FOR_SALE\"",
",",
"\"SOLD_ONLINE\"",
",",
"\"ORDERED_FROM... | Check to see if the all the properties in the model are valid
@return true if the model is valid | [
"Check",
"to",
"see",
"if",
"the",
"all",
"the",
"properties",
"in",
"the",
"model",
"are",
"valid"
] | 798eb9ded716f23b9f1518386f1c311a34bca8bf | https://github.com/square/connect-ruby-sdk/blob/798eb9ded716f23b9f1518386f1c311a34bca8bf/lib/square_connect/models/inventory_adjustment.rb#L221-L227 | train | Returns true if the object is valid for the given array of objects. | [
30522,
13366,
9398,
1029,
2013,
1035,
2110,
1035,
9398,
8844,
1027,
4372,
12248,
4779,
3089,
8569,
2618,
10175,
8524,
4263,
1012,
2047,
1006,
1005,
5164,
1005,
1010,
1031,
1000,
7661,
1000,
1010,
1000,
1999,
1035,
4518,
1000,
1010,
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... |
meew0/discordrb | lib/discordrb/data/audit_logs.rb | Discordrb.AuditLogs.process_webhooks | def process_webhooks(webhooks)
webhooks.each do |element|
webhook = Webhook.new(element, @bot)
@webhooks[webhook.id] = webhook
end
end | ruby | def process_webhooks(webhooks)
webhooks.each do |element|
webhook = Webhook.new(element, @bot)
@webhooks[webhook.id] = webhook
end
end | [
"def",
"process_webhooks",
"(",
"webhooks",
")",
"webhooks",
".",
"each",
"do",
"|",
"element",
"|",
"webhook",
"=",
"Webhook",
".",
"new",
"(",
"element",
",",
"@bot",
")",
"@webhooks",
"[",
"webhook",
".",
"id",
"]",
"=",
"webhook",
"end",
"end"
] | Process webhook objects given by the request
@note For internal use only
@!visibility private | [
"Process",
"webhook",
"objects",
"given",
"by",
"the",
"request"
] | 764298a1ff0be69a1853b510d736f21c2b91a2fe | https://github.com/meew0/discordrb/blob/764298a1ff0be69a1853b510d736f21c2b91a2fe/lib/discordrb/data/audit_logs.rb#L278-L283 | train | Process webhooks | [
30522,
13366,
2832,
1035,
4773,
6806,
6559,
2015,
1006,
4773,
6806,
6559,
2015,
1007,
4773,
6806,
6559,
2015,
1012,
2169,
2079,
1064,
5783,
1064,
4773,
6806,
6559,
1027,
4773,
6806,
6559,
1012,
2047,
1006,
5783,
1010,
1030,
28516,
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... |
heroku/legacy-cli | lib/heroku/command/plugins.rb | Heroku::Command.Plugins.uninstall | def uninstall
plugin = Heroku::Plugin.new(shift_argument)
validate_arguments!
if Heroku::Plugin.list.include? plugin.name
action("Uninstalling #{plugin.name}") do
plugin.uninstall
end
else
Heroku::JSPlugin.uninstall(plugin.name)
end
end | ruby | def uninstall
plugin = Heroku::Plugin.new(shift_argument)
validate_arguments!
if Heroku::Plugin.list.include? plugin.name
action("Uninstalling #{plugin.name}") do
plugin.uninstall
end
else
Heroku::JSPlugin.uninstall(plugin.name)
end
end | [
"def",
"uninstall",
"plugin",
"=",
"Heroku",
"::",
"Plugin",
".",
"new",
"(",
"shift_argument",
")",
"validate_arguments!",
"if",
"Heroku",
"::",
"Plugin",
".",
"list",
".",
"include?",
"plugin",
".",
"name",
"action",
"(",
"\"Uninstalling #{plugin.name}\"",
")"... | plugins:uninstall PLUGIN
uninstall a plugin
Example:
$ heroku plugins:uninstall heroku-production-check
Uninstalling heroku-production-check... done | [
"plugins",
":",
"uninstall",
"PLUGIN"
] | 6f18521a258394bfb79e6b36f7160ad8559a8e16 | https://github.com/heroku/legacy-cli/blob/6f18521a258394bfb79e6b36f7160ad8559a8e16/lib/heroku/command/plugins.rb#L62-L72 | train | Uninstalls the plugin | [
30522,
13366,
4895,
7076,
9080,
2140,
13354,
2378,
1027,
5394,
5283,
1024,
1024,
13354,
2378,
1012,
2047,
1006,
5670,
1035,
6685,
1007,
9398,
3686,
1035,
9918,
999,
2065,
5394,
5283,
1024,
1024,
13354,
2378,
1012,
2862,
1012,
2421,
1029,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
troessner/reek | lib/reek/context_builder.rb | Reek.ContextBuilder.process_if | def process_if(exp, _parent)
children = exp.children
increase_statement_count_by(children[1])
increase_statement_count_by(children[2])
decrease_statement_count
process(exp)
end | ruby | def process_if(exp, _parent)
children = exp.children
increase_statement_count_by(children[1])
increase_statement_count_by(children[2])
decrease_statement_count
process(exp)
end | [
"def",
"process_if",
"(",
"exp",
",",
"_parent",
")",
"children",
"=",
"exp",
".",
"children",
"increase_statement_count_by",
"(",
"children",
"[",
"1",
"]",
")",
"increase_statement_count_by",
"(",
"children",
"[",
"2",
"]",
")",
"decrease_statement_count",
"pr... | Handles `if` nodes.
An input example that would trigger this method would be:
if a > 5 && b < 3
puts 'bingo'
else
3
end
Counts the `if` body as one statement and the `else` body as another statement.
At the end we subtract one statement because the surrounding context was already counted
as one (e.g. v... | [
"Handles",
"if",
"nodes",
"."
] | 8c6b5c0c6228a6981ab48543457889f9ea984054 | https://github.com/troessner/reek/blob/8c6b5c0c6228a6981ab48543457889f9ea984054/lib/reek/context_builder.rb#L312-L318 | train | process if statement | [
30522,
13366,
2832,
1035,
2065,
1006,
4654,
2361,
1010,
1035,
6687,
1007,
2336,
1027,
4654,
2361,
1012,
2336,
3623,
1035,
4861,
1035,
4175,
1035,
2011,
1006,
2336,
1031,
1015,
1033,
1007,
3623,
1035,
4861,
1035,
4175,
1035,
2011,
1006,
23... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
heroku/legacy-cli | lib/heroku/command/stack.rb | Heroku::Command.Stack.index | def index
validate_arguments!
stacks_data = api.get_stack(app).body
styled_header("#{app} Available Stacks")
stacks = stacks_data.map do |stack|
row = [stack['current'] ? '*' : ' ', Codex.out(stack['name'])]
row << '(beta)' if stack['beta']
row << '(deprecated)' if stac... | ruby | def index
validate_arguments!
stacks_data = api.get_stack(app).body
styled_header("#{app} Available Stacks")
stacks = stacks_data.map do |stack|
row = [stack['current'] ? '*' : ' ', Codex.out(stack['name'])]
row << '(beta)' if stack['beta']
row << '(deprecated)' if stac... | [
"def",
"index",
"validate_arguments!",
"stacks_data",
"=",
"api",
".",
"get_stack",
"(",
"app",
")",
".",
"body",
"styled_header",
"(",
"\"#{app} Available Stacks\"",
")",
"stacks",
"=",
"stacks_data",
".",
"map",
"do",
"|",
"stack",
"|",
"row",
"=",
"[",
"s... | stack
show the list of available stacks
Example:
$ heroku stack
=== example Available Stacks
cedar-10
* cedar-14 | [
"stack"
] | 6f18521a258394bfb79e6b36f7160ad8559a8e16 | https://github.com/heroku/legacy-cli/blob/6f18521a258394bfb79e6b36f7160ad8559a8e16/lib/heroku/command/stack.rb#L19-L33 | train | Returns a list of available stacks for the current app. | [
30522,
13366,
5950,
9398,
3686,
1035,
9918,
999,
20829,
1035,
2951,
1027,
17928,
1012,
2131,
1035,
9991,
1006,
10439,
1007,
1012,
2303,
13650,
1035,
20346,
1006,
1000,
1001,
1063,
10439,
1065,
2800,
20829,
1000,
1007,
20829,
1027,
20829,
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_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/tag.rb | Azure::ApiManagement::Mgmt::V2018_01_01.Tag.assign_to_product | def assign_to_product(resource_group_name, service_name, product_id, tag_id, if_match:nil, custom_headers:nil)
response = assign_to_product_async(resource_group_name, service_name, product_id, tag_id, if_match:if_match, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def assign_to_product(resource_group_name, service_name, product_id, tag_id, if_match:nil, custom_headers:nil)
response = assign_to_product_async(resource_group_name, service_name, product_id, tag_id, if_match:if_match, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"assign_to_product",
"(",
"resource_group_name",
",",
"service_name",
",",
"product_id",
",",
"tag_id",
",",
"if_match",
":",
"nil",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"assign_to_product_async",
"(",
"resource_group_name",
",",
"service_... | Assign tag to the Product.
@param resource_group_name [String] The name of the resource group.
@param service_name [String] The name of the API Management service.
@param product_id [String] Product identifier. Must be unique in the current
API Management service instance.
@param tag_id [String] Tag identifier. M... | [
"Assign",
"tag",
"to",
"the",
"Product",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/tag.rb#L2361-L2364 | train | Assign a tag to a product. | [
30522,
13366,
23911,
1035,
2000,
1035,
4031,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2326,
1035,
2171,
1010,
4031,
1035,
8909,
1010,
6415,
1035,
8909,
1010,
2065,
1035,
2674,
1024,
9152,
2140,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
castwide/solargraph | lib/solargraph/api_map.rb | Solargraph.ApiMap.get_path_suggestions | def get_path_suggestions path
return [] if path.nil?
result = []
result.concat store.get_path_pins(path)
# if result.empty?
# lp = live_map.get_path_pin(path)
# result.push lp unless lp.nil?
# end
resolve_method_aliases(result)
end | ruby | def get_path_suggestions path
return [] if path.nil?
result = []
result.concat store.get_path_pins(path)
# if result.empty?
# lp = live_map.get_path_pin(path)
# result.push lp unless lp.nil?
# end
resolve_method_aliases(result)
end | [
"def",
"get_path_suggestions",
"path",
"return",
"[",
"]",
"if",
"path",
".",
"nil?",
"result",
"=",
"[",
"]",
"result",
".",
"concat",
"store",
".",
"get_path_pins",
"(",
"path",
")",
"# if result.empty?",
"# lp = live_map.get_path_pin(path)",
"# result.push lp... | Get an array of all suggestions that match the specified path.
@deprecated Use #get_path_pins instead.
@param path [String] The path to find
@return [Array<Solargraph::Pin::Base>] | [
"Get",
"an",
"array",
"of",
"all",
"suggestions",
"that",
"match",
"the",
"specified",
"path",
"."
] | 47badb5d151aca775ccbe6c470236089eae7839d | https://github.com/castwide/solargraph/blob/47badb5d151aca775ccbe6c470236089eae7839d/lib/solargraph/api_map.rb#L368-L377 | train | Get the suggestions for a given path. | [
30522,
13366,
2131,
1035,
4130,
1035,
15690,
4130,
2709,
1031,
1033,
2065,
4130,
1012,
9152,
2140,
1029,
2765,
1027,
1031,
1033,
2765,
1012,
9530,
11266,
3573,
1012,
2131,
1035,
4130,
1035,
16300,
1006,
4130,
1007,
1001,
2065,
2765,
1012,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_network/lib/2018-01-01/generated/azure_mgmt_network/inbound_nat_rules.rb | Azure::Network::Mgmt::V2018_01_01.InboundNatRules.delete | def delete(resource_group_name, load_balancer_name, inbound_nat_rule_name, custom_headers:nil)
response = delete_async(resource_group_name, load_balancer_name, inbound_nat_rule_name, custom_headers:custom_headers).value!
nil
end | ruby | def delete(resource_group_name, load_balancer_name, inbound_nat_rule_name, custom_headers:nil)
response = delete_async(resource_group_name, load_balancer_name, inbound_nat_rule_name, custom_headers:custom_headers).value!
nil
end | [
"def",
"delete",
"(",
"resource_group_name",
",",
"load_balancer_name",
",",
"inbound_nat_rule_name",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"delete_async",
"(",
"resource_group_name",
",",
"load_balancer_name",
",",
"inbound_nat_rule_name",
",",
"cust... | Deletes the specified load balancer inbound nat rule.
@param resource_group_name [String] The name of the resource group.
@param load_balancer_name [String] The name of the load balancer.
@param inbound_nat_rule_name [String] The name of the inbound nat rule.
@param custom_headers [Hash{String => String}] A hash o... | [
"Deletes",
"the",
"specified",
"load",
"balancer",
"inbound",
"nat",
"rule",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_network/lib/2018-01-01/generated/azure_mgmt_network/inbound_nat_rules.rb#L125-L128 | train | Deletes a load balancer inbound nat rule. | [
30522,
13366,
3972,
12870,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
7170,
1035,
5703,
2099,
1035,
2171,
1010,
1999,
15494,
1035,
14085,
1035,
3627,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
3972,
12870,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/disaster_recovery_configurations.rb | Azure::SQL::Mgmt::V2014_04_01.DisasterRecoveryConfigurations.failover | def failover(resource_group_name, server_name, disaster_recovery_configuration_name, custom_headers:nil)
response = failover_async(resource_group_name, server_name, disaster_recovery_configuration_name, custom_headers:custom_headers).value!
nil
end | ruby | def failover(resource_group_name, server_name, disaster_recovery_configuration_name, custom_headers:nil)
response = failover_async(resource_group_name, server_name, disaster_recovery_configuration_name, custom_headers:custom_headers).value!
nil
end | [
"def",
"failover",
"(",
"resource_group_name",
",",
"server_name",
",",
"disaster_recovery_configuration_name",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"failover_async",
"(",
"resource_group_name",
",",
"server_name",
",",
"disaster_recovery_configuration_n... | Fails over from the current primary server to this 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 disaster_recovery_config... | [
"Fails",
"over",
"from",
"the",
"current",
"primary",
"server",
"to",
"this",
"server",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/disaster_recovery_configurations.rb#L338-L341 | train | Gets the current cluster failover policy. | [
30522,
13366,
8246,
7840,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
8241,
1035,
2171,
1010,
7071,
1035,
7233,
1035,
9563,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
8246,
7840,
1035,
2004,
6038,
2278,
1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
aws/aws-sdk-ruby | gems/aws-sdk-sqs/lib/aws-sdk-sqs/resource.rb | Aws::SQS.Resource.create_queue | def create_queue(options = {})
resp = @client.create_queue(options)
Queue.new(
url: resp.data.queue_url,
client: @client
)
end | ruby | def create_queue(options = {})
resp = @client.create_queue(options)
Queue.new(
url: resp.data.queue_url,
client: @client
)
end | [
"def",
"create_queue",
"(",
"options",
"=",
"{",
"}",
")",
"resp",
"=",
"@client",
".",
"create_queue",
"(",
"options",
")",
"Queue",
".",
"new",
"(",
"url",
":",
"resp",
".",
"data",
".",
"queue_url",
",",
"client",
":",
"@client",
")",
"end"
] | @!group Actions
@example Request syntax with placeholder values
queue = sqs.create_queue({
queue_name: "String", # required
attributes: {
"All" => "String",
},
})
@param [Hash] options ({})
@option options [required, String] :queue_name
The name of the new queue. The following limits ... | [
"@!group",
"Actions",
"@example",
"Request",
"syntax",
"with",
"placeholder",
"values"
] | e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d | https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-sqs/lib/aws-sdk-sqs/resource.rb#L176-L182 | train | Create a queue | [
30522,
13366,
3443,
1035,
24240,
1006,
7047,
1027,
1063,
1065,
1007,
24501,
2361,
1027,
1030,
7396,
1012,
3443,
1035,
24240,
1006,
7047,
1007,
24240,
1012,
2047,
1006,
24471,
2140,
1024,
24501,
2361,
1012,
2951,
1012,
24240,
1035,
24471,
21... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
mongodb/mongoid | lib/mongoid/criteria.rb | Mongoid.Criteria.read | def read(value = nil)
clone.tap do |criteria|
criteria.options.merge!(read: value)
end
end | ruby | def read(value = nil)
clone.tap do |criteria|
criteria.options.merge!(read: value)
end
end | [
"def",
"read",
"(",
"value",
"=",
"nil",
")",
"clone",
".",
"tap",
"do",
"|",
"criteria",
"|",
"criteria",
".",
"options",
".",
"merge!",
"(",
"read",
":",
"value",
")",
"end",
"end"
] | Set the read preference for the criteria.
@example Set the read preference.
criteria.read(mode: :primary_preferred)
@param [ Hash ] value The mode preference.
@return [ Criteria ] The cloned criteria.
@since 5.0.0 | [
"Set",
"the",
"read",
"preference",
"for",
"the",
"criteria",
"."
] | 56976e32610f4c2450882b0bfe14da099f0703f4 | https://github.com/mongodb/mongoid/blob/56976e32610f4c2450882b0bfe14da099f0703f4/lib/mongoid/criteria.rb#L310-L314 | train | Read the current criteria from the database. | [
30522,
13366,
3191,
1006,
3643,
1027,
9152,
2140,
1007,
17598,
1012,
11112,
2079,
1064,
9181,
1064,
9181,
1012,
7047,
1012,
13590,
999,
1006,
3191,
1024,
3643,
1007,
2203,
2203,
102,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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_secrets_next | def get_secrets_next(next_page_link, custom_headers:nil)
response = get_secrets_next_async(next_page_link, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def get_secrets_next(next_page_link, custom_headers:nil)
response = get_secrets_next_async(next_page_link, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"get_secrets_next",
"(",
"next_page_link",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"get_secrets_next_async",
"(",
"next_page_link",
",",
"custom_headers",
":custom_headers",
")",
".",
"value!",
"response",
".",
"body",
"unless",
"response",
"... | List secrets in a specified key vault.
The Get Secrets operation is applicable to the entire vault. However, only
the base secret identifier and its attributes are provided in the response.
Individual secret versions are not listed in the response. This operation
requires the secrets/list permission.
@param next... | [
"List",
"secrets",
"in",
"a",
"specified",
"key",
"vault",
"."
] | 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#L8572-L8575 | train | Gets the secrets of the specified App Service Environment. | [
30522,
13366,
2131,
1035,
7800,
1035,
2279,
1006,
2279,
1035,
3931,
1035,
4957,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
2131,
1035,
7800,
1035,
2279,
1035,
2004,
6038,
2278,
1006,
2279,
1035,
3931,
1035,
4957,
1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | data/azure_cognitiveservices_contentmoderator/lib/1.0/generated/azure_cognitiveservices_contentmoderator/reviews.rb | Azure::CognitiveServices::ContentModerator::V1_0.Reviews.create_video_reviews | def create_video_reviews(content_type, team_name, create_video_reviews_body, sub_team:nil, custom_headers:nil)
response = create_video_reviews_async(content_type, team_name, create_video_reviews_body, sub_team:sub_team, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def create_video_reviews(content_type, team_name, create_video_reviews_body, sub_team:nil, custom_headers:nil)
response = create_video_reviews_async(content_type, team_name, create_video_reviews_body, sub_team:sub_team, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"create_video_reviews",
"(",
"content_type",
",",
"team_name",
",",
"create_video_reviews_body",
",",
"sub_team",
":",
"nil",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"create_video_reviews_async",
"(",
"content_type",
",",
"team_name",
",",
"c... | The reviews created would show up for Reviewers on your team. As Reviewers
complete reviewing, results of the Review would be POSTED (i.e. HTTP POST) on
the specified CallBackEndpoint.
<h3>CallBack Schemas </h3>
<h4>Review Completion CallBack Sample</h4>
<p>
{<br/>
"ReviewId": "<Review Id>",<br/>
"ModifiedOn":... | [
"The",
"reviews",
"created",
"would",
"show",
"up",
"for",
"Reviewers",
"on",
"your",
"team",
".",
"As",
"Reviewers",
"complete",
"reviewing",
"results",
"of",
"the",
"Review",
"would",
"be",
"POSTED",
"(",
"i",
".",
"e",
".",
"HTTP",
"POST",
")",
"on",
... | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_cognitiveservices_contentmoderator/lib/1.0/generated/azure_cognitiveservices_contentmoderator/reviews.rb#L1393-L1396 | train | Creates a video review for the specified video. | [
30522,
13366,
3443,
1035,
2678,
1035,
4391,
1006,
4180,
1035,
2828,
1010,
2136,
1035,
2171,
1010,
3443,
1035,
2678,
1035,
4391,
1035,
2303,
1010,
4942,
1035,
2136,
1024,
9152,
2140,
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... |
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_with_http_info | def analyze_image_by_domain_with_http_info(model, url, language:nil, custom_headers:nil)
analyze_image_by_domain_async(model, url, language:language, custom_headers:custom_headers).value!
end | ruby | def analyze_image_by_domain_with_http_info(model, url, language:nil, custom_headers:nil)
analyze_image_by_domain_async(model, url, language:language, custom_headers:custom_headers).value!
end | [
"def",
"analyze_image_by_domain_with_http_info",
"(",
"model",
",",
"url",
",",
"language",
":",
"nil",
",",
"custom_headers",
":",
"nil",
")",
"analyze_image_by_domain_async",
"(",
"model",
",",
"url",
",",
"language",
":",
"language",
",",
"custom_headers",
":cu... | 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#L717-L719 | train | Analyze an image by domain. | [
30522,
13366,
17908,
1035,
3746,
1035,
2011,
1035,
5884,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
2944,
1010,
24471,
2140,
1010,
2653,
1024,
9152,
2140,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
17908,
1035,
3746,
1035,
2011,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
randym/axlsx | lib/axlsx/drawing/marker.rb | Axlsx.Marker.coord | def coord(col, row=0)
coordinates = parse_coord_args(col, row)
self.col = coordinates[0]
self.row = coordinates[1]
end | ruby | def coord(col, row=0)
coordinates = parse_coord_args(col, row)
self.col = coordinates[0]
self.row = coordinates[1]
end | [
"def",
"coord",
"(",
"col",
",",
"row",
"=",
"0",
")",
"coordinates",
"=",
"parse_coord_args",
"(",
"col",
",",
"row",
")",
"self",
".",
"col",
"=",
"coordinates",
"[",
"0",
"]",
"self",
".",
"row",
"=",
"coordinates",
"[",
"1",
"]",
"end"
] | shortcut to set the column, row position for this marker
@param col the column for the marker, a Cell object or a string reference like "B7"
or an Array.
@param row the row of the marker. This is ignored if the col parameter is a Cell or
String or Array. | [
"shortcut",
"to",
"set",
"the",
"column",
"row",
"position",
"for",
"this",
"marker"
] | c593a08b2a929dac7aa8dc418b55e26b4c49dc34 | https://github.com/randym/axlsx/blob/c593a08b2a929dac7aa8dc418b55e26b4c49dc34/lib/axlsx/drawing/marker.rb#L50-L54 | train | Returns the coordinates of the cell and row | [
30522,
13366,
2522,
8551,
1006,
8902,
1010,
5216,
1027,
1014,
1007,
12093,
1027,
11968,
3366,
1035,
2522,
8551,
1035,
12098,
30524,
1012,
8902,
1027,
12093,
1031,
1014,
1033,
2969,
1012,
5216,
1027,
12093,
1031,
1015,
1033,
2203,
102,
0,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | data/azure_service_fabric/lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb | Azure::ServiceFabric::V6_2_0_9.ServiceFabricClientAPIs.get_partition_info | def get_partition_info(partition_id, timeout:60, custom_headers:nil)
response = get_partition_info_async(partition_id, timeout:timeout, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def get_partition_info(partition_id, timeout:60, custom_headers:nil)
response = get_partition_info_async(partition_id, timeout:timeout, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"get_partition_info",
"(",
"partition_id",
",",
"timeout",
":",
"60",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"get_partition_info_async",
"(",
"partition_id",
",",
"timeout",
":",
"timeout",
",",
"custom_headers",
":custom_headers",
")",
".... | Gets the information about a Service Fabric partition.
Gets the information about the specified partition. The response includes the
partition ID, partitioning scheme information, keys supported by the
partition, status, health, and other details about the partition.
@param partition_id The identity of the partit... | [
"Gets",
"the",
"information",
"about",
"a",
"Service",
"Fabric",
"partition",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_service_fabric/lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb#L11980-L11983 | train | Gets the information about the specified partition. | [
30522,
13366,
2131,
1035,
13571,
1035,
18558,
1006,
13571,
1035,
8909,
1010,
2051,
5833,
1024,
3438,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
2131,
1035,
13571,
1035,
18558,
1035,
2004,
6038,
2278,
1006,
13571,
103... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
fastlane/fastlane | spaceship/lib/spaceship/two_step_or_factor_client.rb | Spaceship.Client.update_request_headers | def update_request_headers(req)
req.headers["X-Apple-Id-Session-Id"] = @x_apple_id_session_id
req.headers["X-Apple-Widget-Key"] = self.itc_service_key
req.headers["Accept"] = "application/json"
req.headers["scnt"] = @scnt
end | ruby | def update_request_headers(req)
req.headers["X-Apple-Id-Session-Id"] = @x_apple_id_session_id
req.headers["X-Apple-Widget-Key"] = self.itc_service_key
req.headers["Accept"] = "application/json"
req.headers["scnt"] = @scnt
end | [
"def",
"update_request_headers",
"(",
"req",
")",
"req",
".",
"headers",
"[",
"\"X-Apple-Id-Session-Id\"",
"]",
"=",
"@x_apple_id_session_id",
"req",
".",
"headers",
"[",
"\"X-Apple-Widget-Key\"",
"]",
"=",
"self",
".",
"itc_service_key",
"req",
".",
"headers",
"[... | Responsible for setting all required header attributes for the requests
to succeed | [
"Responsible",
"for",
"setting",
"all",
"required",
"header",
"attributes",
"for",
"the",
"requests",
"to",
"succeed"
] | 457c5d647c77f0e078dafa5129da616914e002c5 | https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/spaceship/lib/spaceship/two_step_or_factor_client.rb#L301-L306 | train | Update the request headers | [
30522,
13366,
10651,
1035,
5227,
1035,
20346,
2015,
1006,
2128,
4160,
1007,
2128,
4160,
1012,
20346,
2015,
1031,
1000,
1060,
1011,
6207,
1011,
8909,
1011,
5219,
1011,
8909,
1000,
1033,
1027,
1030,
1060,
1035,
6207,
1035,
8909,
1035,
5219,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_stor_simple8000_series/lib/2017-06-01/generated/azure_mgmt_stor_simple8000_series/devices.rb | Azure::StorSimple8000Series::Mgmt::V2017_06_01.Devices.install_updates_async | def install_updates_async(device_name, resource_group_name, manager_name, custom_headers:nil)
# Send request
promise = begin_install_updates_async(device_name, resource_group_name, manager_name, custom_headers:custom_headers)
promise = promise.then do |response|
# Defining deserialization met... | ruby | def install_updates_async(device_name, resource_group_name, manager_name, custom_headers:nil)
# Send request
promise = begin_install_updates_async(device_name, resource_group_name, manager_name, custom_headers:custom_headers)
promise = promise.then do |response|
# Defining deserialization met... | [
"def",
"install_updates_async",
"(",
"device_name",
",",
"resource_group_name",
",",
"manager_name",
",",
"custom_headers",
":",
"nil",
")",
"# Send request",
"promise",
"=",
"begin_install_updates_async",
"(",
"device_name",
",",
"resource_group_name",
",",
"manager_name... | @param device_name [String] The device name
@param resource_group_name [String] The resource group name
@param manager_name [String] The manager name
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request.
@return [Concurrent::Promise] promise which provides... | [
"@param",
"device_name",
"[",
"String",
"]",
"The",
"device",
"name",
"@param",
"resource_group_name",
"[",
"String",
"]",
"The",
"resource",
"group",
"name",
"@param",
"manager_name",
"[",
"String",
"]",
"The",
"manager",
"name",
"@param",
"custom_headers",
"["... | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_stor_simple8000_series/lib/2017-06-01/generated/azure_mgmt_stor_simple8000_series/devices.rb#L578-L592 | train | Installs updates for the specified device. | [
30522,
13366,
16500,
1035,
14409,
1035,
2004,
6038,
2278,
1006,
5080,
1035,
2171,
1010,
7692,
1035,
2177,
1035,
2171,
1010,
3208,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
1001,
4604,
5227,
4872,
1027,
4088,
1035,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
sferik/twitter | lib/twitter/creatable.rb | Twitter.Creatable.created_at | def created_at
time = @attrs[:created_at]
return if time.nil?
time = Time.parse(time) unless time.is_a?(Time)
time.utc
end | ruby | def created_at
time = @attrs[:created_at]
return if time.nil?
time = Time.parse(time) unless time.is_a?(Time)
time.utc
end | [
"def",
"created_at",
"time",
"=",
"@attrs",
"[",
":created_at",
"]",
"return",
"if",
"time",
".",
"nil?",
"time",
"=",
"Time",
".",
"parse",
"(",
"time",
")",
"unless",
"time",
".",
"is_a?",
"(",
"Time",
")",
"time",
".",
"utc",
"end"
] | Time when the object was created on Twitter
@return [Time] | [
"Time",
"when",
"the",
"object",
"was",
"created",
"on",
"Twitter"
] | 844818cad07ce490ccb9d8542ebb6b4fc7a61cb4 | https://github.com/sferik/twitter/blob/844818cad07ce490ccb9d8542ebb6b4fc7a61cb4/lib/twitter/creatable.rb#L11-L16 | train | Returns the last modified time in the object. | [
30522,
13366,
2580,
1035,
2012,
2051,
1027,
1030,
2012,
16344,
2015,
1031,
1024,
2580,
1035,
2012,
1033,
2709,
2065,
2051,
1012,
9152,
2140,
1029,
2051,
1027,
2051,
1012,
11968,
3366,
1006,
2051,
1007,
4983,
2051,
1012,
2003,
1035,
1037,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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-cloudformation/lib/aws-sdk-cloudformation/stack.rb | Aws::CloudFormation.Stack.delete | def delete(options = {})
options = options.merge(stack_name: @name)
resp = @client.delete_stack(options)
resp.data
end | ruby | def delete(options = {})
options = options.merge(stack_name: @name)
resp = @client.delete_stack(options)
resp.data
end | [
"def",
"delete",
"(",
"options",
"=",
"{",
"}",
")",
"options",
"=",
"options",
".",
"merge",
"(",
"stack_name",
":",
"@name",
")",
"resp",
"=",
"@client",
".",
"delete_stack",
"(",
"options",
")",
"resp",
".",
"data",
"end"
] | @example Request syntax with placeholder values
stack.delete({
retain_resources: ["LogicalResourceId"],
role_arn: "RoleARN",
client_request_token: "ClientRequestToken",
})
@param [Hash] options ({})
@option options [Array<String>] :retain_resources
For stacks in the `DELETE_FAILED` state, a l... | [
"@example",
"Request",
"syntax",
"with",
"placeholder",
"values"
] | e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d | https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-cloudformation/lib/aws-sdk-cloudformation/stack.rb#L713-L717 | train | Delete a stack | [
30522,
13366,
3972,
12870,
1006,
7047,
1027,
1063,
1065,
1007,
7047,
1027,
7047,
1012,
13590,
1006,
9991,
1035,
2171,
1024,
1030,
2171,
1007,
24501,
2361,
1027,
1030,
7396,
1012,
3972,
12870,
1035,
9991,
1006,
7047,
1007,
24501,
2361,
1012,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/product_groups.rb | Azure::ApiManagement::Mgmt::V2016_07_07.ProductGroups.add_with_http_info | def add_with_http_info(resource_group_name, service_name, product_id, group_id, custom_headers:nil)
add_async(resource_group_name, service_name, product_id, group_id, custom_headers:custom_headers).value!
end | ruby | def add_with_http_info(resource_group_name, service_name, product_id, group_id, custom_headers:nil)
add_async(resource_group_name, service_name, product_id, group_id, custom_headers:custom_headers).value!
end | [
"def",
"add_with_http_info",
"(",
"resource_group_name",
",",
"service_name",
",",
"product_id",
",",
"group_id",
",",
"custom_headers",
":",
"nil",
")",
"add_async",
"(",
"resource_group_name",
",",
"service_name",
",",
"product_id",
",",
"group_id",
",",
"custom_h... | Adds the association between the specified developer group with the specified
product.
@param resource_group_name [String] The name of the resource group.
@param service_name [String] The name of the API Management service.
@param product_id [String] Product identifier. Must be unique in the current
API Managemen... | [
"Adds",
"the",
"association",
"between",
"the",
"specified",
"developer",
"group",
"with",
"the",
"specified",
"product",
"."
] | 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/product_groups.rb#L207-L209 | train | Adds a product to the group. | [
30522,
13366,
5587,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2326,
1035,
2171,
1010,
4031,
1035,
8909,
1010,
2177,
1035,
8909,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
5587,
1035,
2004,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | data/azure_cognitiveservices_luisauthoring/lib/2.0/generated/azure_cognitiveservices_luisauthoring/model.rb | Azure::CognitiveServices::LuisAuthoring::V2_0.Model.delete_custom_prebuilt_domain_with_http_info | def delete_custom_prebuilt_domain_with_http_info(app_id, version_id, domain_name, custom_headers:nil)
delete_custom_prebuilt_domain_async(app_id, version_id, domain_name, custom_headers:custom_headers).value!
end | ruby | def delete_custom_prebuilt_domain_with_http_info(app_id, version_id, domain_name, custom_headers:nil)
delete_custom_prebuilt_domain_async(app_id, version_id, domain_name, custom_headers:custom_headers).value!
end | [
"def",
"delete_custom_prebuilt_domain_with_http_info",
"(",
"app_id",
",",
"version_id",
",",
"domain_name",
",",
"custom_headers",
":",
"nil",
")",
"delete_custom_prebuilt_domain_async",
"(",
"app_id",
",",
"version_id",
",",
"domain_name",
",",
"custom_headers",
":custo... | Deletes a prebuilt domain's models in a version of the application.
@param app_id The application ID.
@param version_id [String] The version ID.
@param domain_name [String] Domain name.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request.
@return [MsRes... | [
"Deletes",
"a",
"prebuilt",
"domain",
"s",
"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#L4906-L4908 | train | Deletes a prebuilt domain. | [
30522,
13366,
3972,
12870,
1035,
7661,
1035,
3653,
8569,
4014,
2102,
1035,
5884,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
10439,
1035,
8909,
1010,
2544,
1035,
8909,
1010,
5884,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_web/lib/2016-03-01/generated/azure_mgmt_web/web_site_management_client.rb | Azure::Web::Mgmt::V2016_03_01.WebSiteManagementClient.list_geo_regions_with_http_info | def list_geo_regions_with_http_info(sku:nil, linux_workers_enabled:nil, custom_headers:nil)
list_geo_regions_async(sku:sku, linux_workers_enabled:linux_workers_enabled, custom_headers:custom_headers).value!
end | ruby | def list_geo_regions_with_http_info(sku:nil, linux_workers_enabled:nil, custom_headers:nil)
list_geo_regions_async(sku:sku, linux_workers_enabled:linux_workers_enabled, custom_headers:custom_headers).value!
end | [
"def",
"list_geo_regions_with_http_info",
"(",
"sku",
":",
"nil",
",",
"linux_workers_enabled",
":",
"nil",
",",
"custom_headers",
":",
"nil",
")",
"list_geo_regions_async",
"(",
"sku",
":",
"sku",
",",
"linux_workers_enabled",
":linux_workers_enabled",
",",
"custom_h... | Get a list of available geographical regions.
Get a list of available geographical regions.
@param sku [SkuName] Name of SKU used to filter the regions. Possible values
include: 'Free', 'Shared', 'Basic', 'Standard', 'Premium', 'PremiumV2',
'Dynamic', 'Isolated'
@param linux_workers_enabled [Boolean] Specify <co... | [
"Get",
"a",
"list",
"of",
"available",
"geographical",
"regions",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_web/lib/2016-03-01/generated/azure_mgmt_web/web_site_management_client.rb#L866-L868 | train | Gets the list of geo regions. | [
30522,
13366,
2862,
1035,
20248,
1035,
4655,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
15315,
2226,
1024,
9152,
2140,
1010,
11603,
1035,
3667,
1035,
9124,
1024,
9152,
2140,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
2862,
1035,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_recovery_services_backup/lib/2016-06-01/generated/azure_mgmt_recovery_services_backup/restores.rb | Azure::RecoveryServicesBackup::Mgmt::V2016_06_01.Restores.trigger_with_http_info | def trigger_with_http_info(vault_name, resource_group_name, fabric_name, container_name, protected_item_name, recovery_point_id, resource_restore_request, custom_headers:nil)
trigger_async(vault_name, resource_group_name, fabric_name, container_name, protected_item_name, recovery_point_id, resource_restore_reques... | ruby | def trigger_with_http_info(vault_name, resource_group_name, fabric_name, container_name, protected_item_name, recovery_point_id, resource_restore_request, custom_headers:nil)
trigger_async(vault_name, resource_group_name, fabric_name, container_name, protected_item_name, recovery_point_id, resource_restore_reques... | [
"def",
"trigger_with_http_info",
"(",
"vault_name",
",",
"resource_group_name",
",",
"fabric_name",
",",
"container_name",
",",
"protected_item_name",
",",
"recovery_point_id",
",",
"resource_restore_request",
",",
"custom_headers",
":",
"nil",
")",
"trigger_async",
"(",
... | Restores the specified backup data. This is an asynchronous operation. To
know the status of this API call, use GetProtectedItemOperationResult API.
@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 Se... | [
"Restores",
"the",
"specified",
"backup",
"data",
".",
"This",
"is",
"an",
"asynchronous",
"operation",
".",
"To",
"know",
"the",
"status",
"of",
"this",
"API",
"call",
"use",
"GetProtectedItemOperationResult",
"API",
"."
] | 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/restores.rb#L72-L74 | train | Trigger a backup of the specified Recovery Point. | [
30522,
13366,
9495,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
11632,
1035,
2171,
1010,
7692,
1035,
2177,
1035,
2171,
1010,
8313,
1035,
2171,
1010,
11661,
1035,
2171,
1010,
5123,
1035,
8875,
1035,
2171,
1010,
7233,
1035,
2391,
1035,
8909,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
aws/aws-sdk-ruby | gems/aws-sdk-iam/lib/aws-sdk-iam/server_certificate.rb | Aws::IAM.ServerCertificate.update | def update(options = {})
options = options.merge(server_certificate_name: @name)
resp = @client.update_server_certificate(options)
ServerCertificate.new(
name: options[:new_server_certificate_name],
client: @client
)
end | ruby | def update(options = {})
options = options.merge(server_certificate_name: @name)
resp = @client.update_server_certificate(options)
ServerCertificate.new(
name: options[:new_server_certificate_name],
client: @client
)
end | [
"def",
"update",
"(",
"options",
"=",
"{",
"}",
")",
"options",
"=",
"options",
".",
"merge",
"(",
"server_certificate_name",
":",
"@name",
")",
"resp",
"=",
"@client",
".",
"update_server_certificate",
"(",
"options",
")",
"ServerCertificate",
".",
"new",
"... | @example Request syntax with placeholder values
servercertificate = server_certificate.update({
new_path: "pathType",
new_server_certificate_name: "serverCertificateNameType",
})
@param [Hash] options ({})
@option options [String] :new_path
The new path for the server certificate. Include this onl... | [
"@example",
"Request",
"syntax",
"with",
"placeholder",
"values"
] | e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d | https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-iam/lib/aws-sdk-iam/server_certificate.rb#L230-L237 | train | Update the server certificate | [
30522,
13366,
10651,
1006,
7047,
1027,
1063,
1065,
1007,
7047,
1027,
7047,
1012,
13590,
1006,
8241,
1035,
8196,
1035,
2171,
1024,
1030,
2171,
1007,
24501,
2361,
1027,
1030,
7396,
1012,
10651,
1035,
8241,
1035,
8196,
1006,
7047,
1007,
8241,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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_kusto/lib/2017-09-07-privatepreview/generated/azure_mgmt_kusto/databases.rb | Azure::Kusto::Mgmt::V2018_09_07_privatepreview.Databases.check_name_availability_with_http_info | def check_name_availability_with_http_info(resource_group_name, cluster_name, database_name, custom_headers:nil)
check_name_availability_async(resource_group_name, cluster_name, database_name, custom_headers:custom_headers).value!
end | ruby | def check_name_availability_with_http_info(resource_group_name, cluster_name, database_name, custom_headers:nil)
check_name_availability_async(resource_group_name, cluster_name, database_name, custom_headers:custom_headers).value!
end | [
"def",
"check_name_availability_with_http_info",
"(",
"resource_group_name",
",",
"cluster_name",
",",
"database_name",
",",
"custom_headers",
":",
"nil",
")",
"check_name_availability_async",
"(",
"resource_group_name",
",",
"cluster_name",
",",
"database_name",
",",
"cust... | Checks that the database name is valid and is not already in use.
@param resource_group_name [String] The name of the resource group containing
the Kusto cluster.
@param cluster_name [String] The name of the Kusto cluster.
@param database_name [DatabaseCheckNameRequest] The name of the database.
@param custom_hea... | [
"Checks",
"that",
"the",
"database",
"name",
"is",
"valid",
"and",
"is",
"not",
"already",
"in",
"use",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_kusto/lib/2017-09-07-privatepreview/generated/azure_mgmt_kusto/databases.rb#L55-L57 | train | Checks the name availability of the database. | [
30522,
13366,
4638,
1035,
2171,
1035,
11343,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
9324,
1035,
2171,
1010,
7809,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
4638,
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... |
samvera/hyrax | app/helpers/hyrax/hyrax_helper_behavior.rb | Hyrax.HyraxHelperBehavior.rights_statement_links | def rights_statement_links(options)
service = Hyrax.config.rights_statement_service_class.new
to_sentence(options[:value].map { |right| link_to service.label(right), right })
end | ruby | def rights_statement_links(options)
service = Hyrax.config.rights_statement_service_class.new
to_sentence(options[:value].map { |right| link_to service.label(right), right })
end | [
"def",
"rights_statement_links",
"(",
"options",
")",
"service",
"=",
"Hyrax",
".",
"config",
".",
"rights_statement_service_class",
".",
"new",
"to_sentence",
"(",
"options",
"[",
":value",
"]",
".",
"map",
"{",
"|",
"right",
"|",
"link_to",
"service",
".",
... | A Blacklight index field helper_method
@param [Hash] options from blacklight helper_method invocation. Maps rights statement URIs to links with labels.
@return [ActiveSupport::SafeBuffer] rights statement links, html_safe | [
"A",
"Blacklight",
"index",
"field",
"helper_method"
] | e2b4f56e829a53b1f11296324736e9d5b8c9ee5f | https://github.com/samvera/hyrax/blob/e2b4f56e829a53b1f11296324736e9d5b8c9ee5f/app/helpers/hyrax/hyrax_helper_behavior.rb#L212-L215 | train | links to the right_statement_service_class | [
30522,
13366,
2916,
1035,
4861,
1035,
6971,
1006,
7047,
1007,
2326,
1027,
1044,
19563,
2595,
1012,
9530,
8873,
2290,
1012,
2916,
1035,
4861,
1035,
2326,
1035,
2465,
1012,
2047,
2000,
1035,
6251,
1006,
7047,
1031,
1024,
3643,
1033,
1012,
4... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
sds/haml-lint | lib/haml_lint/tree/tag_node.rb | HamlLint::Tree.TagNode.attributes_source | def attributes_source
@attributes_source ||=
begin
_explicit_tag, static_attrs, rest =
source_code.scan(/\A\s*(%[-:\w]+)?([-:\w\.\#]*)(.*)/m)[0]
attr_types = {
'{' => [:hash, %w[{ }]],
'(' => [:html, %w[( )]],
'[' => [:object_ref, %w[[ ]... | ruby | def attributes_source
@attributes_source ||=
begin
_explicit_tag, static_attrs, rest =
source_code.scan(/\A\s*(%[-:\w]+)?([-:\w\.\#]*)(.*)/m)[0]
attr_types = {
'{' => [:hash, %w[{ }]],
'(' => [:html, %w[( )]],
'[' => [:object_ref, %w[[ ]... | [
"def",
"attributes_source",
"@attributes_source",
"||=",
"begin",
"_explicit_tag",
",",
"static_attrs",
",",
"rest",
"=",
"source_code",
".",
"scan",
"(",
"/",
"\\A",
"\\s",
"\\w",
"\\w",
"\\.",
"\\#",
"/m",
")",
"[",
"0",
"]",
"attr_types",
"=",
"{",
"'{'... | Returns the source code for the static and dynamic attributes
of a tag.
@example For `%tag.class{ id: 'hello' }(lang=en)`, this returns:
{ :static => '.class', :hash => " id: 'hello' ", :html => "lang=en" }
@return [Hash] | [
"Returns",
"the",
"source",
"code",
"for",
"the",
"static",
"and",
"dynamic",
"attributes",
"of",
"a",
"tag",
"."
] | 024c773667e54cf88db938c2b368977005d70ee8 | https://github.com/sds/haml-lint/blob/024c773667e54cf88db938c2b368977005d70ee8/lib/haml_lint/tree/tag_node.rb#L100-L125 | train | Returns the attributes source of the document. | [
30522,
13366,
12332,
1035,
3120,
1030,
12332,
1035,
3120,
1064,
1064,
1027,
4088,
1035,
13216,
1035,
6415,
1010,
10763,
1035,
2012,
16344,
2015,
1010,
2717,
1027,
3120,
1035,
3642,
1012,
13594,
1006,
1013,
1032,
1037,
1032,
1055,
1008,
3052... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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_operational_insights/lib/2015-11-01-preview/generated/azure_mgmt_operational_insights/linked_services.rb | Azure::OperationalInsights::Mgmt::V2015_11_01_preview.LinkedServices.delete_with_http_info | def delete_with_http_info(resource_group_name, workspace_name, linked_service_name, custom_headers:nil)
delete_async(resource_group_name, workspace_name, linked_service_name, custom_headers:custom_headers).value!
end | ruby | def delete_with_http_info(resource_group_name, workspace_name, linked_service_name, custom_headers:nil)
delete_async(resource_group_name, workspace_name, linked_service_name, custom_headers:custom_headers).value!
end | [
"def",
"delete_with_http_info",
"(",
"resource_group_name",
",",
"workspace_name",
",",
"linked_service_name",
",",
"custom_headers",
":",
"nil",
")",
"delete_async",
"(",
"resource_group_name",
",",
"workspace_name",
",",
"linked_service_name",
",",
"custom_headers",
":c... | Deletes a linked service instance.
@param resource_group_name [String] The name of the resource group to get.
The name is case insensitive.
@param workspace_name [String] Name of the Log Analytics Workspace that
contains the linkedServices resource
@param linked_service_name [String] Name of the linked service.
... | [
"Deletes",
"a",
"linked",
"service",
"instance",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_operational_insights/lib/2015-11-01-preview/generated/azure_mgmt_operational_insights/linked_services.rb#L183-L185 | train | Deletes a linked service specification from the specified workspace. | [
30522,
13366,
3972,
12870,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2573,
15327,
1035,
2171,
1010,
5799,
1035,
2326,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3972,
12870,
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... |
ruby-i18n/i18n | lib/i18n/config.rb | I18n.Config.missing_interpolation_argument_handler | def missing_interpolation_argument_handler
@@missing_interpolation_argument_handler ||= lambda do |missing_key, provided_hash, string|
raise MissingInterpolationArgument.new(missing_key, provided_hash, string)
end
end | ruby | def missing_interpolation_argument_handler
@@missing_interpolation_argument_handler ||= lambda do |missing_key, provided_hash, string|
raise MissingInterpolationArgument.new(missing_key, provided_hash, string)
end
end | [
"def",
"missing_interpolation_argument_handler",
"@@missing_interpolation_argument_handler",
"||=",
"lambda",
"do",
"|",
"missing_key",
",",
"provided_hash",
",",
"string",
"|",
"raise",
"MissingInterpolationArgument",
".",
"new",
"(",
"missing_key",
",",
"provided_hash",
"... | Returns the current handler for situations when interpolation argument
is missing. MissingInterpolationArgument will be raised by default. | [
"Returns",
"the",
"current",
"handler",
"for",
"situations",
"when",
"interpolation",
"argument",
"is",
"missing",
".",
"MissingInterpolationArgument",
"will",
"be",
"raised",
"by",
"default",
"."
] | 0c5dab494d9b043e00662d8e789229c33045c024 | https://github.com/ruby-i18n/i18n/blob/0c5dab494d9b043e00662d8e789229c33045c024/lib/i18n/config.rb#L97-L101 | train | Returns a handler for missing interpolation arguments | [
30522,
13366,
4394,
1035,
6970,
18155,
3370,
1035,
6685,
1035,
28213,
1030,
1030,
4394,
1035,
6970,
18155,
3370,
1035,
6685,
1035,
28213,
1064,
1064,
1027,
23375,
2079,
1064,
4394,
1035,
3145,
1010,
3024,
1035,
23325,
1010,
5164,
1064,
5333... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
aws/aws-sdk-ruby | gems/aws-sdk-autoscaling/lib/aws-sdk-autoscaling/load_balancer.rb | Aws::AutoScaling.LoadBalancer.attach | def attach(options = {})
options = Aws::Util.deep_merge(options,
auto_scaling_group_name: @group_name,
load_balancer_names: [@name]
)
resp = @client.attach_load_balancers(options)
resp.data
end | ruby | def attach(options = {})
options = Aws::Util.deep_merge(options,
auto_scaling_group_name: @group_name,
load_balancer_names: [@name]
)
resp = @client.attach_load_balancers(options)
resp.data
end | [
"def",
"attach",
"(",
"options",
"=",
"{",
"}",
")",
"options",
"=",
"Aws",
"::",
"Util",
".",
"deep_merge",
"(",
"options",
",",
"auto_scaling_group_name",
":",
"@group_name",
",",
"load_balancer_names",
":",
"[",
"@name",
"]",
")",
"resp",
"=",
"@client"... | @!group Actions
@example Request syntax with placeholder values
load_balancer.attach()
@param [Hash] options ({})
@return [Types::AttachLoadBalancersResultType] | [
"@!group",
"Actions",
"@example",
"Request",
"syntax",
"with",
"placeholder",
"values"
] | e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d | https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-autoscaling/lib/aws-sdk-autoscaling/load_balancer.rb#L197-L204 | train | Attach the load balancer to this auto - scaling group | [
30522,
13366,
22476,
1006,
7047,
1027,
1063,
1065,
1007,
7047,
1027,
22091,
2015,
1024,
1024,
21183,
4014,
1012,
2784,
1035,
13590,
1006,
7047,
1010,
8285,
1035,
25169,
1035,
2177,
1035,
2171,
1024,
1030,
2177,
1035,
2171,
1010,
7170,
1035,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_network/lib/2018-10-01/generated/azure_mgmt_network/packet_captures.rb | Azure::Network::Mgmt::V2018_10_01.PacketCaptures.begin_stop | def begin_stop(resource_group_name, network_watcher_name, packet_capture_name, custom_headers:nil)
response = begin_stop_async(resource_group_name, network_watcher_name, packet_capture_name, custom_headers:custom_headers).value!
nil
end | ruby | def begin_stop(resource_group_name, network_watcher_name, packet_capture_name, custom_headers:nil)
response = begin_stop_async(resource_group_name, network_watcher_name, packet_capture_name, custom_headers:custom_headers).value!
nil
end | [
"def",
"begin_stop",
"(",
"resource_group_name",
",",
"network_watcher_name",
",",
"packet_capture_name",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"begin_stop_async",
"(",
"resource_group_name",
",",
"network_watcher_name",
",",
"packet_capture_name",
",",... | Stops a specified packet capture session.
@param resource_group_name [String] The name of the resource group.
@param network_watcher_name [String] The name of the network watcher.
@param packet_capture_name [String] The name of the packet capture session.
@param custom_headers [Hash{String => String}] A hash of cu... | [
"Stops",
"a",
"specified",
"packet",
"capture",
"session",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_network/lib/2018-10-01/generated/azure_mgmt_network/packet_captures.rb#L596-L599 | train | Stops the specified packet capture. | [
30522,
13366,
4088,
1035,
2644,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2897,
1035,
3422,
2121,
1035,
2171,
30524,
5425,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
7661,
1035,
20346,
2015,
1007,
1012,
3643,
999,
9152,
2140,
2203,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
github/linguist | samples/Ruby/sinatra.rb | Sinatra.Base.static! | def static!
return if (public_dir = settings.public_folder).nil?
public_dir = File.expand_path(public_dir)
path = File.expand_path(public_dir + unescape(request.path_info))
return unless path.start_with?(public_dir) and File.file?(path)
env['sinatra.static_file'] = path
cache_contr... | ruby | def static!
return if (public_dir = settings.public_folder).nil?
public_dir = File.expand_path(public_dir)
path = File.expand_path(public_dir + unescape(request.path_info))
return unless path.start_with?(public_dir) and File.file?(path)
env['sinatra.static_file'] = path
cache_contr... | [
"def",
"static!",
"return",
"if",
"(",
"public_dir",
"=",
"settings",
".",
"public_folder",
")",
".",
"nil?",
"public_dir",
"=",
"File",
".",
"expand_path",
"(",
"public_dir",
")",
"path",
"=",
"File",
".",
"expand_path",
"(",
"public_dir",
"+",
"unescape",
... | Attempt to serve static files from public directory. Throws :halt when
a matching file is found, returns nil otherwise. | [
"Attempt",
"to",
"serve",
"static",
"files",
"from",
"public",
"directory",
".",
"Throws",
":",
"halt",
"when",
"a",
"matching",
"file",
"is",
"found",
"returns",
"nil",
"otherwise",
"."
] | 9116c90fcbb82ac03b4b33c58cfbde1fcf745e99 | https://github.com/github/linguist/blob/9116c90fcbb82ac03b4b33c58cfbde1fcf745e99/samples/Ruby/sinatra.rb#L899-L909 | train | send static file | [
30522,
13366,
10763,
999,
2709,
2065,
1006,
2270,
1035,
16101,
1027,
10906,
1012,
2270,
1035,
19622,
1007,
1012,
9152,
2140,
1029,
2270,
1035,
16101,
1027,
5371,
1012,
7818,
1035,
4130,
1006,
2270,
1035,
16101,
1007,
4130,
1027,
5371,
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... |
rails/rails | actionview/lib/action_view/rendering.rb | ActionView.Rendering._normalize_args | def _normalize_args(action = nil, options = {})
options = super(action, options)
case action
when NilClass
when Hash
options = action
when String, Symbol
action = action.to_s
key = action.include?(?/) ? :template : :action
options[key] = ac... | ruby | def _normalize_args(action = nil, options = {})
options = super(action, options)
case action
when NilClass
when Hash
options = action
when String, Symbol
action = action.to_s
key = action.include?(?/) ? :template : :action
options[key] = ac... | [
"def",
"_normalize_args",
"(",
"action",
"=",
"nil",
",",
"options",
"=",
"{",
"}",
")",
"options",
"=",
"super",
"(",
"action",
",",
"options",
")",
"case",
"action",
"when",
"NilClass",
"when",
"Hash",
"options",
"=",
"action",
"when",
"String",
",",
... | Normalize args by converting render "foo" to render :action => "foo" and
render "foo/bar" to render :template => "foo/bar". | [
"Normalize",
"args",
"by",
"converting",
"render",
"foo",
"to",
"render",
":",
"action",
"=",
">",
"foo",
"and",
"render",
"foo",
"/",
"bar",
"to",
"render",
":",
"template",
"=",
">",
"foo",
"/",
"bar",
"."
] | 85a8bc644be69908f05740a5886ec19cd3679df5 | https://github.com/rails/rails/blob/85a8bc644be69908f05740a5886ec19cd3679df5/actionview/lib/action_view/rendering.rb#L135-L154 | train | Normalize the arguments for the action | [
30522,
13366,
1035,
3671,
4697,
1035,
12098,
5620,
1006,
2895,
1027,
9152,
2140,
1010,
7047,
1027,
1063,
1065,
1007,
7047,
1027,
3565,
1006,
2895,
1010,
7047,
1007,
2553,
2895,
2043,
9152,
15472,
27102,
2043,
23325,
7047,
1027,
2895,
2043,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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.reload | def reload(options = nil)
self.class.connection.clear_query_cache
fresh_object =
if options && options[:lock]
self.class.unscoped { self.class.lock(options[:lock]).find(id) }
else
self.class.unscoped { self.class.find(id) }
end
@attributes = fresh_object.i... | ruby | def reload(options = nil)
self.class.connection.clear_query_cache
fresh_object =
if options && options[:lock]
self.class.unscoped { self.class.lock(options[:lock]).find(id) }
else
self.class.unscoped { self.class.find(id) }
end
@attributes = fresh_object.i... | [
"def",
"reload",
"(",
"options",
"=",
"nil",
")",
"self",
".",
"class",
".",
"connection",
".",
"clear_query_cache",
"fresh_object",
"=",
"if",
"options",
"&&",
"options",
"[",
":lock",
"]",
"self",
".",
"class",
".",
"unscoped",
"{",
"self",
".",
"class... | Reloads the record from the database.
This method finds the record by its primary key (which could be assigned
manually) and modifies the receiver in-place:
account = Account.new
# => #<Account id: nil, email: nil>
account.id = 1
account.reload
# Account Load (1.2ms) SELECT "accounts".* FROM "accoun... | [
"Reloads",
"the",
"record",
"from",
"the",
"database",
"."
] | 85a8bc644be69908f05740a5886ec19cd3679df5 | https://github.com/rails/rails/blob/85a8bc644be69908f05740a5886ec19cd3679df5/activerecord/lib/active_record/persistence.rb#L802-L815 | train | Reloads the record from the database. | [
30522,
13366,
2128,
11066,
1006,
7047,
1027,
9152,
2140,
1007,
2969,
1012,
2465,
1012,
4434,
1012,
3154,
1035,
23032,
1035,
17053,
4840,
1035,
4874,
1027,
2065,
7047,
1004,
1004,
7047,
1031,
1024,
5843,
1033,
2969,
1012,
2465,
1012,
4895,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
tongueroo/jets | lib/jets/aws_services/stack_status.rb | Jets::AwsServices.StackStatus.stack_in_progress? | def stack_in_progress?(stack_name)
return true if !stack_exists?(stack_name)
# Assumes stack exists
resp = cfn.describe_stacks(stack_name: stack_name)
status = resp.stacks[0].stack_status
if status =~ /_IN_PROGRESS$/
puts "The '#{stack_name}' stack status is #{status}. " \
... | ruby | def stack_in_progress?(stack_name)
return true if !stack_exists?(stack_name)
# Assumes stack exists
resp = cfn.describe_stacks(stack_name: stack_name)
status = resp.stacks[0].stack_status
if status =~ /_IN_PROGRESS$/
puts "The '#{stack_name}' stack status is #{status}. " \
... | [
"def",
"stack_in_progress?",
"(",
"stack_name",
")",
"return",
"true",
"if",
"!",
"stack_exists?",
"(",
"stack_name",
")",
"# Assumes stack exists",
"resp",
"=",
"cfn",
".",
"describe_stacks",
"(",
"stack_name",
":",
"stack_name",
")",
"status",
"=",
"resp",
"."... | All CloudFormation states listed here: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-describing-stacks.html
Returns resp so we can use it to grab data about the stack without calling api again. | [
"All",
"CloudFormation",
"states",
"listed",
"here",
":",
"http",
":",
"//",
"docs",
".",
"aws",
".",
"amazon",
".",
"com",
"/",
"AWSCloudFormation",
"/",
"latest",
"/",
"UserGuide",
"/",
"using",
"-",
"cfn",
"-",
"describing",
"-",
"stacks",
".",
"html"... | 46943a519224067e58aa3e2d5656e3ca083150f9 | https://github.com/tongueroo/jets/blob/46943a519224067e58aa3e2d5656e3ca083150f9/lib/jets/aws_services/stack_status.rb#L31-L50 | train | Returns true if the stack is in progress | [
30522,
13366,
9991,
1035,
1999,
1035,
5082,
1029,
1006,
9991,
1035,
2171,
1007,
2709,
2995,
2065,
999,
9991,
1035,
6526,
1029,
1006,
9991,
1035,
2171,
1007,
1001,
15980,
9991,
6526,
24501,
2361,
1027,
12935,
2078,
1012,
6235,
1035,
20829,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_stor_simple8000_series/lib/2017-06-01/generated/azure_mgmt_stor_simple8000_series/hardware_component_groups.rb | Azure::StorSimple8000Series::Mgmt::V2017_06_01.HardwareComponentGroups.begin_change_controller_power_state_with_http_info | def begin_change_controller_power_state_with_http_info(device_name, hardware_component_group_name, parameters, resource_group_name, manager_name, custom_headers:nil)
begin_change_controller_power_state_async(device_name, hardware_component_group_name, parameters, resource_group_name, manager_name, custom_headers:... | ruby | def begin_change_controller_power_state_with_http_info(device_name, hardware_component_group_name, parameters, resource_group_name, manager_name, custom_headers:nil)
begin_change_controller_power_state_async(device_name, hardware_component_group_name, parameters, resource_group_name, manager_name, custom_headers:... | [
"def",
"begin_change_controller_power_state_with_http_info",
"(",
"device_name",
",",
"hardware_component_group_name",
",",
"parameters",
",",
"resource_group_name",
",",
"manager_name",
",",
"custom_headers",
":",
"nil",
")",
"begin_change_controller_power_state_async",
"(",
"... | Changes the power state of the controller.
@param device_name [String] The device name
@param hardware_component_group_name [String] The hardware component group
name.
@param parameters [ControllerPowerStateChangeRequest] The controller power
state change request.
@param resource_group_name [String] The resource... | [
"Changes",
"the",
"power",
"state",
"of",
"the",
"controller",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_stor_simple8000_series/lib/2017-06-01/generated/azure_mgmt_stor_simple8000_series/hardware_component_groups.rb#L204-L206 | train | Change controller power state of the hardware component. | [
30522,
13366,
4088,
1035,
2689,
1035,
11486,
1035,
2373,
1035,
2110,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
5080,
1035,
2171,
1010,
8051,
1035,
6922,
1035,
2177,
1035,
2171,
1010,
11709,
1010,
7692,
1035,
2177,
1035,
2171,
1010,
3208,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
rmagick/rmagick | lib/rmagick_internal.rb | Magick.Draw.circle | def circle(origin_x, origin_y, perim_x, perim_y)
primitive 'circle ' + format('%g,%g %g,%g', origin_x, origin_y, perim_x, perim_y)
end | ruby | def circle(origin_x, origin_y, perim_x, perim_y)
primitive 'circle ' + format('%g,%g %g,%g', origin_x, origin_y, perim_x, perim_y)
end | [
"def",
"circle",
"(",
"origin_x",
",",
"origin_y",
",",
"perim_x",
",",
"perim_y",
")",
"primitive",
"'circle '",
"+",
"format",
"(",
"'%g,%g %g,%g'",
",",
"origin_x",
",",
"origin_y",
",",
"perim_x",
",",
"perim_y",
")",
"end"
] | Draw a circle | [
"Draw",
"a",
"circle"
] | ef6688ed9d76bf123c2ea1a483eff8635051adb7 | https://github.com/rmagick/rmagick/blob/ef6688ed9d76bf123c2ea1a483eff8635051adb7/lib/rmagick_internal.rb#L249-L251 | train | Returns a circle primitive. | [
30522,
13366,
4418,
1006,
4761,
1035,
1060,
1010,
4761,
1035,
1061,
1010,
2566,
5714,
1035,
1060,
1010,
2566,
5714,
1035,
1061,
1007,
10968,
1005,
4418,
1005,
1009,
4289,
1006,
1005,
1003,
1043,
1010,
1003,
1043,
1003,
30524,
0,
0,
0,
0... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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.call_hook_safe | def call_hook_safe(key)
hook = self.get_hook(key)
if hook
# provides hook with model and controller
hook.call(self, PublicActivity.get_controller)
else
true
end
end | ruby | def call_hook_safe(key)
hook = self.get_hook(key)
if hook
# provides hook with model and controller
hook.call(self, PublicActivity.get_controller)
else
true
end
end | [
"def",
"call_hook_safe",
"(",
"key",
")",
"hook",
"=",
"self",
".",
"get_hook",
"(",
"key",
")",
"if",
"hook",
"# provides hook with model and controller",
"hook",
".",
"call",
"(",
"self",
",",
"PublicActivity",
".",
"get_controller",
")",
"else",
"true",
"en... | Calls hook safely.
If a hook for given action exists, calls it with model (self) and
controller (if available, see {StoreController})
@param key (see #get_hook)
@return [Boolean] if hook exists, it's decision, if there's no hook, true
@since 0.4.0
@api private | [
"Calls",
"hook",
"safely",
".",
"If",
"a",
"hook",
"for",
"given",
"action",
"exists",
"calls",
"it",
"with",
"model",
"(",
"self",
")",
"and",
"controller",
"(",
"if",
"available",
"see",
"{",
"StoreController",
"}",
")"
] | e4357cd14db67299e0cbbd656300f51b7069ea9b | https://github.com/chaps-io/public_activity/blob/e4357cd14db67299e0cbbd656300f51b7069ea9b/lib/public_activity/common.rb#L183-L191 | train | Calls the hook if it exists | [
30522,
13366,
2655,
1035,
8103,
1035,
3647,
1006,
3145,
1007,
8103,
1027,
2969,
1012,
2131,
1035,
8103,
1006,
3145,
1007,
2065,
8103,
1001,
3640,
8103,
2007,
2944,
1998,
11486,
8103,
1012,
2655,
1006,
2969,
1010,
2270,
18908,
7730,
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... |
refile/refile | lib/refile/attachment.rb | Refile.Attachment.accepts_attachments_for | def accepts_attachments_for(collection_name, collection_class:, accessor_prefix:, attachment: :file, append: false)
include MultipleAttachments.new(
collection_name,
collection_class: collection_class,
name: accessor_prefix,
attachment: attachment,
append: append
)
... | ruby | def accepts_attachments_for(collection_name, collection_class:, accessor_prefix:, attachment: :file, append: false)
include MultipleAttachments.new(
collection_name,
collection_class: collection_class,
name: accessor_prefix,
attachment: attachment,
append: append
)
... | [
"def",
"accepts_attachments_for",
"(",
"collection_name",
",",
"collection_class",
":",
",",
"accessor_prefix",
":",
",",
"attachment",
":",
":file",
",",
"append",
":",
"false",
")",
"include",
"MultipleAttachments",
".",
"new",
"(",
"collection_name",
",",
"coll... | Macro which generates accessors in pure Ruby classes for assigning
multiple attachments at once. This is primarily useful together with
multiple file uploads. There is also an Active Record version of
this macro.
The name of the generated accessors will be the name of the association
(represented by an attribute ... | [
"Macro",
"which",
"generates",
"accessors",
"in",
"pure",
"Ruby",
"classes",
"for",
"assigning",
"multiple",
"attachments",
"at",
"once",
".",
"This",
"is",
"primarily",
"useful",
"together",
"with",
"multiple",
"file",
"uploads",
".",
"There",
"is",
"also",
"... | e910f5ca5a9060c307bd0a5e813f1fec73219ed5 | https://github.com/refile/refile/blob/e910f5ca5a9060c307bd0a5e813f1fec73219ed5/lib/refile/attachment.rb#L156-L164 | train | Accepts multiple attachments for a collection | [
30522,
13366,
13385,
1035,
14449,
2015,
1035,
2005,
1006,
3074,
1035,
2171,
1010,
3074,
1035,
2465,
1024,
1010,
3229,
2953,
1035,
17576,
1024,
1010,
14449,
1024,
1024,
5371,
1010,
10439,
10497,
1024,
6270,
1007,
2421,
3674,
19321,
6776,
816... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
kaminari/kaminari | kaminari-activerecord/lib/kaminari/activerecord/active_record_relation_methods.rb | Kaminari.PaginatableWithoutCount.load | def load
if loaded? || limit_value.nil?
super
else
@values[:limit] = limit_value + 1
# FIXME: this could be removed when we're dropping AR 4 support
@arel.limit = @values[:limit] if @arel && (Integer === @arel.limit)
super
@values[:limit] = limit_value - 1
... | ruby | def load
if loaded? || limit_value.nil?
super
else
@values[:limit] = limit_value + 1
# FIXME: this could be removed when we're dropping AR 4 support
@arel.limit = @values[:limit] if @arel && (Integer === @arel.limit)
super
@values[:limit] = limit_value - 1
... | [
"def",
"load",
"if",
"loaded?",
"||",
"limit_value",
".",
"nil?",
"super",
"else",
"@values",
"[",
":limit",
"]",
"=",
"limit_value",
"+",
"1",
"# FIXME: this could be removed when we're dropping AR 4 support",
"@arel",
".",
"limit",
"=",
"@values",
"[",
":limit",
... | Overwrite AR::Relation#load to actually load one more record to judge if the page has next page
then store the result in @_has_next ivar | [
"Overwrite",
"AR",
"::",
"Relation#load",
"to",
"actually",
"load",
"one",
"more",
"record",
"to",
"judge",
"if",
"the",
"page",
"has",
"next",
"page",
"then",
"store",
"the",
"result",
"in"
] | e2078ce46b145b811423dc8b5993e4bc87dc88b8 | https://github.com/kaminari/kaminari/blob/e2078ce46b145b811423dc8b5993e4bc87dc88b8/kaminari-activerecord/lib/kaminari/activerecord/active_record_relation_methods.rb#L56-L76 | train | Load the record list | [
30522,
13366,
7170,
2065,
8209,
1029,
1064,
1064,
5787,
1035,
3643,
1012,
9152,
2140,
1029,
3565,
2842,
1030,
5300,
1031,
1024,
5787,
1033,
1027,
5787,
1035,
30524,
5787,
1007,
3565,
1030,
5300,
1031,
1024,
5787,
1033,
1027,
5787,
1035,
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... |
github-changelog-generator/github-changelog-generator | lib/github_changelog_generator/generator/generator_tags.rb | GitHubChangelogGenerator.Generator.sort_tags_by_date | def sort_tags_by_date(tags)
puts "Sorting tags..." if options[:verbose]
tags.sort_by! do |x|
get_time_of_tag(x)
end.reverse!
end | ruby | def sort_tags_by_date(tags)
puts "Sorting tags..." if options[:verbose]
tags.sort_by! do |x|
get_time_of_tag(x)
end.reverse!
end | [
"def",
"sort_tags_by_date",
"(",
"tags",
")",
"puts",
"\"Sorting tags...\"",
"if",
"options",
"[",
":verbose",
"]",
"tags",
".",
"sort_by!",
"do",
"|",
"x",
"|",
"get_time_of_tag",
"(",
"x",
")",
"end",
".",
"reverse!",
"end"
] | rubocop:enable Style/For
Sort all tags by date, newest to oldest | [
"rubocop",
":",
"enable",
"Style",
"/",
"For",
"Sort",
"all",
"tags",
"by",
"date",
"newest",
"to",
"oldest"
] | f18c64b5cc0d7473b059275b88385ac11ca8b564 | https://github.com/github-changelog-generator/github-changelog-generator/blob/f18c64b5cc0d7473b059275b88385ac11ca8b564/lib/github_changelog_generator/generator/generator_tags.rb#L54-L59 | train | Sort the tags by the date of the first tag | [
30522,
13366,
4066,
1035,
22073,
1035,
2011,
1035,
3058,
1006,
22073,
1007,
8509,
1000,
22210,
22073,
1012,
1012,
1012,
1000,
2065,
7047,
1031,
1024,
12034,
9232,
1033,
22073,
1012,
4066,
1035,
2011,
999,
2079,
1064,
1060,
1064,
2131,
1035,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | data/azure_key_vault/lib/2015-06-01/generated/azure_key_vault/key_vault_client.rb | Azure::KeyVault::V2015_06_01.KeyVaultClient.create_key_with_http_info | def create_key_with_http_info(vault_base_url, key_name, kty, key_size:nil, key_ops:nil, key_attributes:nil, tags:nil, custom_headers:nil)
create_key_async(vault_base_url, key_name, kty, key_size:key_size, key_ops:key_ops, key_attributes:key_attributes, tags:tags, custom_headers:custom_headers).value!
end | ruby | def create_key_with_http_info(vault_base_url, key_name, kty, key_size:nil, key_ops:nil, key_attributes:nil, tags:nil, custom_headers:nil)
create_key_async(vault_base_url, key_name, kty, key_size:key_size, key_ops:key_ops, key_attributes:key_attributes, tags:tags, custom_headers:custom_headers).value!
end | [
"def",
"create_key_with_http_info",
"(",
"vault_base_url",
",",
"key_name",
",",
"kty",
",",
"key_size",
":",
"nil",
",",
"key_ops",
":",
"nil",
",",
"key_attributes",
":",
"nil",
",",
"tags",
":",
"nil",
",",
"custom_headers",
":",
"nil",
")",
"create_key_a... | Creates a new, named, key in the specified vault.
@param vault_base_url [String] The vault name, e.g.
https://myvault.vault.azure.net
@param key_name [String] The name of the key
@param kty [JsonWebKeyType] The type of key to create. Valid key types, see
JsonWebKeyType. Supported JsonWebKey key types (kty) for El... | [
"Creates",
"a",
"new",
"named",
"key",
"in",
"the",
"specified",
"vault",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_key_vault/lib/2015-06-01/generated/azure_key_vault/key_vault_client.rb#L155-L157 | train | Creates a key in the specified vault. | [
30522,
13366,
3443,
1035,
3145,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
11632,
1035,
2918,
1035,
24471,
2140,
1010,
3145,
1035,
2171,
1010,
1047,
3723,
1010,
3145,
1035,
2946,
1024,
9152,
2140,
1010,
3145,
1035,
23092,
1024,
9152,
2140,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_sqlvirtualmachine/lib/2017-03-01-preview/generated/azure_mgmt_sqlvirtualmachine/availability_group_listeners.rb | Azure::Sqlvirtualmachine::Mgmt::V2017_03_01_preview.AvailabilityGroupListeners.list_by_group | def list_by_group(resource_group_name, sql_virtual_machine_group_name, custom_headers:nil)
first_page = list_by_group_as_lazy(resource_group_name, sql_virtual_machine_group_name, custom_headers:custom_headers)
first_page.get_all_items
end | ruby | def list_by_group(resource_group_name, sql_virtual_machine_group_name, custom_headers:nil)
first_page = list_by_group_as_lazy(resource_group_name, sql_virtual_machine_group_name, custom_headers:custom_headers)
first_page.get_all_items
end | [
"def",
"list_by_group",
"(",
"resource_group_name",
",",
"sql_virtual_machine_group_name",
",",
"custom_headers",
":",
"nil",
")",
"first_page",
"=",
"list_by_group_as_lazy",
"(",
"resource_group_name",
",",
"sql_virtual_machine_group_name",
",",
"custom_headers",
":custom_he... | Lists all availability group listeners in a SQL virtual machine group.
@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
mach... | [
"Lists",
"all",
"availability",
"group",
"listeners",
"in",
"a",
"SQL",
"virtual",
"machine",
"group",
"."
] | 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#L253-L256 | train | Gets all the SQL virtual machine groups in a SQL virtual machine group. | [
30522,
13366,
2862,
1035,
2011,
1035,
2177,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
29296,
1035,
7484,
1035,
3698,
1035,
2177,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
2034,
1035,
3931,
1027,
2862,
1035,
2011,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_compute/lib/2017-12-01/generated/azure_mgmt_compute/virtual_machine_scale_set_vms.rb | Azure::Compute::Mgmt::V2017_12_01.VirtualMachineScaleSetVMs.begin_redeploy_with_http_info | def begin_redeploy_with_http_info(resource_group_name, vm_scale_set_name, instance_id, custom_headers:nil)
begin_redeploy_async(resource_group_name, vm_scale_set_name, instance_id, custom_headers:custom_headers).value!
end | ruby | def begin_redeploy_with_http_info(resource_group_name, vm_scale_set_name, instance_id, custom_headers:nil)
begin_redeploy_async(resource_group_name, vm_scale_set_name, instance_id, custom_headers:custom_headers).value!
end | [
"def",
"begin_redeploy_with_http_info",
"(",
"resource_group_name",
",",
"vm_scale_set_name",
",",
"instance_id",
",",
"custom_headers",
":",
"nil",
")",
"begin_redeploy_async",
"(",
"resource_group_name",
",",
"vm_scale_set_name",
",",
"instance_id",
",",
"custom_headers",... | Redeploys a virtual machine in a VM scale set.
@param resource_group_name [String] The name of the resource group.
@param vm_scale_set_name [String] The name of the VM scale set.
@param instance_id [String] The instance ID of the virtual machine.
@param custom_headers [Hash{String => String}] A hash of custom head... | [
"Redeploys",
"a",
"virtual",
"machine",
"in",
"a",
"VM",
"scale",
"set",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_compute/lib/2017-12-01/generated/azure_mgmt_compute/virtual_machine_scale_set_vms.rb#L1613-L1615 | train | Redeploy a virtual machine in a VM scale set. | [
30522,
13366,
4088,
1035,
2417,
13699,
4135,
2100,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
1058,
2213,
1035,
4094,
1035,
2275,
1035,
2171,
1010,
6013,
1035,
8909,
1010,
7661,
1035,
20346,
2015,
1024,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
rails/rails | activemodel/lib/active_model/errors.rb | ActiveModel.Errors.generate_message | def generate_message(attribute, type = :invalid, options = {})
type = options.delete(:message) if options[:message].is_a?(Symbol)
value = (attribute != :base ? @base.send(:read_attribute_for_validation, attribute) : nil)
options = {
model: @base.model_name.human,
attribute: @base.clas... | ruby | def generate_message(attribute, type = :invalid, options = {})
type = options.delete(:message) if options[:message].is_a?(Symbol)
value = (attribute != :base ? @base.send(:read_attribute_for_validation, attribute) : nil)
options = {
model: @base.model_name.human,
attribute: @base.clas... | [
"def",
"generate_message",
"(",
"attribute",
",",
"type",
"=",
":invalid",
",",
"options",
"=",
"{",
"}",
")",
"type",
"=",
"options",
".",
"delete",
"(",
":message",
")",
"if",
"options",
"[",
":message",
"]",
".",
"is_a?",
"(",
"Symbol",
")",
"value"... | Translates an error message in its default scope
(<tt>activemodel.errors.messages</tt>).
Error messages are first looked up in <tt>activemodel.errors.models.MODEL.attributes.ATTRIBUTE.MESSAGE</tt>,
if it's not there, it's looked up in <tt>activemodel.errors.models.MODEL.MESSAGE</tt> and if
that is not there also, ... | [
"Translates",
"an",
"error",
"message",
"in",
"its",
"default",
"scope",
"(",
"<tt",
">",
"activemodel",
".",
"errors",
".",
"messages<",
"/",
"tt",
">",
")",
"."
] | 85a8bc644be69908f05740a5886ec19cd3679df5 | https://github.com/rails/rails/blob/85a8bc644be69908f05740a5886ec19cd3679df5/activemodel/lib/active_model/errors.rb#L538-L573 | train | Generate a message for the given attribute. | [
30522,
13366,
9699,
1035,
4471,
1006,
17961,
1010,
2828,
1027,
1024,
19528,
1010,
7047,
1027,
1063,
1065,
1007,
2828,
1027,
7047,
1012,
3972,
12870,
1006,
1024,
4471,
1007,
2065,
7047,
1031,
1024,
4471,
1033,
1012,
2003,
1035,
1037,
1029,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
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.resume_next | def resume_next(next_page_link, custom_headers:nil)
response = resume_next_async(next_page_link, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def resume_next(next_page_link, custom_headers:nil)
response = resume_next_async(next_page_link, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"resume_next",
"(",
"next_page_link",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"resume_next_async",
"(",
"next_page_link",
",",
"custom_headers",
":custom_headers",
")",
".",
"value!",
"response",
".",
"body",
"unless",
"response",
".",
"nil... | Resume an App Service Environment.
Resume an App Service Environment.
@param next_page_link [String] The NextLink from the previous successful call
to List operation.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request.
@return [WebAppCollection] opera... | [
"Resume",
"an",
"App",
"Service",
"Environment",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_web/lib/2018-02-01/generated/azure_mgmt_web/app_service_environments.rb#L6090-L6093 | train | Resumes a collection of image files. | [
30522,
13366,
13746,
1035,
2279,
1006,
2279,
1035,
3931,
1035,
4957,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
13746,
1035,
2279,
1035,
2004,
6038,
2278,
1006,
2279,
1035,
3931,
1035,
4957,
1010,
7661,
1035,
20346,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
aws/aws-sdk-ruby | gems/aws-sdk-rds/lib/aws-sdk-rds/db_snapshot.rb | Aws::RDS.DBSnapshot.delete | def delete(options = {})
options = options.merge(db_snapshot_identifier: @snapshot_id)
resp = @client.delete_db_snapshot(options)
DBSnapshot.new(
instance_id: resp.data.db_snapshot.db_instance_identifier,
snapshot_id: resp.data.db_snapshot.db_snapshot_identifier,
data: resp.dat... | ruby | def delete(options = {})
options = options.merge(db_snapshot_identifier: @snapshot_id)
resp = @client.delete_db_snapshot(options)
DBSnapshot.new(
instance_id: resp.data.db_snapshot.db_instance_identifier,
snapshot_id: resp.data.db_snapshot.db_snapshot_identifier,
data: resp.dat... | [
"def",
"delete",
"(",
"options",
"=",
"{",
"}",
")",
"options",
"=",
"options",
".",
"merge",
"(",
"db_snapshot_identifier",
":",
"@snapshot_id",
")",
"resp",
"=",
"@client",
".",
"delete_db_snapshot",
"(",
"options",
")",
"DBSnapshot",
".",
"new",
"(",
"i... | @example Request syntax with placeholder values
db_snapshot.delete()
@param [Hash] options ({})
@return [DBSnapshot] | [
"@example",
"Request",
"syntax",
"with",
"placeholder",
"values"
] | e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d | https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-rds/lib/aws-sdk-rds/db_snapshot.rb#L524-L533 | train | Delete a snapshot | [
30522,
13366,
3972,
12870,
1006,
7047,
1027,
1063,
1065,
1007,
7047,
1027,
7047,
1012,
13590,
1006,
16962,
1035,
20057,
12326,
1035,
8909,
4765,
18095,
1024,
1030,
20057,
12326,
1035,
8909,
1007,
24501,
2361,
1027,
1030,
7396,
1012,
3972,
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_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/notification_recipient_user.rb | Azure::ApiManagement::Mgmt::V2018_01_01.NotificationRecipientUser.list_by_notification_with_http_info | def list_by_notification_with_http_info(resource_group_name, service_name, notification_name, custom_headers:nil)
list_by_notification_async(resource_group_name, service_name, notification_name, custom_headers:custom_headers).value!
end | ruby | def list_by_notification_with_http_info(resource_group_name, service_name, notification_name, custom_headers:nil)
list_by_notification_async(resource_group_name, service_name, notification_name, custom_headers:custom_headers).value!
end | [
"def",
"list_by_notification_with_http_info",
"(",
"resource_group_name",
",",
"service_name",
",",
"notification_name",
",",
"custom_headers",
":",
"nil",
")",
"list_by_notification_async",
"(",
"resource_group_name",
",",
"service_name",
",",
"notification_name",
",",
"cu... | Gets the list of the Notification Recipient User subscribed to the
notification.
@param resource_group_name [String] The name of the resource group.
@param service_name [String] The name of the API Management service.
@param notification_name [NotificationName] Notification Name Identifier.
Possible values includ... | [
"Gets",
"the",
"list",
"of",
"the",
"Notification",
"Recipient",
"User",
"subscribed",
"to",
"the",
"notification",
"."
] | 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/notification_recipient_user.rb#L61-L63 | train | Gets the list of all the documents associated with the notification. | [
30522,
13366,
2862,
1035,
2011,
1035,
26828,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2326,
1035,
2171,
1010,
26828,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
2862,
1035,
2011,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
puppetlabs/bolt | lib/bolt/r10k_log_proxy.rb | Bolt.R10KLogProxy.to_bolt_level | def to_bolt_level(level_num)
level_str = Log4r::LNAMES[level_num]&.downcase || 'debug'
if level_str =~ /debug/
:debug
else
level_str.to_sym
end
end | ruby | def to_bolt_level(level_num)
level_str = Log4r::LNAMES[level_num]&.downcase || 'debug'
if level_str =~ /debug/
:debug
else
level_str.to_sym
end
end | [
"def",
"to_bolt_level",
"(",
"level_num",
")",
"level_str",
"=",
"Log4r",
"::",
"LNAMES",
"[",
"level_num",
"]",
"&.",
"downcase",
"||",
"'debug'",
"if",
"level_str",
"=~",
"/",
"/",
":debug",
"else",
"level_str",
".",
"to_sym",
"end",
"end"
] | Convert an r10k log level to a bolt log level. These correspond 1-to-1
except that r10k has debug, debug1, and debug2. The log event has the log
level as an integer that we need to look up. | [
"Convert",
"an",
"r10k",
"log",
"level",
"to",
"a",
"bolt",
"log",
"level",
".",
"These",
"correspond",
"1",
"-",
"to",
"-",
"1",
"except",
"that",
"r10k",
"has",
"debug",
"debug1",
"and",
"debug2",
".",
"The",
"log",
"event",
"has",
"the",
"log",
"l... | 50689a33699939d262ea7c822a4b24fd8c4f8d8a | https://github.com/puppetlabs/bolt/blob/50689a33699939d262ea7c822a4b24fd8c4f8d8a/lib/bolt/r10k_log_proxy.rb#L21-L28 | train | Returns the level number for the log | [
30522,
13366,
2000,
1035,
10053,
1035,
2504,
1006,
2504,
1035,
16371,
2213,
1007,
2504,
1035,
2358,
2099,
1027,
8833,
2549,
2099,
1024,
1024,
1048,
18442,
2015,
1031,
2504,
1035,
16371,
2213,
1033,
30524,
2842,
2504,
1035,
2358,
2099,
1012,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
aws/aws-sdk-ruby | gems/aws-sdk-ec2/lib/aws-sdk-ec2/volume.rb | Aws::EC2.Volume.describe_status | def describe_status(options = {})
options = Aws::Util.deep_merge(options, volume_ids: [@id])
resp = @client.describe_volume_status(options)
resp.data
end | ruby | def describe_status(options = {})
options = Aws::Util.deep_merge(options, volume_ids: [@id])
resp = @client.describe_volume_status(options)
resp.data
end | [
"def",
"describe_status",
"(",
"options",
"=",
"{",
"}",
")",
"options",
"=",
"Aws",
"::",
"Util",
".",
"deep_merge",
"(",
"options",
",",
"volume_ids",
":",
"[",
"@id",
"]",
")",
"resp",
"=",
"@client",
".",
"describe_volume_status",
"(",
"options",
")"... | @example Request syntax with placeholder values
volume.describe_status({
filters: [
{
name: "String",
values: ["String"],
},
],
max_results: 1,
next_token: "String",
dry_run: false,
})
@param [Hash] options ({})
@option options [Array<Types::Filter>] :fi... | [
"@example",
"Request",
"syntax",
"with",
"placeholder",
"values"
] | e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d | https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-ec2/lib/aws-sdk-ec2/volume.rb#L464-L468 | train | Returns the status of the volume | [
30522,
13366,
6235,
1035,
3570,
1006,
7047,
1027,
1063,
1065,
1007,
7047,
1027,
22091,
30524,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_network/lib/2018-04-01/generated/azure_mgmt_network/express_route_cross_connections.rb | Azure::Network::Mgmt::V2018_04_01.ExpressRouteCrossConnections.list_routes_table | def list_routes_table(resource_group_name, cross_connection_name, peering_name, device_path, custom_headers:nil)
response = list_routes_table_async(resource_group_name, cross_connection_name, peering_name, device_path, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def list_routes_table(resource_group_name, cross_connection_name, peering_name, device_path, custom_headers:nil)
response = list_routes_table_async(resource_group_name, cross_connection_name, peering_name, device_path, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"list_routes_table",
"(",
"resource_group_name",
",",
"cross_connection_name",
",",
"peering_name",
",",
"device_path",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"list_routes_table_async",
"(",
"resource_group_name",
",",
"cross_connection_name",
","... | Gets the currently advertised routes table associated with the express route
cross connection in a resource group.
@param resource_group_name [String] The name of the resource group.
@param cross_connection_name [String] The name of the
ExpressRouteCrossConnection.
@param peering_name [String] The name of the pee... | [
"Gets",
"the",
"currently",
"advertised",
"routes",
"table",
"associated",
"with",
"the",
"express",
"route",
"cross",
"connection",
"in",
"a",
"resource",
"group",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_network/lib/2018-04-01/generated/azure_mgmt_network/express_route_cross_connections.rb#L501-L504 | train | Gets the routes table for the specified ExpressRouteCrossConnection. | [
30522,
13366,
2862,
1035,
5847,
1035,
2795,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2892,
1035,
4434,
1035,
2171,
1010,
16740,
1035,
2171,
1010,
5080,
1035,
4130,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
2862,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
piotrmurach/github | lib/github_api/client/issues.rb | Github.Client::Issues.list | def list(*args)
params = arguments(args) do
assert_values VALID_ISSUE_PARAM_VALUES
end.params
response = if (org = params.delete('org'))
get_request("/orgs/#{org}/issues", params)
elsif (user_name = params.delete('user')) &&
(repo_name = params.delete('repo'))
... | ruby | def list(*args)
params = arguments(args) do
assert_values VALID_ISSUE_PARAM_VALUES
end.params
response = if (org = params.delete('org'))
get_request("/orgs/#{org}/issues", params)
elsif (user_name = params.delete('user')) &&
(repo_name = params.delete('repo'))
... | [
"def",
"list",
"(",
"*",
"args",
")",
"params",
"=",
"arguments",
"(",
"args",
")",
"do",
"assert_values",
"VALID_ISSUE_PARAM_VALUES",
"end",
".",
"params",
"response",
"=",
"if",
"(",
"org",
"=",
"params",
".",
"delete",
"(",
"'org'",
")",
")",
"get_req... | List your issues
List all issues across all the authenticated user’s visible repositories
including owned repositories, member repositories,
and organization repositories.
@example
github = Github.new oauth_token: '...'
github.issues.list
List all issues across owned and member repositories for the
authent... | [
"List",
"your",
"issues"
] | 8702452c66bea33c9388550aed9e9974f76aaef1 | https://github.com/piotrmurach/github/blob/8702452c66bea33c9388550aed9e9974f76aaef1/lib/github_api/client/issues.rb#L125-L144 | train | List all issues | [
30522,
13366,
2862,
1006,
1008,
12098,
5620,
1007,
11498,
5244,
1027,
9918,
1006,
12098,
5620,
1007,
2079,
20865,
1035,
5300,
9398,
1035,
3277,
1035,
11498,
2213,
1035,
5300,
2203,
1012,
11498,
5244,
3433,
1027,
2065,
1006,
8917,
1027,
1149... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
sensu/sensu | lib/sensu/utilities.rb | Sensu.Utilities.substitute_tokens | def substitute_tokens(tokens, attributes)
unmatched_tokens = []
encoded_tokens = tokens.encode("UTF-8", "binary", {
:invalid => :replace,
:undef => :replace,
:replace => ""
})
substituted = encoded_tokens.gsub(/:::([^:].*?):::/) do
token, default = $1.to_s.split("... | ruby | def substitute_tokens(tokens, attributes)
unmatched_tokens = []
encoded_tokens = tokens.encode("UTF-8", "binary", {
:invalid => :replace,
:undef => :replace,
:replace => ""
})
substituted = encoded_tokens.gsub(/:::([^:].*?):::/) do
token, default = $1.to_s.split("... | [
"def",
"substitute_tokens",
"(",
"tokens",
",",
"attributes",
")",
"unmatched_tokens",
"=",
"[",
"]",
"encoded_tokens",
"=",
"tokens",
".",
"encode",
"(",
"\"UTF-8\"",
",",
"\"binary\"",
",",
"{",
":invalid",
"=>",
":replace",
",",
":undef",
"=>",
":replace",
... | Substitute dot notation tokens (eg. :::db.name|production:::)
with the associated definition attribute value. Tokens can
provide a fallback default value, following a pipe.
@param tokens [String]
@param attributes [Hash]
@return [Array] containing the string with tokens substituted
and an array of unmatched to... | [
"Substitute",
"dot",
"notation",
"tokens",
"(",
"eg",
".",
":::",
"db",
".",
"name|production",
":::",
")",
"with",
"the",
"associated",
"definition",
"attribute",
"value",
".",
"Tokens",
"can",
"provide",
"a",
"fallback",
"default",
"value",
"following",
"a",... | 51319e4b58c8d9986f101ad71ff729aa3e51e951 | https://github.com/sensu/sensu/blob/51319e4b58c8d9986f101ad71ff729aa3e51e951/lib/sensu/utilities.rb#L185-L202 | train | Substitutes the given tokens with the given attributes. | [
30522,
13366,
7681,
1035,
19204,
2015,
1006,
19204,
2015,
1010,
12332,
1007,
4895,
18900,
7690,
1035,
19204,
2015,
1027,
1031,
1033,
12359,
1035,
19204,
2015,
1027,
19204,
2015,
1012,
4372,
16044,
1006,
1000,
21183,
2546,
1011,
1022,
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_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/long_term_retention_backups.rb | Azure::SQL::Mgmt::V2017_03_01_preview.LongTermRetentionBackups.list_by_location | def list_by_location(location_name, only_latest_per_database:nil, database_state:nil, custom_headers:nil)
first_page = list_by_location_as_lazy(location_name, only_latest_per_database:only_latest_per_database, database_state:database_state, custom_headers:custom_headers)
first_page.get_all_items
end | ruby | def list_by_location(location_name, only_latest_per_database:nil, database_state:nil, custom_headers:nil)
first_page = list_by_location_as_lazy(location_name, only_latest_per_database:only_latest_per_database, database_state:database_state, custom_headers:custom_headers)
first_page.get_all_items
end | [
"def",
"list_by_location",
"(",
"location_name",
",",
"only_latest_per_database",
":",
"nil",
",",
"database_state",
":",
"nil",
",",
"custom_headers",
":",
"nil",
")",
"first_page",
"=",
"list_by_location_as_lazy",
"(",
"location_name",
",",
"only_latest_per_database",... | Lists the long term retention backups for a given location.
@param location_name [String] The location of the database
@param only_latest_per_database [Boolean] Whether or not to only get the
latest backup for each database.
@param database_state [LongTermRetentionDatabaseState] Whether to query
against just live... | [
"Lists",
"the",
"long",
"term",
"retention",
"backups",
"for",
"a",
"given",
"location",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/long_term_retention_backups.rb#L294-L297 | train | Gets all the elastic advisor information for a location. | [
30522,
13366,
2862,
1035,
2011,
1035,
3295,
1006,
3295,
1035,
2171,
1010,
2069,
1035,
6745,
1035,
2566,
1035,
7809,
1024,
9152,
2140,
1010,
7809,
1035,
2110,
1024,
9152,
2140,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
2034,
1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | data/azure_cognitiveservices_luisauthoring/lib/2.0/generated/azure_cognitiveservices_luisauthoring/examples.rb | Azure::CognitiveServices::LuisAuthoring::V2_0.Examples.add | def add(app_id, version_id, example_label_object, custom_headers:nil)
response = add_async(app_id, version_id, example_label_object, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def add(app_id, version_id, example_label_object, custom_headers:nil)
response = add_async(app_id, version_id, example_label_object, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"add",
"(",
"app_id",
",",
"version_id",
",",
"example_label_object",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"add_async",
"(",
"app_id",
",",
"version_id",
",",
"example_label_object",
",",
"custom_headers",
":custom_headers",
")",
".",
... | Adds a labeled example utterance in a version of the application.
@param app_id The application ID.
@param version_id [String] The version ID.
@param example_label_object [ExampleLabelObject] A labeled example utterance
with the expected intent and entities.
@param custom_headers [Hash{String => String}] A hash o... | [
"Adds",
"a",
"labeled",
"example",
"utterance",
"in",
"a",
"version",
"of",
"the",
"application",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_cognitiveservices_luisauthoring/lib/2.0/generated/azure_cognitiveservices_luisauthoring/examples.rb#L36-L39 | train | Adds a label object to the application version. | [
30522,
13366,
5587,
1006,
10439,
1035,
8909,
1010,
2544,
1035,
8909,
1010,
2742,
1035,
3830,
1035,
4874,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
5587,
1035,
2004,
6038,
2278,
1006,
10439,
1035,
8909,
1010,
2544,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/product_apis.rb | Azure::ApiManagement::Mgmt::V2016_10_10.ProductApis.create_with_http_info | def create_with_http_info(resource_group_name, service_name, product_id, api_id, custom_headers:nil)
create_async(resource_group_name, service_name, product_id, api_id, custom_headers:custom_headers).value!
end | ruby | def create_with_http_info(resource_group_name, service_name, product_id, api_id, custom_headers:nil)
create_async(resource_group_name, service_name, product_id, api_id, custom_headers:custom_headers).value!
end | [
"def",
"create_with_http_info",
"(",
"resource_group_name",
",",
"service_name",
",",
"product_id",
",",
"api_id",
",",
"custom_headers",
":",
"nil",
")",
"create_async",
"(",
"resource_group_name",
",",
"service_name",
",",
"product_id",
",",
"api_id",
",",
"custom... | Adds an API to the specified product.
@param resource_group_name [String] The name of the resource group.
@param service_name [String] The name of the API Management service.
@param product_id [String] Product identifier. Must be unique in the current
API Management service instance.
@param api_id [String] API id... | [
"Adds",
"an",
"API",
"to",
"the",
"specified",
"product",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/product_apis.rb#L211-L213 | train | Creates a new product specification. | [
30522,
13366,
3443,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2326,
1035,
2171,
1010,
4031,
1035,
8909,
1010,
17928,
1035,
8909,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3443,
1035,
2004,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
decidim/decidim | decidim-core/app/services/decidim/action_logger.rb | Decidim.ActionLogger.log! | def log!
Decidim::ActionLog.create!(
user: user,
organization: organization,
action: action,
resource: resource,
resource_id: resource.id,
resource_type: resource.class.name,
participatory_space: participatory_space,
component: component,
are... | ruby | def log!
Decidim::ActionLog.create!(
user: user,
organization: organization,
action: action,
resource: resource,
resource_id: resource.id,
resource_type: resource.class.name,
participatory_space: participatory_space,
component: component,
are... | [
"def",
"log!",
"Decidim",
"::",
"ActionLog",
".",
"create!",
"(",
"user",
":",
"user",
",",
"organization",
":",
"organization",
",",
"action",
":",
"action",
",",
"resource",
":",
"resource",
",",
"resource_id",
":",
"resource",
".",
"id",
",",
"resource_... | Public: Initializes the instance.
action - a String representing the name of the action
user - the Decidim::User that performed the action
resource - the resource onn which the action was performed
version_id - the ID of the `PaperTrail::Version` that was created on that action
resource_extra - a Hash with resour... | [
"Public",
":",
"Initializes",
"the",
"instance",
"."
] | 6e2b14e559a63088669904e3c5c49a5180700cf7 | https://github.com/decidim/decidim/blob/6e2b14e559a63088669904e3c5c49a5180700cf7/decidim-core/app/services/decidim/action_logger.rb#L46-L62 | train | Log the action log for this object | [
30522,
13366,
8833,
999,
11703,
28173,
2213,
1024,
1024,
2895,
21197,
1012,
3443,
999,
1006,
5310,
1024,
5310,
1010,
3029,
1024,
3029,
1010,
2895,
1024,
2895,
1010,
7692,
1024,
7692,
1010,
7692,
1035,
8909,
1024,
7692,
1012,
8909,
1010,
7... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
aws/aws-sdk-ruby | gems/aws-sdk-iam/lib/aws-sdk-iam/signing_certificate.rb | Aws::IAM.SigningCertificate.delete | def delete(options = {})
options = options.merge(
user_name: @user_name,
certificate_id: @id
)
resp = @client.delete_signing_certificate(options)
resp.data
end | ruby | def delete(options = {})
options = options.merge(
user_name: @user_name,
certificate_id: @id
)
resp = @client.delete_signing_certificate(options)
resp.data
end | [
"def",
"delete",
"(",
"options",
"=",
"{",
"}",
")",
"options",
"=",
"options",
".",
"merge",
"(",
"user_name",
":",
"@user_name",
",",
"certificate_id",
":",
"@id",
")",
"resp",
"=",
"@client",
".",
"delete_signing_certificate",
"(",
"options",
")",
"resp... | @example Request syntax with placeholder values
signing_certificate.delete()
@param [Hash] options ({})
@return [EmptyStructure] | [
"@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#L223-L230 | train | Delete a certificate | [
30522,
13366,
3972,
12870,
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,
1007,
24501,
2361,
1027,
1030,
7396,
1012,
3972,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
backup/backup | lib/backup/model.rb | Backup.Model.elapsed_time | def elapsed_time(start_time, finish_time)
duration = finish_time.to_i - start_time.to_i
hours = duration / 3600
remainder = duration - (hours * 3600)
minutes = remainder / 60
seconds = remainder - (minutes * 60)
sprintf "%02d:%02d:%02d", hours, minutes, seconds
end | ruby | def elapsed_time(start_time, finish_time)
duration = finish_time.to_i - start_time.to_i
hours = duration / 3600
remainder = duration - (hours * 3600)
minutes = remainder / 60
seconds = remainder - (minutes * 60)
sprintf "%02d:%02d:%02d", hours, minutes, seconds
end | [
"def",
"elapsed_time",
"(",
"start_time",
",",
"finish_time",
")",
"duration",
"=",
"finish_time",
".",
"to_i",
"-",
"start_time",
".",
"to_i",
"hours",
"=",
"duration",
"/",
"3600",
"remainder",
"=",
"duration",
"-",
"(",
"hours",
"*",
"3600",
")",
"minut... | Returns a string representing the elapsed time in HH:MM:SS. | [
"Returns",
"a",
"string",
"representing",
"the",
"elapsed",
"time",
"in",
"HH",
":",
"MM",
":",
"SS",
"."
] | 64370f925e859f858766b674717a3dbee0de7a26 | https://github.com/backup/backup/blob/64370f925e859f858766b674717a3dbee0de7a26/lib/backup/model.rb#L463-L470 | train | Returns the elapsed time between start_time and finish_time | [
30522,
13366,
3449,
9331,
6924,
1035,
2051,
1006,
2707,
1035,
2051,
1010,
3926,
1035,
2051,
1007,
9367,
1027,
3926,
1035,
2051,
1012,
2000,
1035,
1045,
1011,
2707,
1035,
2051,
1012,
2000,
1035,
1045,
2847,
1027,
9367,
1013,
9475,
2692,
68... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
square/connect-ruby-sdk | lib/square_connect/models/v1_fee.rb | SquareConnect.V1Fee.valid? | def valid?
calculation_phase_validator = EnumAttributeValidator.new('String', ["FEE_SUBTOTAL_PHASE", "OTHER", "FEE_TOTAL_PHASE"])
return false unless calculation_phase_validator.valid?(@calculation_phase)
adjustment_type_validator = EnumAttributeValidator.new('String', ["TAX"])
return false unle... | ruby | def valid?
calculation_phase_validator = EnumAttributeValidator.new('String', ["FEE_SUBTOTAL_PHASE", "OTHER", "FEE_TOTAL_PHASE"])
return false unless calculation_phase_validator.valid?(@calculation_phase)
adjustment_type_validator = EnumAttributeValidator.new('String', ["TAX"])
return false unle... | [
"def",
"valid?",
"calculation_phase_validator",
"=",
"EnumAttributeValidator",
".",
"new",
"(",
"'String'",
",",
"[",
"\"FEE_SUBTOTAL_PHASE\"",
",",
"\"OTHER\"",
",",
"\"FEE_TOTAL_PHASE\"",
"]",
")",
"return",
"false",
"unless",
"calculation_phase_validator",
".",
"vali... | Check to see if the all the properties in the model are valid
@return true if the model is valid | [
"Check",
"to",
"see",
"if",
"the",
"all",
"the",
"properties",
"in",
"the",
"model",
"are",
"valid"
] | 798eb9ded716f23b9f1518386f1c311a34bca8bf | https://github.com/square/connect-ruby-sdk/blob/798eb9ded716f23b9f1518386f1c311a34bca8bf/lib/square_connect/models/v1_fee.rb#L158-L168 | train | Returns true if the object is valid for the given object. | [
30522,
13366,
9398,
1029,
17208,
1035,
4403,
1035,
9398,
30524,
9080,
1035,
4403,
1000,
1010,
1000,
2060,
1000,
1010,
1000,
7408,
1035,
2561,
1035,
4403,
1000,
1033,
1007,
2709,
6270,
4983,
17208,
1035,
4403,
1035,
9398,
8844,
1012,
9398,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
appsignal/rdkafka-ruby | lib/rdkafka/consumer.rb | Rdkafka.Consumer.subscribe | def subscribe(*topics)
# Create topic partition list with topics and no partition set
tpl = TopicPartitionList.new_native_tpl(topics.length)
topics.each do |topic|
Rdkafka::Bindings.rd_kafka_topic_partition_list_add(
tpl,
topic,
-1
)
end
# Sub... | ruby | def subscribe(*topics)
# Create topic partition list with topics and no partition set
tpl = TopicPartitionList.new_native_tpl(topics.length)
topics.each do |topic|
Rdkafka::Bindings.rd_kafka_topic_partition_list_add(
tpl,
topic,
-1
)
end
# Sub... | [
"def",
"subscribe",
"(",
"*",
"topics",
")",
"# Create topic partition list with topics and no partition set",
"tpl",
"=",
"TopicPartitionList",
".",
"new_native_tpl",
"(",
"topics",
".",
"length",
")",
"topics",
".",
"each",
"do",
"|",
"topic",
"|",
"Rdkafka",
"::"... | Subscribe to one or more topics letting Kafka handle partition assignments.
@param topics [Array<String>] One or more topic names
@raise [RdkafkaError] When subscribing fails
@return [nil] | [
"Subscribe",
"to",
"one",
"or",
"more",
"topics",
"letting",
"Kafka",
"handle",
"partition",
"assignments",
"."
] | 87b3e0ddae5ea576847cb67228fcea06ec2a24d6 | https://github.com/appsignal/rdkafka-ruby/blob/87b3e0ddae5ea576847cb67228fcea06ec2a24d6/lib/rdkafka/consumer.rb#L31-L47 | train | Subscribe to a list of topics | [
30522,
13366,
4942,
29234,
1006,
1008,
7832,
1007,
1001,
3443,
8476,
13571,
2862,
2007,
7832,
1998,
2053,
13571,
2275,
1056,
24759,
1027,
8476,
19362,
3775,
3508,
9863,
1012,
2047,
1035,
3128,
1035,
1056,
24759,
1006,
7832,
1012,
3091,
1007... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
aws/aws-sdk-ruby | gems/aws-sdk-ec2/lib/aws-sdk-ec2/resource.rb | Aws::EC2.Resource.subnets | def subnets(options = {})
batches = Enumerator.new do |y|
batch = []
resp = @client.describe_subnets(options)
resp.data.subnets.each do |s|
batch << Subnet.new(
id: s.subnet_id,
data: s,
client: @client
)
end
y.yield(b... | ruby | def subnets(options = {})
batches = Enumerator.new do |y|
batch = []
resp = @client.describe_subnets(options)
resp.data.subnets.each do |s|
batch << Subnet.new(
id: s.subnet_id,
data: s,
client: @client
)
end
y.yield(b... | [
"def",
"subnets",
"(",
"options",
"=",
"{",
"}",
")",
"batches",
"=",
"Enumerator",
".",
"new",
"do",
"|",
"y",
"|",
"batch",
"=",
"[",
"]",
"resp",
"=",
"@client",
".",
"describe_subnets",
"(",
"options",
")",
"resp",
".",
"data",
".",
"subnets",
... | @example Request syntax with placeholder values
subnets = ec2.subnets({
filters: [
{
name: "String",
values: ["String"],
},
],
subnet_ids: ["String"],
dry_run: false,
})
@param [Hash] options ({})
@option options [Array<Types::Filter>] :filters
One or more... | [
"@example",
"Request",
"syntax",
"with",
"placeholder",
"values"
] | e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d | https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-ec2/lib/aws-sdk-ec2/resource.rb#L2701-L2715 | train | Returns a list of subnets | [
30522,
13366,
4942,
22781,
1006,
7047,
1027,
1063,
1065,
1007,
14108,
2229,
1027,
4372,
17897,
16259,
1012,
2047,
2079,
1064,
1061,
1064,
14108,
1027,
1031,
1033,
24501,
2361,
1027,
1030,
7396,
1012,
6235,
1035,
4942,
22781,
1006,
7047,
100... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_stor_simple8000_series/lib/2017-06-01/generated/azure_mgmt_stor_simple8000_series/storage_account_credentials.rb | Azure::StorSimple8000Series::Mgmt::V2017_06_01.StorageAccountCredentials.begin_delete | def begin_delete(storage_account_credential_name, resource_group_name, manager_name, custom_headers:nil)
response = begin_delete_async(storage_account_credential_name, resource_group_name, manager_name, custom_headers:custom_headers).value!
nil
end | ruby | def begin_delete(storage_account_credential_name, resource_group_name, manager_name, custom_headers:nil)
response = begin_delete_async(storage_account_credential_name, resource_group_name, manager_name, custom_headers:custom_headers).value!
nil
end | [
"def",
"begin_delete",
"(",
"storage_account_credential_name",
",",
"resource_group_name",
",",
"manager_name",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"begin_delete_async",
"(",
"storage_account_credential_name",
",",
"resource_group_name",
",",
"manager_n... | Deletes the storage account credential.
@param storage_account_credential_name [String] The name of the storage
account credential.
@param resource_group_name [String] The resource group name
@param manager_name [String] The manager name
@param custom_headers [Hash{String => String}] A hash of custom headers that... | [
"Deletes",
"the",
"storage",
"account",
"credential",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_stor_simple8000_series/lib/2017-06-01/generated/azure_mgmt_stor_simple8000_series/storage_account_credentials.rb#L437-L440 | train | Deletes the specified storage account credential. | [
30522,
13366,
4088,
1035,
3972,
12870,
1006,
5527,
1035,
4070,
1035,
13675,
14728,
19909,
1035,
2171,
1010,
7692,
1035,
2177,
1035,
2171,
1010,
3208,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
4088,
1035,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/blob_containers.rb | Azure::Storage::Mgmt::V2018_07_01.BlobContainers.extend_immutability_policy_with_http_info | def extend_immutability_policy_with_http_info(resource_group_name, account_name, container_name, if_match, parameters:nil, custom_headers:nil)
extend_immutability_policy_async(resource_group_name, account_name, container_name, if_match, parameters:parameters, custom_headers:custom_headers).value!
end | ruby | def extend_immutability_policy_with_http_info(resource_group_name, account_name, container_name, if_match, parameters:nil, custom_headers:nil)
extend_immutability_policy_async(resource_group_name, account_name, container_name, if_match, parameters:parameters, custom_headers:custom_headers).value!
end | [
"def",
"extend_immutability_policy_with_http_info",
"(",
"resource_group_name",
",",
"account_name",
",",
"container_name",
",",
"if_match",
",",
"parameters",
":",
"nil",
",",
"custom_headers",
":",
"nil",
")",
"extend_immutability_policy_async",
"(",
"resource_group_name"... | Extends the immutabilityPeriodSinceCreationInDays of a locked
immutabilityPolicy. The only action allowed on a Locked policy will be this
action. ETag in If-Match is required for this operation.
@param resource_group_name [String] The name of the resource group within the
user's subscription. The name is case inse... | [
"Extends",
"the",
"immutabilityPeriodSinceCreationInDays",
"of",
"a",
"locked",
"immutabilityPolicy",
".",
"The",
"only",
"action",
"allowed",
"on",
"a",
"Locked",
"policy",
"will",
"be",
"this",
"action",
".",
"ETag",
"in",
"If",
"-",
"Match",
"is",
"required",... | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/blob_containers.rb#L1618-L1620 | train | Extend the immutability policy of the specified container. | [
30522,
13366,
7949,
1035,
10047,
28120,
8010,
1035,
3343,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
4070,
1035,
2171,
1010,
11661,
1035,
2171,
1010,
2065,
1035,
2674,
1010,
11709,
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... |
mongodb/mongo-ruby-driver | lib/mongo/socket.rb | Mongo.Socket.read | def read(length)
handle_errors do
data = read_from_socket(length)
raise IOError unless (data.length > 0 || length == 0)
while data.length < length
chunk = read_from_socket(length - data.length)
raise IOError unless (chunk.length > 0 || length == 0)
data << chu... | ruby | def read(length)
handle_errors do
data = read_from_socket(length)
raise IOError unless (data.length > 0 || length == 0)
while data.length < length
chunk = read_from_socket(length - data.length)
raise IOError unless (chunk.length > 0 || length == 0)
data << chu... | [
"def",
"read",
"(",
"length",
")",
"handle_errors",
"do",
"data",
"=",
"read_from_socket",
"(",
"length",
")",
"raise",
"IOError",
"unless",
"(",
"data",
".",
"length",
">",
"0",
"||",
"length",
"==",
"0",
")",
"while",
"data",
".",
"length",
"<",
"len... | Create the new socket for the provided family - ipv4, piv6, or unix.
@example Create a new ipv4 socket.
Socket.new(Socket::PF_INET)
@param [ Integer ] family The socket domain.
@since 2.0.0
Will read all data from the socket for the provided number of bytes.
If no data is returned, an exception will be raise... | [
"Create",
"the",
"new",
"socket",
"for",
"the",
"provided",
"family",
"-",
"ipv4",
"piv6",
"or",
"unix",
"."
] | dca26d0870cb3386fad9ccc1d17228097c1fe1c8 | https://github.com/mongodb/mongo-ruby-driver/blob/dca26d0870cb3386fad9ccc1d17228097c1fe1c8/lib/mongo/socket.rb#L123-L134 | train | Reads a chunk of the file from the socket. | [
30522,
13366,
3191,
1006,
3091,
1007,
5047,
1035,
10697,
2079,
2951,
1027,
3191,
1035,
2013,
1035,
22278,
1006,
3091,
1007,
5333,
22834,
2121,
29165,
4983,
1006,
2951,
1012,
3091,
1028,
1014,
1064,
1064,
3091,
1027,
1027,
1014,
1007,
2096,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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.begin_backend_health | def begin_backend_health(resource_group_name, application_gateway_name, expand:nil, custom_headers:nil)
response = begin_backend_health_async(resource_group_name, application_gateway_name, expand:expand, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def begin_backend_health(resource_group_name, application_gateway_name, expand:nil, custom_headers:nil)
response = begin_backend_health_async(resource_group_name, application_gateway_name, expand:expand, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"begin_backend_health",
"(",
"resource_group_name",
",",
"application_gateway_name",
",",
"expand",
":",
"nil",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"begin_backend_health_async",
"(",
"resource_group_name",
",",
"application_gateway_name",
",",
... | Gets the backend health of the specified application gateway in a resource
group.
@param resource_group_name [String] The name of the resource group.
@param application_gateway_name [String] The name of the application gateway.
@param expand [String] Expands BackendAddressPool and BackendHttpSettings
referenced i... | [
"Gets",
"the",
"backend",
"health",
"of",
"the",
"specified",
"application",
"gateway",
"in",
"a",
"resource",
"group",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_network/lib/2019-02-01/generated/azure_mgmt_network/application_gateways.rb#L1707-L1710 | train | Gets the backend health of the application gateway. | [
30522,
13366,
4088,
1035,
2067,
10497,
1035,
2740,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
4646,
1035,
11909,
1035,
2171,
1010,
7818,
1024,
9152,
2140,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
4088,
1035,
2067,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
floere/phony | lib/phony/country.rb | Phony.Country.split | def split national_number
_, trunk, ndc, *rest = internal_split national_number
[trunk, ndc, *rest]
end | ruby | def split national_number
_, trunk, ndc, *rest = internal_split national_number
[trunk, ndc, *rest]
end | [
"def",
"split",
"national_number",
"_",
",",
"trunk",
",",
"ndc",
",",
"*",
"rest",
"=",
"internal_split",
"national_number",
"[",
"trunk",
",",
"ndc",
",",
"rest",
"]",
"end"
] | A number is split with the code handlers as given in the initializer.
Note: If the ndc is nil, it will not return it.
@return [Trunk, String (ndc), Array<String> (national pieces)] | [
"A",
"number",
"is",
"split",
"with",
"the",
"code",
"handlers",
"as",
"given",
"in",
"the",
"initializer",
"."
] | 9ca50743499cf478a25fdb927bcdacd29d2c90c7 | https://github.com/floere/phony/blob/9ca50743499cf478a25fdb927bcdacd29d2c90c7/lib/phony/country.rb#L55-L58 | train | Split national number into national number components. | [
30522,
13366,
3975,
2120,
1035,
2193,
1035,
1010,
8260,
1010,
1050,
16409,
1010,
1008,
2717,
1027,
4722,
1035,
3975,
2120,
1035,
2193,
1031,
8260,
1010,
1050,
16409,
1010,
1008,
2717,
1033,
2203,
102,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_stor_simple8000_series/lib/2017-06-01/generated/azure_mgmt_stor_simple8000_series/managers.rb | Azure::StorSimple8000Series::Mgmt::V2017_06_01.Managers.get_device_public_encryption_key | def get_device_public_encryption_key(device_name, resource_group_name, manager_name, custom_headers:nil)
response = get_device_public_encryption_key_async(device_name, resource_group_name, manager_name, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def get_device_public_encryption_key(device_name, resource_group_name, manager_name, custom_headers:nil)
response = get_device_public_encryption_key_async(device_name, resource_group_name, manager_name, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"get_device_public_encryption_key",
"(",
"device_name",
",",
"resource_group_name",
",",
"manager_name",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"get_device_public_encryption_key_async",
"(",
"device_name",
",",
"resource_group_name",
",",
"manager_n... | Returns the public encryption key of the device.
@param device_name [String] The device name
@param resource_group_name [String] The resource group name
@param manager_name [String] The manager name
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request.
@... | [
"Returns",
"the",
"public",
"encryption",
"key",
"of",
"the",
"device",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_stor_simple8000_series/lib/2017-06-01/generated/azure_mgmt_stor_simple8000_series/managers.rb#L604-L607 | train | Gets the public encryption key of the device. | [
30522,
13366,
2131,
1035,
5080,
1035,
2270,
1035,
21999,
1035,
3145,
1006,
5080,
1035,
2171,
1010,
7692,
1035,
2177,
1035,
2171,
1010,
3208,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
2131,
1035,
5080,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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_privatedns/lib/2018-09-01/generated/azure_mgmt_privatedns/private_zones.rb | Azure::PrivateDns::Mgmt::V2018_09_01.PrivateZones.begin_delete_with_http_info | def begin_delete_with_http_info(resource_group_name, private_zone_name, if_match:nil, custom_headers:nil)
begin_delete_async(resource_group_name, private_zone_name, if_match:if_match, custom_headers:custom_headers).value!
end | ruby | def begin_delete_with_http_info(resource_group_name, private_zone_name, if_match:nil, custom_headers:nil)
begin_delete_async(resource_group_name, private_zone_name, if_match:if_match, custom_headers:custom_headers).value!
end | [
"def",
"begin_delete_with_http_info",
"(",
"resource_group_name",
",",
"private_zone_name",
",",
"if_match",
":",
"nil",
",",
"custom_headers",
":",
"nil",
")",
"begin_delete_async",
"(",
"resource_group_name",
",",
"private_zone_name",
",",
"if_match",
":if_match",
","... | Deletes a Private DNS zone. WARNING: All DNS records in the zone will also be
deleted. This operation cannot be undone. Private DNS zone cannot be deleted
unless all virtual network links to it are removed.
@param resource_group_name [String] The name of the resource group.
@param private_zone_name [String] The na... | [
"Deletes",
"a",
"Private",
"DNS",
"zone",
".",
"WARNING",
":",
"All",
"DNS",
"records",
"in",
"the",
"zone",
"will",
"also",
"be",
"deleted",
".",
"This",
"operation",
"cannot",
"be",
"undone",
".",
"Private",
"DNS",
"zone",
"cannot",
"be",
"deleted",
"u... | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_privatedns/lib/2018-09-01/generated/azure_mgmt_privatedns/private_zones.rb#L765-L767 | train | Deletes a Private DNS zone. | [
30522,
13366,
4088,
1035,
3972,
12870,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2797,
1035,
4224,
1035,
2171,
1010,
2065,
1035,
2674,
1024,
9152,
2140,
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... |
rails/sprockets | lib/sprockets/processor_utils.rb | Sprockets.ProcessorUtils.call_processors | def call_processors(processors, input)
data = input[:data] || ""
metadata = (input[:metadata] || {}).dup
processors.reverse_each do |processor|
result = call_processor(processor, input.merge(data: data, metadata: metadata))
data = result.delete(:data)
metadata.merge!(result)
... | ruby | def call_processors(processors, input)
data = input[:data] || ""
metadata = (input[:metadata] || {}).dup
processors.reverse_each do |processor|
result = call_processor(processor, input.merge(data: data, metadata: metadata))
data = result.delete(:data)
metadata.merge!(result)
... | [
"def",
"call_processors",
"(",
"processors",
",",
"input",
")",
"data",
"=",
"input",
"[",
":data",
"]",
"||",
"\"\"",
"metadata",
"=",
"(",
"input",
"[",
":metadata",
"]",
"||",
"{",
"}",
")",
".",
"dup",
"processors",
".",
"reverse_each",
"do",
"|",
... | Public: Invoke list of processors in right to left order.
The right to left order processing mirrors standard function composition.
Think about:
bundle.call(uglify.call(coffee.call(input)))
processors - Array of processor callables
input - Hash of input data to pass to each processor
Returns a Hash with :da... | [
"Public",
":",
"Invoke",
"list",
"of",
"processors",
"in",
"right",
"to",
"left",
"order",
"."
] | 9e3f0d8e98c44f57e67bc138db87bb8469bf5ddd | https://github.com/rails/sprockets/blob/9e3f0d8e98c44f57e67bc138db87bb8469bf5ddd/lib/sprockets/processor_utils.rb#L61-L72 | train | Calls the processors in reverse order | [
30522,
13366,
2655,
1035,
18017,
1006,
18017,
1010,
7953,
1007,
2951,
1027,
7953,
1031,
1024,
2951,
1033,
1064,
1064,
1000,
1000,
27425,
1027,
1006,
7953,
1031,
1024,
27425,
1033,
1064,
1064,
1063,
1065,
1007,
1012,
4241,
2361,
18017,
1012,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | data/azure_cognitiveservices_luisauthoring/lib/2.0/generated/azure_cognitiveservices_luisauthoring/features.rb | Azure::CognitiveServices::LuisAuthoring::V2_0.Features.delete_phrase_list_with_http_info | def delete_phrase_list_with_http_info(app_id, version_id, phraselist_id, custom_headers:nil)
delete_phrase_list_async(app_id, version_id, phraselist_id, custom_headers:custom_headers).value!
end | ruby | def delete_phrase_list_with_http_info(app_id, version_id, phraselist_id, custom_headers:nil)
delete_phrase_list_async(app_id, version_id, phraselist_id, custom_headers:custom_headers).value!
end | [
"def",
"delete_phrase_list_with_http_info",
"(",
"app_id",
",",
"version_id",
",",
"phraselist_id",
",",
"custom_headers",
":",
"nil",
")",
"delete_phrase_list_async",
"(",
"app_id",
",",
"version_id",
",",
"phraselist_id",
",",
"custom_headers",
":custom_headers",
")",... | Deletes a phraselist feature from a version of the application.
@param app_id The application ID.
@param version_id [String] The version ID.
@param phraselist_id [Integer] The ID of the feature to be deleted.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP re... | [
"Deletes",
"a",
"phraselist",
"feature",
"from",
"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/features.rb#L728-L730 | train | Deletes the phrase list of a given App Version. | [
30522,
13366,
3972,
12870,
1035,
7655,
1035,
2862,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
10439,
1035,
8909,
1010,
2544,
1035,
8909,
1010,
7655,
9863,
1035,
8909,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3972,
12870,
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_key_vault/lib/2016-10-01/generated/azure_key_vault/key_vault_client.rb | Azure::KeyVault::V2016_10_01.KeyVaultClient.verify | def verify(vault_base_url, key_name, key_version, algorithm, digest, signature, custom_headers:nil)
response = verify_async(vault_base_url, key_name, key_version, algorithm, digest, signature, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def verify(vault_base_url, key_name, key_version, algorithm, digest, signature, custom_headers:nil)
response = verify_async(vault_base_url, key_name, key_version, algorithm, digest, signature, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"verify",
"(",
"vault_base_url",
",",
"key_name",
",",
"key_version",
",",
"algorithm",
",",
"digest",
",",
"signature",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"verify_async",
"(",
"vault_base_url",
",",
"key_name",
",",
"key_version",
... | Verifies a signature using a specified key.
The VERIFY operation is applicable to symmetric keys stored in Azure Key
Vault. VERIFY is not strictly necessary for asymmetric keys stored in Azure
Key Vault since signature verification can be performed using the public
portion of the key but this operation is supporte... | [
"Verifies",
"a",
"signature",
"using",
"a",
"specified",
"key",
"."
] | 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#L1781-L1784 | train | Verify the specified key. | [
30522,
13366,
20410,
1006,
11632,
1035,
2918,
1035,
24471,
2140,
1010,
3145,
1035,
2171,
1010,
3145,
1035,
2544,
1010,
9896,
1010,
17886,
1010,
8085,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
20410,
1035,
2004,
6038... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
rails/sprockets | lib/rake/sprocketstask.rb | Rake.SprocketsTask.log_level= | def log_level=(level)
if level.is_a?(Integer)
@logger.level = level
else
@logger.level = Logger.const_get(level.to_s.upcase)
end
end | ruby | def log_level=(level)
if level.is_a?(Integer)
@logger.level = level
else
@logger.level = Logger.const_get(level.to_s.upcase)
end
end | [
"def",
"log_level",
"=",
"(",
"level",
")",
"if",
"level",
".",
"is_a?",
"(",
"Integer",
")",
"@logger",
".",
"level",
"=",
"level",
"else",
"@logger",
".",
"level",
"=",
"Logger",
".",
"const_get",
"(",
"level",
".",
"to_s",
".",
"upcase",
")",
"end... | Set logger level with constant or symbol.
t.log_level = Logger::INFO
t.log_level = :debug | [
"Set",
"logger",
"level",
"with",
"constant",
"or",
"symbol",
"."
] | 9e3f0d8e98c44f57e67bc138db87bb8469bf5ddd | https://github.com/rails/sprockets/blob/9e3f0d8e98c44f57e67bc138db87bb8469bf5ddd/lib/rake/sprocketstask.rb#L91-L97 | train | Set the logger level | [
30522,
13366,
8833,
1035,
2504,
1027,
1006,
2504,
1007,
2065,
2504,
1012,
2003,
1035,
1037,
1029,
1006,
16109,
1007,
1030,
8833,
4590,
1012,
2504,
1027,
2504,
2842,
1030,
8833,
4590,
1012,
2504,
1027,
8833,
4590,
1012,
9530,
3367,
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... |
rails/spring | lib/spring/application_manager.rb | Spring.ApplicationManager.run | def run(client)
with_child do
child.send_io client
child.gets or raise Errno::EPIPE
end
pid = child.gets.to_i
unless pid.zero?
log "got worker pid #{pid}"
pid
end
rescue Errno::ECONNRESET, Errno::EPIPE => e
log "#{e} while reading from child; ret... | ruby | def run(client)
with_child do
child.send_io client
child.gets or raise Errno::EPIPE
end
pid = child.gets.to_i
unless pid.zero?
log "got worker pid #{pid}"
pid
end
rescue Errno::ECONNRESET, Errno::EPIPE => e
log "#{e} while reading from child; ret... | [
"def",
"run",
"(",
"client",
")",
"with_child",
"do",
"child",
".",
"send_io",
"client",
"child",
".",
"gets",
"or",
"raise",
"Errno",
"::",
"EPIPE",
"end",
"pid",
"=",
"child",
".",
"gets",
".",
"to_i",
"unless",
"pid",
".",
"zero?",
"log",
"\"got wor... | Returns the pid of the process running the command, or nil if the application process died. | [
"Returns",
"the",
"pid",
"of",
"the",
"process",
"running",
"the",
"command",
"or",
"nil",
"if",
"the",
"application",
"process",
"died",
"."
] | e7a36afa436fcc59b6945f68dbc08f1076e65585 | https://github.com/rails/spring/blob/e7a36afa436fcc59b6945f68dbc08f1076e65585/lib/spring/application_manager.rb#L59-L76 | train | run the worker | [
30522,
13366,
2448,
1006,
7396,
1007,
2007,
1035,
2775,
2079,
2775,
1012,
4604,
1035,
22834,
7396,
2775,
1012,
4152,
2030,
5333,
9413,
19139,
1024,
1024,
4958,
15457,
2203,
14255,
2094,
1027,
2775,
1012,
4152,
1012,
2000,
1035,
1045,
4983,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
decidim/decidim | decidim-core/app/services/decidim/traceability.rb | Decidim.Traceability.update! | def update!(resource, author, params, extra_log_info = {})
perform_action!(:update, resource, author, extra_log_info) do
resource.update!(params)
resource
end
end | ruby | def update!(resource, author, params, extra_log_info = {})
perform_action!(:update, resource, author, extra_log_info) do
resource.update!(params)
resource
end
end | [
"def",
"update!",
"(",
"resource",
",",
"author",
",",
"params",
",",
"extra_log_info",
"=",
"{",
"}",
")",
"perform_action!",
"(",
":update",
",",
"resource",
",",
"author",
",",
"extra_log_info",
")",
"do",
"resource",
".",
"update!",
"(",
"params",
")",... | Updates the `resource` with `update!` and sets the author of the version.
resource - An ActiveRecord instance that implements `Decidim::Traceable`
author - An object that implements `to_gid` or a String
params - a Hash with the attributes to update to the resource
extra_log_info - a Hash with extra info that will ... | [
"Updates",
"the",
"resource",
"with",
"update!",
"and",
"sets",
"the",
"author",
"of",
"the",
"version",
"."
] | 6e2b14e559a63088669904e3c5c49a5180700cf7 | https://github.com/decidim/decidim/blob/6e2b14e559a63088669904e3c5c49a5180700cf7/decidim-core/app/services/decidim/traceability.rb#L80-L85 | train | Update a resource | [
30522,
13366,
10651,
999,
1006,
7692,
1010,
3166,
1010,
11498,
5244,
1010,
4469,
1035,
8833,
1035,
18558,
1027,
1063,
1065,
1007,
4685,
1035,
2895,
999,
1006,
1024,
10651,
1010,
7692,
1010,
3166,
1010,
4469,
1035,
8833,
1035,
18558,
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... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.