repo stringclasses 237
values | path stringlengths 11 168 | func_name stringlengths 10 147 | original_string stringlengths 79 124k | language stringclasses 1
value | code stringlengths 79 124k | code_tokens listlengths 16 45.3k | docstring stringlengths 4 23.5k | docstring_tokens listlengths 1 452 | sha stringclasses 237
values | url stringlengths 95 268 | partition stringclasses 1
value | summary stringlengths 8 229 | input_ids listlengths 502 502 | token_type_ids listlengths 502 502 | attention_mask listlengths 502 502 | labels listlengths 502 502 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
3scale/3scale_toolbox | lib/3scale_toolbox/remotes.rb | ThreeScaleToolbox.Remotes.update | def update
config.update(:remotes) do |rmts|
yield(rmts || {}).tap do |new_rmts|
raise_invalid unless validate(new_rmts)
end
end
end | ruby | def update
config.update(:remotes) do |rmts|
yield(rmts || {}).tap do |new_rmts|
raise_invalid unless validate(new_rmts)
end
end
end | [
"def",
"update",
"config",
".",
"update",
"(",
":remotes",
")",
"do",
"|",
"rmts",
"|",
"yield",
"(",
"rmts",
"||",
"{",
"}",
")",
".",
"tap",
"do",
"|",
"new_rmts",
"|",
"raise_invalid",
"unless",
"validate",
"(",
"new_rmts",
")",
"end",
"end",
"end... | Update remotes
Perform validation | [
"Update",
"remotes",
"Perform",
"validation"
] | aeb19add0ae2348788b0b21f641bf88bf7003ea3 | https://github.com/3scale/3scale_toolbox/blob/aeb19add0ae2348788b0b21f641bf88bf7003ea3/lib/3scale_toolbox/remotes.rb#L66-L72 | train | Update the configuration | [
30522,
13366,
10651,
9530,
8873,
2290,
1012,
10651,
1006,
1024,
6556,
2015,
1007,
2079,
1064,
28549,
3215,
1064,
10750,
1006,
28549,
3215,
1064,
1064,
1063,
1065,
1007,
1012,
11112,
2079,
1064,
2047,
1035,
28549,
3215,
1064,
5333,
1035,
195... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/search.rb | Github.Client::Search.issues | def issues(*args)
params = arguments(args, required: [:q]).params
params['q'] ||= arguments.q
get_request('/search/issues' , params)
end | ruby | def issues(*args)
params = arguments(args, required: [:q]).params
params['q'] ||= arguments.q
get_request('/search/issues' , params)
end | [
"def",
"issues",
"(",
"*",
"args",
")",
"params",
"=",
"arguments",
"(",
"args",
",",
"required",
":",
"[",
":q",
"]",
")",
".",
"params",
"params",
"[",
"'q'",
"]",
"||=",
"arguments",
".",
"q",
"get_request",
"(",
"'/search/issues'",
",",
"params",
... | Search issues
Find issues by state and keyword.
(This method returns up to 100 results per page.)
@param [Hash] params
@option params [String] :q
The search terms. This can be any combination of the supported
issue search parameters.
@option params [String] :sort
Optional sort field. One of comments, cr... | [
"Search",
"issues"
] | 8702452c66bea33c9388550aed9e9974f76aaef1 | https://github.com/piotrmurach/github/blob/8702452c66bea33c9388550aed9e9974f76aaef1/lib/github_api/client/search.rb#L42-L47 | train | Get a list of issues | [
30522,
13366,
3314,
1006,
1008,
12098,
5620,
1007,
11498,
5244,
1027,
9918,
1006,
12098,
5620,
1010,
3223,
1024,
1031,
1024,
1053,
1033,
1007,
1012,
11498,
5244,
11498,
5244,
1031,
1005,
1053,
1005,
1033,
1064,
1064,
1027,
9918,
1012,
1053,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/ufo | lib/ufo/setting.rb | Ufo.Setting.merge_base | def merge_base(all_envs)
base = all_envs["base"] || {}
all_envs.each do |env, settings|
all_envs[env] = base.merge(settings) unless env == "base"
end
all_envs
end | ruby | def merge_base(all_envs)
base = all_envs["base"] || {}
all_envs.each do |env, settings|
all_envs[env] = base.merge(settings) unless env == "base"
end
all_envs
end | [
"def",
"merge_base",
"(",
"all_envs",
")",
"base",
"=",
"all_envs",
"[",
"\"base\"",
"]",
"||",
"{",
"}",
"all_envs",
".",
"each",
"do",
"|",
"env",
",",
"settings",
"|",
"all_envs",
"[",
"env",
"]",
"=",
"base",
".",
"merge",
"(",
"settings",
")",
... | automatically add base settings to the rest of the environments | [
"automatically",
"add",
"base",
"settings",
"to",
"the",
"rest",
"of",
"the",
"environments"
] | 16ac3dad28edcab2693c0e7d89a1971aca65b8f9 | https://github.com/tongueroo/ufo/blob/16ac3dad28edcab2693c0e7d89a1971aca65b8f9/lib/ufo/setting.rb#L65-L71 | train | Merge base settings with all_envs | [
30522,
13366,
13590,
1035,
2918,
1006,
2035,
1035,
4372,
15088,
1007,
2918,
1027,
2035,
1035,
4372,
15088,
1031,
1000,
2918,
1000,
1033,
1064,
1064,
1063,
1065,
2035,
1035,
4372,
15088,
1012,
2169,
2079,
1064,
4372,
2615,
1010,
10906,
1064,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
ryanb/ruby-warrior | lib/ruby_warrior/player_generator.rb | RubyWarrior.PlayerGenerator.generate | def generate
if level.number == 1
FileUtils.mkdir_p(level.player_path) unless File.exists? level.player_path
FileUtils.cp(templates_path + '/player.rb', level.player_path)
end
File.open(level.player_path + '/README', 'w') do |f|
f.write read_template(templates_path + '/R... | ruby | def generate
if level.number == 1
FileUtils.mkdir_p(level.player_path) unless File.exists? level.player_path
FileUtils.cp(templates_path + '/player.rb', level.player_path)
end
File.open(level.player_path + '/README', 'w') do |f|
f.write read_template(templates_path + '/R... | [
"def",
"generate",
"if",
"level",
".",
"number",
"==",
"1",
"FileUtils",
".",
"mkdir_p",
"(",
"level",
".",
"player_path",
")",
"unless",
"File",
".",
"exists?",
"level",
".",
"player_path",
"FileUtils",
".",
"cp",
"(",
"templates_path",
"+",
"'/player.rb'",... | TODO refactor and test this method | [
"TODO",
"refactor",
"and",
"test",
"this",
"method"
] | 03a9e73a7a09ea2b146e4d4abffc49844d6aacbb | https://github.com/ryanb/ruby-warrior/blob/03a9e73a7a09ea2b146e4d4abffc49844d6aacbb/lib/ruby_warrior/player_generator.rb#L20-L29 | train | Generate the necessary information for the current level. | [
30522,
13366,
9699,
2065,
2504,
1012,
2193,
1027,
1027,
1015,
5371,
21823,
4877,
1012,
12395,
4305,
2099,
1035,
1052,
1006,
2504,
1012,
2447,
1035,
4130,
1007,
4983,
5371,
1012,
6526,
1029,
2504,
1012,
2447,
1035,
4130,
5371,
21823,
4877,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/connection_monitors.rb | Azure::Network::Mgmt::V2018_10_01.ConnectionMonitors.stop | def stop(resource_group_name, network_watcher_name, connection_monitor_name, custom_headers:nil)
response = stop_async(resource_group_name, network_watcher_name, connection_monitor_name, custom_headers:custom_headers).value!
nil
end | ruby | def stop(resource_group_name, network_watcher_name, connection_monitor_name, custom_headers:nil)
response = stop_async(resource_group_name, network_watcher_name, connection_monitor_name, custom_headers:custom_headers).value!
nil
end | [
"def",
"stop",
"(",
"resource_group_name",
",",
"network_watcher_name",
",",
"connection_monitor_name",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"stop_async",
"(",
"resource_group_name",
",",
"network_watcher_name",
",",
"connection_monitor_name",
",",
"... | Stops the specified connection monitor.
@param resource_group_name [String] The name of the resource group containing
Network Watcher.
@param network_watcher_name [String] The name of the Network Watcher
resource.
@param connection_monitor_name [String] The name of the connection monitor.
@param custom_headers [... | [
"Stops",
"the",
"specified",
"connection",
"monitor",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_network/lib/2018-10-01/generated/azure_mgmt_network/connection_monitors.rb#L233-L236 | train | Stops the specified connection monitor. | [
30522,
13366,
2644,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2897,
1035,
3422,
2121,
1035,
2171,
1010,
4434,
1035,
8080,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
2644,
1035,
2004,
6038,
2278,
1006,
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... |
sds/scss-lint | lib/scss_lint/control_comment_processor.rb | SCSSLint.ControlCommentProcessor.last_child | def last_child(node)
last = node.children.inject(node) do |lowest, child|
return lowest unless child.respond_to?(:line)
lowest.line < child.line ? child : lowest
end
# In this case, none of the children have associated line numbers or the
# node has no children at all, so return... | ruby | def last_child(node)
last = node.children.inject(node) do |lowest, child|
return lowest unless child.respond_to?(:line)
lowest.line < child.line ? child : lowest
end
# In this case, none of the children have associated line numbers or the
# node has no children at all, so return... | [
"def",
"last_child",
"(",
"node",
")",
"last",
"=",
"node",
".",
"children",
".",
"inject",
"(",
"node",
")",
"do",
"|",
"lowest",
",",
"child",
"|",
"return",
"lowest",
"unless",
"child",
".",
"respond_to?",
"(",
":line",
")",
"lowest",
".",
"line",
... | Gets the child of the node that resides on the lowest line in the file.
This is necessary due to the fact that our monkey patching of the parse
tree's {#children} method does not return nodes sorted by their line
number.
Returns `nil` if node has no children or no children with associated line
numbers.
@param ... | [
"Gets",
"the",
"child",
"of",
"the",
"node",
"that",
"resides",
"on",
"the",
"lowest",
"line",
"in",
"the",
"file",
"."
] | e99afe4ede041a431a06e585c12ce82f6ad50116 | https://github.com/sds/scss-lint/blob/e99afe4ede041a431a06e585c12ce82f6ad50116/lib/scss_lint/control_comment_processor.rb#L137-L148 | train | Returns the last child of the node. | [
30522,
13366,
2197,
1035,
2775,
1006,
13045,
1007,
2197,
1027,
13045,
1012,
2336,
1012,
1999,
20614,
1006,
13045,
1007,
2079,
1064,
7290,
1010,
2775,
1064,
2709,
7290,
4983,
2775,
1012,
6869,
1035,
2000,
1029,
1006,
1024,
2240,
1007,
7290,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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.suspend_service_backup | def suspend_service_backup(service_id, timeout:60, custom_headers:nil)
response = suspend_service_backup_async(service_id, timeout:timeout, custom_headers:custom_headers).value!
nil
end | ruby | def suspend_service_backup(service_id, timeout:60, custom_headers:nil)
response = suspend_service_backup_async(service_id, timeout:timeout, custom_headers:custom_headers).value!
nil
end | [
"def",
"suspend_service_backup",
"(",
"service_id",
",",
"timeout",
":",
"60",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"suspend_service_backup_async",
"(",
"service_id",
",",
"timeout",
":",
"timeout",
",",
"custom_headers",
":custom_headers",
")",
... | Suspends periodic backup for the specified Service Fabric service.
The service which is configured to take periodic backups, is suspended for
taking further backups till it is resumed again. This operation applies to
the entire service's hierarchy. It means all the partitions under this
service are now suspended f... | [
"Suspends",
"periodic",
"backup",
"for",
"the",
"specified",
"Service",
"Fabric",
"service",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_service_fabric/lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb#L24488-L24491 | train | Suspend service backup of a service. | [
30522,
13366,
28324,
1035,
2326,
1035,
10200,
1006,
2326,
1035,
8909,
1010,
2051,
5833,
1024,
3438,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
28324,
1035,
2326,
1035,
10200,
1035,
2004,
6038,
2278,
1006,
2326,
1035,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Shopify/liquid | lib/liquid/standardfilters.rb | Liquid.StandardFilters.uniq | def uniq(input, property = nil)
ary = InputIterator.new(input)
if property.nil?
ary.uniq
elsif ary.empty? # The next two cases assume a non-empty array.
[]
elsif ary.first.respond_to?(:[])
begin
ary.uniq { |a| a[property] }
rescue TypeError
ra... | ruby | def uniq(input, property = nil)
ary = InputIterator.new(input)
if property.nil?
ary.uniq
elsif ary.empty? # The next two cases assume a non-empty array.
[]
elsif ary.first.respond_to?(:[])
begin
ary.uniq { |a| a[property] }
rescue TypeError
ra... | [
"def",
"uniq",
"(",
"input",
",",
"property",
"=",
"nil",
")",
"ary",
"=",
"InputIterator",
".",
"new",
"(",
"input",
")",
"if",
"property",
".",
"nil?",
"ary",
".",
"uniq",
"elsif",
"ary",
".",
"empty?",
"# The next two cases assume a non-empty array.",
"["... | Remove duplicate elements from an array
provide optional property with which to determine uniqueness | [
"Remove",
"duplicate",
"elements",
"from",
"an",
"array",
"provide",
"optional",
"property",
"with",
"which",
"to",
"determine",
"uniqueness"
] | b3b63a683f6daaea7e70f1602ee829abdf970ef3 | https://github.com/Shopify/liquid/blob/b3b63a683f6daaea7e70f1602ee829abdf970ef3/lib/liquid/standardfilters.rb#L196-L210 | train | Returns an array of unique values for the input. | [
30522,
13366,
4895,
18515,
1006,
7953,
1010,
3200,
1027,
9152,
2140,
1007,
12098,
2100,
1027,
7953,
21646,
8844,
1012,
2047,
1006,
7953,
1007,
2065,
3200,
1012,
9152,
2140,
1029,
12098,
2100,
1012,
4895,
18515,
3449,
5332,
2546,
12098,
2100... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
fastlane/fastlane | fastlane_core/lib/fastlane_core/configuration/config_item.rb | FastlaneCore.ConfigItem.auto_convert_value | def auto_convert_value(value)
return nil if value.nil?
if data_type == Array
return value.split(',') if value.kind_of?(String)
elsif data_type == Integer
return value.to_i if value.to_i.to_s == value.to_s
elsif data_type == Float
return value.to_f if value.to_f.to_s == v... | ruby | def auto_convert_value(value)
return nil if value.nil?
if data_type == Array
return value.split(',') if value.kind_of?(String)
elsif data_type == Integer
return value.to_i if value.to_i.to_s == value.to_s
elsif data_type == Float
return value.to_f if value.to_f.to_s == v... | [
"def",
"auto_convert_value",
"(",
"value",
")",
"return",
"nil",
"if",
"value",
".",
"nil?",
"if",
"data_type",
"==",
"Array",
"return",
"value",
".",
"split",
"(",
"','",
")",
"if",
"value",
".",
"kind_of?",
"(",
"String",
")",
"elsif",
"data_type",
"==... | Returns an updated value type (if necessary) | [
"Returns",
"an",
"updated",
"value",
"type",
"(",
"if",
"necessary",
")"
] | 457c5d647c77f0e078dafa5129da616914e002c5 | https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/fastlane_core/lib/fastlane_core/configuration/config_item.rb#L231-L254 | train | Convert the value to the correct type | [
30522,
13366,
8285,
1035,
10463,
1035,
3643,
1006,
3643,
1007,
2709,
9152,
2140,
2065,
3643,
1012,
9152,
2140,
1029,
2065,
2951,
1035,
2828,
1027,
1027,
9140,
2709,
3643,
1012,
3975,
1006,
1005,
1010,
1005,
1007,
2065,
3643,
1012,
2785,
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... |
rails/rails | actionview/lib/action_view/layouts.rb | ActionView.Layouts._default_layout | def _default_layout(lookup_context, formats, require_layout = false)
begin
value = _layout(lookup_context, formats) if action_has_layout?
rescue NameError => e
raise e, "Could not render layout: #{e.message}"
end
if require_layout && action_has_layout? && !value
raise Ar... | ruby | def _default_layout(lookup_context, formats, require_layout = false)
begin
value = _layout(lookup_context, formats) if action_has_layout?
rescue NameError => e
raise e, "Could not render layout: #{e.message}"
end
if require_layout && action_has_layout? && !value
raise Ar... | [
"def",
"_default_layout",
"(",
"lookup_context",
",",
"formats",
",",
"require_layout",
"=",
"false",
")",
"begin",
"value",
"=",
"_layout",
"(",
"lookup_context",
",",
"formats",
")",
"if",
"action_has_layout?",
"rescue",
"NameError",
"=>",
"e",
"raise",
"e",
... | Returns the default layout for this controller.
Optionally raises an exception if the layout could not be found.
==== Parameters
* <tt>formats</tt> - The formats accepted to this layout
* <tt>require_layout</tt> - If set to +true+ and layout is not found,
an +ArgumentError+ exception is raised (defaults to +fal... | [
"Returns",
"the",
"default",
"layout",
"for",
"this",
"controller",
".",
"Optionally",
"raises",
"an",
"exception",
"if",
"the",
"layout",
"could",
"not",
"be",
"found",
"."
] | 85a8bc644be69908f05740a5886ec19cd3679df5 | https://github.com/rails/rails/blob/85a8bc644be69908f05740a5886ec19cd3679df5/actionview/lib/action_view/layouts.rb#L414-L427 | train | Returns the default layout for this view. | [
30522,
13366,
1035,
12398,
1035,
9621,
1006,
2298,
6279,
1035,
6123,
1010,
11630,
1010,
5478,
1035,
9621,
1027,
6270,
1007,
4088,
3643,
1027,
1035,
9621,
1006,
2298,
6279,
1035,
6123,
1010,
11630,
1007,
2065,
2895,
1035,
2038,
1035,
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... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
boazsegev/combine_pdf | lib/combine_pdf/renderer.rb | CombinePDF.Renderer.object_to_pdf | def object_to_pdf(object)
if object.nil?
return 'null'
elsif object.is_a?(String)
return format_string_to_pdf object
elsif object.is_a?(Symbol)
return format_name_to_pdf object
elsif object.is_a?(Array)
return format_array_to_pdf object
elsif object.is_a?(In... | ruby | def object_to_pdf(object)
if object.nil?
return 'null'
elsif object.is_a?(String)
return format_string_to_pdf object
elsif object.is_a?(Symbol)
return format_name_to_pdf object
elsif object.is_a?(Array)
return format_array_to_pdf object
elsif object.is_a?(In... | [
"def",
"object_to_pdf",
"(",
"object",
")",
"if",
"object",
".",
"nil?",
"return",
"'null'",
"elsif",
"object",
".",
"is_a?",
"(",
"String",
")",
"return",
"format_string_to_pdf",
"object",
"elsif",
"object",
".",
"is_a?",
"(",
"Symbol",
")",
"return",
"form... | Formats an object into PDF format. This is used my the PDF object to format the PDF file and it is used in the secure injection which is still being developed. | [
"Formats",
"an",
"object",
"into",
"PDF",
"format",
".",
"This",
"is",
"used",
"my",
"the",
"PDF",
"object",
"to",
"format",
"the",
"PDF",
"file",
"and",
"it",
"is",
"used",
"in",
"the",
"secure",
"injection",
"which",
"is",
"still",
"being",
"developed"... | 09054051019c069f551f3e60be789577c0f93900 | https://github.com/boazsegev/combine_pdf/blob/09054051019c069f551f3e60be789577c0f93900/lib/combine_pdf/renderer.rb#L14-L32 | train | Returns the PDF representation of the given object. | [
30522,
13366,
4874,
1035,
2000,
1035,
11135,
1006,
4874,
1007,
2065,
4874,
1012,
9152,
2140,
1029,
2709,
1005,
19701,
1005,
3449,
5332,
2546,
4874,
1012,
2003,
1035,
1037,
1029,
1006,
5164,
1007,
2709,
4289,
1035,
5164,
1035,
2000,
1035,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
troessner/reek | lib/reek/spec.rb | Reek.Spec.reek_of | def reek_of(smell_type,
smell_details = {},
configuration = Configuration::AppConfiguration.default)
ShouldReekOf.new(smell_type, smell_details, configuration)
end | ruby | def reek_of(smell_type,
smell_details = {},
configuration = Configuration::AppConfiguration.default)
ShouldReekOf.new(smell_type, smell_details, configuration)
end | [
"def",
"reek_of",
"(",
"smell_type",
",",
"smell_details",
"=",
"{",
"}",
",",
"configuration",
"=",
"Configuration",
"::",
"AppConfiguration",
".",
"default",
")",
"ShouldReekOf",
".",
"new",
"(",
"smell_type",
",",
"smell_details",
",",
"configuration",
")",
... | Checks the target source code for instances of "smell type"
and returns true only if it can find one of them that matches.
You can pass the smell type you want to check for as String or as Symbol:
- :UtilityFunction
- "UtilityFunction"
It is recommended to pass this as a symbol like :UtilityFunction. Howeve... | [
"Checks",
"the",
"target",
"source",
"code",
"for",
"instances",
"of",
"smell",
"type",
"and",
"returns",
"true",
"only",
"if",
"it",
"can",
"find",
"one",
"of",
"them",
"that",
"matches",
"."
] | 8c6b5c0c6228a6981ab48543457889f9ea984054 | https://github.com/troessner/reek/blob/8c6b5c0c6228a6981ab48543457889f9ea984054/lib/reek/spec.rb#L88-L92 | train | Returns the sequencer that should be reeked of the given smell type | [
30522,
13366,
2128,
5937,
1035,
1997,
1006,
5437,
1035,
2828,
1010,
5437,
1035,
4751,
1027,
1063,
1065,
1010,
9563,
1027,
9563,
1024,
1024,
10439,
8663,
8873,
27390,
3370,
1012,
12398,
1007,
2323,
9910,
3683,
2546,
1012,
2047,
1006,
5437,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/group.rb | Aws::IAM.Group.users | def users(options = {})
batches = Enumerator.new do |y|
options = options.merge(group_name: @name)
resp = @client.get_group(options)
resp.each_page do |page|
batch = []
page.data.users.each do |u|
batch << User.new(
name: u.user_name,
... | ruby | def users(options = {})
batches = Enumerator.new do |y|
options = options.merge(group_name: @name)
resp = @client.get_group(options)
resp.each_page do |page|
batch = []
page.data.users.each do |u|
batch << User.new(
name: u.user_name,
... | [
"def",
"users",
"(",
"options",
"=",
"{",
"}",
")",
"batches",
"=",
"Enumerator",
".",
"new",
"do",
"|",
"y",
"|",
"options",
"=",
"options",
".",
"merge",
"(",
"group_name",
":",
"@name",
")",
"resp",
"=",
"@client",
".",
"get_group",
"(",
"options"... | @example Request syntax with placeholder values
group.users()
@param [Hash] options ({})
@return [User::Collection] | [
"@example",
"Request",
"syntax",
"with",
"placeholder",
"values"
] | e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d | https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-iam/lib/aws-sdk-iam/group.rb#L521-L538 | train | Get users in a group | [
30522,
13366,
5198,
1006,
7047,
1027,
1063,
1065,
1007,
14108,
2229,
1027,
4372,
17897,
16259,
1012,
2047,
2079,
1064,
1061,
1064,
7047,
1027,
7047,
1012,
13590,
1006,
2177,
1035,
2171,
1024,
1030,
2171,
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... |
jekyll/jekyll | lib/jekyll/frontmatter_defaults.rb | Jekyll.FrontmatterDefaults.find | def find(path, type, setting)
value = nil
old_scope = nil
matching_sets(path, type).each do |set|
if set["values"].key?(setting) && has_precedence?(old_scope, set["scope"])
value = set["values"][setting]
old_scope = set["scope"]
end
end
value
end | ruby | def find(path, type, setting)
value = nil
old_scope = nil
matching_sets(path, type).each do |set|
if set["values"].key?(setting) && has_precedence?(old_scope, set["scope"])
value = set["values"][setting]
old_scope = set["scope"]
end
end
value
end | [
"def",
"find",
"(",
"path",
",",
"type",
",",
"setting",
")",
"value",
"=",
"nil",
"old_scope",
"=",
"nil",
"matching_sets",
"(",
"path",
",",
"type",
")",
".",
"each",
"do",
"|",
"set",
"|",
"if",
"set",
"[",
"\"values\"",
"]",
".",
"key?",
"(",
... | Finds a default value for a given setting, filtered by path and type
path - the path (relative to the source) of the page,
post or :draft the default is used in
type - a symbol indicating whether a :page,
a :post or a :draft calls this method
Returns the default value or nil if none was found | [
"Finds",
"a",
"default",
"value",
"for",
"a",
"given",
"setting",
"filtered",
"by",
"path",
"and",
"type"
] | fd74fe3e93a1fb506fa6621a2e271d7b9c5c3e3b | https://github.com/jekyll/jekyll/blob/fd74fe3e93a1fb506fa6621a2e271d7b9c5c3e3b/lib/jekyll/frontmatter_defaults.rb#L60-L71 | train | Find a setting in a set of values | [
30522,
13366,
2424,
1006,
4130,
1010,
2828,
1010,
4292,
1007,
3643,
1027,
9152,
2140,
2214,
1035,
9531,
1027,
9152,
2140,
9844,
1035,
4520,
1006,
4130,
1010,
2828,
1007,
1012,
2169,
2079,
1064,
2275,
1064,
2065,
2275,
1031,
1000,
5300,
10... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
rails/rails | railties/lib/rails/railtie.rb | Rails.Railtie.each_registered_block | def each_registered_block(type, &block)
klass = self.class
while klass.respond_to?(type)
klass.public_send(type).each(&block)
klass = klass.superclass
end
end | ruby | def each_registered_block(type, &block)
klass = self.class
while klass.respond_to?(type)
klass.public_send(type).each(&block)
klass = klass.superclass
end
end | [
"def",
"each_registered_block",
"(",
"type",
",",
"&",
"block",
")",
"klass",
"=",
"self",
".",
"class",
"while",
"klass",
".",
"respond_to?",
"(",
"type",
")",
"klass",
".",
"public_send",
"(",
"type",
")",
".",
"each",
"(",
"block",
")",
"klass",
"="... | run `&block` in every registered block in `#register_block_for` | [
"run",
"&block",
"in",
"every",
"registered",
"block",
"in",
"#register_block_for"
] | 85a8bc644be69908f05740a5886ec19cd3679df5 | https://github.com/rails/rails/blob/85a8bc644be69908f05740a5886ec19cd3679df5/railties/lib/rails/railtie.rb#L252-L258 | train | Iterate over all registered block methods of the class. | [
30522,
13366,
2169,
1035,
5068,
1035,
3796,
1006,
2828,
1010,
1004,
3796,
1007,
1047,
27102,
1027,
2969,
1012,
2465,
2096,
1047,
27102,
1012,
6869,
1035,
2000,
1029,
1006,
2828,
1007,
1047,
27102,
1012,
2270,
1035,
4604,
1006,
2828,
1007,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_web/lib/2018-02-01/generated/azure_mgmt_web/app_service_environments.rb | Azure::Web::Mgmt::V2018_02_01.AppServiceEnvironments.resume | def resume(resource_group_name, name, custom_headers:nil)
response = resume_async(resource_group_name, name, custom_headers:custom_headers).value!
unless response.nil?
page = response.body
page.next_method = Proc.new do |next_page_link|
resume_next_async(next_page_link, custom_head... | ruby | def resume(resource_group_name, name, custom_headers:nil)
response = resume_async(resource_group_name, name, custom_headers:custom_headers).value!
unless response.nil?
page = response.body
page.next_method = Proc.new do |next_page_link|
resume_next_async(next_page_link, custom_head... | [
"def",
"resume",
"(",
"resource_group_name",
",",
"name",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"resume_async",
"(",
"resource_group_name",
",",
"name",
",",
"custom_headers",
":custom_headers",
")",
".",
"value!",
"unless",
"response",
".",
"... | Resume an App Service Environment.
Resume an App Service Environment.
@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 custom_headers [Hash{String => String}] A hash of custom headers that
will be added... | [
"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#L2575-L2584 | train | Resumes an existing App Service Environment. | [
30522,
13366,
13746,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
13746,
1035,
2004,
6038,
2278,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2171,
1010,
7661,
1035,
20346,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
rails/rails | railties/lib/rails/console/app.rb | Rails.ConsoleMethods.new_session | def new_session
app = Rails.application
session = ActionDispatch::Integration::Session.new(app)
yield session if block_given?
# This makes app.url_for and app.foo_path available in the console
session.extend(app.routes.url_helpers)
session.extend(app.routes.mounted_helpers)
s... | ruby | def new_session
app = Rails.application
session = ActionDispatch::Integration::Session.new(app)
yield session if block_given?
# This makes app.url_for and app.foo_path available in the console
session.extend(app.routes.url_helpers)
session.extend(app.routes.mounted_helpers)
s... | [
"def",
"new_session",
"app",
"=",
"Rails",
".",
"application",
"session",
"=",
"ActionDispatch",
"::",
"Integration",
"::",
"Session",
".",
"new",
"(",
"app",
")",
"yield",
"session",
"if",
"block_given?",
"# This makes app.url_for and app.foo_path available in the cons... | create a new session. If a block is given, the new session will be yielded
to the block before being returned. | [
"create",
"a",
"new",
"session",
".",
"If",
"a",
"block",
"is",
"given",
"the",
"new",
"session",
"will",
"be",
"yielded",
"to",
"the",
"block",
"before",
"being",
"returned",
"."
] | 85a8bc644be69908f05740a5886ec19cd3679df5 | https://github.com/rails/rails/blob/85a8bc644be69908f05740a5886ec19cd3679df5/railties/lib/rails/console/app.rb#L19-L29 | train | Creates a new session object for the current application. | [
30522,
13366,
2047,
1035,
5219,
10439,
1027,
15168,
1012,
4646,
5219,
1027,
2895,
10521,
4502,
10649,
1024,
1024,
8346,
1024,
1024,
5219,
1012,
2047,
1006,
10439,
1007,
10750,
5219,
2065,
3796,
1035,
2445,
1029,
1001,
2023,
3084,
10439,
101... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
RailsEventStore/rails_event_store | ruby_event_store/lib/ruby_event_store/client.rb | RubyEventStore.Client.with_metadata | def with_metadata(metadata, &block)
previous_metadata = metadata()
self.metadata = previous_metadata.merge(metadata)
block.call if block_given?
ensure
self.metadata = previous_metadata
end | ruby | def with_metadata(metadata, &block)
previous_metadata = metadata()
self.metadata = previous_metadata.merge(metadata)
block.call if block_given?
ensure
self.metadata = previous_metadata
end | [
"def",
"with_metadata",
"(",
"metadata",
",",
"&",
"block",
")",
"previous_metadata",
"=",
"metadata",
"(",
")",
"self",
".",
"metadata",
"=",
"previous_metadata",
".",
"merge",
"(",
"metadata",
")",
"block",
".",
"call",
"if",
"block_given?",
"ensure",
"sel... | Set additional metadata for all events published within the provided block
{http://railseventstore.org/docs/request_metadata#passing-your-own-metadata-using-with_metadata-method Read more}
@param metadata [Hash] metadata to set for events
@param block [Proc] block of code during which the metadata will be added
@r... | [
"Set",
"additional",
"metadata",
"for",
"all",
"events",
"published",
"within",
"the",
"provided",
"block",
"{",
"http",
":",
"//",
"railseventstore",
".",
"org",
"/",
"docs",
"/",
"request_metadata#passing",
"-",
"your",
"-",
"own",
"-",
"metadata",
"-",
"u... | 3ee4f3148499794154ee6fec74ccf6d4670d85ac | https://github.com/RailsEventStore/rails_event_store/blob/3ee4f3148499794154ee6fec74ccf6d4670d85ac/ruby_event_store/lib/ruby_event_store/client.rb#L211-L217 | train | Sets the metadata for this object. | [
30522,
13366,
2007,
1035,
27425,
1006,
27425,
1010,
1004,
3796,
1007,
3025,
1035,
27425,
1027,
27425,
1006,
1007,
2969,
1012,
27425,
1027,
3025,
1035,
27425,
1012,
13590,
1006,
27425,
1007,
3796,
1012,
2655,
2065,
3796,
1035,
2445,
1029,
56... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/capabilities.rb | Azure::SQL::Mgmt::V2014_04_01.Capabilities.list_by_location | def list_by_location(location_id, custom_headers:nil)
response = list_by_location_async(location_id, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def list_by_location(location_id, custom_headers:nil)
response = list_by_location_async(location_id, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"list_by_location",
"(",
"location_id",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"list_by_location_async",
"(",
"location_id",
",",
"custom_headers",
":custom_headers",
")",
".",
"value!",
"response",
".",
"body",
"unless",
"response",
".",
... | Gets the capabilities available for the specified location.
@param location_id [String] The location id whose capabilities are retrieved.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request.
@return [LocationCapabilities] operation results. | [
"Gets",
"the",
"capabilities",
"available",
"for",
"the",
"specified",
"location",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/capabilities.rb#L36-L39 | train | Gets the list of the elastic advisors in a location. | [
30522,
13366,
2862,
1035,
2011,
1035,
3295,
1006,
3295,
1035,
8909,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
2862,
1035,
2011,
1035,
3295,
1035,
2004,
6038,
2278,
1006,
3295,
1035,
8909,
1010,
7661,
1035,
20346,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_web/lib/2018-02-01/generated/azure_mgmt_web/diagnostics.rb | Azure::Web::Mgmt::V2018_02_01.Diagnostics.list_site_detectors_with_http_info | def list_site_detectors_with_http_info(resource_group_name, site_name, diagnostic_category, custom_headers:nil)
list_site_detectors_async(resource_group_name, site_name, diagnostic_category, custom_headers:custom_headers).value!
end | ruby | def list_site_detectors_with_http_info(resource_group_name, site_name, diagnostic_category, custom_headers:nil)
list_site_detectors_async(resource_group_name, site_name, diagnostic_category, custom_headers:custom_headers).value!
end | [
"def",
"list_site_detectors_with_http_info",
"(",
"resource_group_name",
",",
"site_name",
",",
"diagnostic_category",
",",
"custom_headers",
":",
"nil",
")",
"list_site_detectors_async",
"(",
"resource_group_name",
",",
"site_name",
",",
"diagnostic_category",
",",
"custom... | Get Detectors
Get Detectors
@param resource_group_name [String] Name of the resource group to which the
resource belongs.
@param site_name [String] Site Name
@param diagnostic_category [String] Diagnostic Category
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the... | [
"Get",
"Detectors"
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_web/lib/2018-02-01/generated/azure_mgmt_web/diagnostics.rb#L1055-L1057 | train | Gets the list of site detectors. | [
30522,
13366,
2862,
1035,
2609,
1035,
25971,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2609,
1035,
2171,
1010,
16474,
1035,
4696,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
2862,
1035,
2609,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
rmosolgo/graphql-ruby | lib/graphql/object_type.rb | GraphQL.ObjectType.implements | def implements(interfaces, inherit: false)
if !interfaces.is_a?(Array)
raise ArgumentError, "`implements(interfaces)` must be an array, not #{interfaces.class} (#{interfaces})"
end
@clean_interfaces = nil
@clean_inherited_fields = nil
dirty_ifaces = inherit ? @dirty_inherited_inte... | ruby | def implements(interfaces, inherit: false)
if !interfaces.is_a?(Array)
raise ArgumentError, "`implements(interfaces)` must be an array, not #{interfaces.class} (#{interfaces})"
end
@clean_interfaces = nil
@clean_inherited_fields = nil
dirty_ifaces = inherit ? @dirty_inherited_inte... | [
"def",
"implements",
"(",
"interfaces",
",",
"inherit",
":",
"false",
")",
"if",
"!",
"interfaces",
".",
"is_a?",
"(",
"Array",
")",
"raise",
"ArgumentError",
",",
"\"`implements(interfaces)` must be an array, not #{interfaces.class} (#{interfaces})\"",
"end",
"@clean_int... | Declare that this object implements this interface.
This declaration will be validated when the schema is defined.
@param interfaces [Array<GraphQL::Interface>] add a new interface that this type implements
@param inherits [Boolean] If true, copy the interfaces' field definitions to this type | [
"Declare",
"that",
"this",
"object",
"implements",
"this",
"interface",
".",
"This",
"declaration",
"will",
"be",
"validated",
"when",
"the",
"schema",
"is",
"defined",
"."
] | d5be13a816f220b9efbabeaa69a3e56fedf311f5 | https://github.com/rmosolgo/graphql-ruby/blob/d5be13a816f220b9efbabeaa69a3e56fedf311f5/lib/graphql/object_type.rb#L94-L103 | train | Sets the class to use for the given class. | [
30522,
13366,
22164,
1006,
19706,
1010,
22490,
1024,
6270,
1007,
2065,
999,
19706,
1012,
2003,
1035,
1037,
1029,
1006,
9140,
1007,
5333,
6685,
2121,
29165,
1010,
1000,
1036,
22164,
1006,
19706,
1007,
1036,
2442,
2022,
2019,
9140,
1010,
2025... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
CocoaPods/Xcodeproj | lib/xcodeproj/config.rb | Xcodeproj.Config.extract_key_value | def extract_key_value(line)
match = line.match(KEY_VALUE_PATTERN)
if match
key = match[1]
value = match[2]
[key.strip, value.strip]
else
[]
end
end | ruby | def extract_key_value(line)
match = line.match(KEY_VALUE_PATTERN)
if match
key = match[1]
value = match[2]
[key.strip, value.strip]
else
[]
end
end | [
"def",
"extract_key_value",
"(",
"line",
")",
"match",
"=",
"line",
".",
"match",
"(",
"KEY_VALUE_PATTERN",
")",
"if",
"match",
"key",
"=",
"match",
"[",
"1",
"]",
"value",
"=",
"match",
"[",
"2",
"]",
"[",
"key",
".",
"strip",
",",
"value",
".",
"... | Returns the key and the value described by the given line of an xcconfig.
@param [String] line
the line to process.
@return [Array] A tuple where the first entry is the key and the second
entry is the value. | [
"Returns",
"the",
"key",
"and",
"the",
"value",
"described",
"by",
"the",
"given",
"line",
"of",
"an",
"xcconfig",
"."
] | 3be1684437a6f8e69c7836ad4c85a2b78663272f | https://github.com/CocoaPods/Xcodeproj/blob/3be1684437a6f8e69c7836ad4c85a2b78663272f/lib/xcodeproj/config.rb#L345-L354 | train | Extract the key value from a line | [
30522,
13366,
14817,
1035,
30524,
1012,
6167,
1010,
3643,
1012,
6167,
1033,
2842,
1031,
1033,
2203,
2203,
102,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
rails/rails | actionpack/lib/action_controller/metal/request_forgery_protection.rb | ActionController.RequestForgeryProtection.masked_authenticity_token | def masked_authenticity_token(session, form_options: {}) # :doc:
action, method = form_options.values_at(:action, :method)
raw_token = if per_form_csrf_tokens && action && method
action_path = normalize_action_path(action)
per_form_csrf_token(session, action_path, method)
el... | ruby | def masked_authenticity_token(session, form_options: {}) # :doc:
action, method = form_options.values_at(:action, :method)
raw_token = if per_form_csrf_tokens && action && method
action_path = normalize_action_path(action)
per_form_csrf_token(session, action_path, method)
el... | [
"def",
"masked_authenticity_token",
"(",
"session",
",",
"form_options",
":",
"{",
"}",
")",
"# :doc:",
"action",
",",
"method",
"=",
"form_options",
".",
"values_at",
"(",
":action",
",",
":method",
")",
"raw_token",
"=",
"if",
"per_form_csrf_tokens",
"&&",
"... | Creates a masked version of the authenticity token that varies
on each request. The masking is used to mitigate SSL attacks
like BREACH. | [
"Creates",
"a",
"masked",
"version",
"of",
"the",
"authenticity",
"token",
"that",
"varies",
"on",
"each",
"request",
".",
"The",
"masking",
"is",
"used",
"to",
"mitigate",
"SSL",
"attacks",
"like",
"BREACH",
"."
] | 85a8bc644be69908f05740a5886ec19cd3679df5 | https://github.com/rails/rails/blob/85a8bc644be69908f05740a5886ec19cd3679df5/actionpack/lib/action_controller/metal/request_forgery_protection.rb#L320-L334 | train | Returns the masked authentication token for the given session. | [
30522,
13366,
16520,
1035,
21452,
1035,
19204,
1006,
5219,
1010,
2433,
1035,
7047,
1024,
1063,
1065,
1007,
1001,
1024,
9986,
1024,
2895,
1010,
4118,
1027,
2433,
1035,
7047,
1012,
5300,
1035,
2012,
1006,
1024,
2895,
1010,
1024,
4118,
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-sns/lib/aws-sdk-sns/platform_endpoint.rb | Aws::SNS.PlatformEndpoint.publish | def publish(options = {})
options = options.merge(target_arn: @arn)
resp = @client.publish(options)
resp.data
end | ruby | def publish(options = {})
options = options.merge(target_arn: @arn)
resp = @client.publish(options)
resp.data
end | [
"def",
"publish",
"(",
"options",
"=",
"{",
"}",
")",
"options",
"=",
"options",
".",
"merge",
"(",
"target_arn",
":",
"@arn",
")",
"resp",
"=",
"@client",
".",
"publish",
"(",
"options",
")",
"resp",
".",
"data",
"end"
] | @example Request syntax with placeholder values
platform_endpoint.publish({
topic_arn: "topicARN",
phone_number: "String",
message: "message", # required
subject: "subject",
message_structure: "messageStructure",
message_attributes: {
"String" => {
data_type: "String", ... | [
"@example",
"Request",
"syntax",
"with",
"placeholder",
"values"
] | e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d | https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-sns/lib/aws-sdk-sns/platform_endpoint.rb#L224-L228 | train | Publishes the target to the target | [
30522,
13366,
10172,
1006,
7047,
1027,
1063,
1065,
1007,
7047,
1027,
7047,
1012,
13590,
1006,
4539,
1035,
12098,
2078,
1024,
1030,
12098,
2078,
1007,
24501,
2361,
1027,
1030,
7396,
1012,
10172,
1006,
7047,
1007,
24501,
2361,
1012,
2951,
220... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
piotrmurach/github | lib/github_api/paged_request.rb | Github.PagedRequest.page_request | def page_request(path, params={})
if params[PARAM_PER_PAGE] == NOT_FOUND
params[PARAM_PER_PAGE] = default_page_size
end
if params[PARAM_PAGE] && params[PARAM_PAGE] == NOT_FOUND
params[PARAM_PAGE] = default_page
end
current_api.get_request(path, ParamsHash.new(params))
... | ruby | def page_request(path, params={})
if params[PARAM_PER_PAGE] == NOT_FOUND
params[PARAM_PER_PAGE] = default_page_size
end
if params[PARAM_PAGE] && params[PARAM_PAGE] == NOT_FOUND
params[PARAM_PAGE] = default_page
end
current_api.get_request(path, ParamsHash.new(params))
... | [
"def",
"page_request",
"(",
"path",
",",
"params",
"=",
"{",
"}",
")",
"if",
"params",
"[",
"PARAM_PER_PAGE",
"]",
"==",
"NOT_FOUND",
"params",
"[",
"PARAM_PER_PAGE",
"]",
"=",
"default_page_size",
"end",
"if",
"params",
"[",
"PARAM_PAGE",
"]",
"&&",
"para... | Perform http get request with pagination parameters | [
"Perform",
"http",
"get",
"request",
"with",
"pagination",
"parameters"
] | 8702452c66bea33c9388550aed9e9974f76aaef1 | https://github.com/piotrmurach/github/blob/8702452c66bea33c9388550aed9e9974f76aaef1/lib/github_api/paged_request.rb#L30-L39 | train | Get a request to a specific page | [
30522,
13366,
3931,
1035,
5227,
1006,
4130,
1010,
11498,
5244,
1027,
1063,
1065,
1007,
2065,
11498,
5244,
1031,
11498,
2213,
1035,
2566,
1035,
3931,
1033,
1027,
1027,
2025,
1035,
2179,
11498,
5244,
1031,
11498,
2213,
1035,
2566,
1035,
3931,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/indexers/hyrax/deep_indexing_service.rb | Hyrax.DeepIndexingService.append_label_and_uri | def append_label_and_uri(solr_doc, solr_field_key, field_info, val)
val = val.solrize
ActiveFedora::Indexing::Inserter.create_and_insert_terms(solr_field_key,
val.first,
fiel... | ruby | def append_label_and_uri(solr_doc, solr_field_key, field_info, val)
val = val.solrize
ActiveFedora::Indexing::Inserter.create_and_insert_terms(solr_field_key,
val.first,
fiel... | [
"def",
"append_label_and_uri",
"(",
"solr_doc",
",",
"solr_field_key",
",",
"field_info",
",",
"val",
")",
"val",
"=",
"val",
".",
"solrize",
"ActiveFedora",
"::",
"Indexing",
"::",
"Inserter",
".",
"create_and_insert_terms",
"(",
"solr_field_key",
",",
"val",
"... | Appends the uri to the default solr field and puts the label (if found) in the label solr field
@param [Hash] solr_doc
@param [String] solr_field_key
@param [Hash] field_info
@param [Array] val an array of two elements, first is a string (the uri) and the second is a hash with one key: `:label` | [
"Appends",
"the",
"uri",
"to",
"the",
"default",
"solr",
"field",
"and",
"puts",
"the",
"label",
"(",
"if",
"found",
")",
"in",
"the",
"label",
"solr",
"field"
] | e2b4f56e829a53b1f11296324736e9d5b8c9ee5f | https://github.com/samvera/hyrax/blob/e2b4f56e829a53b1f11296324736e9d5b8c9ee5f/app/indexers/hyrax/deep_indexing_service.rb#L68-L77 | train | Append label and uri to the solr_doc | [
30522,
13366,
10439,
10497,
1035,
3830,
1035,
1998,
1035,
24471,
2072,
1006,
14017,
2099,
1035,
9986,
1010,
14017,
2099,
1035,
2492,
1035,
3145,
1010,
2492,
1035,
18558,
1010,
11748,
1007,
11748,
1027,
11748,
1012,
14017,
25709,
3161,
25031,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/npm.rb | Sprockets.Npm.resolve_alternates | def resolve_alternates(load_path, logical_path)
candidates, deps = super
dirname = File.join(load_path, logical_path)
if directory?(dirname)
filename = File.join(dirname, 'package.json')
if self.file?(filename)
deps << build_file_digest_uri(filename)
read_package... | ruby | def resolve_alternates(load_path, logical_path)
candidates, deps = super
dirname = File.join(load_path, logical_path)
if directory?(dirname)
filename = File.join(dirname, 'package.json')
if self.file?(filename)
deps << build_file_digest_uri(filename)
read_package... | [
"def",
"resolve_alternates",
"(",
"load_path",
",",
"logical_path",
")",
"candidates",
",",
"deps",
"=",
"super",
"dirname",
"=",
"File",
".",
"join",
"(",
"load_path",
",",
"logical_path",
")",
"if",
"directory?",
"(",
"dirname",
")",
"filename",
"=",
"File... | Internal: Override resolve_alternates to install package.json behavior.
load_path - String environment path
logical_path - String path relative to base
Returns candiate filenames. | [
"Internal",
":",
"Override",
"resolve_alternates",
"to",
"install",
"package",
".",
"json",
"behavior",
"."
] | 9e3f0d8e98c44f57e67bc138db87bb8469bf5ddd | https://github.com/rails/sprockets/blob/9e3f0d8e98c44f57e67bc138db87bb8469bf5ddd/lib/sprockets/npm.rb#L12-L31 | train | Resolve all alternate packages | [
30522,
13366,
10663,
1035,
6585,
2015,
1006,
30524,
11177,
1035,
4130,
1007,
5347,
1010,
2139,
4523,
1027,
3565,
16101,
18442,
1027,
5371,
1012,
3693,
1006,
7170,
1035,
4130,
1010,
11177,
1035,
4130,
1007,
2065,
14176,
1029,
1006,
16101,
18... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
square/connect-ruby-sdk | lib/square_connect/api/v1_employees_api.rb | SquareConnect.V1EmployeesApi.update_timecard | def update_timecard(timecard_id, body, opts = {})
data, _status_code, _headers = update_timecard_with_http_info(timecard_id, body, opts)
return data
end | ruby | def update_timecard(timecard_id, body, opts = {})
data, _status_code, _headers = update_timecard_with_http_info(timecard_id, body, opts)
return data
end | [
"def",
"update_timecard",
"(",
"timecard_id",
",",
"body",
",",
"opts",
"=",
"{",
"}",
")",
"data",
",",
"_status_code",
",",
"_headers",
"=",
"update_timecard_with_http_info",
"(",
"timecard_id",
",",
"body",
",",
"opts",
")",
"return",
"data",
"end"
] | UpdateTimecard
Modifies the details of a timecard with an `API_EDIT` event for the timecard. Updating an active timecard with a `clockout_time` clocks the employee out.
@param timecard_id TThe ID of the timecard to modify.
@param body An object containing the fields to POST for the request. See the corresponding obj... | [
"UpdateTimecard",
"Modifies",
"the",
"details",
"of",
"a",
"timecard",
"with",
"an",
"API_EDIT",
"event",
"for",
"the",
"timecard",
".",
"Updating",
"an",
"active",
"timecard",
"with",
"a",
"clockout_time",
"clocks",
"the",
"employee",
"out",
"."
] | 798eb9ded716f23b9f1518386f1c311a34bca8bf | https://github.com/square/connect-ruby-sdk/blob/798eb9ded716f23b9f1518386f1c311a34bca8bf/lib/square_connect/api/v1_employees_api.rb#L944-L947 | train | Updates a timecard | [
30522,
13366,
10651,
1035,
2051,
11522,
1006,
2051,
11522,
1035,
8909,
1010,
2303,
1010,
23569,
2015,
1027,
1063,
1065,
1007,
2951,
1010,
1035,
3570,
1035,
3642,
1010,
1035,
20346,
2015,
1027,
10651,
1035,
2051,
11522,
1035,
2007,
1035,
829... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_stream_analytics/lib/2016-03-01/generated/azure_mgmt_stream_analytics/outputs.rb | Azure::StreamAnalytics::Mgmt::V2016_03_01.Outputs.list_by_streaming_job_as_lazy | def list_by_streaming_job_as_lazy(resource_group_name, job_name, select:nil, custom_headers:nil)
response = list_by_streaming_job_async(resource_group_name, job_name, select:select, custom_headers:custom_headers).value!
unless response.nil?
page = response.body
page.next_method = Proc.new do... | ruby | def list_by_streaming_job_as_lazy(resource_group_name, job_name, select:nil, custom_headers:nil)
response = list_by_streaming_job_async(resource_group_name, job_name, select:select, custom_headers:custom_headers).value!
unless response.nil?
page = response.body
page.next_method = Proc.new do... | [
"def",
"list_by_streaming_job_as_lazy",
"(",
"resource_group_name",
",",
"job_name",
",",
"select",
":",
"nil",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"list_by_streaming_job_async",
"(",
"resource_group_name",
",",
"job_name",
",",
"select",
":",
"... | Lists all of the outputs under the specified streaming job.
@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 job_name [String] The name of the streaming job.
@param select [String] The... | [
"Lists",
"all",
"of",
"the",
"outputs",
"under",
"the",
"specified",
"streaming",
"job",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_stream_analytics/lib/2016-03-01/generated/azure_mgmt_stream_analytics/outputs.rb#L913-L922 | train | Gets the list of all the image artifacts in a streaming job. | [
30522,
13366,
2862,
1035,
2011,
1035,
11058,
1035,
3105,
1035,
2004,
1035,
13971,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
3105,
1035,
2171,
1010,
7276,
1024,
9152,
2140,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_media_services/lib/2018-07-01/generated/azure_mgmt_media_services/assets.rb | Azure::MediaServices::Mgmt::V2018_07_01.Assets.list_streaming_locators | def list_streaming_locators(resource_group_name, account_name, asset_name, custom_headers:nil)
response = list_streaming_locators_async(resource_group_name, account_name, asset_name, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def list_streaming_locators(resource_group_name, account_name, asset_name, custom_headers:nil)
response = list_streaming_locators_async(resource_group_name, account_name, asset_name, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"list_streaming_locators",
"(",
"resource_group_name",
",",
"account_name",
",",
"asset_name",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"list_streaming_locators_async",
"(",
"resource_group_name",
",",
"account_name",
",",
"asset_name",
",",
"cust... | List Streaming Locators
Lists Streaming Locators which are associated with this asset.
@param resource_group_name [String] The name of the resource group within the
Azure subscription.
@param account_name [String] The Media Services account name.
@param asset_name [String] The Asset name.
@param custom_headers ... | [
"List",
"Streaming",
"Locators"
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_media_services/lib/2018-07-01/generated/azure_mgmt_media_services/assets.rb#L831-L834 | train | Gets the list of streaming locators for an asset. | [
30522,
13366,
2862,
1035,
11058,
1035,
8840,
11266,
5668,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
4070,
1035,
2171,
1010,
11412,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
2862,
1035,
11058,
1035,
8840,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
aws/aws-sdk-ruby | gems/aws-sdk-sns/lib/aws-sdk-sns/subscription.rb | Aws::SNS.Subscription.delete | def delete(options = {})
options = options.merge(subscription_arn: @arn)
resp = @client.unsubscribe(options)
resp.data
end | ruby | def delete(options = {})
options = options.merge(subscription_arn: @arn)
resp = @client.unsubscribe(options)
resp.data
end | [
"def",
"delete",
"(",
"options",
"=",
"{",
"}",
")",
"options",
"=",
"options",
".",
"merge",
"(",
"subscription_arn",
":",
"@arn",
")",
"resp",
"=",
"@client",
".",
"unsubscribe",
"(",
"options",
")",
"resp",
".",
"data",
"end"
] | @!group Actions
@example Request syntax with placeholder values
subscription.delete()
@param [Hash] options ({})
@return [EmptyStructure] | [
"@!group",
"Actions",
"@example",
"Request",
"syntax",
"with",
"placeholder",
"values"
] | e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d | https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-sns/lib/aws-sdk-sns/subscription.rb#L109-L113 | train | Delete a subscription | [
30522,
13366,
3972,
12870,
1006,
7047,
1027,
1063,
1065,
1007,
7047,
1027,
7047,
1012,
13590,
1006,
15002,
1035,
12098,
2078,
1024,
1030,
12098,
2078,
1007,
24501,
2361,
1027,
1030,
7396,
1012,
4895,
6342,
5910,
26775,
20755,
30524,
0,
0,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_web/lib/2018-02-01/generated/azure_mgmt_web/app_service_environments.rb | Azure::Web::Mgmt::V2018_02_01.AppServiceEnvironments.list_web_worker_metrics_with_http_info | def list_web_worker_metrics_with_http_info(resource_group_name, name, worker_pool_name, details:nil, filter:nil, custom_headers:nil)
list_web_worker_metrics_async(resource_group_name, name, worker_pool_name, details:details, filter:filter, custom_headers:custom_headers).value!
end | ruby | def list_web_worker_metrics_with_http_info(resource_group_name, name, worker_pool_name, details:nil, filter:nil, custom_headers:nil)
list_web_worker_metrics_async(resource_group_name, name, worker_pool_name, details:details, filter:filter, custom_headers:custom_headers).value!
end | [
"def",
"list_web_worker_metrics_with_http_info",
"(",
"resource_group_name",
",",
"name",
",",
"worker_pool_name",
",",
"details",
":",
"nil",
",",
"filter",
":",
"nil",
",",
"custom_headers",
":",
"nil",
")",
"list_web_worker_metrics_async",
"(",
"resource_group_name",... | Get metrics for a worker pool of a AppServiceEnvironment (App Service
Environment).
Get metrics for a worker pool of a AppServiceEnvironment (App Service
Environment).
@param resource_group_name [String] Name of the resource group to which the
resource belongs.
@param name [String] Name of the App Service Envir... | [
"Get",
"metrics",
"for",
"a",
"worker",
"pool",
"of",
"a",
"AppServiceEnvironment",
"(",
"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#L3839-L3841 | train | Gets metrics for a worker pool. | [
30522,
13366,
2862,
1035,
4773,
1035,
7309,
1035,
12046,
2015,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2171,
1010,
7309,
1035,
4770,
1035,
2171,
1010,
4751,
1024,
9152,
2140,
1010,
11307,
1024,
9152,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_reservations/lib/2017-11-01/generated/azure_mgmt_reservations/reservation.rb | Azure::Reservations::Mgmt::V2017_11_01.Reservation.split | def split(reservation_order_id, body, custom_headers:nil)
response = split_async(reservation_order_id, body, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def split(reservation_order_id, body, custom_headers:nil)
response = split_async(reservation_order_id, body, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"split",
"(",
"reservation_order_id",
",",
"body",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"split_async",
"(",
"reservation_order_id",
",",
"body",
",",
"custom_headers",
":custom_headers",
")",
".",
"value!",
"response",
".",
"body",
"un... | Split the `Reservation`.
Split a `Reservation` into two `Reservation`s with specified quantity
distribution.
@param reservation_order_id [String] Order Id of the reservation
@param body [SplitRequest] Information needed to Split a reservation item
@param custom_headers [Hash{String => String}] A hash of custom... | [
"Split",
"the",
"Reservation",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_reservations/lib/2017-11-01/generated/azure_mgmt_reservations/reservation.rb#L39-L42 | train | Splits the given reservation order by the given body. | [
30522,
13366,
3975,
1006,
11079,
1035,
2344,
1035,
8909,
1010,
2303,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
3975,
1035,
2004,
6038,
2278,
1006,
11079,
1035,
2344,
1035,
8909,
1010,
2303,
1010,
7661,
1035,
20346,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_links/lib/2016-09-01/generated/azure_mgmt_links/resource_links.rb | Azure::Links::Mgmt::V2016_09_01.ResourceLinks.list_at_source_scope | def list_at_source_scope(scope, filter:nil, custom_headers:nil)
first_page = list_at_source_scope_as_lazy(scope, filter:filter, custom_headers:custom_headers)
first_page.get_all_items
end | ruby | def list_at_source_scope(scope, filter:nil, custom_headers:nil)
first_page = list_at_source_scope_as_lazy(scope, filter:filter, custom_headers:custom_headers)
first_page.get_all_items
end | [
"def",
"list_at_source_scope",
"(",
"scope",
",",
"filter",
":",
"nil",
",",
"custom_headers",
":",
"nil",
")",
"first_page",
"=",
"list_at_source_scope_as_lazy",
"(",
"scope",
",",
"filter",
":",
"filter",
",",
"custom_headers",
":custom_headers",
")",
"first_pag... | Gets a list of resource links at and below the specified source scope.
@param scope [String] The fully qualified ID of the scope for getting the
resource links. For example, to list resource links at and under a resource
group, set the scope to
/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myG... | [
"Gets",
"a",
"list",
"of",
"resource",
"links",
"at",
"and",
"below",
"the",
"specified",
"source",
"scope",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_links/lib/2016-09-01/generated/azure_mgmt_links/resource_links.rb#L441-L444 | train | Gets all the items at source scope. | [
30522,
13366,
2862,
1035,
2012,
1035,
3120,
1035,
9531,
1006,
9531,
1010,
11307,
1024,
9152,
2140,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
2034,
1035,
3931,
1027,
2862,
1035,
2012,
1035,
3120,
1035,
9531,
1035,
2004,
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_authorization/lib/2018-09-01-preview/generated/azure_mgmt_authorization/role_assignments.rb | Azure::Authorization::Mgmt::V2018_09_01_preview.RoleAssignments.get | def get(scope, role_assignment_name, custom_headers:nil)
response = get_async(scope, role_assignment_name, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def get(scope, role_assignment_name, custom_headers:nil)
response = get_async(scope, role_assignment_name, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"get",
"(",
"scope",
",",
"role_assignment_name",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"get_async",
"(",
"scope",
",",
"role_assignment_name",
",",
"custom_headers",
":custom_headers",
")",
".",
"value!",
"response",
".",
"body",
"unle... | Get the specified role assignment.
@param scope [String] The scope of the role assignment.
@param role_assignment_name [String] The name of the role assignment to get.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request.
@return [RoleAssignment] operatio... | [
"Get",
"the",
"specified",
"role",
"assignment",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_authorization/lib/2018-09-01-preview/generated/azure_mgmt_authorization/role_assignments.rb#L482-L485 | train | Gets the role assignment s segmentation. | [
30522,
13366,
2131,
1006,
9531,
1010,
2535,
1035,
8775,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
2131,
1035,
2004,
6038,
2278,
1006,
9531,
1010,
2535,
1035,
8775,
1035,
2171,
1010,
7661,
1035,
20346,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_network/lib/2018-07-01/generated/azure_mgmt_network/default_security_rules.rb | Azure::Network::Mgmt::V2018_07_01.DefaultSecurityRules.list | def list(resource_group_name, network_security_group_name, custom_headers:nil)
first_page = list_as_lazy(resource_group_name, network_security_group_name, custom_headers:custom_headers)
first_page.get_all_items
end | ruby | def list(resource_group_name, network_security_group_name, custom_headers:nil)
first_page = list_as_lazy(resource_group_name, network_security_group_name, custom_headers:custom_headers)
first_page.get_all_items
end | [
"def",
"list",
"(",
"resource_group_name",
",",
"network_security_group_name",
",",
"custom_headers",
":",
"nil",
")",
"first_page",
"=",
"list_as_lazy",
"(",
"resource_group_name",
",",
"network_security_group_name",
",",
"custom_headers",
":custom_headers",
")",
"first_... | Gets all default security rules in a network security group.
@param resource_group_name [String] The name of the resource group.
@param network_security_group_name [String] The name of the network security
group.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTT... | [
"Gets",
"all",
"default",
"security",
"rules",
"in",
"a",
"network",
"security",
"group",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_network/lib/2018-07-01/generated/azure_mgmt_network/default_security_rules.rb#L35-L38 | train | Gets all the network security groups in a network security group. | [
30522,
13366,
2862,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2897,
1035,
3036,
1035,
2177,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
2034,
1035,
3931,
1027,
2862,
1035,
2004,
1035,
13971,
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... |
rails/rails | activesupport/lib/active_support/dependencies.rb | ActiveSupport.Dependencies.to_constant_name | def to_constant_name(desc) #:nodoc:
case desc
when String then desc.sub(/^::/, "")
when Symbol then desc.to_s
when Module
desc.name ||
raise(ArgumentError, "Anonymous modules have no name to be referenced by")
else raise TypeError, "Not a valid constant descriptor: #{desc... | ruby | def to_constant_name(desc) #:nodoc:
case desc
when String then desc.sub(/^::/, "")
when Symbol then desc.to_s
when Module
desc.name ||
raise(ArgumentError, "Anonymous modules have no name to be referenced by")
else raise TypeError, "Not a valid constant descriptor: #{desc... | [
"def",
"to_constant_name",
"(",
"desc",
")",
"#:nodoc:",
"case",
"desc",
"when",
"String",
"then",
"desc",
".",
"sub",
"(",
"/",
"/",
",",
"\"\"",
")",
"when",
"Symbol",
"then",
"desc",
".",
"to_s",
"when",
"Module",
"desc",
".",
"name",
"||",
"raise",... | Convert the provided const desc to a qualified constant name (as a string).
A module, class, symbol, or string may be provided. | [
"Convert",
"the",
"provided",
"const",
"desc",
"to",
"a",
"qualified",
"constant",
"name",
"(",
"as",
"a",
"string",
")",
".",
"A",
"module",
"class",
"symbol",
"or",
"string",
"may",
"be",
"provided",
"."
] | 85a8bc644be69908f05740a5886ec19cd3679df5 | https://github.com/rails/rails/blob/85a8bc644be69908f05740a5886ec19cd3679df5/activesupport/lib/active_support/dependencies.rb#L693-L702 | train | Returns the constant name for the given descriptor. | [
30522,
13366,
2000,
1035,
5377,
1035,
2171,
1006,
4078,
2278,
1007,
1001,
1024,
7293,
10085,
1024,
2553,
4078,
2278,
2043,
5164,
2059,
4078,
2278,
1012,
4942,
1006,
1013,
1034,
1024,
1024,
1013,
1010,
1000,
1000,
1007,
2043,
6454,
2059,
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... |
aws/aws-sdk-ruby | gems/aws-sdk-s3/lib/aws-sdk-s3/bucket_policy.rb | Aws::S3.BucketPolicy.delete | def delete(options = {})
options = options.merge(bucket: @bucket_name)
resp = @client.delete_bucket_policy(options)
resp.data
end | ruby | def delete(options = {})
options = options.merge(bucket: @bucket_name)
resp = @client.delete_bucket_policy(options)
resp.data
end | [
"def",
"delete",
"(",
"options",
"=",
"{",
"}",
")",
"options",
"=",
"options",
".",
"merge",
"(",
"bucket",
":",
"@bucket_name",
")",
"resp",
"=",
"@client",
".",
"delete_bucket_policy",
"(",
"options",
")",
"resp",
".",
"data",
"end"
] | @!group Actions
@example Request syntax with placeholder values
bucket_policy.delete()
@param [Hash] options ({})
@return [EmptyStructure] | [
"@!group",
"Actions",
"@example",
"Request",
"syntax",
"with",
"placeholder",
"values"
] | e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d | https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-s3/lib/aws-sdk-s3/bucket_policy.rb#L176-L180 | train | Delete the policy on the bucket | [
30522,
13366,
3972,
12870,
1006,
7047,
1027,
1063,
1065,
1007,
30524,
2361,
1012,
2951,
2203,
102,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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.opacity | def opacity(opacity)
if opacity.is_a?(Numeric)
Kernel.raise ArgumentError, 'opacity must be >= 0 and <= 1.0' if opacity < 0 || opacity > 1.0
end
primitive "opacity #{opacity}"
end | ruby | def opacity(opacity)
if opacity.is_a?(Numeric)
Kernel.raise ArgumentError, 'opacity must be >= 0 and <= 1.0' if opacity < 0 || opacity > 1.0
end
primitive "opacity #{opacity}"
end | [
"def",
"opacity",
"(",
"opacity",
")",
"if",
"opacity",
".",
"is_a?",
"(",
"Numeric",
")",
"Kernel",
".",
"raise",
"ArgumentError",
",",
"'opacity must be >= 0 and <= 1.0'",
"if",
"opacity",
"<",
"0",
"||",
"opacity",
">",
"1.0",
"end",
"primitive",
"\"opacity... | Specify drawing fill and stroke opacities. If the value is a string
ending with a %, the number will be multiplied by 0.01. | [
"Specify",
"drawing",
"fill",
"and",
"stroke",
"opacities",
".",
"If",
"the",
"value",
"is",
"a",
"string",
"ending",
"with",
"a",
"%",
"the",
"number",
"will",
"be",
"multiplied",
"by",
"0",
".",
"01",
"."
] | ef6688ed9d76bf123c2ea1a483eff8635051adb7 | https://github.com/rmagick/rmagick/blob/ef6688ed9d76bf123c2ea1a483eff8635051adb7/lib/rmagick_internal.rb#L418-L423 | train | Returns the image s opacity. | [
30522,
13366,
6728,
6305,
3012,
1006,
6728,
6305,
3012,
1007,
2065,
6728,
6305,
3012,
1012,
2003,
1035,
1037,
1029,
1006,
16371,
25531,
1007,
16293,
1012,
5333,
6685,
2121,
29165,
1010,
1005,
6728,
6305,
3012,
2442,
2022,
1028,
1027,
1014,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/cloud_appliances.rb | Azure::StorSimple8000Series::Mgmt::V2017_06_01.CloudAppliances.provision | def provision(parameters, resource_group_name, manager_name, custom_headers:nil)
response = provision_async(parameters, resource_group_name, manager_name, custom_headers:custom_headers).value!
nil
end | ruby | def provision(parameters, resource_group_name, manager_name, custom_headers:nil)
response = provision_async(parameters, resource_group_name, manager_name, custom_headers:custom_headers).value!
nil
end | [
"def",
"provision",
"(",
"parameters",
",",
"resource_group_name",
",",
"manager_name",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"provision_async",
"(",
"parameters",
",",
"resource_group_name",
",",
"manager_name",
",",
"custom_headers",
":custom_head... | Provisions cloud appliance.
@param parameters [CloudAppliance] The cloud appliance
@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. | [
"Provisions",
"cloud",
"appliance",
"."
] | 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/cloud_appliances.rb#L127-L130 | train | Provision a container container. | [
30522,
13366,
9347,
1006,
11709,
1010,
7692,
1035,
2177,
1035,
2171,
1010,
3208,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
9347,
1035,
2004,
6038,
2278,
1006,
11709,
1010,
7692,
1035,
2177,
1035,
2171,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_recovery_services_backup/lib/2016-06-01/generated/azure_mgmt_recovery_services_backup/backups.rb | Azure::RecoveryServicesBackup::Mgmt::V2016_06_01.Backups.trigger_with_http_info | def trigger_with_http_info(vault_name, resource_group_name, fabric_name, container_name, protected_item_name, resource_backup_request, custom_headers:nil)
trigger_async(vault_name, resource_group_name, fabric_name, container_name, protected_item_name, resource_backup_request, custom_headers:custom_headers).value!... | ruby | def trigger_with_http_info(vault_name, resource_group_name, fabric_name, container_name, protected_item_name, resource_backup_request, custom_headers:nil)
trigger_async(vault_name, resource_group_name, fabric_name, container_name, protected_item_name, resource_backup_request, custom_headers:custom_headers).value!... | [
"def",
"trigger_with_http_info",
"(",
"vault_name",
",",
"resource_group_name",
",",
"fabric_name",
",",
"container_name",
",",
"protected_item_name",
",",
"resource_backup_request",
",",
"custom_headers",
":",
"nil",
")",
"trigger_async",
"(",
"vault_name",
",",
"resou... | Triggers the backup job for the specified backup item. This is an
asynchronous operation. To know the status of the operation, call
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
... | [
"Triggers",
"the",
"backup",
"job",
"for",
"the",
"specified",
"backup",
"item",
".",
"This",
"is",
"an",
"asynchronous",
"operation",
".",
"To",
"know",
"the",
"status",
"of",
"the",
"operation",
"call",
"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/backups.rb#L72-L74 | train | Trigger a backup of a backup of a backup of a backup of a backup. | [
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,
7692,
1035,
10200,
1035,
5227,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_iot_hub/lib/2017-01-19/generated/azure_mgmt_iot_hub/iot_hub_resource.rb | Azure::IotHub::Mgmt::V2017_01_19.IotHubResource.delete_event_hub_consumer_group | def delete_event_hub_consumer_group(resource_group_name, resource_name, event_hub_endpoint_name, name, custom_headers:nil)
response = delete_event_hub_consumer_group_async(resource_group_name, resource_name, event_hub_endpoint_name, name, custom_headers:custom_headers).value!
nil
end | ruby | def delete_event_hub_consumer_group(resource_group_name, resource_name, event_hub_endpoint_name, name, custom_headers:nil)
response = delete_event_hub_consumer_group_async(resource_group_name, resource_name, event_hub_endpoint_name, name, custom_headers:custom_headers).value!
nil
end | [
"def",
"delete_event_hub_consumer_group",
"(",
"resource_group_name",
",",
"resource_name",
",",
"event_hub_endpoint_name",
",",
"name",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"delete_event_hub_consumer_group_async",
"(",
"resource_group_name",
",",
"resou... | Delete a consumer group from an Event Hub-compatible endpoint in an IoT hub.
Delete a consumer group from an Event Hub-compatible endpoint in an IoT hub.
@param resource_group_name [String] The name of the resource group that
contains the IoT hub.
@param resource_name [String] The name of the IoT hub.
@param eve... | [
"Delete",
"a",
"consumer",
"group",
"from",
"an",
"Event",
"Hub",
"-",
"compatible",
"endpoint",
"in",
"an",
"IoT",
"hub",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_iot_hub/lib/2017-01-19/generated/azure_mgmt_iot_hub/iot_hub_resource.rb#L978-L981 | train | Deletes an existing Event Hub Consumer Group. | [
30522,
13366,
3972,
12870,
1035,
2724,
1035,
9594,
1035,
7325,
1035,
2177,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
7692,
1035,
2171,
1010,
2724,
1035,
9594,
1035,
2203,
8400,
1035,
2171,
1010,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
tongueroo/jets | lib/jets/rdoc.rb | Jets.Rdoc.options | def options
exclude = %w[
docs
spec
vendor
core.rb
.js
templates
commands
internal
support
Dockerfile
Dockerfile.base
Gemfile
Gemfile.lock
Guardfile
LICENSE
Procfile
Rakefile
... | ruby | def options
exclude = %w[
docs
spec
vendor
core.rb
.js
templates
commands
internal
support
Dockerfile
Dockerfile.base
Gemfile
Gemfile.lock
Guardfile
LICENSE
Procfile
Rakefile
... | [
"def",
"options",
"exclude",
"=",
"%w[",
"docs",
"spec",
"vendor",
"core.rb",
".js",
"templates",
"commands",
"internal",
"support",
"Dockerfile",
"Dockerfile.base",
"Gemfile",
"Gemfile.lock",
"Guardfile",
"LICENSE",
"Procfile",
"Rakefile",
"bin",
"]",
"exclude",
"=... | Use for both jets.gemspec and rake rdoc task | [
"Use",
"for",
"both",
"jets",
".",
"gemspec",
"and",
"rake",
"rdoc",
"task"
] | 46943a519224067e58aa3e2d5656e3ca083150f9 | https://github.com/tongueroo/jets/blob/46943a519224067e58aa3e2d5656e3ca083150f9/lib/jets/rdoc.rb#L4-L27 | train | Returns the options for the command. | [
30522,
13366,
7047,
23329,
1027,
1003,
1059,
1031,
9986,
2015,
28699,
21431,
4563,
1012,
21144,
1012,
1046,
2015,
23561,
2015,
10954,
4722,
2490,
8946,
2121,
8873,
2571,
8946,
2121,
8873,
2571,
1012,
2918,
17070,
8873,
2571,
17070,
8873,
25... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_managed_applications/lib/2018-06-01/generated/azure_mgmt_managed_applications/applications.rb | Azure::ManagedApplications::Mgmt::V2018_06_01.Applications.begin_create_or_update_by_id | def begin_create_or_update_by_id(application_id, parameters, custom_headers:nil)
response = begin_create_or_update_by_id_async(application_id, parameters, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def begin_create_or_update_by_id(application_id, parameters, custom_headers:nil)
response = begin_create_or_update_by_id_async(application_id, parameters, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"begin_create_or_update_by_id",
"(",
"application_id",
",",
"parameters",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"begin_create_or_update_by_id_async",
"(",
"application_id",
",",
"parameters",
",",
"custom_headers",
":custom_headers",
")",
".",
... | Creates a new managed application.
@param application_id [String] The fully qualified ID of the managed
application, including the managed application name and the managed
application resource type. Use the format,
/subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applications/{applica... | [
"Creates",
"a",
"new",
"managed",
"application",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_managed_applications/lib/2018-06-01/generated/azure_mgmt_managed_applications/applications.rb#L1118-L1121 | train | Creates or updates a specific App Service Environment. | [
30522,
30524,
1010,
11709,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
4088,
1035,
3443,
1035,
2030,
1035,
10651,
1035,
2011,
1035,
8909,
1035,
2004,
6038,
2278,
1006,
4646,
1035,
8909,
1010,
11709,
1010,
7661,
1035,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_compute/lib/2018-09-30/generated/azure_mgmt_compute/disks.rb | Azure::Compute::Mgmt::V2018_09_30.Disks.grant_access | def grant_access(resource_group_name, disk_name, grant_access_data, custom_headers:nil)
response = grant_access_async(resource_group_name, disk_name, grant_access_data, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def grant_access(resource_group_name, disk_name, grant_access_data, custom_headers:nil)
response = grant_access_async(resource_group_name, disk_name, grant_access_data, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"grant_access",
"(",
"resource_group_name",
",",
"disk_name",
",",
"grant_access_data",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"grant_access_async",
"(",
"resource_group_name",
",",
"disk_name",
",",
"grant_access_data",
",",
"custom_headers",
... | Grants access to a disk.
@param resource_group_name [String] The name of the resource group.
@param disk_name [String] The name of the managed disk that is being created.
The name can't be changed after the disk is created. Supported characters for
the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 ch... | [
"Grants",
"access",
"to",
"a",
"disk",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_compute/lib/2018-09-30/generated/azure_mgmt_compute/disks.rb#L450-L453 | train | Grant access to a disk. | [
30522,
13366,
3946,
1035,
3229,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
9785,
1035,
2171,
1010,
3946,
1035,
3229,
1035,
2951,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
3946,
1035,
3229,
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... |
mojombo/chronic | lib/chronic/repeaters/repeater_second.rb | Chronic.RepeaterSecond.next | def next(pointer = :future)
super
direction = pointer == :future ? 1 : -1
unless @second_start
@second_start = @now + (direction * SECOND_SECONDS)
else
@second_start += SECOND_SECONDS * direction
end
Span.new(@second_start, @second_start + SECOND_SECONDS)
end | ruby | def next(pointer = :future)
super
direction = pointer == :future ? 1 : -1
unless @second_start
@second_start = @now + (direction * SECOND_SECONDS)
else
@second_start += SECOND_SECONDS * direction
end
Span.new(@second_start, @second_start + SECOND_SECONDS)
end | [
"def",
"next",
"(",
"pointer",
"=",
":future",
")",
"super",
"direction",
"=",
"pointer",
"==",
":future",
"?",
"1",
":",
"-",
"1",
"unless",
"@second_start",
"@second_start",
"=",
"@now",
"+",
"(",
"direction",
"*",
"SECOND_SECONDS",
")",
"else",
"@second... | haha, awesome | [
"haha",
"awesome"
] | 2b1eae7ec440d767c09e0b1a7f0e9bcf30ce1d6c | https://github.com/mojombo/chronic/blob/2b1eae7ec440d767c09e0b1a7f0e9bcf30ce1d6c/lib/chronic/repeaters/repeater_second.rb#L10-L22 | train | Returns the next Span in the sequence. | [
30522,
13366,
2279,
1006,
20884,
1027,
1024,
2925,
1007,
3565,
3257,
1027,
20884,
1027,
1027,
1024,
2925,
1029,
1015,
1024,
1011,
1015,
4983,
1030,
2117,
1035,
2707,
1030,
2117,
1035,
2707,
1027,
1030,
2085,
1009,
1006,
3257,
1008,
2117,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
rails/rails | railties/lib/rails/engine.rb | Rails.Engine.load_generators | def load_generators(app = self)
require "rails/generators"
run_generators_blocks(app)
Rails::Generators.configure!(app.config.generators)
self
end | ruby | def load_generators(app = self)
require "rails/generators"
run_generators_blocks(app)
Rails::Generators.configure!(app.config.generators)
self
end | [
"def",
"load_generators",
"(",
"app",
"=",
"self",
")",
"require",
"\"rails/generators\"",
"run_generators_blocks",
"(",
"app",
")",
"Rails",
"::",
"Generators",
".",
"configure!",
"(",
"app",
".",
"config",
".",
"generators",
")",
"self",
"end"
] | Load Rails generators and invoke the registered hooks.
Check <tt>Rails::Railtie.generators</tt> for more info. | [
"Load",
"Rails",
"generators",
"and",
"invoke",
"the",
"registered",
"hooks",
".",
"Check",
"<tt",
">",
"Rails",
"::",
"Railtie",
".",
"generators<",
"/",
"tt",
">",
"for",
"more",
"info",
"."
] | 85a8bc644be69908f05740a5886ec19cd3679df5 | https://github.com/rails/rails/blob/85a8bc644be69908f05740a5886ec19cd3679df5/railties/lib/rails/engine.rb#L465-L470 | train | Load the generators | [
30522,
13366,
7170,
1035,
16937,
1006,
10439,
1027,
2969,
1007,
5478,
1000,
15168,
1013,
16937,
1000,
2448,
1035,
16937,
1035,
5991,
1006,
10439,
1007,
15168,
1024,
1024,
16937,
1012,
9530,
8873,
27390,
2063,
999,
1006,
10439,
1012,
9530,
8... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/tag.rb | Azure::ApiManagement::Mgmt::V2018_01_01.Tag.get_by_api_with_http_info | def get_by_api_with_http_info(resource_group_name, service_name, api_id, tag_id, custom_headers:nil)
get_by_api_async(resource_group_name, service_name, api_id, tag_id, custom_headers:custom_headers).value!
end | ruby | def get_by_api_with_http_info(resource_group_name, service_name, api_id, tag_id, custom_headers:nil)
get_by_api_async(resource_group_name, service_name, api_id, tag_id, custom_headers:custom_headers).value!
end | [
"def",
"get_by_api_with_http_info",
"(",
"resource_group_name",
",",
"service_name",
",",
"api_id",
",",
"tag_id",
",",
"custom_headers",
":",
"nil",
")",
"get_by_api_async",
"(",
"resource_group_name",
",",
"service_name",
",",
"api_id",
",",
"tag_id",
",",
"custom... | Get tag associated with the API.
@param resource_group_name [String] The name of the resource group.
@param service_name [String] The name of the API Management service.
@param api_id [String] API revision identifier. Must be unique in the current
API Management service instance. Non-current revision has ;rev=n as... | [
"Get",
"tag",
"associated",
"with",
"the",
"API",
"."
] | 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#L973-L975 | train | Gets the specified tag for the specified API. | [
30522,
13366,
2131,
1035,
2011,
1035,
17928,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2326,
1035,
2171,
1010,
17928,
1035,
8909,
1010,
6415,
1035,
8909,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_container_registry/lib/2017-10-01/generated/azure_mgmt_container_registry/registries.rb | Azure::ContainerRegistry::Mgmt::V2017_10_01.Registries.update_policies_async | def update_policies_async(resource_group_name, registry_name, registry_policies_update_parameters, custom_headers:nil)
# Send request
promise = begin_update_policies_async(resource_group_name, registry_name, registry_policies_update_parameters, custom_headers:custom_headers)
promise = promise.then do... | ruby | def update_policies_async(resource_group_name, registry_name, registry_policies_update_parameters, custom_headers:nil)
# Send request
promise = begin_update_policies_async(resource_group_name, registry_name, registry_policies_update_parameters, custom_headers:custom_headers)
promise = promise.then do... | [
"def",
"update_policies_async",
"(",
"resource_group_name",
",",
"registry_name",
",",
"registry_policies_update_parameters",
",",
"custom_headers",
":",
"nil",
")",
"# Send request",
"promise",
"=",
"begin_update_policies_async",
"(",
"resource_group_name",
",",
"registry_na... | @param resource_group_name [String] The name of the resource group to which
the container registry belongs.
@param registry_name [String] The name of the container registry.
@param registry_policies_update_parameters [RegistryPolicies] The parameters
for updating policies of a container registry.
@param custom_hea... | [
"@param",
"resource_group_name",
"[",
"String",
"]",
"The",
"name",
"of",
"the",
"resource",
"group",
"to",
"which",
"the",
"container",
"registry",
"belongs",
".",
"@param",
"registry_name",
"[",
"String",
"]",
"The",
"name",
"of",
"the",
"container",
"regist... | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_container_registry/lib/2017-10-01/generated/azure_mgmt_container_registry/registries.rb#L1028-L1044 | train | Updates the policies of a container registry. | [
30522,
13366,
10651,
1035,
6043,
1035,
2004,
6038,
2278,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
15584,
1035,
2171,
1010,
15584,
1035,
6043,
1035,
10651,
1035,
11709,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
1001,
4604,
5227... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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_attribute.rb | Aws::RDS.DBSnapshotAttribute.modify | def modify(options = {})
options = options.merge(
attribute_name: @name,
db_snapshot_identifier: @snapshot_id
)
resp = @client.modify_db_snapshot_attribute(options)
resp.data
end | ruby | def modify(options = {})
options = options.merge(
attribute_name: @name,
db_snapshot_identifier: @snapshot_id
)
resp = @client.modify_db_snapshot_attribute(options)
resp.data
end | [
"def",
"modify",
"(",
"options",
"=",
"{",
"}",
")",
"options",
"=",
"options",
".",
"merge",
"(",
"attribute_name",
":",
"@name",
",",
"db_snapshot_identifier",
":",
"@snapshot_id",
")",
"resp",
"=",
"@client",
".",
"modify_db_snapshot_attribute",
"(",
"optio... | @!group Actions
@example Request syntax with placeholder values
db_snapshot_attribute.modify({
values_to_add: ["String"],
values_to_remove: ["String"],
})
@param [Hash] options ({})
@option options [Array<String>] :values_to_add
A list of DB snapshot attributes to add to the attribute specified b... | [
"@!group",
"Actions",
"@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_attribute.rb#L208-L215 | train | Modify the attribute of the snapshot | [
30522,
13366,
19933,
1006,
7047,
1027,
1063,
1065,
1007,
7047,
1027,
7047,
1012,
13590,
1006,
17961,
1035,
2171,
1024,
1030,
2171,
1010,
16962,
1035,
20057,
12326,
1035,
8909,
4765,
18095,
1024,
1030,
20057,
12326,
1035,
8909,
1007,
24501,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Dynamoid/dynamoid | lib/dynamoid/config.rb | Dynamoid.Config.logger= | def logger=(logger)
case logger
when false, nil then @logger = NullLogger.new
when true then @logger = default_logger
else
@logger = logger if logger.respond_to?(:info)
end
end | ruby | def logger=(logger)
case logger
when false, nil then @logger = NullLogger.new
when true then @logger = default_logger
else
@logger = logger if logger.respond_to?(:info)
end
end | [
"def",
"logger",
"=",
"(",
"logger",
")",
"case",
"logger",
"when",
"false",
",",
"nil",
"then",
"@logger",
"=",
"NullLogger",
".",
"new",
"when",
"true",
"then",
"@logger",
"=",
"default_logger",
"else",
"@logger",
"=",
"logger",
"if",
"logger",
".",
"r... | If you want to, set the logger manually to any output you'd like. Or pass false or nil to disable logging entirely.
@since 0.2.0 | [
"If",
"you",
"want",
"to",
"set",
"the",
"logger",
"manually",
"to",
"any",
"output",
"you",
"d",
"like",
".",
"Or",
"pass",
"false",
"or",
"nil",
"to",
"disable",
"logging",
"entirely",
"."
] | 9e3d006b039e45877b003564ded65509b10b6354 | https://github.com/Dynamoid/dynamoid/blob/9e3d006b039e45877b003564ded65509b10b6354/lib/dynamoid/config.rb#L67-L74 | train | Sets the logger to use. | [
30522,
13366,
8833,
4590,
1027,
1006,
8833,
4590,
1007,
2553,
8833,
4590,
2043,
6270,
1010,
9152,
2140,
2059,
1030,
8833,
4590,
1027,
19701,
21197,
4590,
1012,
2047,
2043,
2995,
2059,
1030,
8833,
4590,
1027,
12398,
1035,
8833,
4590,
2842,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
square/connect-ruby-sdk | lib/square_connect/api/v1_employees_api.rb | SquareConnect.V1EmployeesApi.retrieve_cash_drawer_shift | def retrieve_cash_drawer_shift(location_id, shift_id, opts = {})
data, _status_code, _headers = retrieve_cash_drawer_shift_with_http_info(location_id, shift_id, opts)
return data
end | ruby | def retrieve_cash_drawer_shift(location_id, shift_id, opts = {})
data, _status_code, _headers = retrieve_cash_drawer_shift_with_http_info(location_id, shift_id, opts)
return data
end | [
"def",
"retrieve_cash_drawer_shift",
"(",
"location_id",
",",
"shift_id",
",",
"opts",
"=",
"{",
"}",
")",
"data",
",",
"_status_code",
",",
"_headers",
"=",
"retrieve_cash_drawer_shift_with_http_info",
"(",
"location_id",
",",
"shift_id",
",",
"opts",
")",
"retur... | RetrieveCashDrawerShift
Provides the details for a single cash drawer shift, including all events that occurred during the shift.
@param location_id The ID of the location to list cash drawer shifts for.
@param shift_id The shift's ID.
@param [Hash] opts the optional parameters
@return [V1CashDrawerShift] | [
"RetrieveCashDrawerShift",
"Provides",
"the",
"details",
"for",
"a",
"single",
"cash",
"drawer",
"shift",
"including",
"all",
"events",
"that",
"occurred",
"during",
"the",
"shift",
"."
] | 798eb9ded716f23b9f1518386f1c311a34bca8bf | https://github.com/square/connect-ruby-sdk/blob/798eb9ded716f23b9f1518386f1c311a34bca8bf/lib/square_connect/api/v1_employees_api.rb#L602-L605 | train | RetrieveCashDrawerShift Returns a single cash drawing shift | [
30522,
13366,
12850,
1035,
5356,
1035,
13065,
1035,
5670,
1006,
3295,
1035,
8909,
1010,
5670,
1035,
8909,
1010,
23569,
2015,
1027,
1063,
1065,
1007,
2951,
1010,
1035,
3570,
1035,
3642,
1010,
1035,
20346,
2015,
1027,
12850,
1035,
5356,
1035,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/database_recommended_actions.rb | Azure::SQL::Mgmt::V2015_05_01_preview.DatabaseRecommendedActions.get | def get(resource_group_name, server_name, database_name, advisor_name, recommended_action_name, custom_headers:nil)
response = get_async(resource_group_name, server_name, database_name, advisor_name, recommended_action_name, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def get(resource_group_name, server_name, database_name, advisor_name, recommended_action_name, custom_headers:nil)
response = get_async(resource_group_name, server_name, database_name, advisor_name, recommended_action_name, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"get",
"(",
"resource_group_name",
",",
"server_name",
",",
"database_name",
",",
"advisor_name",
",",
"recommended_action_name",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"get_async",
"(",
"resource_group_name",
",",
"server_name",
",",
"datab... | Gets a database recommended action.
@param resource_group_name [String] The name of the resource group that
contains the resource. You can obtain this value from the Azure Resource
Manager API or the portal.
@param server_name [String] The name of the server.
@param database_name [String] The name of the database... | [
"Gets",
"a",
"database",
"recommended",
"action",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/database_recommended_actions.rb#L165-L168 | train | Gets the specified database advisor and recommended action. | [
30522,
13366,
2131,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
8241,
1035,
2171,
1010,
7809,
1035,
2171,
1010,
8619,
1035,
2171,
1010,
6749,
1035,
2895,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
2131,
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-cloudformation/lib/aws-sdk-cloudformation/stack.rb | Aws::CloudFormation.Stack.events | def events(options = {})
batches = Enumerator.new do |y|
options = options.merge(stack_name: @name)
resp = @client.describe_stack_events(options)
resp.each_page do |page|
batch = []
page.data.stack_events.each do |s|
batch << Event.new(
id: s.e... | ruby | def events(options = {})
batches = Enumerator.new do |y|
options = options.merge(stack_name: @name)
resp = @client.describe_stack_events(options)
resp.each_page do |page|
batch = []
page.data.stack_events.each do |s|
batch << Event.new(
id: s.e... | [
"def",
"events",
"(",
"options",
"=",
"{",
"}",
")",
"batches",
"=",
"Enumerator",
".",
"new",
"do",
"|",
"y",
"|",
"options",
"=",
"options",
".",
"merge",
"(",
"stack_name",
":",
"@name",
")",
"resp",
"=",
"@client",
".",
"describe_stack_events",
"("... | @!group Associations
@example Request syntax with placeholder values
stack.events()
@param [Hash] options ({})
@return [Event::Collection] | [
"@!group",
"Associations",
"@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#L1003-L1020 | train | Returns an Enumerator of all events in the stack. | [
30522,
13366,
2824,
1006,
7047,
1027,
1063,
1065,
1007,
14108,
2229,
1027,
4372,
17897,
16259,
1012,
2047,
2079,
1064,
1061,
1064,
7047,
1027,
7047,
1012,
13590,
1006,
9991,
1035,
2171,
1024,
1030,
2171,
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... |
aws/aws-sdk-ruby | gems/aws-sdk-opsworks/lib/aws-sdk-opsworks/stack.rb | Aws::OpsWorks.Stack.create_layer | def create_layer(options = {})
options = options.merge(stack_id: @id)
resp = @client.create_layer(options)
Layer.new(
id: resp.data.layer_id,
client: @client
)
end | ruby | def create_layer(options = {})
options = options.merge(stack_id: @id)
resp = @client.create_layer(options)
Layer.new(
id: resp.data.layer_id,
client: @client
)
end | [
"def",
"create_layer",
"(",
"options",
"=",
"{",
"}",
")",
"options",
"=",
"options",
".",
"merge",
"(",
"stack_id",
":",
"@id",
")",
"resp",
"=",
"@client",
".",
"create_layer",
"(",
"options",
")",
"Layer",
".",
"new",
"(",
"id",
":",
"resp",
".",
... | @!group Actions
@example Request syntax with placeholder values
layer = stack.create_layer({
type: "aws-flow-ruby", # required, accepts aws-flow-ruby, ecs-cluster, java-app, lb, web, php-app, rails-app, nodejs-app, memcached, db-master, monitoring-master, custom
name: "String", # required
shortname:... | [
"@!group",
"Actions",
"@example",
"Request",
"syntax",
"with",
"placeholder",
"values"
] | e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d | https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-opsworks/lib/aws-sdk-opsworks/stack.rb#L503-L510 | train | Creates a new layer | [
30522,
13366,
3443,
1035,
6741,
1006,
7047,
1027,
1063,
1065,
1007,
7047,
1027,
7047,
1012,
13590,
1006,
9991,
1035,
8909,
1024,
1030,
8909,
1007,
24501,
2361,
1027,
1030,
7396,
1012,
3443,
1035,
6741,
1006,
7047,
1007,
6741,
1012,
2047,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | data/azure_cognitiveservices_luisauthoring/lib/2.0/generated/azure_cognitiveservices_luisauthoring/model.rb | Azure::CognitiveServices::LuisAuthoring::V2_0.Model.list_prebuilt_entity_roles_with_http_info | def list_prebuilt_entity_roles_with_http_info(app_id, version_id, entity_id, custom_headers:nil)
list_prebuilt_entity_roles_async(app_id, version_id, entity_id, custom_headers:custom_headers).value!
end | ruby | def list_prebuilt_entity_roles_with_http_info(app_id, version_id, entity_id, custom_headers:nil)
list_prebuilt_entity_roles_async(app_id, version_id, entity_id, custom_headers:custom_headers).value!
end | [
"def",
"list_prebuilt_entity_roles_with_http_info",
"(",
"app_id",
",",
"version_id",
",",
"entity_id",
",",
"custom_headers",
":",
"nil",
")",
"list_prebuilt_entity_roles_async",
"(",
"app_id",
",",
"version_id",
",",
"entity_id",
",",
"custom_headers",
":custom_headers"... | Get a prebuilt entity's roles in a version of the application.
@param app_id The application ID.
@param version_id [String] The version ID.
@param entity_id entity Id
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request.
@return [MsRestAzure::AzureOperat... | [
"Get",
"a",
"prebuilt",
"entity",
"s",
"roles",
"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#L6367-L6369 | train | Gets the list of roles for a prebuilt entity. | [
30522,
13366,
2862,
1035,
3653,
8569,
4014,
2102,
1035,
9178,
1035,
4395,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
10439,
1035,
8909,
1010,
2544,
1035,
8909,
1010,
9178,
1035,
8909,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
cypriss/mutations | lib/mutations/errors.rb | Mutations.ErrorHash.message_list | def message_list
list = []
each do |k, v|
list.concat(v.message_list)
end
list
end | ruby | def message_list
list = []
each do |k, v|
list.concat(v.message_list)
end
list
end | [
"def",
"message_list",
"list",
"=",
"[",
"]",
"each",
"do",
"|",
"k",
",",
"v",
"|",
"list",
".",
"concat",
"(",
"v",
".",
"message_list",
")",
"end",
"list",
"end"
] | Returns a flat array where each element is a full sentence. Eg:
[
"Email isn't in the right format.",
"Name is too weird",
"That's not a city, silly!",
"State isn't a valid option."
] | [
"Returns",
"a",
"flat",
"array",
"where",
"each",
"element",
"is",
"a",
"full",
"sentence",
".",
"Eg",
":",
"[",
"Email",
"isn",
"t",
"in",
"the",
"right",
"format",
".",
"Name",
"is",
"too",
"weird",
"That",
"s",
"not",
"a",
"city",
"silly!",
"State... | c9948325648d0ea85420963829d1a4d6b4f17bd9 | https://github.com/cypriss/mutations/blob/c9948325648d0ea85420963829d1a4d6b4f17bd9/lib/mutations/errors.rb#L148-L154 | train | Get the message list for this object. | [
30522,
13366,
4471,
1035,
2862,
2862,
1027,
1031,
1033,
2169,
2079,
1064,
1047,
1010,
1058,
1064,
2862,
1012,
9530,
11266,
1006,
1058,
1012,
4471,
1035,
2862,
1007,
2203,
2862,
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... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
hashicorp/vault-ruby | lib/vault/api/auth.rb | Vault.Authenticate.region_from_sts_endpoint | def region_from_sts_endpoint(sts_endpoint)
valid_sts_endpoint = %r{https:\/\/sts\.?(.*).amazonaws.com}.match(sts_endpoint)
raise "Unable to parse STS endpoint #{sts_endpoint}" unless valid_sts_endpoint
valid_sts_endpoint[1].empty? ? 'us-east-1' : valid_sts_endpoint[1]
end | ruby | def region_from_sts_endpoint(sts_endpoint)
valid_sts_endpoint = %r{https:\/\/sts\.?(.*).amazonaws.com}.match(sts_endpoint)
raise "Unable to parse STS endpoint #{sts_endpoint}" unless valid_sts_endpoint
valid_sts_endpoint[1].empty? ? 'us-east-1' : valid_sts_endpoint[1]
end | [
"def",
"region_from_sts_endpoint",
"(",
"sts_endpoint",
")",
"valid_sts_endpoint",
"=",
"%r{",
"\\/",
"\\/",
"\\.",
"}",
".",
"match",
"(",
"sts_endpoint",
")",
"raise",
"\"Unable to parse STS endpoint #{sts_endpoint}\"",
"unless",
"valid_sts_endpoint",
"valid_sts_endpoint"... | Parse an AWS region from a STS endpoint
STS in the China (Beijing) region (cn-north-1) is sts.cn-north-1.amazonaws.com.cn
Take care changing below regex with that edge case in mind
@param [String] sts_endpoint
https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_enable-regions.html
@return [Str... | [
"Parse",
"an",
"AWS",
"region",
"from",
"a",
"STS",
"endpoint",
"STS",
"in",
"the",
"China",
"(",
"Beijing",
")",
"region",
"(",
"cn",
"-",
"north",
"-",
"1",
")",
"is",
"sts",
".",
"cn",
"-",
"north",
"-",
"1",
".",
"amazonaws",
".",
"com",
".",... | 02f0532a802ba1a2a0d8703a4585dab76eb9d864 | https://github.com/hashicorp/vault-ruby/blob/02f0532a802ba1a2a0d8703a4585dab76eb9d864/lib/vault/api/auth.rb#L310-L314 | train | Returns the region from the STS endpoint | [
30522,
13366,
2555,
1035,
2013,
1035,
8541,
1035,
2203,
8400,
1006,
8541,
1035,
2203,
8400,
1007,
9398,
1035,
8541,
1035,
2203,
8400,
1027,
1003,
1054,
1063,
16770,
1024,
1032,
1013,
1032,
1013,
8541,
1032,
1012,
1029,
1006,
1012,
1008,
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... |
twitter/secure_headers | lib/secure_headers/middleware.rb | SecureHeaders.Middleware.call | def call(env)
req = Rack::Request.new(env)
status, headers, response = @app.call(env)
config = SecureHeaders.config_for(req)
flag_cookies!(headers, override_secure(env, config.cookies)) unless config.cookies == OPT_OUT
headers.merge!(SecureHeaders.header_hash_for(req))
[status, head... | ruby | def call(env)
req = Rack::Request.new(env)
status, headers, response = @app.call(env)
config = SecureHeaders.config_for(req)
flag_cookies!(headers, override_secure(env, config.cookies)) unless config.cookies == OPT_OUT
headers.merge!(SecureHeaders.header_hash_for(req))
[status, head... | [
"def",
"call",
"(",
"env",
")",
"req",
"=",
"Rack",
"::",
"Request",
".",
"new",
"(",
"env",
")",
"status",
",",
"headers",
",",
"response",
"=",
"@app",
".",
"call",
"(",
"env",
")",
"config",
"=",
"SecureHeaders",
".",
"config_for",
"(",
"req",
"... | merges the hash of headers into the current header set. | [
"merges",
"the",
"hash",
"of",
"headers",
"into",
"the",
"current",
"header",
"set",
"."
] | 543e6712aadae08f1653ed973e6b6204f7eac26a | https://github.com/twitter/secure_headers/blob/543e6712aadae08f1653ed973e6b6204f7eac26a/lib/secure_headers/middleware.rb#L9-L17 | train | Call the Rack application. | [
30522,
13366,
2655,
1006,
4372,
2615,
1007,
2128,
4160,
1027,
14513,
1024,
1024,
5227,
1012,
2047,
1006,
4372,
2615,
1007,
3570,
1010,
20346,
2015,
1010,
3433,
1027,
1030,
10439,
1012,
2655,
1006,
4372,
2615,
1007,
9530,
8873,
2290,
1027,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
awesome-print/awesome_print | lib/awesome_print/ext/nobrainer.rb | AwesomePrint.NoBrainer.awesome_nobrainer_class | def awesome_nobrainer_class(object)
name = "#{awesome_simple(object, :class)} < #{awesome_simple(object.superclass, :class)}"
data = Hash[object.fields.map do |field, options|
[field, (options[:type] || Object).to_s.underscore.to_sym]
end]
name = "class #{awesome_simple(object.to_s, :cl... | ruby | def awesome_nobrainer_class(object)
name = "#{awesome_simple(object, :class)} < #{awesome_simple(object.superclass, :class)}"
data = Hash[object.fields.map do |field, options|
[field, (options[:type] || Object).to_s.underscore.to_sym]
end]
name = "class #{awesome_simple(object.to_s, :cl... | [
"def",
"awesome_nobrainer_class",
"(",
"object",
")",
"name",
"=",
"\"#{awesome_simple(object, :class)} < #{awesome_simple(object.superclass, :class)}\"",
"data",
"=",
"Hash",
"[",
"object",
".",
"fields",
".",
"map",
"do",
"|",
"field",
",",
"options",
"|",
"[",
"fie... | Format NoBrainer class object.
------------------------------------------------------------------------------ | [
"Format",
"NoBrainer",
"class",
"object",
".",
"------------------------------------------------------------------------------"
] | 4564fd74721562cbef2443f7d97109bf9192343d | https://github.com/awesome-print/awesome_print/blob/4564fd74721562cbef2443f7d97109bf9192343d/lib/awesome_print/ext/nobrainer.rb#L30-L40 | train | Creates a new object with a class that is a nobrainer. | [
30522,
13366,
12476,
1035,
2053,
10024,
26455,
1035,
2465,
1006,
4874,
1007,
2171,
1027,
1000,
1001,
1063,
12476,
1035,
3722,
1006,
4874,
1010,
1024,
2465,
1007,
1065,
1026,
1001,
1063,
12476,
1035,
3722,
1006,
4874,
1012,
3565,
26266,
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... |
hashicorp/vault-ruby | lib/vault/persistent.rb | Vault.PersistentHTTP.proxy= | def proxy= proxy
@proxy_uri = case proxy
when :ENV then proxy_from_env
when URI::HTTP then proxy
when nil then # ignore
else raise ArgumentError, 'proxy must be :ENV or a URI::HTTP'
end
@no_proxy.clear
if @prox... | ruby | def proxy= proxy
@proxy_uri = case proxy
when :ENV then proxy_from_env
when URI::HTTP then proxy
when nil then # ignore
else raise ArgumentError, 'proxy must be :ENV or a URI::HTTP'
end
@no_proxy.clear
if @prox... | [
"def",
"proxy",
"=",
"proxy",
"@proxy_uri",
"=",
"case",
"proxy",
"when",
":ENV",
"then",
"proxy_from_env",
"when",
"URI",
"::",
"HTTP",
"then",
"proxy",
"when",
"nil",
"then",
"# ignore",
"else",
"raise",
"ArgumentError",
",",
"'proxy must be :ENV or a URI::HTTP'... | Sets the proxy server. The +proxy+ may be the URI of the proxy server,
the symbol +:ENV+ which will read the proxy from the environment or nil to
disable use of a proxy. See #proxy_from_env for details on setting the
proxy from the environment.
If the proxy URI is set after requests have been made, the next requ... | [
"Sets",
"the",
"proxy",
"server",
".",
"The",
"+",
"proxy",
"+",
"may",
"be",
"the",
"URI",
"of",
"the",
"proxy",
"server",
"the",
"symbol",
"+",
":",
"ENV",
"+",
"which",
"will",
"read",
"the",
"proxy",
"from",
"the",
"environment",
"or",
"nil",
"to... | 02f0532a802ba1a2a0d8703a4585dab76eb9d864 | https://github.com/hashicorp/vault-ruby/blob/02f0532a802ba1a2a0d8703a4585dab76eb9d864/lib/vault/persistent.rb#L794-L821 | train | Set the proxy for the given URI | [
30522,
13366,
24540,
1027,
24540,
1030,
24540,
1035,
24471,
2072,
1027,
2553,
24540,
2043,
1024,
4372,
2615,
2059,
24540,
1035,
2013,
1035,
4372,
2615,
2043,
24471,
2072,
1024,
1024,
8299,
2059,
24540,
2043,
9152,
2140,
2059,
30524,
5620,
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... |
mongodb/mongoid | lib/mongoid/persistable.rb | Mongoid.Persistable.process_atomic_operations | def process_atomic_operations(operations)
operations.each do |field, value|
access = database_field_name(field)
yield(access, value)
remove_change(access) unless executing_atomically?
end
end | ruby | def process_atomic_operations(operations)
operations.each do |field, value|
access = database_field_name(field)
yield(access, value)
remove_change(access) unless executing_atomically?
end
end | [
"def",
"process_atomic_operations",
"(",
"operations",
")",
"operations",
".",
"each",
"do",
"|",
"field",
",",
"value",
"|",
"access",
"=",
"database_field_name",
"(",
"field",
")",
"yield",
"(",
"access",
",",
"value",
")",
"remove_change",
"(",
"access",
... | Process the atomic operations - this handles the common behavior of
iterating through each op, getting the aliased field name, and removing
appropriate dirty changes.
@api private
@example Process the atomic operations.
document.process_atomic_operations(pulls) do |field, value|
...
end
@param [ Hash... | [
"Process",
"the",
"atomic",
"operations",
"-",
"this",
"handles",
"the",
"common",
"behavior",
"of",
"iterating",
"through",
"each",
"op",
"getting",
"the",
"aliased",
"field",
"name",
"and",
"removing",
"appropriate",
"dirty",
"changes",
"."
] | 56976e32610f4c2450882b0bfe14da099f0703f4 | https://github.com/mongodb/mongoid/blob/56976e32610f4c2450882b0bfe14da099f0703f4/lib/mongoid/persistable.rb#L220-L226 | train | Process atomic operations | [
30522,
13366,
2832,
1035,
9593,
1035,
3136,
1006,
3136,
1007,
3136,
1012,
2169,
2079,
1064,
2492,
1010,
3643,
1064,
3229,
1027,
7809,
1035,
2492,
1035,
2171,
1006,
2492,
1007,
10750,
1006,
3229,
1010,
3643,
1007,
6366,
1035,
2689,
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... |
opal/opal | opal/corelib/marshal/read_buffer.rb | Marshal.ReadBuffer.read_class | def read_class
klass_name = read_string(cache: false)
result = safe_const_get(klass_name)
unless result.class == Class
raise ArgumentError, "#{klass_name} does not refer to a Class"
end
@object_cache << result
result
end | ruby | def read_class
klass_name = read_string(cache: false)
result = safe_const_get(klass_name)
unless result.class == Class
raise ArgumentError, "#{klass_name} does not refer to a Class"
end
@object_cache << result
result
end | [
"def",
"read_class",
"klass_name",
"=",
"read_string",
"(",
"cache",
":",
"false",
")",
"result",
"=",
"safe_const_get",
"(",
"klass_name",
")",
"unless",
"result",
".",
"class",
"==",
"Class",
"raise",
"ArgumentError",
",",
"\"#{klass_name} does not refer to a Clas... | Reads and returns a Class from an input stream
@example
String
is encoded as
'c', 'String' | [
"Reads",
"and",
"returns",
"a",
"Class",
"from",
"an",
"input",
"stream"
] | 41aedc0fd62aab00d3c117ba0caf00206bedd981 | https://github.com/opal/opal/blob/41aedc0fd62aab00d3c117ba0caf00206bedd981/opal/corelib/marshal/read_buffer.rb#L345-L353 | train | Read a Class
from the file. | [
30522,
13366,
3191,
1035,
2465,
1047,
27102,
1035,
2171,
1027,
3191,
1035,
5164,
1006,
17053,
1024,
6270,
1007,
2765,
1027,
3647,
1035,
9530,
3367,
1035,
2131,
1006,
1047,
27102,
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... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
hashicorp/vagrant | lib/vagrant/environment.rb | Vagrant.Environment.host | def host
return @host if defined?(@host)
# Determine the host class to use. ":detect" is an old Vagrant config
# that shouldn't be valid anymore, but we respect it here by assuming
# its old behavior. No need to deprecate this because I thin it is
# fairly harmless.
host_klass = vag... | ruby | def host
return @host if defined?(@host)
# Determine the host class to use. ":detect" is an old Vagrant config
# that shouldn't be valid anymore, but we respect it here by assuming
# its old behavior. No need to deprecate this because I thin it is
# fairly harmless.
host_klass = vag... | [
"def",
"host",
"return",
"@host",
"if",
"defined?",
"(",
"@host",
")",
"# Determine the host class to use. \":detect\" is an old Vagrant config",
"# that shouldn't be valid anymore, but we respect it here by assuming",
"# its old behavior. No need to deprecate this because I thin it is",
"# ... | Returns the host object associated with this environment.
@return [Class] | [
"Returns",
"the",
"host",
"object",
"associated",
"with",
"this",
"environment",
"."
] | c22a145c59790c098f95d50141d9afb48e1ef55f | https://github.com/hashicorp/vagrant/blob/c22a145c59790c098f95d50141d9afb48e1ef55f/lib/vagrant/environment.rb#L533-L564 | train | Returns the host object for this instance. | [
30522,
13366,
3677,
2709,
1030,
3677,
2065,
4225,
1029,
1006,
1030,
3677,
1007,
1001,
5646,
1996,
3677,
2465,
2000,
2224,
1012,
1000,
1024,
11487,
1000,
2003,
2019,
2214,
12436,
18980,
9530,
8873,
2290,
1001,
2008,
5807,
1005,
1056,
2022,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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_create_or_update | def begin_create_or_update(resource_group_name, private_zone_name, parameters, if_match:nil, if_none_match:nil, custom_headers:nil)
response = begin_create_or_update_async(resource_group_name, private_zone_name, parameters, if_match:if_match, if_none_match:if_none_match, custom_headers:custom_headers).value!
... | ruby | def begin_create_or_update(resource_group_name, private_zone_name, parameters, if_match:nil, if_none_match:nil, custom_headers:nil)
response = begin_create_or_update_async(resource_group_name, private_zone_name, parameters, if_match:if_match, if_none_match:if_none_match, custom_headers:custom_headers).value!
... | [
"def",
"begin_create_or_update",
"(",
"resource_group_name",
",",
"private_zone_name",
",",
"parameters",
",",
"if_match",
":",
"nil",
",",
"if_none_match",
":",
"nil",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"begin_create_or_update_async",
"(",
"re... | Creates or updates a Private DNS zone. Does not modify Links to virtual
networks or DNS records within the zone.
@param resource_group_name [String] The name of the resource group.
@param private_zone_name [String] The name of the Private DNS zone (without a
terminating dot).
@param parameters [PrivateZone] Param... | [
"Creates",
"or",
"updates",
"a",
"Private",
"DNS",
"zone",
".",
"Does",
"not",
"modify",
"Links",
"to",
"virtual",
"networks",
"or",
"DNS",
"records",
"within",
"the",
"zone",
"."
] | 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#L488-L491 | train | Creates or updates a Private DNS zone. | [
30522,
13366,
4088,
1035,
3443,
1035,
2030,
1035,
10651,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2797,
1035,
4224,
1035,
2171,
1010,
11709,
1010,
2065,
1035,
2674,
1024,
9152,
2140,
1010,
2065,
1035,
3904,
1035,
2674,
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_network/lib/2019-02-01/generated/azure_mgmt_network/virtual_network_taps.rb | Azure::Network::Mgmt::V2019_02_01.VirtualNetworkTaps.update_tags | def update_tags(resource_group_name, tap_name, tap_parameters, custom_headers:nil)
response = update_tags_async(resource_group_name, tap_name, tap_parameters, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def update_tags(resource_group_name, tap_name, tap_parameters, custom_headers:nil)
response = update_tags_async(resource_group_name, tap_name, tap_parameters, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"update_tags",
"(",
"resource_group_name",
",",
"tap_name",
",",
"tap_parameters",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"update_tags_async",
"(",
"resource_group_name",
",",
"tap_name",
",",
"tap_parameters",
",",
"custom_headers",
":custom_... | Updates an VirtualNetworkTap tags.
@param resource_group_name [String] The name of the resource group.
@param tap_name [String] The name of the tap.
@param tap_parameters [TagsObject] Parameters supplied to update
VirtualNetworkTap tags.
@param custom_headers [Hash{String => String}] A hash of custom headers that... | [
"Updates",
"an",
"VirtualNetworkTap",
"tags",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_network/lib/2019-02-01/generated/azure_mgmt_network/virtual_network_taps.rb#L212-L215 | train | Updates a Tap. | [
30522,
13366,
10651,
1035,
22073,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
11112,
1035,
2171,
1010,
11112,
1035,
11709,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
10651,
1035,
22073,
1035,
2004,
6038,
2278,
1006,
76... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
randym/axlsx | lib/axlsx/drawing/chart.rb | Axlsx.Chart.to_xml_string | def to_xml_string(str = '')
str << '<?xml version="1.0" encoding="UTF-8"?>'
str << ('<c:chartSpace xmlns:c="' << XML_NS_C << '" xmlns:a="' << XML_NS_A << '" xmlns:r="' << XML_NS_R << '">')
str << ('<c:date1904 val="' << Axlsx::Workbook.date1904.to_s << '"/>')
str << ('<c:style val="' << style.to... | ruby | def to_xml_string(str = '')
str << '<?xml version="1.0" encoding="UTF-8"?>'
str << ('<c:chartSpace xmlns:c="' << XML_NS_C << '" xmlns:a="' << XML_NS_A << '" xmlns:r="' << XML_NS_R << '">')
str << ('<c:date1904 val="' << Axlsx::Workbook.date1904.to_s << '"/>')
str << ('<c:style val="' << style.to... | [
"def",
"to_xml_string",
"(",
"str",
"=",
"''",
")",
"str",
"<<",
"'<?xml version=\"1.0\" encoding=\"UTF-8\"?>'",
"str",
"<<",
"(",
"'<c:chartSpace xmlns:c=\"'",
"<<",
"XML_NS_C",
"<<",
"'\" xmlns:a=\"'",
"<<",
"XML_NS_A",
"<<",
"'\" xmlns:r=\"'",
"<<",
"XML_NS_R",
"<<... | Serializes the object
@param [String] str
@return [String] | [
"Serializes",
"the",
"object"
] | c593a08b2a929dac7aa8dc418b55e26b4c49dc34 | https://github.com/randym/axlsx/blob/c593a08b2a929dac7aa8dc418b55e26b4c49dc34/lib/axlsx/drawing/chart.rb#L186-L229 | train | Returns a string representation of this chart. | [
30522,
13366,
2000,
1035,
20950,
1035,
5164,
1006,
2358,
2099,
1027,
1005,
1005,
1007,
2358,
2099,
1026,
1026,
1005,
1026,
1029,
20950,
2544,
1027,
1000,
1015,
1012,
1014,
1000,
17181,
1027,
1000,
21183,
2546,
1011,
1022,
1000,
1029,
1028,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | data/azure_cognitiveservices_contentmoderator/lib/1.0/generated/azure_cognitiveservices_contentmoderator/text_moderation.rb | Azure::CognitiveServices::ContentModerator::V1_0.TextModeration.screen_text_with_http_info | def screen_text_with_http_info(text_content_type, text_content, language:nil, autocorrect:false, pii:false, list_id:nil, classify:false, custom_headers:nil)
screen_text_async(text_content_type, text_content, language:language, autocorrect:autocorrect, pii:pii, list_id:list_id, classify:classify, custom_headers:cu... | ruby | def screen_text_with_http_info(text_content_type, text_content, language:nil, autocorrect:false, pii:false, list_id:nil, classify:false, custom_headers:nil)
screen_text_async(text_content_type, text_content, language:language, autocorrect:autocorrect, pii:pii, list_id:list_id, classify:classify, custom_headers:cu... | [
"def",
"screen_text_with_http_info",
"(",
"text_content_type",
",",
"text_content",
",",
"language",
":",
"nil",
",",
"autocorrect",
":",
"false",
",",
"pii",
":",
"false",
",",
"list_id",
":",
"nil",
",",
"classify",
":",
"false",
",",
"custom_headers",
":",
... | Detect profanity and match against custom and shared blacklists
Detects profanity in more than 100 languages and match against custom and
shared blacklists.
@param text_content_type [Enum] The content type. Possible values include:
'text/plain', 'text/html', 'text/xml', 'text/markdown'
@param text_content Conten... | [
"Detect",
"profanity",
"and",
"match",
"against",
"custom",
"and",
"shared",
"blacklists"
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_cognitiveservices_contentmoderator/lib/1.0/generated/azure_cognitiveservices_contentmoderator/text_moderation.rb#L77-L79 | train | Returns the sequence of screen text in a given text content type. | [
30522,
13366,
3898,
1035,
3793,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
3793,
1035,
4180,
1035,
2828,
1010,
3793,
1035,
4180,
1010,
2653,
1024,
9152,
2140,
1010,
8285,
27108,
2890,
6593,
1024,
6270,
1010,
14255,
2072,
1024,
6270,
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... |
ruby-git/ruby-git | lib/git/lib.rb | Git.Lib.read_tree | def read_tree(treeish, opts = {})
arr_opts = []
arr_opts << "--prefix=#{opts[:prefix]}" if opts[:prefix]
arr_opts += [treeish]
command('read-tree', arr_opts)
end | ruby | def read_tree(treeish, opts = {})
arr_opts = []
arr_opts << "--prefix=#{opts[:prefix]}" if opts[:prefix]
arr_opts += [treeish]
command('read-tree', arr_opts)
end | [
"def",
"read_tree",
"(",
"treeish",
",",
"opts",
"=",
"{",
"}",
")",
"arr_opts",
"=",
"[",
"]",
"arr_opts",
"<<",
"\"--prefix=#{opts[:prefix]}\"",
"if",
"opts",
"[",
":prefix",
"]",
"arr_opts",
"+=",
"[",
"treeish",
"]",
"command",
"(",
"'read-tree'",
",",... | reads a tree into the current index file | [
"reads",
"a",
"tree",
"into",
"the",
"current",
"index",
"file"
] | 9bd4407c56068e1604f14a1b6c0c5a84868e6378 | https://github.com/ruby-git/ruby-git/blob/9bd4407c56068e1604f14a1b6c0c5a84868e6378/lib/git/lib.rb#L808-L813 | train | Reads a tree from the specified file. | [
30522,
13366,
3191,
1035,
3392,
1006,
3392,
4509,
1010,
23569,
2015,
1027,
1063,
1065,
1007,
12098,
2099,
1035,
23569,
2015,
1027,
1031,
1033,
12098,
2099,
1035,
23569,
2015,
1026,
1026,
1000,
1011,
1011,
17576,
1027,
1001,
1063,
23569,
201... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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 | gym/lib/gym/runner.rb | Gym.Runner.move_app_thinning_size_report | def move_app_thinning_size_report
if File.exist?(PackageCommandGenerator.app_thinning_size_report_path)
FileUtils.mv(PackageCommandGenerator.app_thinning_size_report_path, File.expand_path(Gym.config[:output_directory]), force: true)
app_thinning_size_report_path = File.join(File.expand_path(Gym.c... | ruby | def move_app_thinning_size_report
if File.exist?(PackageCommandGenerator.app_thinning_size_report_path)
FileUtils.mv(PackageCommandGenerator.app_thinning_size_report_path, File.expand_path(Gym.config[:output_directory]), force: true)
app_thinning_size_report_path = File.join(File.expand_path(Gym.c... | [
"def",
"move_app_thinning_size_report",
"if",
"File",
".",
"exist?",
"(",
"PackageCommandGenerator",
".",
"app_thinning_size_report_path",
")",
"FileUtils",
".",
"mv",
"(",
"PackageCommandGenerator",
".",
"app_thinning_size_report_path",
",",
"File",
".",
"expand_path",
"... | Move the App Thinning Size Report.txt file into the output directory | [
"Move",
"the",
"App",
"Thinning",
"Size",
"Report",
".",
"txt",
"file",
"into",
"the",
"output",
"directory"
] | 457c5d647c77f0e078dafa5129da616914e002c5 | https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/gym/lib/gym/runner.rb#L237-L246 | train | Move the App Thinning Size Report. txt file to the output directory. | [
30522,
13366,
2693,
1035,
10439,
1035,
4857,
5582,
1035,
2946,
1035,
3189,
2065,
5371,
1012,
4839,
1029,
1006,
7427,
9006,
2386,
11818,
3678,
8844,
1012,
10439,
1035,
4857,
5582,
1035,
2946,
1035,
3189,
1035,
4130,
1007,
5371,
21823,
4877,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
kpumuk/meta-tags | lib/meta_tags/renderer.rb | MetaTags.Renderer.render_noindex | def render_noindex(tags)
meta_tags.extract_noindex.each do |name, content|
tags << Tag.new(:meta, name: name, content: content) if content.present?
end
end | ruby | def render_noindex(tags)
meta_tags.extract_noindex.each do |name, content|
tags << Tag.new(:meta, name: name, content: content) if content.present?
end
end | [
"def",
"render_noindex",
"(",
"tags",
")",
"meta_tags",
".",
"extract_noindex",
".",
"each",
"do",
"|",
"name",
",",
"content",
"|",
"tags",
"<<",
"Tag",
".",
"new",
"(",
":meta",
",",
"name",
":",
"name",
",",
"content",
":",
"content",
")",
"if",
"... | Renders noindex and nofollow meta tags.
@param [Array<Tag>] tags a buffer object to store tag in. | [
"Renders",
"noindex",
"and",
"nofollow",
"meta",
"tags",
"."
] | 03585f95edf96cd17024c5c155ce46ec8bc47232 | https://github.com/kpumuk/meta-tags/blob/03585f95edf96cd17024c5c155ce46ec8bc47232/lib/meta_tags/renderer.rb#L99-L103 | train | Render the noindex tags | [
30522,
13366,
17552,
1035,
2053,
22254,
10288,
1006,
22073,
1007,
18804,
1035,
22073,
1012,
14817,
1035,
2053,
22254,
10288,
1012,
2169,
2079,
1064,
2171,
1010,
4180,
1064,
22073,
1026,
1026,
6415,
1012,
2047,
1006,
1024,
18804,
1010,
2171,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
projectcypress/health-data-standards | lib/hqmf-parser/2.0/data_criteria_helpers/dc_definition_from_template_or_type_extract.rb | HQMF2.DataCriteriaTypeAndDefinitionExtraction.handle_entry_type | def handle_entry_type(entry_type)
# settings is required to trigger exceptions, which set the definition
HQMF::DataCriteria.get_settings_for_definition(entry_type, @status)
@definition = entry_type
rescue
# if no exact match then try a string match just using entry definition value
cas... | ruby | def handle_entry_type(entry_type)
# settings is required to trigger exceptions, which set the definition
HQMF::DataCriteria.get_settings_for_definition(entry_type, @status)
@definition = entry_type
rescue
# if no exact match then try a string match just using entry definition value
cas... | [
"def",
"handle_entry_type",
"(",
"entry_type",
")",
"# settings is required to trigger exceptions, which set the definition",
"HQMF",
"::",
"DataCriteria",
".",
"get_settings_for_definition",
"(",
"entry_type",
",",
"@status",
")",
"@definition",
"=",
"entry_type",
"rescue",
... | Generate the definition and/or status from the entry type in most cases.
If the entry type is nil, and the value is a specific occurrence, more parsing may be necessary. | [
"Generate",
"the",
"definition",
"and",
"/",
"or",
"status",
"from",
"the",
"entry",
"type",
"in",
"most",
"cases",
".",
"If",
"the",
"entry",
"type",
"is",
"nil",
"and",
"the",
"value",
"is",
"a",
"specific",
"occurrence",
"more",
"parsing",
"may",
"be"... | 252d4f0927c513eacde6b9ea41b76faa1423c34b | https://github.com/projectcypress/health-data-standards/blob/252d4f0927c513eacde6b9ea41b76faa1423c34b/lib/hqmf-parser/2.0/data_criteria_helpers/dc_definition_from_template_or_type_extract.rb#L110-L128 | train | Returns the definition of the given entry type | [
30522,
13366,
5047,
1035,
4443,
1035,
2828,
1006,
4443,
1035,
2828,
1007,
1001,
10906,
2003,
3223,
2000,
9495,
11790,
1010,
2029,
2275,
1996,
6210,
16260,
2213,
2546,
1024,
1024,
2951,
26775,
21646,
2401,
1012,
2131,
1035,
10906,
1035,
2005... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
samvera/hyrax | app/models/sipity/workflow.rb | Sipity.Workflow.remove_workflow_responsibilities | def remove_workflow_responsibilities(role, allowed_agents)
wf_role = Sipity::WorkflowRole.find_by(workflow: self, role_id: role)
wf_role.workflow_responsibilities.where.not(agent: allowed_agents).destroy_all
end | ruby | def remove_workflow_responsibilities(role, allowed_agents)
wf_role = Sipity::WorkflowRole.find_by(workflow: self, role_id: role)
wf_role.workflow_responsibilities.where.not(agent: allowed_agents).destroy_all
end | [
"def",
"remove_workflow_responsibilities",
"(",
"role",
",",
"allowed_agents",
")",
"wf_role",
"=",
"Sipity",
"::",
"WorkflowRole",
".",
"find_by",
"(",
"workflow",
":",
"self",
",",
"role_id",
":",
"role",
")",
"wf_role",
".",
"workflow_responsibilities",
".",
... | Find any workflow_responsibilities held by agents not in the allowed_agents
and remove them
@param [Sipity::Role] role
@param [Array<Sipity::Agent>] allowed_agents | [
"Find",
"any",
"workflow_responsibilities",
"held",
"by",
"agents",
"not",
"in",
"the",
"allowed_agents",
"and",
"remove",
"them"
] | e2b4f56e829a53b1f11296324736e9d5b8c9ee5f | https://github.com/samvera/hyrax/blob/e2b4f56e829a53b1f11296324736e9d5b8c9ee5f/app/models/sipity/workflow.rb#L84-L87 | train | Remove all workflow responsibilities for a role | [
30522,
13366,
6366,
1035,
2147,
12314,
1035,
10198,
1006,
2535,
1010,
30524,
1010,
2535,
1035,
8909,
1024,
2535,
1007,
1059,
2546,
1035,
2535,
1012,
2147,
12314,
1035,
10198,
1012,
2073,
1012,
2025,
1006,
4005,
1024,
3039,
1035,
6074,
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... |
jeremytregunna/ruby-trello | lib/trello/card.rb | Trello.Card.add_attachment | def add_attachment(attachment, name = '')
# Is it a file object or a string (url)?
if attachment.respond_to?(:path) && attachment.respond_to?(:read)
client.post("/cards/#{id}/attachments", {
file: attachment,
name: name
})
else
client.post("/cards/#{id... | ruby | def add_attachment(attachment, name = '')
# Is it a file object or a string (url)?
if attachment.respond_to?(:path) && attachment.respond_to?(:read)
client.post("/cards/#{id}/attachments", {
file: attachment,
name: name
})
else
client.post("/cards/#{id... | [
"def",
"add_attachment",
"(",
"attachment",
",",
"name",
"=",
"''",
")",
"# Is it a file object or a string (url)?",
"if",
"attachment",
".",
"respond_to?",
"(",
":path",
")",
"&&",
"attachment",
".",
"respond_to?",
"(",
":read",
")",
"client",
".",
"post",
"(",... | Add an attachment to this card | [
"Add",
"an",
"attachment",
"to",
"this",
"card"
] | ad79c9d8152ad5395b3b61c43170908f1912bfb2 | https://github.com/jeremytregunna/ruby-trello/blob/ad79c9d8152ad5395b3b61c43170908f1912bfb2/lib/trello/card.rb#L421-L434 | train | Add an attachment to the card | [
30522,
13366,
5587,
1035,
14449,
1006,
14449,
1010,
2171,
1027,
1005,
1005,
1007,
1001,
2003,
2009,
1037,
5371,
4874,
2030,
1037,
5164,
1006,
24471,
2140,
1007,
1029,
2065,
14449,
1012,
6869,
1035,
2000,
1029,
1006,
1024,
4130,
1007,
1004,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_network/lib/2018-07-01/generated/azure_mgmt_network/virtual_network_gateways.rb | Azure::Network::Mgmt::V2018_07_01.VirtualNetworkGateways.begin_set_vpnclient_ipsec_parameters | def begin_set_vpnclient_ipsec_parameters(resource_group_name, virtual_network_gateway_name, vpnclient_ipsec_params, custom_headers:nil)
response = begin_set_vpnclient_ipsec_parameters_async(resource_group_name, virtual_network_gateway_name, vpnclient_ipsec_params, custom_headers:custom_headers).value!
respo... | ruby | def begin_set_vpnclient_ipsec_parameters(resource_group_name, virtual_network_gateway_name, vpnclient_ipsec_params, custom_headers:nil)
response = begin_set_vpnclient_ipsec_parameters_async(resource_group_name, virtual_network_gateway_name, vpnclient_ipsec_params, custom_headers:custom_headers).value!
respo... | [
"def",
"begin_set_vpnclient_ipsec_parameters",
"(",
"resource_group_name",
",",
"virtual_network_gateway_name",
",",
"vpnclient_ipsec_params",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"begin_set_vpnclient_ipsec_parameters_async",
"(",
"resource_group_name",
",",
... | The Set VpnclientIpsecParameters operation sets the vpnclient ipsec policy
for P2S client of virtual network gateway in the specified resource group
through Network resource provider.
@param resource_group_name [String] The name of the resource group.
@param virtual_network_gateway_name [String] The name of the vi... | [
"The",
"Set",
"VpnclientIpsecParameters",
"operation",
"sets",
"the",
"vpnclient",
"ipsec",
"policy",
"for",
"P2S",
"client",
"of",
"virtual",
"network",
"gateway",
"in",
"the",
"specified",
"resource",
"group",
"through",
"Network",
"resource",
"provider",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_network/lib/2018-07-01/generated/azure_mgmt_network/virtual_network_gateways.rb#L2129-L2132 | train | Set vpnclient ipsec parameters. | [
30522,
13366,
4088,
1035,
2275,
1035,
21210,
12273,
8751,
3372,
1035,
12997,
3366,
2278,
1035,
11709,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
7484,
1035,
2897,
1035,
11909,
1035,
2171,
1010,
21210,
12273,
8751,
3372,
1035,
12997,
3366,
22... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_recovery_services_backup/lib/2016-06-01/generated/azure_mgmt_recovery_services_backup/jobs.rb | Azure::RecoveryServicesBackup::Mgmt::V2016_06_01.Jobs.export_with_http_info | def export_with_http_info(vault_name, resource_group_name, filter:nil, custom_headers:nil)
export_async(vault_name, resource_group_name, filter:filter, custom_headers:custom_headers).value!
end | ruby | def export_with_http_info(vault_name, resource_group_name, filter:nil, custom_headers:nil)
export_async(vault_name, resource_group_name, filter:filter, custom_headers:custom_headers).value!
end | [
"def",
"export_with_http_info",
"(",
"vault_name",
",",
"resource_group_name",
",",
"filter",
":",
"nil",
",",
"custom_headers",
":",
"nil",
")",
"export_async",
"(",
"vault_name",
",",
"resource_group_name",
",",
"filter",
":",
"filter",
",",
"custom_headers",
":... | Exports all jobs for a given Shared Access Signatures (SAS) URL. The SAS URL
expires within 15 minutes of its creation.
@param vault_name [String] The name of the Recovery Services vault.
@param resource_group_name [String] The name of the resource group associated
with the Recovery Services vault.
@param filter ... | [
"Exports",
"all",
"jobs",
"for",
"a",
"given",
"Shared",
"Access",
"Signatures",
"(",
"SAS",
")",
"URL",
".",
"The",
"SAS",
"URL",
"expires",
"within",
"15",
"minutes",
"of",
"its",
"creation",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_recovery_services_backup/lib/2016-06-01/generated/azure_mgmt_recovery_services_backup/jobs.rb#L68-L70 | train | Export a key - value pair to a key - value pair. | [
30522,
13366,
9167,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
11632,
1035,
2171,
1010,
7692,
1035,
2177,
1035,
2171,
1010,
11307,
1024,
9152,
2140,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
9167,
1035,
2004,
6038,
2278,
1006,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
aws/aws-sdk-ruby | gems/aws-sdk-sns/lib/aws-sdk-sns/topic.rb | Aws::SNS.Topic.remove_permission | def remove_permission(options = {})
options = options.merge(topic_arn: @arn)
resp = @client.remove_permission(options)
resp.data
end | ruby | def remove_permission(options = {})
options = options.merge(topic_arn: @arn)
resp = @client.remove_permission(options)
resp.data
end | [
"def",
"remove_permission",
"(",
"options",
"=",
"{",
"}",
")",
"options",
"=",
"options",
".",
"merge",
"(",
"topic_arn",
":",
"@arn",
")",
"resp",
"=",
"@client",
".",
"remove_permission",
"(",
"options",
")",
"resp",
".",
"data",
"end"
] | @example Request syntax with placeholder values
topic.remove_permission({
label: "label", # required
})
@param [Hash] options ({})
@option options [required, String] :label
The unique label of the statement you want to remove.
@return [EmptyStructure] | [
"@example",
"Request",
"syntax",
"with",
"placeholder",
"values"
] | e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d | https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-sns/lib/aws-sdk-sns/topic.rb#L299-L303 | train | Remove a permission from the topic | [
30522,
13366,
6366,
1035,
6656,
1006,
7047,
1027,
1063,
1065,
1007,
7047,
1027,
7047,
1012,
13590,
1006,
8476,
1035,
12098,
2078,
1024,
1030,
12098,
2078,
1007,
24501,
2361,
1027,
1030,
7396,
1012,
6366,
1035,
6656,
1006,
7047,
1007,
24501,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
rails/rails | activerecord/lib/active_record/autosave_association.rb | ActiveRecord.AutosaveAssociation.record_changed? | def record_changed?(reflection, record, key)
record.new_record? ||
association_foreign_key_changed?(reflection, record, key) ||
record.will_save_change_to_attribute?(reflection.foreign_key)
end | ruby | def record_changed?(reflection, record, key)
record.new_record? ||
association_foreign_key_changed?(reflection, record, key) ||
record.will_save_change_to_attribute?(reflection.foreign_key)
end | [
"def",
"record_changed?",
"(",
"reflection",
",",
"record",
",",
"key",
")",
"record",
".",
"new_record?",
"||",
"association_foreign_key_changed?",
"(",
"reflection",
",",
"record",
",",
"key",
")",
"||",
"record",
".",
"will_save_change_to_attribute?",
"(",
"ref... | If the record is new or it has changed, returns true. | [
"If",
"the",
"record",
"is",
"new",
"or",
"it",
"has",
"changed",
"returns",
"true",
"."
] | 85a8bc644be69908f05740a5886ec19cd3679df5 | https://github.com/rails/rails/blob/85a8bc644be69908f05740a5886ec19cd3679df5/activerecord/lib/active_record/autosave_association.rb#L457-L461 | train | Returns true if the record has changed | [
30522,
13366,
2501,
1035,
2904,
1029,
1006,
9185,
1010,
2501,
1010,
3145,
1007,
2501,
1012,
2047,
1035,
2501,
1029,
1064,
1064,
2523,
1035,
3097,
1035,
3145,
1035,
2904,
1029,
1006,
9185,
1010,
2501,
1010,
3145,
1007,
1064,
1064,
2501,
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... |
guard/guard | lib/guard/dsl_describer.rb | Guard.DslDescriber.notifiers | def notifiers
supported = Notifier.supported
Notifier.connect(notify: true, silent: true)
detected = Notifier.detected
Notifier.disconnect
detected_names = detected.map { |item| item[:name] }
final_rows = supported.each_with_object([]) do |(name, _), rows|
available = detec... | ruby | def notifiers
supported = Notifier.supported
Notifier.connect(notify: true, silent: true)
detected = Notifier.detected
Notifier.disconnect
detected_names = detected.map { |item| item[:name] }
final_rows = supported.each_with_object([]) do |(name, _), rows|
available = detec... | [
"def",
"notifiers",
"supported",
"=",
"Notifier",
".",
"supported",
"Notifier",
".",
"connect",
"(",
"notify",
":",
"true",
",",
"silent",
":",
"true",
")",
"detected",
"=",
"Notifier",
".",
"detected",
"Notifier",
".",
"disconnect",
"detected_names",
"=",
"... | Shows all notifiers and their options that are defined in
the `Guardfile`.
@see CLI#show | [
"Shows",
"all",
"notifiers",
"and",
"their",
"options",
"that",
"are",
"defined",
"in",
"the",
"Guardfile",
"."
] | e2508cd83badf0d537dbaba35d307adc35d92e4f | https://github.com/guard/guard/blob/e2508cd83badf0d537dbaba35d307adc35d92e4f/lib/guard/dsl_describer.rb#L109-L146 | train | Returns an array of all notifiers | [
30522,
13366,
2025,
28295,
3569,
1027,
2025,
18095,
1012,
3569,
2025,
18095,
1012,
7532,
1006,
2025,
8757,
1024,
2995,
1010,
4333,
1024,
2995,
1007,
11156,
1027,
2025,
18095,
1012,
11156,
2025,
18095,
1012,
12532,
10087,
6593,
11156,
1035,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
rails/rails | activerecord/lib/active_record/transactions.rb | ActiveRecord.Transactions.with_transaction_returning_status | def with_transaction_returning_status
status = nil
self.class.transaction do
if has_transactional_callbacks?
add_to_transaction
else
sync_with_transaction_state if @transaction_state&.finalized?
@transaction_state = self.class.connection.transaction_state
... | ruby | def with_transaction_returning_status
status = nil
self.class.transaction do
if has_transactional_callbacks?
add_to_transaction
else
sync_with_transaction_state if @transaction_state&.finalized?
@transaction_state = self.class.connection.transaction_state
... | [
"def",
"with_transaction_returning_status",
"status",
"=",
"nil",
"self",
".",
"class",
".",
"transaction",
"do",
"if",
"has_transactional_callbacks?",
"add_to_transaction",
"else",
"sync_with_transaction_state",
"if",
"@transaction_state",
"&.",
"finalized?",
"@transaction_s... | Executes +method+ within a transaction and captures its return value as a
status flag. If the status is true the transaction is committed, otherwise
a ROLLBACK is issued. In any case the status flag is returned.
This method is available within the context of an ActiveRecord::Base
instance. | [
"Executes",
"+",
"method",
"+",
"within",
"a",
"transaction",
"and",
"captures",
"its",
"return",
"value",
"as",
"a",
"status",
"flag",
".",
"If",
"the",
"status",
"is",
"true",
"the",
"transaction",
"is",
"committed",
"otherwise",
"a",
"ROLLBACK",
"is",
"... | 85a8bc644be69908f05740a5886ec19cd3679df5 | https://github.com/rails/rails/blob/85a8bc644be69908f05740a5886ec19cd3679df5/activerecord/lib/active_record/transactions.rb#L364-L379 | train | Returns the status of the transaction. | [
30522,
13366,
2007,
1035,
12598,
1035,
4192,
1035,
3570,
3570,
1027,
9152,
2140,
2969,
1012,
2465,
1012,
12598,
2079,
2065,
2038,
1035,
12598,
2389,
1035,
2655,
12221,
1029,
5587,
1035,
2000,
1035,
12598,
2842,
26351,
1035,
2007,
1035,
1259... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_labservices/lib/2018-10-15/generated/azure_mgmt_labservices/environments.rb | Azure::Labservices::Mgmt::V2018_10_15.Environments.update | def update(resource_group_name, lab_account_name, lab_name, environment_setting_name, environment_name, environment, custom_headers:nil)
response = update_async(resource_group_name, lab_account_name, lab_name, environment_setting_name, environment_name, environment, custom_headers:custom_headers).value!
res... | ruby | def update(resource_group_name, lab_account_name, lab_name, environment_setting_name, environment_name, environment, custom_headers:nil)
response = update_async(resource_group_name, lab_account_name, lab_name, environment_setting_name, environment_name, environment, custom_headers:custom_headers).value!
res... | [
"def",
"update",
"(",
"resource_group_name",
",",
"lab_account_name",
",",
"lab_name",
",",
"environment_setting_name",
",",
"environment_name",
",",
"environment",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"update_async",
"(",
"resource_group_name",
",... | Modify properties of environments.
@param resource_group_name [String] The name of the resource group.
@param lab_account_name [String] The name of the lab Account.
@param lab_name [String] The name of the lab.
@param environment_setting_name [String] The name of the environment Setting.
@param environment_name [... | [
"Modify",
"properties",
"of",
"environments",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_labservices/lib/2018-10-15/generated/azure_mgmt_labservices/environments.rb#L438-L441 | train | Update an existing App Service Environment. | [
30522,
13366,
10651,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
6845,
1035,
4070,
1035,
2171,
1010,
6845,
1035,
2171,
1010,
4044,
1035,
4292,
1035,
2171,
1010,
4044,
1035,
2171,
1010,
4044,
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... |
meew0/discordrb | lib/discordrb/data/webhook.rb | Discordrb.Webhook.update | def update(data)
# Only pass a value for avatar if the key is defined as sending nil will delete the
data[:avatar] = avatarise(data[:avatar]) if data.key?(:avatar)
data[:channel_id] = data[:channel].resolve_id
data.delete(:channel)
update_webhook(data)
end | ruby | def update(data)
# Only pass a value for avatar if the key is defined as sending nil will delete the
data[:avatar] = avatarise(data[:avatar]) if data.key?(:avatar)
data[:channel_id] = data[:channel].resolve_id
data.delete(:channel)
update_webhook(data)
end | [
"def",
"update",
"(",
"data",
")",
"# Only pass a value for avatar if the key is defined as sending nil will delete the",
"data",
"[",
":avatar",
"]",
"=",
"avatarise",
"(",
"data",
"[",
":avatar",
"]",
")",
"if",
"data",
".",
"key?",
"(",
":avatar",
")",
"data",
... | Updates the webhook if you need to edit more than 1 attribute.
@param data [Hash] the data to update.
@option data [String, #read, nil] :avatar The new avatar, in base64-encoded JPG format, or nil to delete the avatar.
@option data [Channel, String, Integer, #resolve_id] :channel The channel the webhook should use.
... | [
"Updates",
"the",
"webhook",
"if",
"you",
"need",
"to",
"edit",
"more",
"than",
"1",
"attribute",
"."
] | 764298a1ff0be69a1853b510d736f21c2b91a2fe | https://github.com/meew0/discordrb/blob/764298a1ff0be69a1853b510d736f21c2b91a2fe/lib/discordrb/data/webhook.rb#L77-L83 | train | Update the webhook | [
30522,
13366,
10651,
1006,
2951,
1007,
1001,
2069,
3413,
1037,
3643,
2005,
22128,
2065,
1996,
3145,
2003,
4225,
2004,
6016,
9152,
2140,
2097,
3972,
12870,
1996,
2951,
1031,
1024,
22128,
1033,
1027,
22128,
5562,
1006,
2951,
1031,
1024,
22128... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
CocoaPods/Xcodeproj | lib/xcodeproj/config.rb | Xcodeproj.Config.hash_from_file_content | def hash_from_file_content(string)
hash = {}
string.split("\n").each do |line|
uncommented_line = strip_comment(line)
if include = extract_include(uncommented_line)
@includes.push normalized_xcconfig_path(include)
else
key, value = extract_key_value(uncommented_li... | ruby | def hash_from_file_content(string)
hash = {}
string.split("\n").each do |line|
uncommented_line = strip_comment(line)
if include = extract_include(uncommented_line)
@includes.push normalized_xcconfig_path(include)
else
key, value = extract_key_value(uncommented_li... | [
"def",
"hash_from_file_content",
"(",
"string",
")",
"hash",
"=",
"{",
"}",
"string",
".",
"split",
"(",
"\"\\n\"",
")",
".",
"each",
"do",
"|",
"line",
"|",
"uncommented_line",
"=",
"strip_comment",
"(",
"line",
")",
"if",
"include",
"=",
"extract_include... | Returns a hash from the string representation of an Xcconfig file.
@param [String] string
The string representation of an xcconfig file.
@return [Hash] the hash containing the xcconfig data. | [
"Returns",
"a",
"hash",
"from",
"the",
"string",
"representation",
"of",
"an",
"Xcconfig",
"file",
"."
] | 3be1684437a6f8e69c7836ad4c85a2b78663272f | https://github.com/CocoaPods/Xcodeproj/blob/3be1684437a6f8e69c7836ad4c85a2b78663272f/lib/xcodeproj/config.rb#L273-L287 | train | Returns a hash of the file content | [
30522,
13366,
23325,
1035,
2013,
1035,
5371,
1035,
4180,
1006,
5164,
1007,
23325,
1027,
1063,
1065,
5164,
1012,
3975,
1006,
1000,
1032,
1050,
1000,
1007,
1012,
2169,
2079,
1064,
2240,
1064,
4895,
9006,
3672,
2098,
1035,
2240,
1027,
6167,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
fastlane/fastlane | fastlane_core/lib/fastlane_core/project.rb | FastlaneCore.Project.build_settings | def build_settings(key: nil, optional: true)
unless @build_settings
if is_workspace
if schemes.count == 0
UI.user_error!("Could not find any schemes for Xcode workspace at path '#{self.path}'. Please make sure that the schemes you want to use are marked as `Shared` from Xcode.")
... | ruby | def build_settings(key: nil, optional: true)
unless @build_settings
if is_workspace
if schemes.count == 0
UI.user_error!("Could not find any schemes for Xcode workspace at path '#{self.path}'. Please make sure that the schemes you want to use are marked as `Shared` from Xcode.")
... | [
"def",
"build_settings",
"(",
"key",
":",
"nil",
",",
"optional",
":",
"true",
")",
"unless",
"@build_settings",
"if",
"is_workspace",
"if",
"schemes",
".",
"count",
"==",
"0",
"UI",
".",
"user_error!",
"(",
"\"Could not find any schemes for Xcode workspace at path ... | Get the build settings for our project
e.g. to properly get the DerivedData folder
@param [String] The key of which we want the value for (e.g. "PRODUCT_NAME") | [
"Get",
"the",
"build",
"settings",
"for",
"our",
"project",
"e",
".",
"g",
".",
"to",
"properly",
"get",
"the",
"DerivedData",
"folder"
] | 457c5d647c77f0e078dafa5129da616914e002c5 | https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/fastlane_core/lib/fastlane_core/project.rb#L341-L382 | train | Get the build settings for the current project. | [
30522,
13366,
3857,
1035,
10906,
1006,
3145,
1024,
9152,
2140,
1010,
11887,
1024,
2995,
1007,
4983,
1030,
3857,
1035,
10906,
2065,
2003,
1035,
2573,
15327,
2065,
11683,
1012,
4175,
1027,
1027,
1014,
21318,
1012,
5310,
1035,
7561,
999,
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... |
rails/rails | activemodel/lib/active_model/errors.rb | ActiveModel.Errors.delete | def delete(attribute, type = nil, **options)
attribute, type, options = normalize_arguments(attribute, type, options)
matches = where(attribute, type, options)
matches.each do |error|
@errors.delete(error)
end
matches.map(&:message)
end | ruby | def delete(attribute, type = nil, **options)
attribute, type, options = normalize_arguments(attribute, type, options)
matches = where(attribute, type, options)
matches.each do |error|
@errors.delete(error)
end
matches.map(&:message)
end | [
"def",
"delete",
"(",
"attribute",
",",
"type",
"=",
"nil",
",",
"**",
"options",
")",
"attribute",
",",
"type",
",",
"options",
"=",
"normalize_arguments",
"(",
"attribute",
",",
"type",
",",
"options",
")",
"matches",
"=",
"where",
"(",
"attribute",
",... | Delete messages for +key+. Returns the deleted messages.
person.errors[:name] # => ["cannot be nil"]
person.errors.delete(:name) # => ["cannot be nil"]
person.errors[:name] # => [] | [
"Delete",
"messages",
"for",
"+",
"key",
"+",
".",
"Returns",
"the",
"deleted",
"messages",
"."
] | 85a8bc644be69908f05740a5886ec19cd3679df5 | https://github.com/rails/rails/blob/85a8bc644be69908f05740a5886ec19cd3679df5/activemodel/lib/active_model/errors.rb#L196-L203 | train | Delete an error from the database | [
30522,
13366,
3972,
12870,
1006,
17961,
1010,
2828,
1027,
9152,
2140,
1010,
1008,
1008,
7047,
1007,
17961,
1010,
2828,
1010,
7047,
1027,
3671,
4697,
1035,
9918,
1006,
17961,
1010,
2828,
1010,
7047,
1007,
3503,
1027,
2073,
1006,
17961,
1010,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_compute/lib/2018-04-01/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb | Azure::Compute::Mgmt::V2018_04_01.VirtualMachineScaleSets.begin_redeploy_with_http_info | def begin_redeploy_with_http_info(resource_group_name, vm_scale_set_name, vm_instance_ids:nil, custom_headers:nil)
begin_redeploy_async(resource_group_name, vm_scale_set_name, vm_instance_ids:vm_instance_ids, custom_headers:custom_headers).value!
end | ruby | def begin_redeploy_with_http_info(resource_group_name, vm_scale_set_name, vm_instance_ids:nil, custom_headers:nil)
begin_redeploy_async(resource_group_name, vm_scale_set_name, vm_instance_ids:vm_instance_ids, custom_headers:custom_headers).value!
end | [
"def",
"begin_redeploy_with_http_info",
"(",
"resource_group_name",
",",
"vm_scale_set_name",
",",
"vm_instance_ids",
":",
"nil",
",",
"custom_headers",
":",
"nil",
")",
"begin_redeploy_async",
"(",
"resource_group_name",
",",
"vm_scale_set_name",
",",
"vm_instance_ids",
... | Redeploy one or more virtual machines 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 vm_instance_ids [VirtualMachineScaleSetVMInstanceIDs] A list of
virtual machine instance IDs from the VM scale set.
@p... | [
"Redeploy",
"one",
"or",
"more",
"virtual",
"machines",
"in",
"a",
"VM",
"scale",
"set",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_compute/lib/2018-04-01/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb#L2052-L2054 | train | Redeploy a virtual machine. | [
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,
1058,
2213,
1035,
6013,
1035,
8909,
2015,
1024,
9152,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_recovery_services_site_recovery/lib/2016-08-10/generated/azure_mgmt_recovery_services_site_recovery/replication_storage_classification_mappings.rb | Azure::RecoveryServicesSiteRecovery::Mgmt::V2016_08_10.ReplicationStorageClassificationMappings.begin_create | def begin_create(fabric_name, storage_classification_name, storage_classification_mapping_name, pairing_input, custom_headers:nil)
response = begin_create_async(fabric_name, storage_classification_name, storage_classification_mapping_name, pairing_input, custom_headers:custom_headers).value!
response.body u... | ruby | def begin_create(fabric_name, storage_classification_name, storage_classification_mapping_name, pairing_input, custom_headers:nil)
response = begin_create_async(fabric_name, storage_classification_name, storage_classification_mapping_name, pairing_input, custom_headers:custom_headers).value!
response.body u... | [
"def",
"begin_create",
"(",
"fabric_name",
",",
"storage_classification_name",
",",
"storage_classification_mapping_name",
",",
"pairing_input",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"begin_create_async",
"(",
"fabric_name",
",",
"storage_classification_n... | Create storage classification mapping.
The operation to create a storage classification mapping.
@param fabric_name [String] Fabric name.
@param storage_classification_name [String] Storage classification name.
@param storage_classification_mapping_name [String] Storage classification
mapping name.
@param pairi... | [
"Create",
"storage",
"classification",
"mapping",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_recovery_services_site_recovery/lib/2016-08-10/generated/azure_mgmt_recovery_services_site_recovery/replication_storage_classification_mappings.rb#L432-L435 | train | Creates a new cluster cluster. | [
30522,
13366,
4088,
1035,
3443,
1006,
8313,
1035,
2171,
1010,
5527,
1035,
5579,
1035,
2171,
1010,
5527,
1035,
5579,
1035,
12375,
1035,
2171,
1010,
22778,
1035,
7953,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
4088,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
square/connect-ruby-sdk | lib/square_connect/api/catalog_api.rb | SquareConnect.CatalogApi.batch_upsert_catalog_objects | def batch_upsert_catalog_objects(body, opts = {})
data, _status_code, _headers = batch_upsert_catalog_objects_with_http_info(body, opts)
return data
end | ruby | def batch_upsert_catalog_objects(body, opts = {})
data, _status_code, _headers = batch_upsert_catalog_objects_with_http_info(body, opts)
return data
end | [
"def",
"batch_upsert_catalog_objects",
"(",
"body",
",",
"opts",
"=",
"{",
"}",
")",
"data",
",",
"_status_code",
",",
"_headers",
"=",
"batch_upsert_catalog_objects_with_http_info",
"(",
"body",
",",
"opts",
")",
"return",
"data",
"end"
] | BatchUpsertCatalogObjects
Creates or updates up to 10,000 target objects based on the provided list of objects. The target objects are grouped into batches and each batch is inserted/updated in an all-or-nothing manner. If an object within a batch is malformed in some way, or violates a database constraint, the entire... | [
"BatchUpsertCatalogObjects",
"Creates",
"or",
"updates",
"up",
"to",
"10",
"000",
"target",
"objects",
"based",
"on",
"the",
"provided",
"list",
"of",
"objects",
".",
"The",
"target",
"objects",
"are",
"grouped",
"into",
"batches",
"and",
"each",
"batch",
"is"... | 798eb9ded716f23b9f1518386f1c311a34bca8bf | https://github.com/square/connect-ruby-sdk/blob/798eb9ded716f23b9f1518386f1c311a34bca8bf/lib/square_connect/api/catalog_api.rb#L135-L138 | train | Batch upserts a list of catalog objects | [
30522,
13366,
14108,
1035,
11139,
8743,
1035,
12105,
1035,
5200,
1006,
2303,
1010,
23569,
2015,
1027,
1063,
1065,
1007,
2951,
1010,
1035,
3570,
1035,
3642,
1010,
1035,
20346,
2015,
1027,
14108,
1035,
11139,
8743,
1035,
12105,
1035,
5200,
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... |
boazsegev/combine_pdf | lib/combine_pdf/renderer.rb | CombinePDF.Renderer.create_deep_copy | def create_deep_copy(object)
if object.is_a?(Array)
return object.map { |e| create_deep_copy e }
elsif object.is_a?(Hash)
return {}.tap { |out| object.each { |k, v| out[create_deep_copy(k)] = create_deep_copy(v) unless k == :Parent } }
elsif object.is_a?(String)
return object.d... | ruby | def create_deep_copy(object)
if object.is_a?(Array)
return object.map { |e| create_deep_copy e }
elsif object.is_a?(Hash)
return {}.tap { |out| object.each { |k, v| out[create_deep_copy(k)] = create_deep_copy(v) unless k == :Parent } }
elsif object.is_a?(String)
return object.d... | [
"def",
"create_deep_copy",
"(",
"object",
")",
"if",
"object",
".",
"is_a?",
"(",
"Array",
")",
"return",
"object",
".",
"map",
"{",
"|",
"e",
"|",
"create_deep_copy",
"e",
"}",
"elsif",
"object",
".",
"is_a?",
"(",
"Hash",
")",
"return",
"{",
"}",
"... | Ruby normally assigns pointes.
noramlly:
a = [1,2,3] # => [1,2,3]
b = a # => [1,2,3]
a << 4 # => [1,2,3,4]
b # => [1,2,3,4]
This method makes sure that the memory is copied instead of a pointer assigned.
this works using recursion, so that arrays and hashes within arrays and hashes are also copied and no... | [
"Ruby",
"normally",
"assigns",
"pointes",
".",
"noramlly",
":",
"a",
"=",
"[",
"1",
"2",
"3",
"]",
"#",
"=",
">",
"[",
"1",
"2",
"3",
"]",
"b",
"=",
"a",
"#",
"=",
">",
"[",
"1",
"2",
"3",
"]",
"a",
"<<",
"4",
"#",
"=",
">",
"[",
"1",
... | 09054051019c069f551f3e60be789577c0f93900 | https://github.com/boazsegev/combine_pdf/blob/09054051019c069f551f3e60be789577c0f93900/lib/combine_pdf/renderer.rb#L156-L166 | train | Create a deep copy of the given object. | [
30522,
13366,
3443,
1035,
2784,
1035,
6100,
1006,
4874,
1007,
2065,
4874,
1012,
2003,
1035,
1037,
1029,
1006,
9140,
1007,
2709,
4874,
1012,
4949,
1063,
1064,
1041,
1064,
3443,
1035,
2784,
1035,
6100,
1041,
1065,
3449,
5332,
2546,
4874,
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... |
samvera/hyrax | app/presenters/hyrax/work_show_presenter.rb | Hyrax.WorkShowPresenter.paginated_item_list | def paginated_item_list(page_array:)
Kaminari.paginate_array(page_array, total_count: page_array.size).page(current_page).per(rows_from_params)
end | ruby | def paginated_item_list(page_array:)
Kaminari.paginate_array(page_array, total_count: page_array.size).page(current_page).per(rows_from_params)
end | [
"def",
"paginated_item_list",
"(",
"page_array",
":",
")",
"Kaminari",
".",
"paginate_array",
"(",
"page_array",
",",
"total_count",
":",
"page_array",
".",
"size",
")",
".",
"page",
"(",
"current_page",
")",
".",
"per",
"(",
"rows_from_params",
")",
"end"
] | Uses kaminari to paginate an array to avoid need for solr documents for items here | [
"Uses",
"kaminari",
"to",
"paginate",
"an",
"array",
"to",
"avoid",
"need",
"for",
"solr",
"documents",
"for",
"items",
"here"
] | e2b4f56e829a53b1f11296324736e9d5b8c9ee5f | https://github.com/samvera/hyrax/blob/e2b4f56e829a53b1f11296324736e9d5b8c9ee5f/app/presenters/hyrax/work_show_presenter.rb#L246-L248 | train | Returns a paginated list of items | [
30522,
13366,
6643,
20876,
3064,
1035,
8875,
1035,
2862,
1006,
3931,
1035,
9140,
1024,
1007,
27829,
3981,
3089,
1012,
6643,
20876,
2618,
1035,
9140,
1006,
3931,
1035,
9140,
1010,
2561,
1035,
4175,
1024,
3931,
1035,
9140,
1012,
2946,
1007,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
aws/aws-sdk-ruby | gems/aws-sdk-iam/lib/aws-sdk-iam/virtual_mfa_device.rb | Aws::IAM.VirtualMfaDevice.delete | def delete(options = {})
options = options.merge(serial_number: @serial_number)
resp = @client.delete_virtual_mfa_device(options)
resp.data
end | ruby | def delete(options = {})
options = options.merge(serial_number: @serial_number)
resp = @client.delete_virtual_mfa_device(options)
resp.data
end | [
"def",
"delete",
"(",
"options",
"=",
"{",
"}",
")",
"options",
"=",
"options",
".",
"merge",
"(",
"serial_number",
":",
"@serial_number",
")",
"resp",
"=",
"@client",
".",
"delete_virtual_mfa_device",
"(",
"options",
")",
"resp",
".",
"data",
"end"
] | @!group Actions
@example Request syntax with placeholder values
virtual_mfa_device.delete()
@param [Hash] options ({})
@return [EmptyStructure] | [
"@!group",
"Actions",
"@example",
"Request",
"syntax",
"with",
"placeholder",
"values"
] | e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d | https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-iam/lib/aws-sdk-iam/virtual_mfa_device.rb#L193-L197 | train | Delete a virtual mfa device | [
30522,
13366,
3972,
12870,
1006,
7047,
1027,
1063,
1065,
1007,
7047,
1027,
7047,
1012,
13590,
1006,
7642,
1035,
2193,
1024,
1030,
7642,
1035,
2193,
1007,
24501,
2361,
1027,
1030,
7396,
1012,
3972,
12870,
1035,
7484,
1035,
26913,
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... |
aws/aws-sdk-ruby | gems/aws-sdk-ec2/lib/aws-sdk-ec2/network_acl.rb | Aws::EC2.NetworkAcl.create_entry | def create_entry(options = {})
options = options.merge(network_acl_id: @id)
resp = @client.create_network_acl_entry(options)
resp.data
end | ruby | def create_entry(options = {})
options = options.merge(network_acl_id: @id)
resp = @client.create_network_acl_entry(options)
resp.data
end | [
"def",
"create_entry",
"(",
"options",
"=",
"{",
"}",
")",
"options",
"=",
"options",
".",
"merge",
"(",
"network_acl_id",
":",
"@id",
")",
"resp",
"=",
"@client",
".",
"create_network_acl_entry",
"(",
"options",
")",
"resp",
".",
"data",
"end"
] | @!group Actions
@example Request syntax with placeholder values
network_acl.create_entry({
cidr_block: "String",
dry_run: false,
egress: false, # required
icmp_type_code: {
code: 1,
type: 1,
},
ipv_6_cidr_block: "String",
port_range: {
from: 1,
to: 1,
... | [
"@!group",
"Actions",
"@example",
"Request",
"syntax",
"with",
"placeholder",
"values"
] | e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d | https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-ec2/lib/aws-sdk-ec2/network_acl.rb#L261-L265 | train | Creates a network acl entry | [
30522,
13366,
3443,
1035,
4443,
1006,
7047,
1027,
1063,
1065,
1007,
7047,
1027,
7047,
1012,
13590,
1006,
2897,
1035,
9353,
2140,
1035,
8909,
1024,
1030,
8909,
1007,
24501,
2361,
1027,
1030,
7396,
1012,
3443,
1035,
2897,
1035,
9353,
2140,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
aws/aws-sdk-ruby | gems/aws-sdk-glacier/lib/aws-sdk-glacier/vault.rb | Aws::Glacier.Vault.delete | def delete(options = {})
options = options.merge(
vault_name: @name,
account_id: @account_id
)
resp = @client.delete_vault(options)
resp.data
end | ruby | def delete(options = {})
options = options.merge(
vault_name: @name,
account_id: @account_id
)
resp = @client.delete_vault(options)
resp.data
end | [
"def",
"delete",
"(",
"options",
"=",
"{",
"}",
")",
"options",
"=",
"options",
".",
"merge",
"(",
"vault_name",
":",
"@name",
",",
"account_id",
":",
"@account_id",
")",
"resp",
"=",
"@client",
".",
"delete_vault",
"(",
"options",
")",
"resp",
".",
"d... | @example Request syntax with placeholder values
vault.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-glacier/lib/aws-sdk-glacier/vault.rb#L234-L241 | train | Delete the vault | [
30522,
13366,
3972,
12870,
1006,
7047,
1027,
1063,
1065,
1007,
7047,
1027,
7047,
1012,
13590,
1006,
11632,
1035,
2171,
1024,
1030,
2171,
1010,
4070,
1035,
8909,
1024,
1030,
4070,
1035,
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... |
rails/rails | activesupport/lib/active_support/message_encryptor.rb | ActiveSupport.MessageEncryptor.encrypt_and_sign | def encrypt_and_sign(value, expires_at: nil, expires_in: nil, purpose: nil)
verifier.generate(_encrypt(value, expires_at: expires_at, expires_in: expires_in, purpose: purpose))
end | ruby | def encrypt_and_sign(value, expires_at: nil, expires_in: nil, purpose: nil)
verifier.generate(_encrypt(value, expires_at: expires_at, expires_in: expires_in, purpose: purpose))
end | [
"def",
"encrypt_and_sign",
"(",
"value",
",",
"expires_at",
":",
"nil",
",",
"expires_in",
":",
"nil",
",",
"purpose",
":",
"nil",
")",
"verifier",
".",
"generate",
"(",
"_encrypt",
"(",
"value",
",",
"expires_at",
":",
"expires_at",
",",
"expires_in",
":"... | Initialize a new MessageEncryptor. +secret+ must be at least as long as
the cipher key size. For the default 'aes-256-gcm' cipher, this is 256
bits. If you are using a user-entered secret, you can generate a suitable
key by using <tt>ActiveSupport::KeyGenerator</tt> or a similar key
derivation function.
First add... | [
"Initialize",
"a",
"new",
"MessageEncryptor",
".",
"+",
"secret",
"+",
"must",
"be",
"at",
"least",
"as",
"long",
"as",
"the",
"cipher",
"key",
"size",
".",
"For",
"the",
"default",
"aes",
"-",
"256",
"-",
"gcm",
"cipher",
"this",
"is",
"256",
"bits",
... | 85a8bc644be69908f05740a5886ec19cd3679df5 | https://github.com/rails/rails/blob/85a8bc644be69908f05740a5886ec19cd3679df5/activesupport/lib/active_support/message_encryptor.rb#L150-L152 | train | Encrypt and sign a value | [
30522,
13366,
4372,
26775,
22571,
2102,
1035,
1998,
1035,
3696,
1006,
3643,
1010,
4654,
20781,
2015,
1035,
2012,
1024,
9152,
2140,
1010,
4654,
20781,
2015,
1035,
1999,
1024,
9152,
2140,
1010,
3800,
1024,
9152,
2140,
1007,
2310,
3089,
8873,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
aws/aws-sdk-ruby | gems/aws-sdk-rds/lib/aws-sdk-rds/resource.rb | Aws::RDS.Resource.db_parameter_groups | def db_parameter_groups(options = {})
batches = Enumerator.new do |y|
resp = @client.describe_db_parameter_groups(options)
resp.each_page do |page|
batch = []
page.data.db_parameter_groups.each do |d|
batch << DBParameterGroup.new(
name: d.db_parameter... | ruby | def db_parameter_groups(options = {})
batches = Enumerator.new do |y|
resp = @client.describe_db_parameter_groups(options)
resp.each_page do |page|
batch = []
page.data.db_parameter_groups.each do |d|
batch << DBParameterGroup.new(
name: d.db_parameter... | [
"def",
"db_parameter_groups",
"(",
"options",
"=",
"{",
"}",
")",
"batches",
"=",
"Enumerator",
".",
"new",
"do",
"|",
"y",
"|",
"resp",
"=",
"@client",
".",
"describe_db_parameter_groups",
"(",
"options",
")",
"resp",
".",
"each_page",
"do",
"|",
"page",
... | @example Request syntax with placeholder values
db_parameter_groups = rds.db_parameter_groups({
db_parameter_group_name: "String",
filters: [
{
name: "String", # required
values: ["String"], # required
},
],
})
@param [Hash] options ({})
@option options [String] :... | [
"@example",
"Request",
"syntax",
"with",
"placeholder",
"values"
] | e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d | https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-rds/lib/aws-sdk-rds/resource.rb#L1928-L1944 | train | Returns a collection of DBParameterGroups | [
30522,
13366,
16962,
1035,
16381,
1035,
2967,
1006,
7047,
1027,
1063,
1065,
1007,
14108,
2229,
1027,
4372,
17897,
16259,
1012,
2047,
2079,
1064,
1061,
1064,
24501,
2361,
1027,
1030,
7396,
1012,
6235,
1035,
16962,
1035,
16381,
1035,
2967,
10... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_network/lib/2019-02-01/generated/azure_mgmt_network/ddos_custom_policies.rb | Azure::Network::Mgmt::V2019_02_01.DdosCustomPolicies.delete | def delete(resource_group_name, ddos_custom_policy_name, custom_headers:nil)
response = delete_async(resource_group_name, ddos_custom_policy_name, custom_headers:custom_headers).value!
nil
end | ruby | def delete(resource_group_name, ddos_custom_policy_name, custom_headers:nil)
response = delete_async(resource_group_name, ddos_custom_policy_name, custom_headers:custom_headers).value!
nil
end | [
"def",
"delete",
"(",
"resource_group_name",
",",
"ddos_custom_policy_name",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"delete_async",
"(",
"resource_group_name",
",",
"ddos_custom_policy_name",
",",
"custom_headers",
":custom_headers",
")",
".",
"value!"... | Deletes the specified DDoS custom policy.
@param resource_group_name [String] The name of the resource group.
@param ddos_custom_policy_name [String] The name of the DDoS custom policy.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request. | [
"Deletes",
"the",
"specified",
"DDoS",
"custom",
"policy",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_network/lib/2019-02-01/generated/azure_mgmt_network/ddos_custom_policies.rb#L32-L35 | train | Deletes the specified DDoS custom policy. | [
30522,
13366,
3972,
12870,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
20315,
2891,
1035,
7661,
1035,
3343,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
3972,
12870,
1035,
2004,
6038,
2278,
1006,
7692,
1035,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | 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.force_approve_repair_task | def force_approve_repair_task(repair_task_approve_description, custom_headers:nil)
response = force_approve_repair_task_async(repair_task_approve_description, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def force_approve_repair_task(repair_task_approve_description, custom_headers:nil)
response = force_approve_repair_task_async(repair_task_approve_description, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"force_approve_repair_task",
"(",
"repair_task_approve_description",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"force_approve_repair_task_async",
"(",
"repair_task_approve_description",
",",
"custom_headers",
":custom_headers",
")",
".",
"value!",
"respo... | Forces the approval of the given repair task.
This API supports the Service Fabric platform; it is not meant to be used
directly from your code.
@param repair_task_approve_description [RepairTaskApproveDescription]
Describes the repair task to be approved.
@param custom_headers [Hash{String => String}] A hash of... | [
"Forces",
"the",
"approval",
"of",
"the",
"given",
"repair",
"task",
"."
] | 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#L14118-L14121 | train | Force approval of a repair task. | [
30522,
13366,
2486,
1035,
14300,
1035,
7192,
1035,
4708,
1006,
7192,
1035,
4708,
1035,
14300,
1035,
6412,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
2486,
1035,
14300,
1035,
7192,
1035,
4708,
1035,
2004,
6038,
2278,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
square/connect-ruby-sdk | lib/square_connect/api/inventory_api.rb | SquareConnect.InventoryApi.retrieve_inventory_changes | def retrieve_inventory_changes(catalog_object_id, opts = {})
data, _status_code, _headers = retrieve_inventory_changes_with_http_info(catalog_object_id, opts)
return data
end | ruby | def retrieve_inventory_changes(catalog_object_id, opts = {})
data, _status_code, _headers = retrieve_inventory_changes_with_http_info(catalog_object_id, opts)
return data
end | [
"def",
"retrieve_inventory_changes",
"(",
"catalog_object_id",
",",
"opts",
"=",
"{",
"}",
")",
"data",
",",
"_status_code",
",",
"_headers",
"=",
"retrieve_inventory_changes_with_http_info",
"(",
"catalog_object_id",
",",
"opts",
")",
"return",
"data",
"end"
] | RetrieveInventoryChanges
Returns a set of physical counts and inventory adjustments for the provided [CatalogObject](#type-catalogobject) at the requested [Location](#type-location)s. Results are paginated and sorted in descending order according to their `occurred_at` timestamp (newest first). There are no limits o... | [
"RetrieveInventoryChanges",
"Returns",
"a",
"set",
"of",
"physical",
"counts",
"and",
"inventory",
"adjustments",
"for",
"the",
"provided",
"[",
"CatalogObject",
"]",
"(",
"#type",
"-",
"catalogobject",
")",
"at",
"the",
"requested",
"[",
"Location",
"]",
"(",
... | 798eb9ded716f23b9f1518386f1c311a34bca8bf | https://github.com/square/connect-ruby-sdk/blob/798eb9ded716f23b9f1518386f1c311a34bca8bf/lib/square_connect/api/inventory_api.rb#L247-L250 | train | Retrieve inventory changes | [
30522,
13366,
12850,
1035,
12612,
1035,
3431,
1006,
12105,
1035,
4874,
1035,
8909,
1010,
23569,
2015,
1027,
1063,
1065,
1007,
2951,
1010,
1035,
3570,
1035,
3642,
1010,
1035,
20346,
2015,
1027,
12850,
1035,
12612,
1035,
3431,
1035,
2007,
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... |
dry-rb/dry-initializer | lib/dry/initializer/config.rb | Dry::Initializer.Config.final_definitions | def final_definitions
parent_definitions = Hash(parent&.definitions&.dup)
definitions.each_with_object(parent_definitions) do |(key, val), obj|
obj[key] = check_type(obj[key], val)
end
end | ruby | def final_definitions
parent_definitions = Hash(parent&.definitions&.dup)
definitions.each_with_object(parent_definitions) do |(key, val), obj|
obj[key] = check_type(obj[key], val)
end
end | [
"def",
"final_definitions",
"parent_definitions",
"=",
"Hash",
"(",
"parent",
"&.",
"definitions",
"&.",
"dup",
")",
"definitions",
".",
"each_with_object",
"(",
"parent_definitions",
")",
"do",
"|",
"(",
"key",
",",
"val",
")",
",",
"obj",
"|",
"obj",
"[",
... | rubocop: enable Metrics/MethodLength | [
"rubocop",
":",
"enable",
"Metrics",
"/",
"MethodLength"
] | 422d331468602ff0d3543fbb336b784343e5cc31 | https://github.com/dry-rb/dry-initializer/blob/422d331468602ff0d3543fbb336b784343e5cc31/lib/dry/initializer/config.rb#L156-L161 | train | Return the array of definitions that are not of the correct type. | [
30522,
13366,
2345,
1035,
15182,
6687,
1035,
15182,
1027,
23325,
1006,
6687,
1004,
1012,
15182,
1004,
1012,
4241,
2361,
1007,
15182,
1012,
2169,
1035,
2007,
1035,
4874,
1006,
6687,
1035,
15182,
1007,
2079,
1064,
1006,
3145,
1010,
11748,
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... |
winebarrel/ridgepole | lib/ridgepole/diff.rb | Ridgepole.Diff.fix_change_column_options | def fix_change_column_options(table_name, from_attrs, to_attrs)
# default: 0, null: false -> default: nil, null: false | default: nil
# default: 0, null: false -> null: false | default: nil
# default: 0, null: false -> default: nil, null: true | default: nil, null: true
# default:... | ruby | def fix_change_column_options(table_name, from_attrs, to_attrs)
# default: 0, null: false -> default: nil, null: false | default: nil
# default: 0, null: false -> null: false | default: nil
# default: 0, null: false -> default: nil, null: true | default: nil, null: true
# default:... | [
"def",
"fix_change_column_options",
"(",
"table_name",
",",
"from_attrs",
",",
"to_attrs",
")",
"# default: 0, null: false -> default: nil, null: false | default: nil",
"# default: 0, null: false -> null: false | default: nil",
"# default: 0, null: false -> default: nil, null: tr... | XXX: MySQL only?
https://github.com/rails/rails/blob/v4.2.1/activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb#L760
https://github.com/rails/rails/blob/v4.2.1/activerecord/lib/active_record/connection_adapters/abstract/schema_creation.rb#L102 | [
"XXX",
":",
"MySQL",
"only?",
"https",
":",
"//",
"github",
".",
"com",
"/",
"rails",
"/",
"rails",
"/",
"blob",
"/",
"v4",
".",
"2",
".",
"1",
"/",
"activerecord",
"/",
"lib",
"/",
"active_record",
"/",
"connection_adapters",
"/",
"abstract_mysql_adapte... | ef6402cfe8caae804c059c839aeb9bdc4299cf20 | https://github.com/winebarrel/ridgepole/blob/ef6402cfe8caae804c059c839aeb9bdc4299cf20/lib/ridgepole/diff.rb#L435-L455 | train | Fixes the change_column_options method for the table_name | [
30522,
13366,
8081,
1035,
2689,
1035,
5930,
1035,
7047,
1006,
2795,
1035,
2171,
1010,
2013,
1035,
2012,
16344,
2015,
1010,
2000,
1035,
2012,
16344,
2015,
1007,
1001,
12398,
1024,
1014,
1010,
19701,
1024,
6270,
1011,
1028,
12398,
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... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.