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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
danger/danger | lib/danger/danger_core/plugins/dangerfile_messaging_plugin.rb | Danger.DangerfileMessagingPlugin.warn | def warn(*warnings, **options)
sticky = options.fetch(:sticky, false)
file = options.fetch(:file, nil)
line = options.fetch(:line, nil)
warnings.flatten.each do |warning|
next if should_ignore_violation(warning)
@warnings << Violation.new(warning, sticky, file, line) if warning
... | ruby | def warn(*warnings, **options)
sticky = options.fetch(:sticky, false)
file = options.fetch(:file, nil)
line = options.fetch(:line, nil)
warnings.flatten.each do |warning|
next if should_ignore_violation(warning)
@warnings << Violation.new(warning, sticky, file, line) if warning
... | [
"def",
"warn",
"(",
"*",
"warnings",
",",
"**",
"options",
")",
"sticky",
"=",
"options",
".",
"fetch",
"(",
":sticky",
",",
"false",
")",
"file",
"=",
"options",
".",
"fetch",
"(",
":file",
",",
"nil",
")",
"line",
"=",
"options",
".",
"fetch",
"(... | @!group Core
Specifies a problem, but not critical
@param [String, Array<String>] message
The message to present to the user
@param [Boolean] sticky
Whether the message should be kept after it was fixed,
defaults to `false`.
@param [String] file
Optional. Path t... | [
"@!group",
"Core",
"Specifies",
"a",
"problem",
"but",
"not",
"critical"
] | 0d6d09f2d949c287fe75202d947374042b0679f4 | https://github.com/danger/danger/blob/0d6d09f2d949c287fe75202d947374042b0679f4/lib/danger/danger_core/plugins/dangerfile_messaging_plugin.rb#L145-L154 | train | Add warnings to the warnings list | [
30522,
13366,
11582,
1006,
1008,
16234,
1010,
1008,
1008,
7047,
1007,
15875,
1027,
7047,
1012,
18584,
1006,
1024,
15875,
1010,
6270,
1007,
5371,
1027,
7047,
1012,
18584,
1006,
1024,
5371,
1010,
9152,
2140,
1007,
2240,
1027,
7047,
1012,
1858... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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.add_closed_list_with_http_info | def add_closed_list_with_http_info(app_id, version_id, closed_list_model_create_object, custom_headers:nil)
add_closed_list_async(app_id, version_id, closed_list_model_create_object, custom_headers:custom_headers).value!
end | ruby | def add_closed_list_with_http_info(app_id, version_id, closed_list_model_create_object, custom_headers:nil)
add_closed_list_async(app_id, version_id, closed_list_model_create_object, custom_headers:custom_headers).value!
end | [
"def",
"add_closed_list_with_http_info",
"(",
"app_id",
",",
"version_id",
",",
"closed_list_model_create_object",
",",
"custom_headers",
":",
"nil",
")",
"add_closed_list_async",
"(",
"app_id",
",",
"version_id",
",",
"closed_list_model_create_object",
",",
"custom_headers... | Adds a list entity model to a version of the application.
@param app_id The application ID.
@param version_id [String] The version ID.
@param closed_list_model_create_object [ClosedListModelCreateObject] A model
containing the name and words for the new list entity extractor.
@param custom_headers [Hash{String =>... | [
"Adds",
"a",
"list",
"entity",
"model",
"to",
"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#L1113-L1115 | train | Adds a list to the application version of the application. | [
30522,
13366,
5587,
1035,
2701,
1035,
2862,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
10439,
1035,
8909,
1010,
2544,
1035,
8909,
1010,
2701,
1035,
2862,
1035,
2944,
1035,
3443,
1035,
4874,
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 | data/azure_service_fabric/lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb | Azure::ServiceFabric::V6_2_0_9.ServiceFabricClientAPIs.get_fault_operation_list_with_http_info | def get_fault_operation_list_with_http_info(type_filter, state_filter, timeout:60, custom_headers:nil)
get_fault_operation_list_async(type_filter, state_filter, timeout:timeout, custom_headers:custom_headers).value!
end | ruby | def get_fault_operation_list_with_http_info(type_filter, state_filter, timeout:60, custom_headers:nil)
get_fault_operation_list_async(type_filter, state_filter, timeout:timeout, custom_headers:custom_headers).value!
end | [
"def",
"get_fault_operation_list_with_http_info",
"(",
"type_filter",
",",
"state_filter",
",",
"timeout",
":",
"60",
",",
"custom_headers",
":",
"nil",
")",
"get_fault_operation_list_async",
"(",
"type_filter",
",",
"state_filter",
",",
"timeout",
":",
"timeout",
","... | Gets a list of user-induced fault operations filtered by provided input.
Gets the a list of user-induced fault operations filtered by provided input.
@param type_filter [Integer] Used to filter on OperationType for user-induced
operations.
65535 - select all
1 - select PartitionDataLoss.
2 - select Part... | [
"Gets",
"a",
"list",
"of",
"user",
"-",
"induced",
"fault",
"operations",
"filtered",
"by",
"provided",
"input",
"."
] | 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#L21920-L21922 | train | Gets the list of fault operations. | [
30522,
13366,
2131,
1035,
6346,
1035,
3169,
1035,
2862,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
2828,
1035,
11307,
1010,
2110,
1035,
11307,
1010,
2051,
5833,
1024,
3438,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
2131,
1035,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
mongodb/mongoid | lib/rails/mongoid.rb | Rails.Mongoid.load_model | def load_model(file)
begin
require_dependency(file)
rescue Exception => e
Logger.new($stdout).warn(e.message)
end
end | ruby | def load_model(file)
begin
require_dependency(file)
rescue Exception => e
Logger.new($stdout).warn(e.message)
end
end | [
"def",
"load_model",
"(",
"file",
")",
"begin",
"require_dependency",
"(",
"file",
")",
"rescue",
"Exception",
"=>",
"e",
"Logger",
".",
"new",
"(",
"$stdout",
")",
".",
"warn",
"(",
"e",
".",
"message",
")",
"end",
"end"
] | I don't want to mock out kernel for unit testing purposes, so added this
method as a convenience.
@example Load the model.
Mongoid.load_model("/mongoid/behavior")
@param [ String ] file The base filename.
@since 2.0.0.rc.3 | [
"I",
"don",
"t",
"want",
"to",
"mock",
"out",
"kernel",
"for",
"unit",
"testing",
"purposes",
"so",
"added",
"this",
"method",
"as",
"a",
"convenience",
"."
] | 56976e32610f4c2450882b0bfe14da099f0703f4 | https://github.com/mongodb/mongoid/blob/56976e32610f4c2450882b0bfe14da099f0703f4/lib/rails/mongoid.rb#L49-L55 | train | Load a model from a file | [
30522,
13366,
7170,
1035,
2944,
1006,
5371,
1007,
4088,
5478,
1035,
24394,
1006,
5371,
1007,
5343,
6453,
1027,
1028,
1041,
8833,
4590,
1012,
2047,
1006,
1002,
2358,
26797,
2102,
1007,
1012,
11582,
1006,
1041,
1012,
4471,
1007,
2203,
2203,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
commander-rb/commander | lib/commander/command.rb | Commander.Command.call | def call(args = [])
object, meth = @when_called[0, 2]
meth ||= :call
options = proxy_option_struct
case object
when Proc then object.call(args, options)
when Class then meth != :call ? object.new.send(meth, args, options) : object.new(args, options)
else object.send(meth, args... | ruby | def call(args = [])
object, meth = @when_called[0, 2]
meth ||= :call
options = proxy_option_struct
case object
when Proc then object.call(args, options)
when Class then meth != :call ? object.new.send(meth, args, options) : object.new(args, options)
else object.send(meth, args... | [
"def",
"call",
"(",
"args",
"=",
"[",
"]",
")",
"object",
",",
"meth",
"=",
"@when_called",
"[",
"0",
",",
"2",
"]",
"meth",
"||=",
":call",
"options",
"=",
"proxy_option_struct",
"case",
"object",
"when",
"Proc",
"then",
"object",
".",
"call",
"(",
... | Call the commands when_called block with _args_. | [
"Call",
"the",
"commands",
"when_called",
"block",
"with",
"_args_",
"."
] | 332047c14948225462fe60042eed23adfb996d68 | https://github.com/commander-rb/commander/blob/332047c14948225462fe60042eed23adfb996d68/lib/commander/command.rb#L176-L186 | train | Returns the result of calling the method. | [
30522,
13366,
2655,
1006,
12098,
5620,
1027,
1031,
1033,
1007,
4874,
1010,
2777,
2232,
1027,
1030,
2043,
1035,
2170,
1031,
1014,
1010,
1016,
1033,
2777,
2232,
1064,
1064,
1027,
1024,
2655,
7047,
1027,
24540,
1035,
5724,
1035,
2358,
6820,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_network/lib/2016-06-01/generated/azure_mgmt_network/virtual_network_gateways.rb | Azure::Network::Mgmt::V2016_06_01.VirtualNetworkGateways.reset | def reset(resource_group_name, virtual_network_gateway_name, parameters, custom_headers:nil)
response = reset_async(resource_group_name, virtual_network_gateway_name, parameters, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def reset(resource_group_name, virtual_network_gateway_name, parameters, custom_headers:nil)
response = reset_async(resource_group_name, virtual_network_gateway_name, parameters, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"reset",
"(",
"resource_group_name",
",",
"virtual_network_gateway_name",
",",
"parameters",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"reset_async",
"(",
"resource_group_name",
",",
"virtual_network_gateway_name",
",",
"parameters",
",",
"custom_h... | The Reset VirtualNetworkGateway operation resets the primary of the 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 virtual network
gateway.
... | [
"The",
"Reset",
"VirtualNetworkGateway",
"operation",
"resets",
"the",
"primary",
"of",
"the",
"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/2016-06-01/generated/azure_mgmt_network/virtual_network_gateways.rb#L320-L323 | train | Resets a virtual network gateway. | [
30522,
13366,
25141,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
7484,
1035,
2897,
1035,
11909,
1035,
2171,
1010,
11709,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
25141,
1035,
2004,
6038,
2278,
1006,
7692,
1035,
2177,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
cloudfoundry/bosh | src/bosh-director/lib/bosh/director/job_runner.rb | Bosh::Director.JobRunner.finish_task | def finish_task(state, result)
@task.refresh
@task.state = state
@task.result = truncate(result.to_s)
@task.timestamp = Time.now
@task.save
end | ruby | def finish_task(state, result)
@task.refresh
@task.state = state
@task.result = truncate(result.to_s)
@task.timestamp = Time.now
@task.save
end | [
"def",
"finish_task",
"(",
"state",
",",
"result",
")",
"@task",
".",
"refresh",
"@task",
".",
"state",
"=",
"state",
"@task",
".",
"result",
"=",
"truncate",
"(",
"result",
".",
"to_s",
")",
"@task",
".",
"timestamp",
"=",
"Time",
".",
"now",
"@task",... | Marks task completion
@param [Symbol] state Task completion state
@param [#to_s] result | [
"Marks",
"task",
"completion"
] | 2eaa7100879ddd20cd909cd698514746195e28b7 | https://github.com/cloudfoundry/bosh/blob/2eaa7100879ddd20cd909cd698514746195e28b7/src/bosh-director/lib/bosh/director/job_runner.rb#L149-L155 | train | Finish a task | [
30522,
13366,
3926,
1035,
4708,
1006,
2110,
1010,
2765,
1007,
1030,
4708,
1012,
25416,
21898,
1030,
4708,
1012,
2110,
1027,
2110,
1030,
4708,
1012,
2765,
1027,
19817,
4609,
16280,
1006,
2765,
1012,
2000,
1035,
1055,
1007,
1030,
4708,
1012,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
ruby-i18n/i18n | lib/i18n.rb | I18n.Base.handle_exception | def handle_exception(handling, exception, locale, key, options)
case handling
when :raise
raise exception.respond_to?(:to_exception) ? exception.to_exception : exception
when :throw
throw :exception, exception
else
case handler = options[:exception_handler] || config.exce... | ruby | def handle_exception(handling, exception, locale, key, options)
case handling
when :raise
raise exception.respond_to?(:to_exception) ? exception.to_exception : exception
when :throw
throw :exception, exception
else
case handler = options[:exception_handler] || config.exce... | [
"def",
"handle_exception",
"(",
"handling",
",",
"exception",
",",
"locale",
",",
"key",
",",
"options",
")",
"case",
"handling",
"when",
":raise",
"raise",
"exception",
".",
"respond_to?",
"(",
":to_exception",
")",
"?",
"exception",
".",
"to_exception",
":",... | Any exceptions thrown in translate will be sent to the @@exception_handler
which can be a Symbol, a Proc or any other Object unless they're forced to
be raised or thrown (MissingTranslation).
If exception_handler is a Symbol then it will simply be sent to I18n as
a method call. A Proc will simply be called. In any... | [
"Any",
"exceptions",
"thrown",
"in",
"translate",
"will",
"be",
"sent",
"to",
"the",
"@@exception_handler",
"which",
"can",
"be",
"a",
"Symbol",
"a",
"Proc",
"or",
"any",
"other",
"Object",
"unless",
"they",
"re",
"forced",
"to",
"be",
"raised",
"or",
"thr... | 0c5dab494d9b043e00662d8e789229c33045c024 | https://github.com/ruby-i18n/i18n/blob/0c5dab494d9b043e00662d8e789229c33045c024/lib/i18n.rb#L354-L368 | train | Handles exceptions | [
30522,
13366,
5047,
1035,
6453,
1006,
8304,
1010,
6453,
1010,
2334,
2063,
1010,
3145,
1010,
7047,
1007,
2553,
8304,
2043,
1024,
5333,
5333,
6453,
1012,
6869,
1035,
2000,
1029,
1006,
1024,
2000,
1035,
6453,
1007,
1029,
6453,
1012,
2000,
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... |
haml/haml | lib/haml/helpers.rb | Haml.Helpers.merge_name_and_attributes | def merge_name_and_attributes(name, attributes_hash = {})
# skip merging if no ids or classes found in name
return name, attributes_hash unless name =~ /^(.+?)?([\.#].*)$/
return $1 || "div", AttributeBuilder.merge_attributes!(
Haml::Parser.parse_class_and_id($2), attributes_hash)
end | ruby | def merge_name_and_attributes(name, attributes_hash = {})
# skip merging if no ids or classes found in name
return name, attributes_hash unless name =~ /^(.+?)?([\.#].*)$/
return $1 || "div", AttributeBuilder.merge_attributes!(
Haml::Parser.parse_class_and_id($2), attributes_hash)
end | [
"def",
"merge_name_and_attributes",
"(",
"name",
",",
"attributes_hash",
"=",
"{",
"}",
")",
"# skip merging if no ids or classes found in name",
"return",
"name",
",",
"attributes_hash",
"unless",
"name",
"=~",
"/",
"\\.",
"/",
"return",
"$1",
"||",
"\"div\"",
",",... | Parses the tag name used for \{#haml\_tag}
and merges it with the Ruby attributes hash. | [
"Parses",
"the",
"tag",
"name",
"used",
"for",
"\\",
"{",
"#haml",
"\\",
"_tag",
"}",
"and",
"merges",
"it",
"with",
"the",
"Ruby",
"attributes",
"hash",
"."
] | 9aa0fbe4a91b999978927be569d2ad0cd39076f1 | https://github.com/haml/haml/blob/9aa0fbe4a91b999978927be569d2ad0cd39076f1/lib/haml/helpers.rb#L647-L653 | train | merges the name and attributes hash with the attributes from the name | [
30522,
13366,
13590,
1035,
2171,
1035,
1998,
1035,
12332,
1006,
2171,
1010,
12332,
1035,
23325,
1027,
1063,
1065,
1007,
1001,
13558,
16468,
2065,
2053,
8909,
2015,
2030,
4280,
2179,
1999,
2171,
2709,
2171,
1010,
12332,
1035,
23325,
4983,
21... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
github-changelog-generator/github-changelog-generator | lib/github_changelog_generator/generator/generator_fetcher.rb | GitHubChangelogGenerator.Generator.fetch_tags_dates | def fetch_tags_dates(tags)
print "Fetching tag dates...\r" if options[:verbose]
i = 0
tags.each do |tag|
get_time_of_tag(tag)
i += 1
end
puts "Fetching tags dates: #{i}/#{tags.count}" if options[:verbose]
end | ruby | def fetch_tags_dates(tags)
print "Fetching tag dates...\r" if options[:verbose]
i = 0
tags.each do |tag|
get_time_of_tag(tag)
i += 1
end
puts "Fetching tags dates: #{i}/#{tags.count}" if options[:verbose]
end | [
"def",
"fetch_tags_dates",
"(",
"tags",
")",
"print",
"\"Fetching tag dates...\\r\"",
"if",
"options",
"[",
":verbose",
"]",
"i",
"=",
"0",
"tags",
".",
"each",
"do",
"|",
"tag",
"|",
"get_time_of_tag",
"(",
"tag",
")",
"i",
"+=",
"1",
"end",
"puts",
"\"... | Async fetching of all tags dates | [
"Async",
"fetching",
"of",
"all",
"tags",
"dates"
] | f18c64b5cc0d7473b059275b88385ac11ca8b564 | https://github.com/github-changelog-generator/github-changelog-generator/blob/f18c64b5cc0d7473b059275b88385ac11ca8b564/lib/github_changelog_generator/generator/generator_fetcher.rb#L17-L25 | train | Fetch the dates of the tags | [
30522,
13366,
18584,
1035,
22073,
1035,
5246,
1006,
22073,
1007,
6140,
1000,
18584,
2075,
6415,
5246,
1012,
1012,
1012,
1032,
1054,
1000,
2065,
7047,
1031,
1024,
12034,
9232,
1033,
1045,
1027,
1014,
22073,
1012,
2169,
2079,
1064,
6415,
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... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_stor_simple8000_series/lib/2017-06-01/generated/azure_mgmt_stor_simple8000_series/devices.rb | Azure::StorSimple8000Series::Mgmt::V2017_06_01.Devices.configure_async | def configure_async(parameters, resource_group_name, manager_name, custom_headers:nil)
# Send request
promise = begin_configure_async(parameters, resource_group_name, manager_name, custom_headers:custom_headers)
promise = promise.then do |response|
# Defining deserialization method.
d... | ruby | def configure_async(parameters, resource_group_name, manager_name, custom_headers:nil)
# Send request
promise = begin_configure_async(parameters, resource_group_name, manager_name, custom_headers:custom_headers)
promise = promise.then do |response|
# Defining deserialization method.
d... | [
"def",
"configure_async",
"(",
"parameters",
",",
"resource_group_name",
",",
"manager_name",
",",
"custom_headers",
":",
"nil",
")",
"# Send request",
"promise",
"=",
"begin_configure_async",
"(",
"parameters",
",",
"resource_group_name",
",",
"manager_name",
",",
"c... | @param parameters [ConfigureDeviceRequest] The minimal properties to
configure a device.
@param resource_group_name [String] The resource group name
@param manager_name [String] The manager name
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request.
@retur... | [
"@param",
"parameters",
"[",
"ConfigureDeviceRequest",
"]",
"The",
"minimal",
"properties",
"to",
"configure",
"a",
"device",
".",
"@param",
"resource_group_name",
"[",
"String",
"]",
"The",
"resource",
"group",
"name",
"@param",
"manager_name",
"[",
"String",
"]"... | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_stor_simple8000_series/lib/2017-06-01/generated/azure_mgmt_stor_simple8000_series/devices.rb#L50-L64 | train | Configure a managed database. | [
30522,
13366,
9530,
8873,
27390,
2063,
1035,
2004,
6038,
2278,
1006,
11709,
1010,
7692,
1035,
2177,
1035,
2171,
1010,
3208,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
1001,
4604,
5227,
4872,
1027,
4088,
1035,
9530,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
thoughtbot/factory_bot | lib/factory_bot/definition_proxy.rb | FactoryBot.DefinitionProxy.method_missing | def method_missing(name, *args, &block) # rubocop:disable Style/MethodMissing
association_options = args.first
if association_options.nil?
__declare_attribute__(name, block)
elsif __valid_association_options?(association_options)
association(name, association_options)
else
... | ruby | def method_missing(name, *args, &block) # rubocop:disable Style/MethodMissing
association_options = args.first
if association_options.nil?
__declare_attribute__(name, block)
elsif __valid_association_options?(association_options)
association(name, association_options)
else
... | [
"def",
"method_missing",
"(",
"name",
",",
"*",
"args",
",",
"&",
"block",
")",
"# rubocop:disable Style/MethodMissing",
"association_options",
"=",
"args",
".",
"first",
"if",
"association_options",
".",
"nil?",
"__declare_attribute__",
"(",
"name",
",",
"block",
... | Calls add_attribute using the missing method name as the name of the
attribute, so that:
factory :user do
name { 'Billy Idol' }
end
and:
factory :user do
add_attribute(:name) { 'Billy Idol' }
end
are equivalent.
If no argument or block is given, factory_bot will first look for an
associa... | [
"Calls",
"add_attribute",
"using",
"the",
"missing",
"method",
"name",
"as",
"the",
"name",
"of",
"the",
"attribute",
"so",
"that",
":"
] | 99ac02400fd56bd1872fc3ed84f81ea5e8f27737 | https://github.com/thoughtbot/factory_bot/blob/99ac02400fd56bd1872fc3ed84f81ea5e8f27737/lib/factory_bot/definition_proxy.rb#L91-L104 | train | Returns the object that is used to create a new instance of the class. | [
30522,
13366,
4118,
1035,
4394,
1006,
2171,
1010,
1008,
12098,
5620,
1010,
1004,
3796,
1007,
1001,
14548,
24163,
2361,
1024,
4487,
19150,
2806,
1013,
4118,
15630,
7741,
2523,
1035,
7047,
1027,
12098,
5620,
1012,
2034,
2065,
2523,
1035,
7047... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_resources/lib/2016-02-01/generated/azure_mgmt_resources/resource_groups.rb | Azure::Resources::Mgmt::V2016_02_01.ResourceGroups.export_template | def export_template(resource_group_name, parameters, custom_headers:nil)
response = export_template_async(resource_group_name, parameters, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def export_template(resource_group_name, parameters, custom_headers:nil)
response = export_template_async(resource_group_name, parameters, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"export_template",
"(",
"resource_group_name",
",",
"parameters",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"export_template_async",
"(",
"resource_group_name",
",",
"parameters",
",",
"custom_headers",
":custom_headers",
")",
".",
"value!",
"res... | Captures the specified resource group as a template.
@param resource_group_name [String] The name of the resource group to be
created or updated.
@param parameters [ExportTemplateRequest] Parameters supplied to the export
template resource group operation.
@param custom_headers [Hash{String => String}] A hash of ... | [
"Captures",
"the",
"specified",
"resource",
"group",
"as",
"a",
"template",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_resources/lib/2016-02-01/generated/azure_mgmt_resources/resource_groups.rb#L594-L597 | train | Export a template to a managed cluster. | [
30522,
30524,
11709,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
9167,
1035,
23561,
1035,
2004,
6038,
2278,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
11709,
1010,
7661,
1035,
20346,
2015,
1024,
7661,
1035,
20346,
2015... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
rails/rails | activemodel/lib/active_model/naming.rb | ActiveModel.Naming.model_name | def model_name
@_model_name ||= begin
namespace = module_parents.detect do |n|
n.respond_to?(:use_relative_model_naming?) && n.use_relative_model_naming?
end
ActiveModel::Name.new(self, namespace)
end
end | ruby | def model_name
@_model_name ||= begin
namespace = module_parents.detect do |n|
n.respond_to?(:use_relative_model_naming?) && n.use_relative_model_naming?
end
ActiveModel::Name.new(self, namespace)
end
end | [
"def",
"model_name",
"@_model_name",
"||=",
"begin",
"namespace",
"=",
"module_parents",
".",
"detect",
"do",
"|",
"n",
"|",
"n",
".",
"respond_to?",
"(",
":use_relative_model_naming?",
")",
"&&",
"n",
".",
"use_relative_model_naming?",
"end",
"ActiveModel",
"::",... | Returns an ActiveModel::Name object for module. It can be
used to retrieve all kinds of naming-related information
(See ActiveModel::Name for more information).
class Person
extend ActiveModel::Naming
end
Person.model_name.name # => "Person"
Person.model_name.class # => ActiveModel::Name
... | [
"Returns",
"an",
"ActiveModel",
"::",
"Name",
"object",
"for",
"module",
".",
"It",
"can",
"be",
"used",
"to",
"retrieve",
"all",
"kinds",
"of",
"naming",
"-",
"related",
"information",
"(",
"See",
"ActiveModel",
"::",
"Name",
"for",
"more",
"information",
... | 85a8bc644be69908f05740a5886ec19cd3679df5 | https://github.com/rails/rails/blob/85a8bc644be69908f05740a5886ec19cd3679df5/activemodel/lib/active_model/naming.rb#L253-L260 | train | Returns the model name for the current module. | [
30522,
13366,
2944,
1035,
2171,
1030,
1035,
2944,
1035,
2171,
1064,
1064,
1027,
4088,
3415,
15327,
1027,
11336,
1035,
3008,
1012,
11487,
2079,
1064,
1050,
1064,
1050,
1012,
6869,
1035,
2000,
1029,
1006,
1024,
2224,
1035,
5816,
1035,
2944,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/blob_containers.rb | Azure::Storage::Mgmt::V2018_07_01.BlobContainers.delete_with_http_info | def delete_with_http_info(resource_group_name, account_name, container_name, custom_headers:nil)
delete_async(resource_group_name, account_name, container_name, custom_headers:custom_headers).value!
end | ruby | def delete_with_http_info(resource_group_name, account_name, container_name, custom_headers:nil)
delete_async(resource_group_name, account_name, container_name, custom_headers:custom_headers).value!
end | [
"def",
"delete_with_http_info",
"(",
"resource_group_name",
",",
"account_name",
",",
"container_name",
",",
"custom_headers",
":",
"nil",
")",
"delete_async",
"(",
"resource_group_name",
",",
"account_name",
",",
"container_name",
",",
"custom_headers",
":custom_headers"... | Deletes specified container under its account.
@param resource_group_name [String] The name of the resource group within the
user's subscription. The name is case insensitive.
@param account_name [String] The name of the storage account within the
specified resource group. Storage account names must be between 3 a... | [
"Deletes",
"specified",
"container",
"under",
"its",
"account",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/blob_containers.rb#L596-L598 | train | Deletes the specified container. | [
30522,
13366,
3972,
12870,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
4070,
1035,
2171,
1010,
11661,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3972,
12870,
1035,
2004,
6038,
2278,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
AaronLasseigne/active_interaction | lib/active_interaction/concerns/active_recordable.rb | ActiveInteraction.ActiveRecordable.column_for_attribute | def column_for_attribute(name)
filter = self.class.filters[name]
FilterColumn.intern(filter.database_column_type) if filter
end | ruby | def column_for_attribute(name)
filter = self.class.filters[name]
FilterColumn.intern(filter.database_column_type) if filter
end | [
"def",
"column_for_attribute",
"(",
"name",
")",
"filter",
"=",
"self",
".",
"class",
".",
"filters",
"[",
"name",
"]",
"FilterColumn",
".",
"intern",
"(",
"filter",
".",
"database_column_type",
")",
"if",
"filter",
"end"
] | Returns the column object for the named filter.
@param name [Symbol] The name of a filter.
@example
class Interaction < ActiveInteraction::Base
string :email, default: nil
def execute; end
end
Interaction.new.column_for_attribute(:email)
# => #<ActiveInteraction::FilterColumn:0x007faebeb2a6c... | [
"Returns",
"the",
"column",
"object",
"for",
"the",
"named",
"filter",
"."
] | fdc00a041e939ef48948baa2f7fd1ce2e4d66982 | https://github.com/AaronLasseigne/active_interaction/blob/fdc00a041e939ef48948baa2f7fd1ce2e4d66982/lib/active_interaction/concerns/active_recordable.rb#L29-L32 | train | Returns the column for the given attribute. | [
30522,
13366,
5930,
1035,
2005,
1035,
17961,
1006,
2171,
1007,
11307,
1027,
2969,
1012,
2465,
1012,
17736,
1031,
2171,
1033,
11307,
25778,
2819,
2078,
1012,
25204,
1006,
11307,
1012,
7809,
1035,
5930,
1035,
2828,
1007,
2065,
11307,
2203,
10... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | data/azure_cognitiveservices_luisauthoring/lib/2.0/generated/azure_cognitiveservices_luisauthoring/versions.rb | Azure::CognitiveServices::LuisAuthoring::V2_0.Versions.update_with_http_info | def update_with_http_info(app_id, version_id, version_update_object, custom_headers:nil)
update_async(app_id, version_id, version_update_object, custom_headers:custom_headers).value!
end | ruby | def update_with_http_info(app_id, version_id, version_update_object, custom_headers:nil)
update_async(app_id, version_id, version_update_object, custom_headers:custom_headers).value!
end | [
"def",
"update_with_http_info",
"(",
"app_id",
",",
"version_id",
",",
"version_update_object",
",",
"custom_headers",
":",
"nil",
")",
"update_async",
"(",
"app_id",
",",
"version_id",
",",
"version_update_object",
",",
"custom_headers",
":custom_headers",
")",
".",
... | Updates the name or description of the application version.
@param app_id The application ID.
@param version_id [String] The version ID.
@param version_update_object [TaskUpdateObject] A model containing Name and
Description of the application.
@param custom_headers [Hash{String => String}] A hash of custom heade... | [
"Updates",
"the",
"name",
"or",
"description",
"of",
"the",
"application",
"version",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_cognitiveservices_luisauthoring/lib/2.0/generated/azure_cognitiveservices_luisauthoring/versions.rb#L375-L377 | train | Updates the specified version of the application. | [
30522,
13366,
10651,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
10439,
1035,
8909,
1010,
2544,
1035,
8909,
1010,
2544,
1035,
10651,
1035,
4874,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
10651,
1035,
2004,
6038,
2278,
1006,
1043... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
aws/aws-sdk-ruby | gems/aws-sdk-ec2/lib/aws-sdk-ec2/resource.rb | Aws::EC2.Resource.create_dhcp_options | def create_dhcp_options(options = {})
resp = @client.create_dhcp_options(options)
DhcpOptions.new(
id: resp.data.dhcp_options.dhcp_options_id,
data: resp.data.dhcp_options,
client: @client
)
end | ruby | def create_dhcp_options(options = {})
resp = @client.create_dhcp_options(options)
DhcpOptions.new(
id: resp.data.dhcp_options.dhcp_options_id,
data: resp.data.dhcp_options,
client: @client
)
end | [
"def",
"create_dhcp_options",
"(",
"options",
"=",
"{",
"}",
")",
"resp",
"=",
"@client",
".",
"create_dhcp_options",
"(",
"options",
")",
"DhcpOptions",
".",
"new",
"(",
"id",
":",
"resp",
".",
"data",
".",
"dhcp_options",
".",
"dhcp_options_id",
",",
"da... | @!group Actions
@example Request syntax with placeholder values
dhcpoptions = ec2.create_dhcp_options({
dhcp_configurations: [ # required
{
key: "String",
values: ["String"],
},
],
dry_run: false,
})
@param [Hash] options ({})
@option options [required, Array<Typ... | [
"@!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/resource.rb#L44-L51 | train | Creates a new DhcpOptions object. | [
30522,
13366,
3443,
1035,
28144,
21906,
1035,
7047,
1006,
7047,
1027,
1063,
1065,
1007,
24501,
2361,
1027,
1030,
7396,
1012,
3443,
1035,
28144,
21906,
1035,
7047,
1006,
7047,
1007,
28144,
21906,
7361,
9285,
1012,
2047,
1006,
8909,
1024,
245... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/resource.rb | Aws::IAM.Resource.create_saml_provider | def create_saml_provider(options = {})
resp = @client.create_saml_provider(options)
SamlProvider.new(
arn: resp.data.saml_provider_arn,
client: @client
)
end | ruby | def create_saml_provider(options = {})
resp = @client.create_saml_provider(options)
SamlProvider.new(
arn: resp.data.saml_provider_arn,
client: @client
)
end | [
"def",
"create_saml_provider",
"(",
"options",
"=",
"{",
"}",
")",
"resp",
"=",
"@client",
".",
"create_saml_provider",
"(",
"options",
")",
"SamlProvider",
".",
"new",
"(",
"arn",
":",
"resp",
".",
"data",
".",
"saml_provider_arn",
",",
"client",
":",
"@c... | @example Request syntax with placeholder values
samlprovider = iam.create_saml_provider({
saml_metadata_document: "SAMLMetadataDocumentType", # required
name: "SAMLProviderNameType", # required
})
@param [Hash] options ({})
@option options [required, String] :saml_metadata_document
An XML document... | [
"@example",
"Request",
"syntax",
"with",
"placeholder",
"values"
] | e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d | https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-iam/lib/aws-sdk-iam/resource.rb#L491-L497 | train | Creates a new Saml Provider | [
30522,
13366,
3443,
1035,
3520,
2140,
1035,
10802,
1006,
7047,
1027,
1063,
1065,
1007,
24501,
2361,
1027,
1030,
7396,
1012,
3443,
1035,
3520,
2140,
1035,
10802,
1006,
7047,
1007,
3520,
14277,
12298,
18688,
1012,
2047,
1006,
12098,
2078,
102... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
randym/axlsx | lib/axlsx/drawing/line_chart.rb | Axlsx.LineChart.to_xml_string | def to_xml_string(str = '')
super(str) do
str << ("<c:" << node_name << ">")
str << ('<c:grouping val="' << grouping.to_s << '"/>')
str << ('<c:varyColors val="' << vary_colors.to_s << '"/>')
@series.each { |ser| ser.to_xml_string(str) }
@d_lbls.to_xml_string(str) if @d_lbl... | ruby | def to_xml_string(str = '')
super(str) do
str << ("<c:" << node_name << ">")
str << ('<c:grouping val="' << grouping.to_s << '"/>')
str << ('<c:varyColors val="' << vary_colors.to_s << '"/>')
@series.each { |ser| ser.to_xml_string(str) }
@d_lbls.to_xml_string(str) if @d_lbl... | [
"def",
"to_xml_string",
"(",
"str",
"=",
"''",
")",
"super",
"(",
"str",
")",
"do",
"str",
"<<",
"(",
"\"<c:\"",
"<<",
"node_name",
"<<",
"\">\"",
")",
"str",
"<<",
"(",
"'<c:grouping val=\"'",
"<<",
"grouping",
".",
"to_s",
"<<",
"'\"/>'",
")",
"str",... | Serializes the object
@param [String] str
@return [String] | [
"Serializes",
"the",
"object"
] | c593a08b2a929dac7aa8dc418b55e26b4c49dc34 | https://github.com/randym/axlsx/blob/c593a08b2a929dac7aa8dc418b55e26b4c49dc34/lib/axlsx/drawing/line_chart.rb#L78-L90 | train | Convert the series to XML string. | [
30522,
13366,
2000,
1035,
20950,
1035,
5164,
1006,
2358,
2099,
1027,
1005,
1005,
1007,
3565,
1006,
2358,
2099,
1007,
2079,
2358,
2099,
1026,
1026,
1006,
1000,
1026,
1039,
1024,
1000,
1026,
1026,
13045,
1035,
2171,
1026,
1026,
1000,
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... |
anycable/anycable | lib/anycable/rpc_handler.rb | AnyCable.RPCHandler.rack_env | def rack_env(request)
uri = URI.parse(request.path)
# Minimum required variables according to Rack Spec
env = {
"REQUEST_METHOD" => "GET",
"SCRIPT_NAME" => "",
"PATH_INFO" => uri.path,
"QUERY_STRING" => uri.query,
"SERVER_NAME" => uri.host,
"SERVER_PORT... | ruby | def rack_env(request)
uri = URI.parse(request.path)
# Minimum required variables according to Rack Spec
env = {
"REQUEST_METHOD" => "GET",
"SCRIPT_NAME" => "",
"PATH_INFO" => uri.path,
"QUERY_STRING" => uri.query,
"SERVER_NAME" => uri.host,
"SERVER_PORT... | [
"def",
"rack_env",
"(",
"request",
")",
"uri",
"=",
"URI",
".",
"parse",
"(",
"request",
".",
"path",
")",
"# Minimum required variables according to Rack Spec",
"env",
"=",
"{",
"\"REQUEST_METHOD\"",
"=>",
"\"GET\"",
",",
"\"SCRIPT_NAME\"",
"=>",
"\"\"",
",",
"... | Build Rack env from request | [
"Build",
"Rack",
"env",
"from",
"request"
] | d7515e8e034d42e86ebeb09786a92aad2a11b25f | https://github.com/anycable/anycable/blob/d7515e8e034d42e86ebeb09786a92aad2a11b25f/lib/anycable/rpc_handler.rb#L101-L119 | train | Build Rack Environment | [
30522,
13366,
14513,
1035,
4372,
2615,
1006,
5227,
1007,
24471,
2072,
1027,
24471,
2072,
1012,
11968,
3366,
1006,
5227,
1012,
4130,
1007,
1001,
6263,
3223,
10857,
2429,
2000,
14513,
28699,
4372,
2615,
1027,
1063,
1000,
5227,
1035,
4118,
100... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_authorization/lib/2015-07-01/generated/azure_mgmt_authorization/permissions.rb | Azure::Authorization::Mgmt::V2015_07_01.Permissions.list_for_resource_as_lazy | def list_for_resource_as_lazy(resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, custom_headers:nil)
response = list_for_resource_async(resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, custom_headers:custom_hea... | ruby | def list_for_resource_as_lazy(resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, custom_headers:nil)
response = list_for_resource_async(resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, custom_headers:custom_hea... | [
"def",
"list_for_resource_as_lazy",
"(",
"resource_group_name",
",",
"resource_provider_namespace",
",",
"parent_resource_path",
",",
"resource_type",
",",
"resource_name",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"list_for_resource_async",
"(",
"resource_gr... | Gets all permissions the caller has for a resource.
@param resource_group_name [String] The name of the resource group containing
the resource. The name is case insensitive.
@param resource_provider_namespace [String] The namespace of the resource
provider.
@param parent_resource_path [String] The parent resource... | [
"Gets",
"all",
"permissions",
"the",
"caller",
"has",
"for",
"a",
"resource",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_authorization/lib/2015-07-01/generated/azure_mgmt_authorization/permissions.rb#L448-L457 | train | Gets the list of all the resources under the resource provider. | [
30522,
13366,
2862,
1035,
2005,
1035,
7692,
1035,
2004,
1035,
13971,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
7692,
1035,
10802,
1035,
3415,
15327,
1010,
6687,
1035,
7692,
1035,
4130,
1010,
7692,
1035,
2828,
1010,
7692,
1035,
2171,
1010,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_scheduler/lib/2016-03-01/generated/azure_mgmt_scheduler/job_collections.rb | Azure::Scheduler::Mgmt::V2016_03_01.JobCollections.begin_disable | def begin_disable(resource_group_name, job_collection_name, custom_headers:nil)
response = begin_disable_async(resource_group_name, job_collection_name, custom_headers:custom_headers).value!
nil
end | ruby | def begin_disable(resource_group_name, job_collection_name, custom_headers:nil)
response = begin_disable_async(resource_group_name, job_collection_name, custom_headers:custom_headers).value!
nil
end | [
"def",
"begin_disable",
"(",
"resource_group_name",
",",
"job_collection_name",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"begin_disable_async",
"(",
"resource_group_name",
",",
"job_collection_name",
",",
"custom_headers",
":custom_headers",
")",
".",
"v... | Disables all of the jobs in the job collection.
@param resource_group_name [String] The resource group name.
@param job_collection_name [String] The job collection name.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request. | [
"Disables",
"all",
"of",
"the",
"jobs",
"in",
"the",
"job",
"collection",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_scheduler/lib/2016-03-01/generated/azure_mgmt_scheduler/job_collections.rb#L795-L798 | train | Disables the specified job collection. | [
30522,
13366,
4088,
1035,
4487,
19150,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
3105,
1035,
3074,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
4088,
1035,
4487,
19150,
1035,
2004,
6038,
2278,
1006,
7692,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_logic/lib/2016-06-01/generated/azure_mgmt_logic/workflows.rb | Azure::Logic::Mgmt::V2016_06_01.Workflows.validate_workflow | def validate_workflow(resource_group_name, workflow_name, validate, custom_headers:nil)
response = validate_workflow_async(resource_group_name, workflow_name, validate, custom_headers:custom_headers).value!
nil
end | ruby | def validate_workflow(resource_group_name, workflow_name, validate, custom_headers:nil)
response = validate_workflow_async(resource_group_name, workflow_name, validate, custom_headers:custom_headers).value!
nil
end | [
"def",
"validate_workflow",
"(",
"resource_group_name",
",",
"workflow_name",
",",
"validate",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"validate_workflow_async",
"(",
"resource_group_name",
",",
"workflow_name",
",",
"validate",
",",
"custom_headers",
... | Validates the workflow.
@param resource_group_name [String] The resource group name.
@param workflow_name [String] The workflow name.
@param validate [Workflow] The workflow.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request. | [
"Validates",
"the",
"workflow",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_logic/lib/2016-06-01/generated/azure_mgmt_logic/workflows.rb#L1243-L1246 | train | Validates the workflow. | [
30522,
13366,
9398,
3686,
1035,
2147,
12314,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2147,
12314,
1035,
2171,
1010,
9398,
3686,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
9398,
3686,
1035,
2147,
12314,
1035,
2004,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_container_registry/lib/2017-06-01-preview/generated/azure_mgmt_container_registry/registries.rb | Azure::ContainerRegistry::Mgmt::V2017_06_01_preview.Registries.regenerate_credential_with_http_info | def regenerate_credential_with_http_info(resource_group_name, registry_name, regenerate_credential_parameters, custom_headers:nil)
regenerate_credential_async(resource_group_name, registry_name, regenerate_credential_parameters, custom_headers:custom_headers).value!
end | ruby | def regenerate_credential_with_http_info(resource_group_name, registry_name, regenerate_credential_parameters, custom_headers:nil)
regenerate_credential_async(resource_group_name, registry_name, regenerate_credential_parameters, custom_headers:custom_headers).value!
end | [
"def",
"regenerate_credential_with_http_info",
"(",
"resource_group_name",
",",
"registry_name",
",",
"regenerate_credential_parameters",
",",
"custom_headers",
":",
"nil",
")",
"regenerate_credential_async",
"(",
"resource_group_name",
",",
"registry_name",
",",
"regenerate_cr... | Regenerates one of the login credentials for the specified container
registry.
@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 regenerate_credential_parameters [RegenerateCredential... | [
"Regenerates",
"one",
"of",
"the",
"login",
"credentials",
"for",
"the",
"specified",
"container",
"registry",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_container_registry/lib/2017-06-01-preview/generated/azure_mgmt_container_registry/registries.rb#L668-L670 | train | Regenerate credential for a container registry. | [
30522,
13366,
19723,
24454,
3686,
1035,
13675,
14728,
19909,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
15584,
1035,
2171,
1010,
19723,
24454,
3686,
1035,
13675,
14728,
19909,
1035,
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... |
ruby-git/ruby-git | lib/git/lib.rb | Git.Lib.add | def add(paths='.',options={})
arr_opts = []
arr_opts << '--all' if options[:all]
arr_opts << '--force' if options[:force]
arr_opts << '--'
arr_opts << paths
arr_opts.flatten!
command('add', arr_opts)
end | ruby | def add(paths='.',options={})
arr_opts = []
arr_opts << '--all' if options[:all]
arr_opts << '--force' if options[:force]
arr_opts << '--'
arr_opts << paths
arr_opts.flatten!
command('add', arr_opts)
end | [
"def",
"add",
"(",
"paths",
"=",
"'.'",
",",
"options",
"=",
"{",
"}",
")",
"arr_opts",
"=",
"[",
"]",
"arr_opts",
"<<",
"'--all'",
"if",
"options",
"[",
":all",
"]",
"arr_opts",
"<<",
"'--force'",
"if",
"options",
"[",
":force",
"]",
"arr_opts",
"<<... | updates the repository index using the working directory content
lib.add('path/to/file')
lib.add(['path/to/file1','path/to/file2'])
lib.add(:all => true)
options:
:all => true
:force => true
@param [String,Array] paths files paths to be added to the repository
@param [Hash] options | [
"updates",
"the",
"repository",
"index",
"using",
"the",
"working",
"directory",
"content"
] | 9bd4407c56068e1604f14a1b6c0c5a84868e6378 | https://github.com/ruby-git/ruby-git/blob/9bd4407c56068e1604f14a1b6c0c5a84868e6378/lib/git/lib.rb#L523-L536 | train | Add a file or directory to the container. | [
30522,
13366,
5587,
1006,
10425,
1027,
1005,
1012,
1005,
1010,
7047,
1027,
1063,
1065,
1007,
12098,
2099,
1035,
23569,
2015,
1027,
1031,
1033,
12098,
2099,
1035,
23569,
2015,
1026,
1026,
1005,
1011,
1011,
2035,
1005,
2065,
7047,
1031,
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... |
square/connect-ruby-sdk | lib/square_connect/api/inventory_api.rb | SquareConnect.InventoryApi.batch_change_inventory | def batch_change_inventory(body, opts = {})
data, _status_code, _headers = batch_change_inventory_with_http_info(body, opts)
return data
end | ruby | def batch_change_inventory(body, opts = {})
data, _status_code, _headers = batch_change_inventory_with_http_info(body, opts)
return data
end | [
"def",
"batch_change_inventory",
"(",
"body",
",",
"opts",
"=",
"{",
"}",
")",
"data",
",",
"_status_code",
",",
"_headers",
"=",
"batch_change_inventory_with_http_info",
"(",
"body",
",",
"opts",
")",
"return",
"data",
"end"
] | BatchChangeInventory
Applies adjustments and counts to the provided item quantities. On success: returns the current calculated counts for all objects referenced in the request. On failure: returns a list of related errors.
@param body An object containing the fields to POST for the request. See the corresponding o... | [
"BatchChangeInventory",
"Applies",
"adjustments",
"and",
"counts",
"to",
"the",
"provided",
"item",
"quantities",
".",
"On",
"success",
":",
"returns",
"the",
"current",
"calculated",
"counts",
"for",
"all",
"objects",
"referenced",
"in",
"the",
"request",
".",
... | 798eb9ded716f23b9f1518386f1c311a34bca8bf | https://github.com/square/connect-ruby-sdk/blob/798eb9ded716f23b9f1518386f1c311a34bca8bf/lib/square_connect/api/inventory_api.rb#L25-L28 | train | BatchChangeInventory Returns an array of the inventory that has been changed. | [
30522,
13366,
14108,
1035,
2689,
1035,
12612,
1006,
2303,
1010,
23569,
2015,
1027,
1063,
1065,
1007,
2951,
1010,
1035,
3570,
1035,
3642,
1010,
1035,
20346,
2015,
1027,
14108,
1035,
2689,
1035,
12612,
1035,
2007,
1035,
8299,
1035,
18558,
100... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
aws/aws-sdk-ruby | gems/aws-sdk-ec2/lib/aws-sdk-ec2/vpc_address.rb | Aws::EC2.VpcAddress.release | def release(options = {})
options = options.merge(allocation_id: data[:allocation_id])
resp = @client.release_address(options)
resp.data
end | ruby | def release(options = {})
options = options.merge(allocation_id: data[:allocation_id])
resp = @client.release_address(options)
resp.data
end | [
"def",
"release",
"(",
"options",
"=",
"{",
"}",
")",
"options",
"=",
"options",
".",
"merge",
"(",
"allocation_id",
":",
"data",
"[",
":allocation_id",
"]",
")",
"resp",
"=",
"@client",
".",
"release_address",
"(",
"options",
")",
"resp",
".",
"data",
... | @example Request syntax with placeholder values
vpc_address.release({
public_ip: "String",
dry_run: false,
})
@param [Hash] options ({})
@option options [String] :public_ip
\[EC2-Classic\] The Elastic IP address. Required for EC2-Classic.
@option options [Boolean] :dry_run
Checks whether you h... | [
"@example",
"Request",
"syntax",
"with",
"placeholder",
"values"
] | e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d | https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-ec2/lib/aws-sdk-ec2/vpc_address.rb#L286-L290 | train | Release the address | [
30522,
13366,
2713,
1006,
7047,
1027,
1063,
1065,
1007,
7047,
1027,
7047,
1012,
13590,
1006,
16169,
1035,
8909,
1024,
2951,
1031,
1024,
16169,
1035,
8909,
1033,
1007,
24501,
2361,
1027,
1030,
7396,
1012,
2713,
1035,
4769,
1006,
7047,
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_machine_learning/lib/2017-01-01/generated/azure_mgmt_machine_learning/web_services.rb | Azure::MachineLearning::Mgmt::V2017_01_01.WebServices.begin_patch_with_http_info | def begin_patch_with_http_info(resource_group_name, web_service_name, patch_payload, custom_headers:nil)
begin_patch_async(resource_group_name, web_service_name, patch_payload, custom_headers:custom_headers).value!
end | ruby | def begin_patch_with_http_info(resource_group_name, web_service_name, patch_payload, custom_headers:nil)
begin_patch_async(resource_group_name, web_service_name, patch_payload, custom_headers:custom_headers).value!
end | [
"def",
"begin_patch_with_http_info",
"(",
"resource_group_name",
",",
"web_service_name",
",",
"patch_payload",
",",
"custom_headers",
":",
"nil",
")",
"begin_patch_async",
"(",
"resource_group_name",
",",
"web_service_name",
",",
"patch_payload",
",",
"custom_headers",
"... | Modifies an existing web service resource. The PATCH API call is an
asynchronous operation. To determine whether it has completed successfully,
you must perform a Get operation.
@param resource_group_name [String] Name of the resource group in which the
web service is located.
@param web_service_name [String] The... | [
"Modifies",
"an",
"existing",
"web",
"service",
"resource",
".",
"The",
"PATCH",
"API",
"call",
"is",
"an",
"asynchronous",
"operation",
".",
"To",
"determine",
"whether",
"it",
"has",
"completed",
"successfully",
"you",
"must",
"perform",
"a",
"Get",
"operati... | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_machine_learning/lib/2017-01-01/generated/azure_mgmt_machine_learning/web_services.rb#L772-L774 | train | Patch a specified resource group. | [
30522,
13366,
4088,
1035,
8983,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
4773,
1035,
2326,
1035,
2171,
1010,
8983,
1035,
18093,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
4088,
1035,
8983,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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_analysis_services/lib/2017-08-01-beta/generated/azure_mgmt_analysis_services/servers.rb | Azure::AnalysisServices::Mgmt::V2017_08_01_beta.Servers.begin_suspend | def begin_suspend(resource_group_name, server_name, custom_headers:nil)
response = begin_suspend_async(resource_group_name, server_name, custom_headers:custom_headers).value!
nil
end | ruby | def begin_suspend(resource_group_name, server_name, custom_headers:nil)
response = begin_suspend_async(resource_group_name, server_name, custom_headers:custom_headers).value!
nil
end | [
"def",
"begin_suspend",
"(",
"resource_group_name",
",",
"server_name",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"begin_suspend_async",
"(",
"resource_group_name",
",",
"server_name",
",",
"custom_headers",
":custom_headers",
")",
".",
"value!",
"nil",... | Supends operation of the specified Analysis Services server instance.
@param resource_group_name [String] The name of the Azure Resource group of
which a given Analysis Services server is part. This name must be at least 1
character in length, and no more than 90.
@param server_name [String] The name of the Analys... | [
"Supends",
"operation",
"of",
"the",
"specified",
"Analysis",
"Services",
"server",
"instance",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_analysis_services/lib/2017-08-01-beta/generated/azure_mgmt_analysis_services/servers.rb#L1609-L1612 | train | Suspend a managed server. | [
30522,
13366,
4088,
1035,
28324,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
8241,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
4088,
1035,
28324,
1035,
2004,
6038,
2278,
1006,
7692,
1035,
2177,
1035,
2171,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
rails/rails | actionpack/lib/abstract_controller/rendering.rb | AbstractController.Rendering.render | def render(*args, &block)
options = _normalize_render(*args, &block)
rendered_body = render_to_body(options)
if options[:html]
_set_html_content_type
else
_set_rendered_content_type rendered_format
end
self.response_body = rendered_body
end | ruby | def render(*args, &block)
options = _normalize_render(*args, &block)
rendered_body = render_to_body(options)
if options[:html]
_set_html_content_type
else
_set_rendered_content_type rendered_format
end
self.response_body = rendered_body
end | [
"def",
"render",
"(",
"*",
"args",
",",
"&",
"block",
")",
"options",
"=",
"_normalize_render",
"(",
"args",
",",
"block",
")",
"rendered_body",
"=",
"render_to_body",
"(",
"options",
")",
"if",
"options",
"[",
":html",
"]",
"_set_html_content_type",
"else",... | Normalizes arguments, options and then delegates render_to_body and
sticks the result in <tt>self.response_body</tt>. | [
"Normalizes",
"arguments",
"options",
"and",
"then",
"delegates",
"render_to_body",
"and",
"sticks",
"the",
"result",
"in",
"<tt",
">",
"self",
".",
"response_body<",
"/",
"tt",
">",
"."
] | 85a8bc644be69908f05740a5886ec19cd3679df5 | https://github.com/rails/rails/blob/85a8bc644be69908f05740a5886ec19cd3679df5/actionpack/lib/abstract_controller/rendering.rb#L23-L32 | train | Render the response | [
30522,
13366,
17552,
1006,
1008,
12098,
5620,
1010,
1004,
3796,
1007,
7047,
1027,
1035,
3671,
4697,
1035,
17552,
1006,
1008,
12098,
5620,
1010,
1004,
3796,
1007,
10155,
1035,
2303,
1027,
17552,
1035,
2000,
1035,
2303,
1006,
7047,
1007,
2065... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
tongueroo/ufo | lib/ufo/completer.rb | Ufo.Completer.all_commands | def all_commands
commands = @command_class.all_commands.reject do |k,v|
v.is_a?(Thor::HiddenCommand)
end
commands.keys
end | ruby | def all_commands
commands = @command_class.all_commands.reject do |k,v|
v.is_a?(Thor::HiddenCommand)
end
commands.keys
end | [
"def",
"all_commands",
"commands",
"=",
"@command_class",
".",
"all_commands",
".",
"reject",
"do",
"|",
"k",
",",
"v",
"|",
"v",
".",
"is_a?",
"(",
"Thor",
"::",
"HiddenCommand",
")",
"end",
"commands",
".",
"keys",
"end"
] | all top-level commands | [
"all",
"top",
"-",
"level",
"commands"
] | 16ac3dad28edcab2693c0e7d89a1971aca65b8f9 | https://github.com/tongueroo/ufo/blob/16ac3dad28edcab2693c0e7d89a1971aca65b8f9/lib/ufo/completer.rb#L119-L124 | train | Returns the list of all commands that are hidden | [
30522,
13366,
2035,
1035,
10954,
10954,
1027,
1030,
3094,
1035,
2465,
1012,
2035,
1035,
10954,
1012,
15454,
2079,
1064,
1047,
1010,
1058,
1064,
1058,
1012,
2003,
1035,
1037,
1029,
1006,
15321,
1024,
1024,
5023,
9006,
2386,
2094,
1007,
2203,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
mikel/mail | lib/mail/message.rb | Mail.Message.ready_to_send! | def ready_to_send!
identify_and_set_transfer_encoding
parts.each do |part|
part.transport_encoding = transport_encoding
part.ready_to_send!
end
add_required_fields
end | ruby | def ready_to_send!
identify_and_set_transfer_encoding
parts.each do |part|
part.transport_encoding = transport_encoding
part.ready_to_send!
end
add_required_fields
end | [
"def",
"ready_to_send!",
"identify_and_set_transfer_encoding",
"parts",
".",
"each",
"do",
"|",
"part",
"|",
"part",
".",
"transport_encoding",
"=",
"transport_encoding",
"part",
".",
"ready_to_send!",
"end",
"add_required_fields",
"end"
] | Encodes the message, calls encode on all its parts, gets an email message
ready to send | [
"Encodes",
"the",
"message",
"calls",
"encode",
"on",
"all",
"its",
"parts",
"gets",
"an",
"email",
"message",
"ready",
"to",
"send"
] | fb53fb369eb2bf0494ac70675970c90cdcc3f495 | https://github.com/mikel/mail/blob/fb53fb369eb2bf0494ac70675970c90cdcc3f495/lib/mail/message.rb#L1789-L1796 | train | set transfer encoding of the message | [
30522,
13366,
3201,
1035,
2000,
1035,
4604,
999,
6709,
1035,
1998,
1035,
2275,
1035,
4651,
1035,
17181,
3033,
1012,
2169,
2079,
1064,
2112,
1064,
2112,
1012,
3665,
1035,
17181,
1027,
3665,
1035,
17181,
2112,
1012,
3201,
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... |
piotrmurach/github | lib/github_api/client/authorizations/app.rb | Github.Client::Authorizations::App.check | def check(*args)
raise_authentication_error unless authenticated?
params = arguments(args, required: [:client_id, :access_token]).params
if arguments.client_id
begin
get_request("/applications/#{arguments.client_id}/tokens/#{arguments.access_token}", params)
rescue Github::E... | ruby | def check(*args)
raise_authentication_error unless authenticated?
params = arguments(args, required: [:client_id, :access_token]).params
if arguments.client_id
begin
get_request("/applications/#{arguments.client_id}/tokens/#{arguments.access_token}", params)
rescue Github::E... | [
"def",
"check",
"(",
"*",
"args",
")",
"raise_authentication_error",
"unless",
"authenticated?",
"params",
"=",
"arguments",
"(",
"args",
",",
"required",
":",
"[",
":client_id",
",",
":access_token",
"]",
")",
".",
"params",
"if",
"arguments",
".",
"client_id... | Check if an access token is a valid authorization for an application
@example
github = Github.new basic_auth: "client_id:client_secret"
github.oauth.app.check 'client_id', 'access-token'
@api public | [
"Check",
"if",
"an",
"access",
"token",
"is",
"a",
"valid",
"authorization",
"for",
"an",
"application"
] | 8702452c66bea33c9388550aed9e9974f76aaef1 | https://github.com/piotrmurach/github/blob/8702452c66bea33c9388550aed9e9974f76aaef1/lib/github_api/client/authorizations/app.rb#L45-L58 | train | Check the authentication credentials for an application | [
30522,
13366,
4638,
1006,
1008,
12098,
5620,
1007,
5333,
1035,
27280,
1035,
7561,
4983,
14469,
4383,
1029,
11498,
5244,
1027,
9918,
1006,
12098,
5620,
1010,
3223,
1024,
1031,
1024,
7396,
1035,
8909,
1010,
1024,
3229,
1035,
19204,
1033,
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 | data/azure_service_fabric/lib/6.3.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb | Azure::ServiceFabric::V6_3_0_9.ServiceFabricClientAPIs.get_volume_resource | def get_volume_resource(volume_resource_name, custom_headers:nil)
response = get_volume_resource_async(volume_resource_name, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def get_volume_resource(volume_resource_name, custom_headers:nil)
response = get_volume_resource_async(volume_resource_name, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"get_volume_resource",
"(",
"volume_resource_name",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"get_volume_resource_async",
"(",
"volume_resource_name",
",",
"custom_headers",
":custom_headers",
")",
".",
"value!",
"response",
".",
"body",
"unless",... | Gets the volume resource.
Gets the information about the volume resource with a given name. This
information includes the volume description and other runtime information.
@param volume_resource_name [String] Service Fabric volume resource name.
@param custom_headers [Hash{String => String}] A hash of custom head... | [
"Gets",
"the",
"volume",
"resource",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_service_fabric/lib/6.3.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb#L30143-L30146 | train | Gets the specified volume resource. | [
30522,
13366,
2131,
1035,
3872,
1035,
7692,
1006,
3872,
1035,
7692,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
2131,
1035,
3872,
1035,
7692,
1035,
2004,
6038,
2278,
1006,
3872,
1035,
7692,
1035,
2171,
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... |
hexorx/countries | lib/countries/country.rb | ISO3166.Country.local_names | def local_names
ISO3166.configuration.locales = (ISO3166.configuration.locales + languages.map(&:to_sym)).uniq
reload
@local_names ||= languages.map { |language| translations[language] }
end | ruby | def local_names
ISO3166.configuration.locales = (ISO3166.configuration.locales + languages.map(&:to_sym)).uniq
reload
@local_names ||= languages.map { |language| translations[language] }
end | [
"def",
"local_names",
"ISO3166",
".",
"configuration",
".",
"locales",
"=",
"(",
"ISO3166",
".",
"configuration",
".",
"locales",
"+",
"languages",
".",
"map",
"(",
":to_sym",
")",
")",
".",
"uniq",
"reload",
"@local_names",
"||=",
"languages",
".",
"map",
... | TODO: Looping through locale langs could be be very slow across multiple countries | [
"TODO",
":",
"Looping",
"through",
"locale",
"langs",
"could",
"be",
"be",
"very",
"slow",
"across",
"multiple",
"countries"
] | 105973bd905133130bde4d95406c6e710cae3d69 | https://github.com/hexorx/countries/blob/105973bd905133130bde4d95406c6e710cae3d69/lib/countries/country.rb#L93-L98 | train | Returns the local names of the language. | [
30522,
13366,
2334,
1035,
3415,
11163,
21486,
28756,
1012,
9563,
1012,
2334,
2229,
1027,
1006,
11163,
21486,
28756,
1012,
9563,
1012,
2334,
2229,
1009,
4155,
1012,
4949,
1006,
1004,
1024,
2000,
1035,
25353,
2213,
1007,
1007,
1012,
4895,
185... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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_customvisiontraining/lib/3.0/generated/azure_cognitiveservices_customvisiontraining/customvisiontraining_client.rb | Azure::CognitiveServices::Customvisiontraining::V3_0.CustomvisiontrainingClient.get_iteration_performance | def get_iteration_performance(project_id, iteration_id, threshold:nil, overlap_threshold:nil, custom_headers:nil)
response = get_iteration_performance_async(project_id, iteration_id, threshold:threshold, overlap_threshold:overlap_threshold, custom_headers:custom_headers).value!
response.body unless response... | ruby | def get_iteration_performance(project_id, iteration_id, threshold:nil, overlap_threshold:nil, custom_headers:nil)
response = get_iteration_performance_async(project_id, iteration_id, threshold:threshold, overlap_threshold:overlap_threshold, custom_headers:custom_headers).value!
response.body unless response... | [
"def",
"get_iteration_performance",
"(",
"project_id",
",",
"iteration_id",
",",
"threshold",
":",
"nil",
",",
"overlap_threshold",
":",
"nil",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"get_iteration_performance_async",
"(",
"project_id",
",",
"itera... | Get detailed performance information about an iteration.
@param project_id The id of the project the iteration belongs to.
@param iteration_id The id of the iteration to get.
@param threshold [Float] The threshold used to determine true predictions.
@param overlap_threshold [Float] If applicable, the bounding box ... | [
"Get",
"detailed",
"performance",
"information",
"about",
"an",
"iteration",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_cognitiveservices_customvisiontraining/lib/3.0/generated/azure_cognitiveservices_customvisiontraining/customvisiontraining_client.rb#L2436-L2439 | train | Gets the performance of a given iteration. | [
30522,
13366,
2131,
1035,
27758,
1035,
2836,
1006,
2622,
1035,
8909,
1010,
27758,
1035,
8909,
1010,
11207,
1024,
9152,
2140,
1010,
17702,
1035,
11207,
1024,
9152,
2140,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
2131... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
square/connect-ruby-sdk | lib/square_connect/api/labor_api.rb | SquareConnect.LaborApi.create_shift | def create_shift(body, opts = {})
data, _status_code, _headers = create_shift_with_http_info(body, opts)
return data
end | ruby | def create_shift(body, opts = {})
data, _status_code, _headers = create_shift_with_http_info(body, opts)
return data
end | [
"def",
"create_shift",
"(",
"body",
",",
"opts",
"=",
"{",
"}",
")",
"data",
",",
"_status_code",
",",
"_headers",
"=",
"create_shift_with_http_info",
"(",
"body",
",",
"opts",
")",
"return",
"data",
"end"
] | CreateShift
Creates a new `Shift`. A `Shift` represents a complete work day for a single employee. You must provide the following values in your request to this endpoint: - `location_id` - `employee_id` - `start_at` An attempt to create a new `Shift` can result in a `BAD_REQUEST` error when: - The `status` of the... | [
"CreateShift",
"Creates",
"a",
"new",
"Shift",
".",
"A",
"Shift",
"represents",
"a",
"complete",
"work",
"day",
"for",
"a",
"single",
"employee",
".",
"You",
"must",
"provide",
"the",
"following",
"values",
"in",
"your",
"request",
"to",
"this",
"endpoint",
... | 798eb9ded716f23b9f1518386f1c311a34bca8bf | https://github.com/square/connect-ruby-sdk/blob/798eb9ded716f23b9f1518386f1c311a34bca8bf/lib/square_connect/api/labor_api.rb#L80-L83 | train | Create a shift | [
30522,
13366,
3443,
1035,
5670,
1006,
2303,
1010,
23569,
2015,
1027,
1063,
1065,
1007,
2951,
1010,
1035,
3570,
1035,
3642,
1010,
1035,
20346,
2015,
1027,
3443,
1035,
5670,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
2303,
1010,
23569,
2015,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_redis/lib/2017-02-01/generated/azure_mgmt_redis/redis.rb | Azure::Redis::Mgmt::V2017_02_01.Redis.regenerate_key | def regenerate_key(resource_group_name, name, parameters, custom_headers:nil)
response = regenerate_key_async(resource_group_name, name, parameters, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def regenerate_key(resource_group_name, name, parameters, custom_headers:nil)
response = regenerate_key_async(resource_group_name, name, parameters, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"regenerate_key",
"(",
"resource_group_name",
",",
"name",
",",
"parameters",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"regenerate_key_async",
"(",
"resource_group_name",
",",
"name",
",",
"parameters",
",",
"custom_headers",
":custom_headers",
... | Regenerate Redis cache's access keys. This operation requires write
permission to the cache resource.
@param resource_group_name [String] The name of the resource group.
@param name [String] The name of the Redis cache.
@param parameters [RedisRegenerateKeyParameters] Specifies which key to
regenerate.
@param cu... | [
"Regenerate",
"Redis",
"cache",
"s",
"access",
"keys",
".",
"This",
"operation",
"requires",
"write",
"permission",
"to",
"the",
"cache",
"resource",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_redis/lib/2017-02-01/generated/azure_mgmt_redis/redis.rb#L587-L590 | train | Regenerate a key for a managed database. | [
30522,
13366,
19723,
24454,
3686,
1035,
3145,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2171,
1010,
11709,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
19723,
24454,
3686,
1035,
3145,
1035,
2004,
6038,
2278,
1006,
7692... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | data/azure_cognitiveservices_luisauthoring/lib/2.0/generated/azure_cognitiveservices_luisauthoring/model.rb | Azure::CognitiveServices::LuisAuthoring::V2_0.Model.list_closed_list_entity_roles | def list_closed_list_entity_roles(app_id, version_id, entity_id, custom_headers:nil)
response = list_closed_list_entity_roles_async(app_id, version_id, entity_id, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def list_closed_list_entity_roles(app_id, version_id, entity_id, custom_headers:nil)
response = list_closed_list_entity_roles_async(app_id, version_id, entity_id, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"list_closed_list_entity_roles",
"(",
"app_id",
",",
"version_id",
",",
"entity_id",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"list_closed_list_entity_roles_async",
"(",
"app_id",
",",
"version_id",
",",
"entity_id",
",",
"custom_headers",
":cus... | Get all roles for a list entity in a version of the application.
@param app_id The application ID.
@param version_id [String] The version ID.
@param entity_id entity Id
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request.
@return [Array] operation resul... | [
"Get",
"all",
"roles",
"for",
"a",
"list",
"entity",
"in",
"a",
"version",
"of",
"the",
"application",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_cognitiveservices_luisauthoring/lib/2.0/generated/azure_cognitiveservices_luisauthoring/model.rb#L6578-L6581 | train | Gets the roles of the entity. | [
30522,
13366,
2862,
1035,
2701,
1035,
2862,
1035,
9178,
1035,
4395,
1006,
10439,
1035,
8909,
1010,
2544,
1035,
8909,
1010,
9178,
1035,
8909,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
2862,
1035,
2701,
1035,
2862,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
activeadmin/activeadmin | lib/active_admin/application.rb | ActiveAdmin.Application.register_page | def register_page(name, options = {}, &block)
ns = options.fetch(:namespace) { default_namespace }
namespace(ns).register_page name, options, &block
end | ruby | def register_page(name, options = {}, &block)
ns = options.fetch(:namespace) { default_namespace }
namespace(ns).register_page name, options, &block
end | [
"def",
"register_page",
"(",
"name",
",",
"options",
"=",
"{",
"}",
",",
"&",
"block",
")",
"ns",
"=",
"options",
".",
"fetch",
"(",
":namespace",
")",
"{",
"default_namespace",
"}",
"namespace",
"(",
"ns",
")",
".",
"register_page",
"name",
",",
"opti... | Register a page
@param name [String] The page name
@option [Hash] Accepts option :namespace.
@&block The registration block. | [
"Register",
"a",
"page"
] | 0759c8dcf97865748c9344459162ac3c7e65a6cd | https://github.com/activeadmin/activeadmin/blob/0759c8dcf97865748c9344459162ac3c7e65a6cd/lib/active_admin/application.rb#L93-L96 | train | Register a page with the current namespace. | [
30522,
13366,
4236,
1035,
3931,
1006,
2171,
1010,
7047,
1027,
1063,
1065,
1010,
1004,
3796,
1007,
24978,
1027,
7047,
1012,
18584,
1006,
1024,
3415,
15327,
1007,
1063,
12398,
1035,
3415,
15327,
1065,
3415,
15327,
1006,
24978,
1007,
1012,
423... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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_graph_rbac/lib/1.6/generated/azure_graph_rbac/service_principals.rb | Azure::GraphRbac::V1_6.ServicePrincipals.update_key_credentials | def update_key_credentials(object_id, parameters, custom_headers:nil)
response = update_key_credentials_async(object_id, parameters, custom_headers:custom_headers).value!
nil
end | ruby | def update_key_credentials(object_id, parameters, custom_headers:nil)
response = update_key_credentials_async(object_id, parameters, custom_headers:custom_headers).value!
nil
end | [
"def",
"update_key_credentials",
"(",
"object_id",
",",
"parameters",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"update_key_credentials_async",
"(",
"object_id",
",",
"parameters",
",",
"custom_headers",
":custom_headers",
")",
".",
"value!",
"nil",
"... | Update the keyCredentials associated with a service principal.
@param object_id [String] The object ID for which to get service principal
information.
@param parameters [KeyCredentialsUpdateParameters] Parameters to update the
keyCredentials of an existing service principal.
@param custom_headers [Hash{String => ... | [
"Update",
"the",
"keyCredentials",
"associated",
"with",
"a",
"service",
"principal",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_graph_rbac/lib/1.6/generated/azure_graph_rbac/service_principals.rb#L576-L579 | train | Updates the key credentials of the specified object. | [
30522,
13366,
10651,
1035,
3145,
1035,
22496,
1006,
4874,
1035,
8909,
1010,
11709,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
10651,
1035,
3145,
1035,
22496,
1035,
2004,
6038,
2278,
1006,
4874,
1035,
8909,
1010,
1170... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
jch/html-pipeline | lib/html/pipeline.rb | HTML.Pipeline.perform_filter | def perform_filter(filter, doc, context, result)
payload = default_payload filter: filter.name,
context: context, result: result
instrument 'call_filter.html_pipeline', payload do
filter.call(doc, context, result)
end
end | ruby | def perform_filter(filter, doc, context, result)
payload = default_payload filter: filter.name,
context: context, result: result
instrument 'call_filter.html_pipeline', payload do
filter.call(doc, context, result)
end
end | [
"def",
"perform_filter",
"(",
"filter",
",",
"doc",
",",
"context",
",",
"result",
")",
"payload",
"=",
"default_payload",
"filter",
":",
"filter",
".",
"name",
",",
"context",
":",
"context",
",",
"result",
":",
"result",
"instrument",
"'call_filter.html_pipe... | Internal: Applies a specific filter to the supplied doc.
The filter is instrumented.
Returns the result of the filter. | [
"Internal",
":",
"Applies",
"a",
"specific",
"filter",
"to",
"the",
"supplied",
"doc",
"."
] | f1bbce4858876dc2619c61a8b18637b5d3321b1c | https://github.com/jch/html-pipeline/blob/f1bbce4858876dc2619c61a8b18637b5d3321b1c/lib/html/pipeline.rb#L127-L133 | train | Perform a filter | [
30522,
13366,
4685,
1035,
11307,
1006,
11307,
1010,
9986,
1010,
6123,
1010,
2765,
1007,
18093,
1027,
12398,
1035,
18093,
11307,
1024,
11307,
1012,
2171,
1010,
6123,
1024,
6123,
1010,
2765,
1024,
2765,
6602,
1005,
2655,
1035,
11307,
1012,
16... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
sunspot/sunspot | sunspot/lib/sunspot/text_field_setup.rb | Sunspot.TextFieldSetup.field | def field(name)
fields = @setup.text_fields(name)
if fields
if fields.length == 1
fields.first
else
raise(
Sunspot::UnrecognizedFieldError,
"The text field with name #{name} has incompatible configurations for the classes #{@setup.type_names.join('... | ruby | def field(name)
fields = @setup.text_fields(name)
if fields
if fields.length == 1
fields.first
else
raise(
Sunspot::UnrecognizedFieldError,
"The text field with name #{name} has incompatible configurations for the classes #{@setup.type_names.join('... | [
"def",
"field",
"(",
"name",
")",
"fields",
"=",
"@setup",
".",
"text_fields",
"(",
"name",
")",
"if",
"fields",
"if",
"fields",
".",
"length",
"==",
"1",
"fields",
".",
"first",
"else",
"raise",
"(",
"Sunspot",
"::",
"UnrecognizedFieldError",
",",
"\"Th... | :nodoc:
Return a text field with the given name. Duck-type compatible with
Setup and CompositeSetup, but return text fields instead. | [
":",
"nodoc",
":"
] | 31dd76cd7a14a4ef7bd541de97483d8cd72ff685 | https://github.com/sunspot/sunspot/blob/31dd76cd7a14a4ef7bd541de97483d8cd72ff685/sunspot/lib/sunspot/text_field_setup.rb#L15-L27 | train | Get the text field with the given name. | [
30522,
13366,
2492,
1006,
2171,
1007,
4249,
1027,
1030,
16437,
1012,
3793,
1035,
4249,
1006,
2171,
1007,
2065,
4249,
2065,
4249,
1012,
3091,
1027,
1027,
1015,
4249,
1012,
2034,
2842,
5333,
1006,
19352,
11008,
1024,
1024,
4895,
2890,
3597,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/user_identities.rb | Azure::ApiManagement::Mgmt::V2016_10_10.UserIdentities.list_by_users_with_http_info | def list_by_users_with_http_info(resource_group_name, service_name, uid, custom_headers:nil)
list_by_users_async(resource_group_name, service_name, uid, custom_headers:custom_headers).value!
end | ruby | def list_by_users_with_http_info(resource_group_name, service_name, uid, custom_headers:nil)
list_by_users_async(resource_group_name, service_name, uid, custom_headers:custom_headers).value!
end | [
"def",
"list_by_users_with_http_info",
"(",
"resource_group_name",
",",
"service_name",
",",
"uid",
",",
"custom_headers",
":",
"nil",
")",
"list_by_users_async",
"(",
"resource_group_name",
",",
"service_name",
",",
"uid",
",",
"custom_headers",
":custom_headers",
")",... | Lists all user identities.
@param resource_group_name [String] The name of the resource group.
@param service_name [String] The name of the API Management service.
@param uid [String] User identifier. Must be unique in the current API
Management service instance.
@param custom_headers [Hash{String => String}] A h... | [
"Lists",
"all",
"user",
"identities",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/user_identities.rb#L53-L55 | train | Gets the list of the documents associated with the user. | [
30522,
13366,
2862,
1035,
2011,
1035,
5198,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2326,
1035,
2171,
1010,
21318,
2094,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
2862,
1035,
2011,
1035,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
awesome-print/awesome_print | lib/awesome_print/formatter.rb | AwesomePrint.Formatter.convert_to_hash | def convert_to_hash(object)
if !object.respond_to?(:to_hash)
return nil
end
if object.method(:to_hash).arity != 0
return nil
end
hash = object.to_hash
if !hash.respond_to?(:keys) || !hash.respond_to?('[]')
return nil
end
return hash
end | ruby | def convert_to_hash(object)
if !object.respond_to?(:to_hash)
return nil
end
if object.method(:to_hash).arity != 0
return nil
end
hash = object.to_hash
if !hash.respond_to?(:keys) || !hash.respond_to?('[]')
return nil
end
return hash
end | [
"def",
"convert_to_hash",
"(",
"object",
")",
"if",
"!",
"object",
".",
"respond_to?",
"(",
":to_hash",
")",
"return",
"nil",
"end",
"if",
"object",
".",
"method",
"(",
":to_hash",
")",
".",
"arity",
"!=",
"0",
"return",
"nil",
"end",
"hash",
"=",
"obj... | Utility methods.
------------------------------------------------------------------------------ | [
"Utility",
"methods",
".",
"------------------------------------------------------------------------------"
] | 4564fd74721562cbef2443f7d97109bf9192343d | https://github.com/awesome-print/awesome_print/blob/4564fd74721562cbef2443f7d97109bf9192343d/lib/awesome_print/formatter.rb#L109-L124 | train | Convert the object to a hash | [
30522,
13366,
10463,
1035,
2000,
1035,
23325,
1006,
4874,
1007,
2065,
999,
4874,
1012,
6869,
1035,
2000,
1029,
1006,
1024,
2000,
1035,
23325,
1007,
2709,
9152,
2140,
2203,
2065,
4874,
1012,
4118,
1006,
1024,
2000,
1035,
23325,
1007,
1012,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
aws/aws-sdk-ruby | gems/aws-sdk-sqs/lib/aws-sdk-sqs/queue.rb | Aws::SQS.Queue.purge | def purge(options = {})
options = options.merge(queue_url: @url)
resp = @client.purge_queue(options)
resp.data
end | ruby | def purge(options = {})
options = options.merge(queue_url: @url)
resp = @client.purge_queue(options)
resp.data
end | [
"def",
"purge",
"(",
"options",
"=",
"{",
"}",
")",
"options",
"=",
"options",
".",
"merge",
"(",
"queue_url",
":",
"@url",
")",
"resp",
"=",
"@client",
".",
"purge_queue",
"(",
"options",
")",
"resp",
".",
"data",
"end"
] | @example Request syntax with placeholder values
queue.purge()
@param [Hash] options ({})
@return [EmptyStructure] | [
"@example",
"Request",
"syntax",
"with",
"placeholder",
"values"
] | e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d | https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-sqs/lib/aws-sdk-sqs/queue.rb#L185-L189 | train | Purge the queue | [
30522,
13366,
24694,
1006,
7047,
1027,
1063,
1065,
1007,
7047,
1027,
7047,
1012,
13590,
1006,
24240,
1035,
24471,
2140,
1024,
1030,
24471,
2140,
1007,
24501,
2361,
1027,
1030,
7396,
1012,
24694,
1035,
24240,
1006,
7047,
1007,
24501,
2361,
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... |
randym/axlsx | lib/axlsx/workbook/worksheet/comment.rb | Axlsx.Comment.initialize_vml_shape | def initialize_vml_shape
pos = Axlsx::name_to_indices(ref)
@vml_shape = VmlShape.new(:row => pos[1], :column => pos[0], :visible => @visible) do |vml|
vml.left_column = vml.column
vml.right_column = vml.column + 2
vml.top_row = vml.row
vml.bottom_row = vml.row + 4
end... | ruby | def initialize_vml_shape
pos = Axlsx::name_to_indices(ref)
@vml_shape = VmlShape.new(:row => pos[1], :column => pos[0], :visible => @visible) do |vml|
vml.left_column = vml.column
vml.right_column = vml.column + 2
vml.top_row = vml.row
vml.bottom_row = vml.row + 4
end... | [
"def",
"initialize_vml_shape",
"pos",
"=",
"Axlsx",
"::",
"name_to_indices",
"(",
"ref",
")",
"@vml_shape",
"=",
"VmlShape",
".",
"new",
"(",
":row",
"=>",
"pos",
"[",
"1",
"]",
",",
":column",
"=>",
"pos",
"[",
"0",
"]",
",",
":visible",
"=>",
"@visib... | initialize the vml shape based on this comment's ref/position in the worksheet.
by default, all columns are 5 columns wide and 5 rows high | [
"initialize",
"the",
"vml",
"shape",
"based",
"on",
"this",
"comment",
"s",
"ref",
"/",
"position",
"in",
"the",
"worksheet",
".",
"by",
"default",
"all",
"columns",
"are",
"5",
"columns",
"wide",
"and",
"5",
"rows",
"high"
] | c593a08b2a929dac7aa8dc418b55e26b4c49dc34 | https://github.com/randym/axlsx/blob/c593a08b2a929dac7aa8dc418b55e26b4c49dc34/lib/axlsx/workbook/worksheet/comment.rb#L81-L89 | train | Initialize the VML shape | [
30522,
13366,
3988,
4697,
1035,
1058,
19968,
1035,
4338,
13433,
2015,
1027,
22260,
4877,
2595,
1024,
1024,
2171,
1035,
2000,
1035,
29299,
1006,
25416,
1007,
1030,
1058,
19968,
1035,
4338,
1027,
1058,
19968,
7377,
5051,
1012,
2047,
1006,
102... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
rails/sprockets | lib/sprockets/server.rb | Sprockets.Server.call | def call(env)
start_time = Time.now.to_f
time_elapsed = lambda { ((Time.now.to_f - start_time) * 1000).to_i }
unless ALLOWED_REQUEST_METHODS.include? env['REQUEST_METHOD']
return method_not_allowed_response
end
msg = "Served asset #{env['PATH_INFO']} -"
# Extract the path ... | ruby | def call(env)
start_time = Time.now.to_f
time_elapsed = lambda { ((Time.now.to_f - start_time) * 1000).to_i }
unless ALLOWED_REQUEST_METHODS.include? env['REQUEST_METHOD']
return method_not_allowed_response
end
msg = "Served asset #{env['PATH_INFO']} -"
# Extract the path ... | [
"def",
"call",
"(",
"env",
")",
"start_time",
"=",
"Time",
".",
"now",
".",
"to_f",
"time_elapsed",
"=",
"lambda",
"{",
"(",
"(",
"Time",
".",
"now",
".",
"to_f",
"-",
"start_time",
")",
"*",
"1000",
")",
".",
"to_i",
"}",
"unless",
"ALLOWED_REQUEST_... | `call` implements the Rack 1.x specification which accepts an
`env` Hash and returns a three item tuple with the status code,
headers, and body.
Mapping your environment at a url prefix will serve all assets
in the path.
map "/assets" do
run Sprockets::Environment.new
end
A request for `"/asset... | [
"call",
"implements",
"the",
"Rack",
"1",
".",
"x",
"specification",
"which",
"accepts",
"an",
"env",
"Hash",
"and",
"returns",
"a",
"three",
"item",
"tuple",
"with",
"the",
"status",
"code",
"headers",
"and",
"body",
"."
] | 9e3f0d8e98c44f57e67bc138db87bb8469bf5ddd | https://github.com/rails/sprockets/blob/9e3f0d8e98c44f57e67bc138db87bb8469bf5ddd/lib/sprockets/server.rb#L27-L109 | train | This method is called by the Rack server. | [
30522,
13366,
2655,
1006,
4372,
2615,
1007,
2707,
1035,
2051,
1027,
2051,
1012,
2085,
1012,
2000,
30524,
1006,
2051,
1012,
2085,
1012,
2000,
1035,
1042,
1011,
2707,
1035,
2051,
1007,
1008,
6694,
1007,
1012,
2000,
1035,
1045,
1065,
4983,
3... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_stor_simple8000_series/lib/2017-06-01/generated/azure_mgmt_stor_simple8000_series/managers.rb | Azure::StorSimple8000Series::Mgmt::V2017_06_01.Managers.get_activation_key | def get_activation_key(resource_group_name, manager_name, custom_headers:nil)
response = get_activation_key_async(resource_group_name, manager_name, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def get_activation_key(resource_group_name, manager_name, custom_headers:nil)
response = get_activation_key_async(resource_group_name, manager_name, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"get_activation_key",
"(",
"resource_group_name",
",",
"manager_name",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"get_activation_key_async",
"(",
"resource_group_name",
",",
"manager_name",
",",
"custom_headers",
":custom_headers",
")",
".",
"value... | Returns the activation key of the manager.
@param resource_group_name [String] The resource group name
@param manager_name [String] The manager name
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request.
@return [Key] operation results. | [
"Returns",
"the",
"activation",
"key",
"of",
"the",
"manager",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_stor_simple8000_series/lib/2017-06-01/generated/azure_mgmt_stor_simple8000_series/managers.rb#L1285-L1288 | train | Gets the activation key of the managed database. | [
30522,
13366,
2131,
1035,
13791,
1035,
3145,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
3208,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
2131,
1035,
13791,
1035,
3145,
1035,
2004,
6038,
2278,
1006,
7692,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
appium/ruby_lib | lib/appium_lib/android/element/button.rb | Appium.Android.button | def button(value)
# Don't use ele_index because that only works on one element type.
# Android needs to combine button and image button to match iOS.
if value.is_a? Numeric
index = value
raise "#{index} is not a valid index. Must be >= 1" if index <= 0
# 1 indexed
retu... | ruby | def button(value)
# Don't use ele_index because that only works on one element type.
# Android needs to combine button and image button to match iOS.
if value.is_a? Numeric
index = value
raise "#{index} is not a valid index. Must be >= 1" if index <= 0
# 1 indexed
retu... | [
"def",
"button",
"(",
"value",
")",
"# Don't use ele_index because that only works on one element type.",
"# Android needs to combine button and image button to match iOS.",
"if",
"value",
".",
"is_a?",
"Numeric",
"index",
"=",
"value",
"raise",
"\"#{index} is not a valid index. Must... | backward compatibility
Find the first button that contains value or by index.
@param value [String, Integer] the value to exactly match.
If int then the button at that index is returned.
@return [BUTTON] | [
"backward",
"compatibility",
"Find",
"the",
"first",
"button",
"that",
"contains",
"value",
"or",
"by",
"index",
"."
] | 1f5898400dd1928bfe42ddd5f842d1f8738f2f76 | https://github.com/appium/ruby_lib/blob/1f5898400dd1928bfe42ddd5f842d1f8738f2f76/lib/appium_lib/android/element/button.rb#L27-L39 | train | Find button element by value | [
30522,
13366,
6462,
1006,
3643,
1007,
1001,
2123,
1005,
1056,
2224,
3449,
2063,
1035,
5950,
2138,
2008,
2069,
2573,
2006,
2028,
5783,
2828,
1012,
1001,
11924,
3791,
2000,
11506,
6462,
1998,
3746,
6462,
2000,
2674,
16380,
1012,
2065,
3643,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
david942j/one_gadget | lib/one_gadget/cli.rb | OneGadget.CLI.handle_script | def handle_script(gadgets, script)
gadgets.map(&:offset).each do |offset|
OneGadget::Logger.info("Trying #{OneGadget::Helper.colored_hex(offset)}...")
execute("#{script} #{offset}")
end
true
end | ruby | def handle_script(gadgets, script)
gadgets.map(&:offset).each do |offset|
OneGadget::Logger.info("Trying #{OneGadget::Helper.colored_hex(offset)}...")
execute("#{script} #{offset}")
end
true
end | [
"def",
"handle_script",
"(",
"gadgets",
",",
"script",
")",
"gadgets",
".",
"map",
"(",
":offset",
")",
".",
"each",
"do",
"|",
"offset",
"|",
"OneGadget",
"::",
"Logger",
".",
"info",
"(",
"\"Trying #{OneGadget::Helper.colored_hex(offset)}...\"",
")",
"execute"... | Handles the --script feature.
@param [Array<OneGadget::Gadget::Gadget>] gadgets
@param [String] script
@return [true] | [
"Handles",
"the",
"--",
"script",
"feature",
"."
] | ff6ef04541e83441bfe3c2664a6febd1640f4263 | https://github.com/david942j/one_gadget/blob/ff6ef04541e83441bfe3c2664a6febd1640f4263/lib/one_gadget/cli.rb#L164-L170 | train | Handles the script | [
30522,
13366,
5047,
1035,
5896,
1006,
11721,
28682,
1010,
5896,
1007,
11721,
28682,
1012,
4949,
1006,
1004,
1024,
16396,
1007,
1012,
2169,
2079,
1064,
16396,
1064,
2028,
3654,
24291,
1024,
1024,
8833,
4590,
1012,
18558,
1006,
1000,
2667,
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... |
github/linguist | samples/Ruby/sinatra.rb | Sinatra.Helpers.uri | def uri(addr = nil, absolute = true, add_script_name = true)
return addr if addr =~ /\A[A-z][A-z0-9\+\.\-]*:/
uri = [host = ""]
if absolute
host << "http#{'s' if request.secure?}://"
if request.forwarded? or request.port != (request.secure? ? 443 : 80)
host << request.host_wi... | ruby | def uri(addr = nil, absolute = true, add_script_name = true)
return addr if addr =~ /\A[A-z][A-z0-9\+\.\-]*:/
uri = [host = ""]
if absolute
host << "http#{'s' if request.secure?}://"
if request.forwarded? or request.port != (request.secure? ? 443 : 80)
host << request.host_wi... | [
"def",
"uri",
"(",
"addr",
"=",
"nil",
",",
"absolute",
"=",
"true",
",",
"add_script_name",
"=",
"true",
")",
"return",
"addr",
"if",
"addr",
"=~",
"/",
"\\A",
"\\+",
"\\.",
"\\-",
"/",
"uri",
"=",
"[",
"host",
"=",
"\"\"",
"]",
"if",
"absolute",
... | Generates the absolute URI for a given path in the app.
Takes Rack routers and reverse proxies into account. | [
"Generates",
"the",
"absolute",
"URI",
"for",
"a",
"given",
"path",
"in",
"the",
"app",
".",
"Takes",
"Rack",
"routers",
"and",
"reverse",
"proxies",
"into",
"account",
"."
] | 9116c90fcbb82ac03b4b33c58cfbde1fcf745e99 | https://github.com/github/linguist/blob/9116c90fcbb82ac03b4b33c58cfbde1fcf745e99/samples/Ruby/sinatra.rb#L182-L196 | train | Returns the URI for the current request. | [
30522,
13366,
24471,
2072,
1006,
5587,
2099,
1027,
9152,
2140,
1010,
7619,
1027,
2995,
1010,
5587,
1035,
5896,
1035,
2171,
1027,
2995,
1007,
2709,
5587,
2099,
2065,
5587,
2099,
1027,
1066,
1013,
1032,
1037,
1031,
1037,
1011,
1062,
1033,
1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_network/lib/2019-02-01/generated/azure_mgmt_network/application_gateways.rb | Azure::Network::Mgmt::V2019_02_01.ApplicationGateways.list_available_response_headers | def list_available_response_headers(custom_headers:nil)
response = list_available_response_headers_async(custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def list_available_response_headers(custom_headers:nil)
response = list_available_response_headers_async(custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"list_available_response_headers",
"(",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"list_available_response_headers_async",
"(",
"custom_headers",
":custom_headers",
")",
".",
"value!",
"response",
".",
"body",
"unless",
"response",
".",
"nil?",
"end"
] | Lists all available response headers.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request.
@return [Array] operation results. | [
"Lists",
"all",
"available",
"response",
"headers",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_network/lib/2019-02-01/generated/azure_mgmt_network/application_gateways.rb#L798-L801 | train | Gets the list of available response headers. | [
30522,
13366,
2862,
1035,
2800,
1035,
3433,
1035,
20346,
2015,
1006,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
2862,
1035,
2800,
1035,
3433,
1035,
20346,
2015,
1035,
2004,
6038,
2278,
1006,
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... |
commander-rb/commander | lib/commander/command.rb | Commander.Command.when_called | def when_called(*args, &block)
fail ArgumentError, 'must pass an object, class, or block.' if args.empty? && !block
@when_called = block ? [block] : args
end | ruby | def when_called(*args, &block)
fail ArgumentError, 'must pass an object, class, or block.' if args.empty? && !block
@when_called = block ? [block] : args
end | [
"def",
"when_called",
"(",
"*",
"args",
",",
"&",
"block",
")",
"fail",
"ArgumentError",
",",
"'must pass an object, class, or block.'",
"if",
"args",
".",
"empty?",
"&&",
"!",
"block",
"@when_called",
"=",
"block",
"?",
"[",
"block",
"]",
":",
"args",
"end"... | Handle execution of command. The handler may be a class,
object, or block (see examples below).
=== Examples
# Simple block handling
c.when_called do |args, options|
# do something
end
# Create inst of Something and pass args / options
c.when_called MyLib::Command::Something
# Create inst ... | [
"Handle",
"execution",
"of",
"command",
".",
"The",
"handler",
"may",
"be",
"a",
"class",
"object",
"or",
"block",
"(",
"see",
"examples",
"below",
")",
"."
] | 332047c14948225462fe60042eed23adfb996d68 | https://github.com/commander-rb/commander/blob/332047c14948225462fe60042eed23adfb996d68/lib/commander/command.rb#L139-L142 | train | Set the when_called method to be called. | [
30522,
13366,
2043,
1035,
2170,
1006,
1008,
12098,
5620,
1010,
1004,
3796,
1007,
8246,
6685,
2121,
29165,
1010,
1005,
2442,
3413,
2019,
4874,
1010,
2465,
1010,
2030,
3796,
1012,
30524,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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.get_entity_role_with_http_info | def get_entity_role_with_http_info(app_id, version_id, entity_id, role_id, custom_headers:nil)
get_entity_role_async(app_id, version_id, entity_id, role_id, custom_headers:custom_headers).value!
end | ruby | def get_entity_role_with_http_info(app_id, version_id, entity_id, role_id, custom_headers:nil)
get_entity_role_async(app_id, version_id, entity_id, role_id, custom_headers:custom_headers).value!
end | [
"def",
"get_entity_role_with_http_info",
"(",
"app_id",
",",
"version_id",
",",
"entity_id",
",",
"role_id",
",",
"custom_headers",
":",
"nil",
")",
"get_entity_role_async",
"(",
"app_id",
",",
"version_id",
",",
"entity_id",
",",
"role_id",
",",
"custom_headers",
... | Get one role for a given entity in a version of the application
@param app_id The application ID.
@param version_id [String] The version ID.
@param entity_id entity ID.
@param role_id entity role ID.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request.
... | [
"Get",
"one",
"role",
"for",
"a",
"given",
"entity",
"in",
"a",
"version",
"of",
"the",
"application"
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_cognitiveservices_luisauthoring/lib/2.0/generated/azure_cognitiveservices_luisauthoring/model.rb#L8798-L8800 | train | Gets the entity role. | [
30522,
13366,
2131,
1035,
9178,
1035,
2535,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
10439,
1035,
8909,
1010,
2544,
1035,
8909,
1010,
9178,
1035,
8909,
1010,
2535,
1035,
8909,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
2131,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | data/azure_cognitiveservices_face/lib/1.0/generated/azure_cognitiveservices_face/large_person_group_person.rb | Azure::CognitiveServices::Face::V1_0.LargePersonGroupPerson.delete | def delete(large_person_group_id, person_id, custom_headers:nil)
response = delete_async(large_person_group_id, person_id, custom_headers:custom_headers).value!
nil
end | ruby | def delete(large_person_group_id, person_id, custom_headers:nil)
response = delete_async(large_person_group_id, person_id, custom_headers:custom_headers).value!
nil
end | [
"def",
"delete",
"(",
"large_person_group_id",
",",
"person_id",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"delete_async",
"(",
"large_person_group_id",
",",
"person_id",
",",
"custom_headers",
":custom_headers",
")",
".",
"value!",
"nil",
"end"
] | Delete an existing person from a large person group. All stored person data,
and face features in the person entry will be deleted.
@param large_person_group_id [String] Id referencing a particular large
person group.
@param person_id Id referencing a particular person.
@param custom_headers [Hash{String => Strin... | [
"Delete",
"an",
"existing",
"person",
"from",
"a",
"large",
"person",
"group",
".",
"All",
"stored",
"person",
"data",
"and",
"face",
"features",
"in",
"the",
"person",
"entry",
"will",
"be",
"deleted",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_cognitiveservices_face/lib/1.0/generated/azure_cognitiveservices_face/large_person_group_person.rb#L276-L279 | train | Deletes a person from a large person group. | [
30522,
13366,
3972,
12870,
1006,
2312,
1035,
2711,
1035,
2177,
1035,
8909,
1010,
2711,
1035,
8909,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
3972,
12870,
1035,
2004,
6038,
2278,
1006,
2312,
1035,
2711,
1035,
2177,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_sql/lib/2018-06-01-preview/generated/azure_mgmt_sql/managed_database_columns.rb | Azure::SQL::Mgmt::V2018_06_01_preview.ManagedDatabaseColumns.list_by_table | def list_by_table(resource_group_name, managed_instance_name, database_name, schema_name, table_name, filter:nil, custom_headers:nil)
first_page = list_by_table_as_lazy(resource_group_name, managed_instance_name, database_name, schema_name, table_name, filter:filter, custom_headers:custom_headers)
first_pag... | ruby | def list_by_table(resource_group_name, managed_instance_name, database_name, schema_name, table_name, filter:nil, custom_headers:nil)
first_page = list_by_table_as_lazy(resource_group_name, managed_instance_name, database_name, schema_name, table_name, filter:filter, custom_headers:custom_headers)
first_pag... | [
"def",
"list_by_table",
"(",
"resource_group_name",
",",
"managed_instance_name",
",",
"database_name",
",",
"schema_name",
",",
"table_name",
",",
"filter",
":",
"nil",
",",
"custom_headers",
":",
"nil",
")",
"first_page",
"=",
"list_by_table_as_lazy",
"(",
"resour... | List managed database columns
@param resource_group_name [String] The name of the resource group that
contains the resource. You can obtain this value from the Azure Resource
Manager API or the portal.
@param managed_instance_name [String] The name of the managed instance.
@param database_name [String] The name o... | [
"List",
"managed",
"database",
"columns"
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_sql/lib/2018-06-01-preview/generated/azure_mgmt_sql/managed_database_columns.rb#L44-L47 | train | Gets all the data in the specified managed database table. | [
30522,
13366,
2862,
1035,
2011,
1035,
2795,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
3266,
1035,
6013,
1035,
2171,
1010,
7809,
1035,
2171,
1010,
8040,
28433,
1035,
2171,
1010,
2795,
1035,
2171,
1010,
11307,
1024,
9152,
2140,
1010,
7661,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
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_closed_lists | def list_closed_lists(app_id, version_id, skip:0, take:100, custom_headers:nil)
response = list_closed_lists_async(app_id, version_id, skip:skip, take:take, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def list_closed_lists(app_id, version_id, skip:0, take:100, custom_headers:nil)
response = list_closed_lists_async(app_id, version_id, skip:skip, take:take, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"list_closed_lists",
"(",
"app_id",
",",
"version_id",
",",
"skip",
":",
"0",
",",
"take",
":",
"100",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"list_closed_lists_async",
"(",
"app_id",
",",
"version_id",
",",
"skip",
":",
"skip",
",... | Gets information about all the list entity models in a version of the
application.
@param app_id The application ID.
@param version_id [String] The version ID.
@param skip [Integer] The number of entries to skip. Default value is 0.
@param take [Integer] The number of entries to return. Maximum page size is
500.... | [
"Gets",
"information",
"about",
"all",
"the",
"list",
"entity",
"models",
"in",
"a",
"version",
"of",
"the",
"application",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_cognitiveservices_luisauthoring/lib/2.0/generated/azure_cognitiveservices_luisauthoring/model.rb#L975-L978 | train | Gets the list of closed lists. | [
30522,
13366,
2862,
1035,
2701,
1035,
7201,
1006,
10439,
1035,
8909,
1010,
2544,
1035,
8909,
1010,
13558,
1024,
1014,
1010,
2202,
1024,
2531,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
2862,
1035,
2701,
1035,
7201,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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_employee | def update_employee(employee_id, body, opts = {})
data, _status_code, _headers = update_employee_with_http_info(employee_id, body, opts)
return data
end | ruby | def update_employee(employee_id, body, opts = {})
data, _status_code, _headers = update_employee_with_http_info(employee_id, body, opts)
return data
end | [
"def",
"update_employee",
"(",
"employee_id",
",",
"body",
",",
"opts",
"=",
"{",
"}",
")",
"data",
",",
"_status_code",
",",
"_headers",
"=",
"update_employee_with_http_info",
"(",
"employee_id",
",",
"body",
",",
"opts",
")",
"return",
"data",
"end"
] | UpdateEmployee
@param employee_id The ID of the role to modify.
@param body An object containing the fields to POST for the request. See the corresponding object definition for field details.
@param [Hash] opts the optional parameters
@return [V1Employee] | [
"UpdateEmployee"
] | 798eb9ded716f23b9f1518386f1c311a34bca8bf | https://github.com/square/connect-ruby-sdk/blob/798eb9ded716f23b9f1518386f1c311a34bca8bf/lib/square_connect/api/v1_employees_api.rb#L826-L829 | train | Update Employee Returns the Employee object | [
30522,
13366,
10651,
1035,
7904,
1006,
7904,
1035,
8909,
1010,
2303,
1010,
23569,
2015,
1027,
1063,
1065,
1007,
2951,
1010,
1035,
3570,
1035,
3642,
1010,
1035,
20346,
2015,
1027,
10651,
1035,
7904,
1035,
2007,
1035,
8299,
1035,
18558,
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... |
cucumber/cucumber-ruby | lib/cucumber/constantize.rb | Cucumber.Constantize.constantize | def constantize(camel_cased_word)
try = 0
begin
try += 1
names = camel_cased_word.split('::')
names.shift if names.empty? || names.first.empty?
constant = ::Object
names.each do |name|
constant = constantize_name(constant, name)
end
constant... | ruby | def constantize(camel_cased_word)
try = 0
begin
try += 1
names = camel_cased_word.split('::')
names.shift if names.empty? || names.first.empty?
constant = ::Object
names.each do |name|
constant = constantize_name(constant, name)
end
constant... | [
"def",
"constantize",
"(",
"camel_cased_word",
")",
"try",
"=",
"0",
"begin",
"try",
"+=",
"1",
"names",
"=",
"camel_cased_word",
".",
"split",
"(",
"'::'",
")",
"names",
".",
"shift",
"if",
"names",
".",
"empty?",
"||",
"names",
".",
"first",
".",
"em... | :nodoc: | [
":",
"nodoc",
":"
] | de3ba2fb9a35b8bcfd5109f610a0c16180d7abf2 | https://github.com/cucumber/cucumber-ruby/blob/de3ba2fb9a35b8bcfd5109f610a0c16180d7abf2/lib/cucumber/constantize.rb#L6-L23 | train | Constantizes a string | [
30522,
13366,
5377,
4697,
1006,
19130,
1035,
2553,
2094,
1035,
2773,
1007,
3046,
1027,
1014,
4088,
3046,
1009,
1027,
1015,
3415,
1027,
19130,
1035,
2553,
2094,
1035,
2773,
1012,
3975,
1006,
1005,
1024,
1024,
1005,
1007,
3415,
1012,
5670,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/service_endpoint_policies.rb | Azure::Network::Mgmt::V2018_07_01.ServiceEndpointPolicies.begin_update_with_http_info | def begin_update_with_http_info(resource_group_name, service_endpoint_policy_name, parameters, custom_headers:nil)
begin_update_async(resource_group_name, service_endpoint_policy_name, parameters, custom_headers:custom_headers).value!
end | ruby | def begin_update_with_http_info(resource_group_name, service_endpoint_policy_name, parameters, custom_headers:nil)
begin_update_async(resource_group_name, service_endpoint_policy_name, parameters, custom_headers:custom_headers).value!
end | [
"def",
"begin_update_with_http_info",
"(",
"resource_group_name",
",",
"service_endpoint_policy_name",
",",
"parameters",
",",
"custom_headers",
":",
"nil",
")",
"begin_update_async",
"(",
"resource_group_name",
",",
"service_endpoint_policy_name",
",",
"parameters",
",",
"... | Updates service Endpoint Policies.
@param resource_group_name [String] The name of the resource group.
@param service_endpoint_policy_name [String] The name of the service endpoint
policy.
@param parameters [TagsObject] Parameters supplied to update service endpoint
policy tags.
@param custom_headers [Hash{Strin... | [
"Updates",
"service",
"Endpoint",
"Policies",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_network/lib/2018-07-01/generated/azure_mgmt_network/service_endpoint_policies.rb#L664-L666 | train | Updates an existing Service Endpoint Policy. | [
30522,
13366,
4088,
1035,
10651,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2326,
1035,
2203,
8400,
1035,
3343,
1035,
2171,
1010,
11709,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
4088,
1035,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_container_registry/lib/2017-06-01-preview/generated/azure_mgmt_container_registry/replications.rb | Azure::ContainerRegistry::Mgmt::V2017_06_01_preview.Replications.update_async | def update_async(resource_group_name, registry_name, replication_name, replication_update_parameters, custom_headers:nil)
# Send request
promise = begin_update_async(resource_group_name, registry_name, replication_name, replication_update_parameters, custom_headers:custom_headers)
promise = promise.t... | ruby | def update_async(resource_group_name, registry_name, replication_name, replication_update_parameters, custom_headers:nil)
# Send request
promise = begin_update_async(resource_group_name, registry_name, replication_name, replication_update_parameters, custom_headers:custom_headers)
promise = promise.t... | [
"def",
"update_async",
"(",
"resource_group_name",
",",
"registry_name",
",",
"replication_name",
",",
"replication_update_parameters",
",",
"custom_headers",
":",
"nil",
")",
"# Send request",
"promise",
"=",
"begin_update_async",
"(",
"resource_group_name",
",",
"regist... | @param resource_group_name [String] The name of the resource group to which
the container registry belongs.
@param registry_name [String] The name of the container registry.
@param replication_name [String] The name of the replication.
@param replication_update_parameters [ReplicationUpdateParameters] The
paramete... | [
"@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-06-01-preview/generated/azure_mgmt_container_registry/replications.rb#L251-L267 | train | Updates a replication. | [
30522,
13366,
10651,
1035,
2004,
6038,
2278,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
15584,
1035,
2171,
1010,
21647,
1035,
2171,
1010,
21647,
30524,
2140,
1007,
1001,
4604,
5227,
4872,
1027,
4088,
1035,
10651,
1035,
2004,
6038,
2278,
1006... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
meew0/discordrb | lib/discordrb/cache.rb | Discordrb.Cache.find_user | def find_user(username, discrim = nil)
users = @users.values.find_all { |e| e.username == username }
return users.find { |u| u.discrim == discrim } if discrim
users
end | ruby | def find_user(username, discrim = nil)
users = @users.values.find_all { |e| e.username == username }
return users.find { |u| u.discrim == discrim } if discrim
users
end | [
"def",
"find_user",
"(",
"username",
",",
"discrim",
"=",
"nil",
")",
"users",
"=",
"@users",
".",
"values",
".",
"find_all",
"{",
"|",
"e",
"|",
"e",
".",
"username",
"==",
"username",
"}",
"return",
"users",
".",
"find",
"{",
"|",
"u",
"|",
"u",
... | Finds a user given its username or username & discriminator.
@overload find_user(username)
Find all cached users with a certain username.
@param username [String] The username to look for.
@return [Array<User>] The array of users that were found. May be empty if none were found.
@overload find_user(username,... | [
"Finds",
"a",
"user",
"given",
"its",
"username",
"or",
"username",
"&",
"discriminator",
"."
] | 764298a1ff0be69a1853b510d736f21c2b91a2fe | https://github.com/meew0/discordrb/blob/764298a1ff0be69a1853b510d736f21c2b91a2fe/lib/discordrb/cache.rb#L249-L254 | train | Find a user by username | [
30522,
13366,
2424,
1035,
5310,
1006,
5310,
18442,
1010,
5860,
20026,
1027,
9152,
2140,
1007,
5198,
1027,
1030,
5198,
1012,
5300,
1012,
2424,
1035,
2035,
1063,
1064,
1041,
1064,
1041,
1012,
5310,
18442,
1027,
1027,
5310,
18442,
1065,
2709,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | data/azure_cognitiveservices_luisauthoring/lib/2.0/generated/azure_cognitiveservices_luisauthoring/model.rb | Azure::CognitiveServices::LuisAuthoring::V2_0.Model.delete_composite_entity_role_with_http_info | def delete_composite_entity_role_with_http_info(app_id, version_id, c_entity_id, role_id, custom_headers:nil)
delete_composite_entity_role_async(app_id, version_id, c_entity_id, role_id, custom_headers:custom_headers).value!
end | ruby | def delete_composite_entity_role_with_http_info(app_id, version_id, c_entity_id, role_id, custom_headers:nil)
delete_composite_entity_role_async(app_id, version_id, c_entity_id, role_id, custom_headers:custom_headers).value!
end | [
"def",
"delete_composite_entity_role_with_http_info",
"(",
"app_id",
",",
"version_id",
",",
"c_entity_id",
",",
"role_id",
",",
"custom_headers",
":",
"nil",
")",
"delete_composite_entity_role_async",
"(",
"app_id",
",",
"version_id",
",",
"c_entity_id",
",",
"role_id"... | Delete a role for a given composite entity in a version of the application.
@param app_id The application ID.
@param version_id [String] The version ID.
@param c_entity_id The composite entity extractor ID.
@param role_id The entity role Id.
@param custom_headers [Hash{String => String}] A hash of custom headers ... | [
"Delete",
"a",
"role",
"for",
"a",
"given",
"composite",
"entity",
"in",
"a",
"version",
"of",
"the",
"application",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_cognitiveservices_luisauthoring/lib/2.0/generated/azure_cognitiveservices_luisauthoring/model.rb#L10260-L10262 | train | Deletes a composite entity role. | [
30522,
13366,
3972,
12870,
1035,
12490,
1035,
9178,
1035,
2535,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
10439,
1035,
8909,
1010,
2544,
1035,
8909,
1010,
1039,
1035,
9178,
1035,
8909,
1010,
2535,
1035,
8909,
1010,
7661,
1035,
20346,
2015,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_storagesync/lib/2018-07-01/generated/azure_mgmt_storagesync/cloud_endpoints.rb | Azure::StorageSync::Mgmt::V2018_07_01.CloudEndpoints.restoreheartbeat | def restoreheartbeat(resource_group_name, storage_sync_service_name, sync_group_name, cloud_endpoint_name, custom_headers:nil)
response = restoreheartbeat_async(resource_group_name, storage_sync_service_name, sync_group_name, cloud_endpoint_name, custom_headers:custom_headers).value!
nil
end | ruby | def restoreheartbeat(resource_group_name, storage_sync_service_name, sync_group_name, cloud_endpoint_name, custom_headers:nil)
response = restoreheartbeat_async(resource_group_name, storage_sync_service_name, sync_group_name, cloud_endpoint_name, custom_headers:custom_headers).value!
nil
end | [
"def",
"restoreheartbeat",
"(",
"resource_group_name",
",",
"storage_sync_service_name",
",",
"sync_group_name",
",",
"cloud_endpoint_name",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"restoreheartbeat_async",
"(",
"resource_group_name",
",",
"storage_sync_ser... | Restore Heartbeat a given CloudEndpoint.
@param resource_group_name [String] The name of the resource group. The name
is case insensitive.
@param storage_sync_service_name [String] Name of Storage Sync Service
resource.
@param sync_group_name [String] Name of Sync Group resource.
@param cloud_endpoint_name [Stri... | [
"Restore",
"Heartbeat",
"a",
"given",
"CloudEndpoint",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_storagesync/lib/2018-07-01/generated/azure_mgmt_storagesync/cloud_endpoints.rb#L503-L506 | train | Restores a heartbeat for the specified cloud endpoint. | [
30522,
13366,
9239,
22375,
19442,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
5527,
1035,
26351,
1035,
2326,
1035,
2171,
1010,
26351,
1035,
2177,
1035,
2171,
1010,
6112,
1035,
2203,
8400,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
jekyll/jekyll-admin | lib/jekyll-admin/apiable.rb | JekyllAdmin.APIable.content_fields | def content_fields
output = {}
# Include file content-related fields
if is_a?(Jekyll::StaticFile)
output["encoded_content"] = encoded_content
elsif is_a?(JekyllAdmin::DataFile)
output["content"] = content
output["raw_content"] = raw_content
else
output["raw... | ruby | def content_fields
output = {}
# Include file content-related fields
if is_a?(Jekyll::StaticFile)
output["encoded_content"] = encoded_content
elsif is_a?(JekyllAdmin::DataFile)
output["content"] = content
output["raw_content"] = raw_content
else
output["raw... | [
"def",
"content_fields",
"output",
"=",
"{",
"}",
"# Include file content-related fields",
"if",
"is_a?",
"(",
"Jekyll",
"::",
"StaticFile",
")",
"output",
"[",
"\"encoded_content\"",
"]",
"=",
"encoded_content",
"elsif",
"is_a?",
"(",
"JekyllAdmin",
"::",
"DataFile... | Returns a hash of content fields for inclusion in the API output | [
"Returns",
"a",
"hash",
"of",
"content",
"fields",
"for",
"inclusion",
"in",
"the",
"API",
"output"
] | bc053b3b93faba679e8666091c42c47970e3bb5e | https://github.com/jekyll/jekyll-admin/blob/bc053b3b93faba679e8666091c42c47970e3bb5e/lib/jekyll-admin/apiable.rb#L128-L152 | train | Returns a hash of the content fields for the current page. | [
30522,
13366,
4180,
1035,
4249,
6434,
1027,
1063,
1065,
1001,
2421,
5371,
4180,
1011,
3141,
4249,
2065,
2003,
1035,
1037,
1029,
1006,
15333,
4801,
3363,
1024,
1024,
10763,
8873,
2571,
1007,
6434,
1031,
1000,
12359,
1035,
4180,
1000,
1033,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
aws/aws-sdk-ruby | gems/aws-sdk-iam/lib/aws-sdk-iam/server_certificate.rb | Aws::IAM.ServerCertificate.delete | def delete(options = {})
options = options.merge(server_certificate_name: @name)
resp = @client.delete_server_certificate(options)
resp.data
end | ruby | def delete(options = {})
options = options.merge(server_certificate_name: @name)
resp = @client.delete_server_certificate(options)
resp.data
end | [
"def",
"delete",
"(",
"options",
"=",
"{",
"}",
")",
"options",
"=",
"options",
".",
"merge",
"(",
"server_certificate_name",
":",
"@name",
")",
"resp",
"=",
"@client",
".",
"delete_server_certificate",
"(",
"options",
")",
"resp",
".",
"data",
"end"
] | @!group Actions
@example Request syntax with placeholder values
server_certificate.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/server_certificate.rb#L189-L193 | train | Delete a server certificate | [
30522,
13366,
3972,
12870,
1006,
7047,
1027,
1063,
1065,
1007,
7047,
1027,
7047,
1012,
13590,
1006,
8241,
1035,
8196,
1035,
2171,
1024,
1030,
2171,
1007,
24501,
2361,
1027,
1030,
7396,
1012,
3972,
12870,
1035,
8241,
1035,
8196,
1006,
7047,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_service_fabric/lib/2017-07-01-preview/generated/azure_mgmt_service_fabric/version.rb | Azure::ServiceFabric::Mgmt::V2017_07_01_preview.Version.list_with_http_info | def list_with_http_info(subscription_id, resource_group_name, cluster_name, application_type_name, api_version, custom_headers:nil)
list_async(subscription_id, resource_group_name, cluster_name, application_type_name, api_version, custom_headers:custom_headers).value!
end | ruby | def list_with_http_info(subscription_id, resource_group_name, cluster_name, application_type_name, api_version, custom_headers:nil)
list_async(subscription_id, resource_group_name, cluster_name, application_type_name, api_version, custom_headers:custom_headers).value!
end | [
"def",
"list_with_http_info",
"(",
"subscription_id",
",",
"resource_group_name",
",",
"cluster_name",
",",
"application_type_name",
",",
"api_version",
",",
"custom_headers",
":",
"nil",
")",
"list_async",
"(",
"subscription_id",
",",
"resource_group_name",
",",
"clust... | Returns all versions for the specified application type.
@param subscription_id [String] The customer subscription identifier
@param resource_group_name [String] The name of the resource group.
@param cluster_name [String] The name of the cluster resource
@param application_type_name [String] The name of the appli... | [
"Returns",
"all",
"versions",
"for",
"the",
"specified",
"application",
"type",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_service_fabric/lib/2017-07-01-preview/generated/azure_mgmt_service_fabric/version.rb#L268-L270 | train | Gets the list of all the available applications. | [
30522,
13366,
2862,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
15002,
1035,
8909,
1010,
7692,
1035,
2177,
1035,
2171,
1010,
9324,
1035,
2171,
1010,
4646,
1035,
2828,
1035,
2171,
1010,
17928,
1035,
2544,
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... |
decidim/decidim | decidim-core/app/commands/decidim/search.rb | Decidim.Search.call | def call
search_results = Decidim::Searchable.searchable_resources.inject({}) do |results_by_type, (class_name, klass)|
result_ids = filtered_query_for(class_name).pluck(:resource_id)
results_count = result_ids.count
results = if filters[:resource_type].present? && filters[:resource_type]... | ruby | def call
search_results = Decidim::Searchable.searchable_resources.inject({}) do |results_by_type, (class_name, klass)|
result_ids = filtered_query_for(class_name).pluck(:resource_id)
results_count = result_ids.count
results = if filters[:resource_type].present? && filters[:resource_type]... | [
"def",
"call",
"search_results",
"=",
"Decidim",
"::",
"Searchable",
".",
"searchable_resources",
".",
"inject",
"(",
"{",
"}",
")",
"do",
"|",
"results_by_type",
",",
"(",
"class_name",
",",
"klass",
")",
"|",
"result_ids",
"=",
"filtered_query_for",
"(",
"... | Public: Initializes the command.
@param term: The term to search for.
@param organization: The Organization to which the results are constrained.
@param filters: (optional) A Hash of SearchableResource attributes to filter for.
@param page_params: (optional) A Hash with `page` and `per_page` options to paginate.
... | [
"Public",
":",
"Initializes",
"the",
"command",
"."
] | 6e2b14e559a63088669904e3c5c49a5180700cf7 | https://github.com/decidim/decidim/blob/6e2b14e559a63088669904e3c5c49a5180700cf7/decidim-core/app/commands/decidim/search.rb#L28-L47 | train | Calls the method on the object. | [
30522,
13366,
2655,
3945,
1035,
3463,
1027,
11703,
28173,
2213,
1024,
1024,
3945,
3085,
1012,
3945,
3085,
1035,
4219,
1012,
1999,
20614,
1006,
1063,
1065,
1007,
2079,
1064,
3463,
1035,
2011,
1035,
2828,
1010,
1006,
2465,
1035,
2171,
1010,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
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_apps | def list_web_apps(resource_group_name, name, properties_to_include:nil, custom_headers:nil)
first_page = list_web_apps_as_lazy(resource_group_name, name, properties_to_include:properties_to_include, custom_headers:custom_headers)
first_page.get_all_items
end | ruby | def list_web_apps(resource_group_name, name, properties_to_include:nil, custom_headers:nil)
first_page = list_web_apps_as_lazy(resource_group_name, name, properties_to_include:properties_to_include, custom_headers:custom_headers)
first_page.get_all_items
end | [
"def",
"list_web_apps",
"(",
"resource_group_name",
",",
"name",
",",
"properties_to_include",
":",
"nil",
",",
"custom_headers",
":",
"nil",
")",
"first_page",
"=",
"list_web_apps_as_lazy",
"(",
"resource_group_name",
",",
"name",
",",
"properties_to_include",
":prop... | Get all apps in an App Service Environment.
Get all apps in 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 properties_to_include [String] Comma separated list of app propert... | [
"Get",
"all",
"apps",
"in",
"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#L2750-L2753 | train | Gets all the apps under the specified App Service plan. | [
30522,
13366,
2862,
1035,
4773,
1035,
18726,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2171,
1010,
5144,
1035,
2000,
1035,
2421,
1024,
9152,
2140,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
2034,
1035,
3931,
1027,
2862,
1035,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | 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.disable_partition_backup | def disable_partition_backup(partition_id, timeout:60, custom_headers:nil)
response = disable_partition_backup_async(partition_id, timeout:timeout, custom_headers:custom_headers).value!
nil
end | ruby | def disable_partition_backup(partition_id, timeout:60, custom_headers:nil)
response = disable_partition_backup_async(partition_id, timeout:timeout, custom_headers:custom_headers).value!
nil
end | [
"def",
"disable_partition_backup",
"(",
"partition_id",
",",
"timeout",
":",
"60",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"disable_partition_backup_async",
"(",
"partition_id",
",",
"timeout",
":",
"timeout",
",",
"custom_headers",
":custom_headers",... | Disables periodic backup of Service Fabric partition which was previously
enabled.
Disables periodic backup of partition which was previously enabled. Backup
must be explicitly enabled before it can be disabled.
In case the backup is enabled for the Service Fabric application or service,
which this partition is p... | [
"Disables",
"periodic",
"backup",
"of",
"Service",
"Fabric",
"partition",
"which",
"was",
"previously",
"enabled",
"."
] | 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#L24855-L24858 | train | Disables backup of the specified partition. | [
30522,
13366,
4487,
19150,
1035,
13571,
1035,
10200,
1006,
13571,
1035,
8909,
1010,
2051,
5833,
1024,
3438,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
4487,
19150,
1035,
13571,
1035,
10200,
1035,
2004,
6038,
2278,
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... |
commander-rb/commander | lib/commander/runner.rb | Commander.Runner.program | def program(key, *args, &block)
if key == :help && !args.empty?
@program[:help] ||= {}
@program[:help][args.first] = args.at(1)
elsif key == :help_formatter && !args.empty?
@program[key] = (@help_formatter_aliases[args.first] || args.first)
elsif block
@program[key] = b... | ruby | def program(key, *args, &block)
if key == :help && !args.empty?
@program[:help] ||= {}
@program[:help][args.first] = args.at(1)
elsif key == :help_formatter && !args.empty?
@program[key] = (@help_formatter_aliases[args.first] || args.first)
elsif block
@program[key] = b... | [
"def",
"program",
"(",
"key",
",",
"*",
"args",
",",
"&",
"block",
")",
"if",
"key",
"==",
":help",
"&&",
"!",
"args",
".",
"empty?",
"@program",
"[",
":help",
"]",
"||=",
"{",
"}",
"@program",
"[",
":help",
"]",
"[",
"args",
".",
"first",
"]",
... | Assign program information.
=== Examples
# Set data
program :name, 'Commander'
program :version, Commander::VERSION
program :description, 'Commander utility program.'
program :help, 'Copyright', '2008 TJ Holowaychuk'
program :help, 'Anything', 'You want'
program :int_message 'Bye bye!'
progra... | [
"Assign",
"program",
"information",
"."
] | 332047c14948225462fe60042eed23adfb996d68 | https://github.com/commander-rb/commander/blob/332047c14948225462fe60042eed23adfb996d68/lib/commander/runner.rb#L141-L155 | train | This method is used to set the program for the current page. | [
30522,
13366,
2565,
1006,
3145,
1010,
1008,
12098,
5620,
1010,
1004,
3796,
1007,
2065,
3145,
1027,
1027,
1024,
2393,
1004,
1004,
999,
12098,
5620,
1012,
4064,
1029,
1030,
2565,
1031,
1024,
2393,
1033,
1064,
1064,
1027,
1063,
1065,
1030,
2... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
samvera/hyrax | app/services/hyrax/admin_set_service.rb | Hyrax.AdminSetService.search_results_with_work_count | def search_results_with_work_count(access, join_field: "isPartOf_ssim")
admin_sets = search_results(access)
ids = admin_sets.map(&:id).join(',')
query = "{!terms f=#{join_field}}#{ids}"
results = ActiveFedora::SolrService.instance.conn.get(
ActiveFedora::SolrService.select_path,
... | ruby | def search_results_with_work_count(access, join_field: "isPartOf_ssim")
admin_sets = search_results(access)
ids = admin_sets.map(&:id).join(',')
query = "{!terms f=#{join_field}}#{ids}"
results = ActiveFedora::SolrService.instance.conn.get(
ActiveFedora::SolrService.select_path,
... | [
"def",
"search_results_with_work_count",
"(",
"access",
",",
"join_field",
":",
"\"isPartOf_ssim\"",
")",
"admin_sets",
"=",
"search_results",
"(",
"access",
")",
"ids",
"=",
"admin_sets",
".",
"map",
"(",
":id",
")",
".",
"join",
"(",
"','",
")",
"query",
"... | This performs a two pass query, first getting the AdminSets
and then getting the work and file counts
@param [Symbol] access :read or :edit
@param join_field [String] how are we joining the admin_set ids (by default "isPartOf_ssim")
@return [Array<Hyrax::AdminSetService::SearchResultForWorkCount>] a list with docum... | [
"This",
"performs",
"a",
"two",
"pass",
"query",
"first",
"getting",
"the",
"AdminSets",
"and",
"then",
"getting",
"the",
"work",
"and",
"file",
"counts"
] | e2b4f56e829a53b1f11296324736e9d5b8c9ee5f | https://github.com/samvera/hyrax/blob/e2b4f56e829a53b1f11296324736e9d5b8c9ee5f/app/services/hyrax/admin_set_service.rb#L29-L44 | train | Returns a list of all the work counts for the given access. | [
30522,
13366,
3945,
1035,
3463,
1035,
2007,
1035,
2147,
1035,
4175,
1006,
3229,
1010,
3693,
1035,
2492,
1024,
1000,
2003,
19362,
3406,
2546,
1035,
7020,
5714,
1000,
1007,
4748,
10020,
1035,
4520,
1027,
3945,
1035,
3463,
1006,
3229,
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_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/api_management_services.rb | Azure::ApiManagement::Mgmt::V2016_10_10.ApiManagementServices.begin_manage_deployments | def begin_manage_deployments(resource_group_name, service_name, parameters, custom_headers:nil)
response = begin_manage_deployments_async(resource_group_name, service_name, parameters, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def begin_manage_deployments(resource_group_name, service_name, parameters, custom_headers:nil)
response = begin_manage_deployments_async(resource_group_name, service_name, parameters, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"begin_manage_deployments",
"(",
"resource_group_name",
",",
"service_name",
",",
"parameters",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"begin_manage_deployments_async",
"(",
"resource_group_name",
",",
"service_name",
",",
"parameters",
",",
"cu... | Manages deployments of an API Management service. This operation can be used
to do the following: Change SKU, Change SKU Units, Change Service Tier
(Developer/Standard/Premium) and Manage VPN Configuration. This is a long
running operation and can take several minutes to complete.
@param resource_group_name [Strin... | [
"Manages",
"deployments",
"of",
"an",
"API",
"Management",
"service",
".",
"This",
"operation",
"can",
"be",
"used",
"to",
"do",
"the",
"following",
":",
"Change",
"SKU",
"Change",
"SKU",
"Units",
"Change",
"Service",
"Tier",
"(",
"Developer",
"/",
"Standard... | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/api_management_services.rb#L1102-L1105 | train | Manage the deployments of a service. | [
30522,
13366,
4088,
1035,
6133,
1035,
10813,
2015,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2326,
1035,
2171,
1010,
11709,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
4088,
1035,
6133,
1035,
10813,
2015,
1035,
2004,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | data/azure_service_fabric/lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb | Azure::ServiceFabric::V6_2_0_9.ServiceFabricClientAPIs.update_backup_policy | def update_backup_policy(backup_policy_description, backup_policy_name, timeout:60, custom_headers:nil)
response = update_backup_policy_async(backup_policy_description, backup_policy_name, timeout:timeout, custom_headers:custom_headers).value!
nil
end | ruby | def update_backup_policy(backup_policy_description, backup_policy_name, timeout:60, custom_headers:nil)
response = update_backup_policy_async(backup_policy_description, backup_policy_name, timeout:timeout, custom_headers:custom_headers).value!
nil
end | [
"def",
"update_backup_policy",
"(",
"backup_policy_description",
",",
"backup_policy_name",
",",
"timeout",
":",
"60",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"update_backup_policy_async",
"(",
"backup_policy_description",
",",
"backup_policy_name",
",",
... | Updates the backup policy.
Updates the backup policy identified by {backupPolicyName}
@param backup_policy_description [BackupPolicyDescription] Describes the
backup policy.
@param backup_policy_name [String] The name of the backup policy.
@param timeout [Integer] The server timeout for performing the operation ... | [
"Updates",
"the",
"backup",
"policy",
"."
] | 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#L22839-L22842 | train | Updates the backup policy. | [
30522,
13366,
10651,
1035,
10200,
1035,
3343,
1006,
10200,
1035,
3343,
1035,
6412,
1010,
10200,
1035,
3343,
1035,
2171,
1010,
2051,
5833,
1024,
3438,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
10651,
1035,
10200,
103... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_batch/lib/2017-09-01/generated/azure_mgmt_batch/certificate_operations.rb | Azure::Batch::Mgmt::V2017_09_01.CertificateOperations.list_by_batch_account_next | def list_by_batch_account_next(next_page_link, custom_headers:nil)
response = list_by_batch_account_next_async(next_page_link, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def list_by_batch_account_next(next_page_link, custom_headers:nil)
response = list_by_batch_account_next_async(next_page_link, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"list_by_batch_account_next",
"(",
"next_page_link",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"list_by_batch_account_next_async",
"(",
"next_page_link",
",",
"custom_headers",
":custom_headers",
")",
".",
"value!",
"response",
".",
"body",
"unless... | Lists all of the certificates in the specified account.
@param next_page_link [String] The NextLink from the previous successful call
to List operation.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request.
@return [ListCertificatesResult] operation resul... | [
"Lists",
"all",
"of",
"the",
"certificates",
"in",
"the",
"specified",
"account",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_batch/lib/2017-09-01/generated/azure_mgmt_batch/certificate_operations.rb#L899-L902 | train | Gets the list of all the available advisors. | [
30522,
13366,
2862,
1035,
2011,
1035,
14108,
1035,
4070,
1035,
2279,
1006,
2279,
1035,
3931,
1035,
4957,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
2862,
1035,
2011,
1035,
14108,
1035,
4070,
1035,
2279,
1035,
2004,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
jekyll/jekyll-admin | lib/jekyll-admin/urlable.rb | JekyllAdmin.URLable.api_url | def api_url
@api_url ||= Addressable::URI.new(
:scheme => scheme, :host => host, :port => port,
:path => path_with_base("/_api", resource_path)
).normalize.to_s
end | ruby | def api_url
@api_url ||= Addressable::URI.new(
:scheme => scheme, :host => host, :port => port,
:path => path_with_base("/_api", resource_path)
).normalize.to_s
end | [
"def",
"api_url",
"@api_url",
"||=",
"Addressable",
"::",
"URI",
".",
"new",
"(",
":scheme",
"=>",
"scheme",
",",
":host",
"=>",
"host",
",",
":port",
"=>",
"port",
",",
":path",
"=>",
"path_with_base",
"(",
"\"/_api\"",
",",
"resource_path",
")",
")",
"... | Absolute URL to the API representation of this resource | [
"Absolute",
"URL",
"to",
"the",
"API",
"representation",
"of",
"this",
"resource"
] | bc053b3b93faba679e8666091c42c47970e3bb5e | https://github.com/jekyll/jekyll-admin/blob/bc053b3b93faba679e8666091c42c47970e3bb5e/lib/jekyll-admin/urlable.rb#L17-L22 | train | Returns the API URL for the current resource | [
30522,
13366,
17928,
1035,
24471,
2140,
1030,
17928,
1035,
24471,
2140,
1064,
1064,
1027,
4769,
3085,
1024,
1024,
24471,
2072,
1012,
2047,
1006,
1024,
5679,
1027,
1028,
5679,
1010,
1024,
3677,
1027,
1028,
3677,
1010,
1024,
3417,
1027,
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 | management/azure_mgmt_stor_simple8000_series/lib/2017-06-01/generated/azure_mgmt_stor_simple8000_series/volume_containers.rb | Azure::StorSimple8000Series::Mgmt::V2017_06_01.VolumeContainers.list_metric_definition | def list_metric_definition(device_name, volume_container_name, resource_group_name, manager_name, custom_headers:nil)
response = list_metric_definition_async(device_name, volume_container_name, resource_group_name, manager_name, custom_headers:custom_headers).value!
response.body unless response.nil?
en... | ruby | def list_metric_definition(device_name, volume_container_name, resource_group_name, manager_name, custom_headers:nil)
response = list_metric_definition_async(device_name, volume_container_name, resource_group_name, manager_name, custom_headers:custom_headers).value!
response.body unless response.nil?
en... | [
"def",
"list_metric_definition",
"(",
"device_name",
",",
"volume_container_name",
",",
"resource_group_name",
",",
"manager_name",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"list_metric_definition_async",
"(",
"device_name",
",",
"volume_container_name",
"... | Gets the metric definitions for the specified volume container.
@param device_name [String] The device name
@param volume_container_name [String] The volume container name.
@param resource_group_name [String] The resource group name
@param manager_name [String] The manager name
@param custom_headers [Hash{String ... | [
"Gets",
"the",
"metric",
"definitions",
"for",
"the",
"specified",
"volume",
"container",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_stor_simple8000_series/lib/2017-06-01/generated/azure_mgmt_stor_simple8000_series/volume_containers.rb#L435-L438 | train | Gets the metric definition of the specified volume container. | [
30522,
13366,
2862,
1035,
12046,
1035,
6210,
1006,
5080,
1035,
2171,
1010,
3872,
1035,
11661,
1035,
2171,
1010,
7692,
1035,
2177,
1035,
2171,
1010,
3208,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
2862,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
aws/aws-sdk-ruby | gems/aws-sdk-dynamodb/lib/aws-sdk-dynamodb/table.rb | Aws::DynamoDB.Table.delete | def delete(options = {})
options = options.merge(table_name: @name)
resp = @client.delete_table(options)
resp.data
end | ruby | def delete(options = {})
options = options.merge(table_name: @name)
resp = @client.delete_table(options)
resp.data
end | [
"def",
"delete",
"(",
"options",
"=",
"{",
"}",
")",
"options",
"=",
"options",
".",
"merge",
"(",
"table_name",
":",
"@name",
")",
"resp",
"=",
"@client",
".",
"delete_table",
"(",
"options",
")",
"resp",
".",
"data",
"end"
] | @!group Actions
@example Request syntax with placeholder values
table.delete()
@param [Hash] options ({})
@return [Types::DeleteTableOutput] | [
"@!group",
"Actions",
"@example",
"Request",
"syntax",
"with",
"placeholder",
"values"
] | e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d | https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-dynamodb/lib/aws-sdk-dynamodb/table.rb#L450-L454 | train | Delete the table | [
30522,
13366,
3972,
12870,
1006,
7047,
1027,
1063,
1065,
1007,
7047,
1027,
7047,
1012,
13590,
1006,
2795,
1035,
2171,
1024,
1030,
2171,
1007,
24501,
2361,
1027,
1030,
7396,
1012,
3972,
12870,
1035,
2795,
1006,
7047,
1007,
24501,
2361,
1012,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_policy_insights/lib/2018-07-01-preview/generated/azure_mgmt_policy_insights/remediations.rb | Azure::PolicyInsights::Mgmt::V2018_07_01_preview.Remediations.list_deployments_at_resource_with_http_info | def list_deployments_at_resource_with_http_info(resource_id, remediation_name, query_options:nil, custom_headers:nil)
list_deployments_at_resource_async(resource_id, remediation_name, query_options:query_options, custom_headers:custom_headers).value!
end | ruby | def list_deployments_at_resource_with_http_info(resource_id, remediation_name, query_options:nil, custom_headers:nil)
list_deployments_at_resource_async(resource_id, remediation_name, query_options:query_options, custom_headers:custom_headers).value!
end | [
"def",
"list_deployments_at_resource_with_http_info",
"(",
"resource_id",
",",
"remediation_name",
",",
"query_options",
":",
"nil",
",",
"custom_headers",
":",
"nil",
")",
"list_deployments_at_resource_async",
"(",
"resource_id",
",",
"remediation_name",
",",
"query_option... | Gets all deployments for a remediation at resource scope.
@param resource_id [String] Resource ID.
@param remediation_name [String] The name of the remediation.
@param query_options [QueryOptions] Additional parameters for the operation
@param custom_headers [Hash{String => String}] A hash of custom headers that
... | [
"Gets",
"all",
"deployments",
"for",
"a",
"remediation",
"at",
"resource",
"scope",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_policy_insights/lib/2018-07-01-preview/generated/azure_mgmt_policy_insights/remediations.rb#L1788-L1790 | train | Gets the list of deployments at resource scope. | [
30522,
13366,
2862,
1035,
10813,
2015,
1035,
2012,
1035,
7692,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
8909,
1010,
2128,
16969,
3508,
1035,
2171,
1010,
23032,
1035,
7047,
1024,
9152,
2140,
1010,
7661,
1035,
20346,
2015,
1024,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_redis/lib/2017-10-01/generated/azure_mgmt_redis/linked_server.rb | Azure::Redis::Mgmt::V2017_10_01.LinkedServer.list | def list(resource_group_name, name, custom_headers:nil)
first_page = list_as_lazy(resource_group_name, name, custom_headers:custom_headers)
first_page.get_all_items
end | ruby | def list(resource_group_name, name, custom_headers:nil)
first_page = list_as_lazy(resource_group_name, name, custom_headers:custom_headers)
first_page.get_all_items
end | [
"def",
"list",
"(",
"resource_group_name",
",",
"name",
",",
"custom_headers",
":",
"nil",
")",
"first_page",
"=",
"list_as_lazy",
"(",
"resource_group_name",
",",
"name",
",",
"custom_headers",
":custom_headers",
")",
"first_page",
".",
"get_all_items",
"end"
] | Gets the list of linked servers associated with this redis cache (requires
Premium SKU).
@param resource_group_name [String] The name of the resource group.
@param name [String] The name of the redis cache.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP requ... | [
"Gets",
"the",
"list",
"of",
"linked",
"servers",
"associated",
"with",
"this",
"redis",
"cache",
"(",
"requires",
"Premium",
"SKU",
")",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_redis/lib/2017-10-01/generated/azure_mgmt_redis/linked_server.rb#L272-L275 | train | Gets all the elastic advisor information. | [
30522,
13366,
2862,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
2034,
1035,
3931,
1027,
2862,
1035,
2004,
1035,
13971,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2171,
1010,
7661,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | data/azure_cognitiveservices_luisauthoring/lib/2.0/generated/azure_cognitiveservices_luisauthoring/model.rb | Azure::CognitiveServices::LuisAuthoring::V2_0.Model.list_hierarchical_entity_roles | def list_hierarchical_entity_roles(app_id, version_id, h_entity_id, custom_headers:nil)
response = list_hierarchical_entity_roles_async(app_id, version_id, h_entity_id, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def list_hierarchical_entity_roles(app_id, version_id, h_entity_id, custom_headers:nil)
response = list_hierarchical_entity_roles_async(app_id, version_id, h_entity_id, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"list_hierarchical_entity_roles",
"(",
"app_id",
",",
"version_id",
",",
"h_entity_id",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"list_hierarchical_entity_roles_async",
"(",
"app_id",
",",
"version_id",
",",
"h_entity_id",
",",
"custom_headers",
... | Get all roles for a hierarchical entity in a version of the application
@param app_id The application ID.
@param version_id [String] The version ID.
@param h_entity_id The hierarchical entity extractor ID.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP reque... | [
"Get",
"all",
"roles",
"for",
"a",
"hierarchical",
"entity",
"in",
"a",
"version",
"of",
"the",
"application"
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_cognitiveservices_luisauthoring/lib/2.0/generated/azure_cognitiveservices_luisauthoring/model.rb#L7492-L7495 | train | Gets the roles of the specified hierarchical entity. | [
30522,
13366,
2862,
1035,
25835,
1035,
9178,
1035,
4395,
1006,
10439,
1035,
8909,
1010,
2544,
1035,
8909,
1010,
1044,
1035,
9178,
1035,
8909,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
2862,
1035,
25835,
1035,
9178,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_network/lib/2018-01-01/generated/azure_mgmt_network/inbound_nat_rules.rb | Azure::Network::Mgmt::V2018_01_01.InboundNatRules.begin_delete_with_http_info | def begin_delete_with_http_info(resource_group_name, load_balancer_name, inbound_nat_rule_name, custom_headers:nil)
begin_delete_async(resource_group_name, load_balancer_name, inbound_nat_rule_name, custom_headers:custom_headers).value!
end | ruby | def begin_delete_with_http_info(resource_group_name, load_balancer_name, inbound_nat_rule_name, custom_headers:nil)
begin_delete_async(resource_group_name, load_balancer_name, inbound_nat_rule_name, custom_headers:custom_headers).value!
end | [
"def",
"begin_delete_with_http_info",
"(",
"resource_group_name",
",",
"load_balancer_name",
",",
"inbound_nat_rule_name",
",",
"custom_headers",
":",
"nil",
")",
"begin_delete_async",
"(",
"resource_group_name",
",",
"load_balancer_name",
",",
"inbound_nat_rule_name",
",",
... | Deletes the specified load balancer inbound nat rule.
@param resource_group_name [String] The name of the resource group.
@param load_balancer_name [String] The name of the load balancer.
@param inbound_nat_rule_name [String] The name of the inbound nat rule.
@param custom_headers [Hash{String => String}] A hash o... | [
"Deletes",
"the",
"specified",
"load",
"balancer",
"inbound",
"nat",
"rule",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_network/lib/2018-01-01/generated/azure_mgmt_network/inbound_nat_rules.rb#L329-L331 | train | Deletes the specified load balancer inbound nat rule. | [
30522,
13366,
4088,
1035,
3972,
12870,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
7170,
1035,
5703,
2099,
1035,
2171,
1010,
1999,
15494,
1035,
14085,
1035,
3627,
1035,
2171,
1010,
7661,
1035,
20346,
2015,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
googleapis/google-cloud-ruby | google-cloud-translate/lib/google-cloud-translate.rb | Google.Cloud.translate | def translate key = nil, scope: nil, retries: nil, timeout: nil
Google::Cloud.translate key, project_id: @project, credentials: @keyfile,
scope: scope,
retries: (retries || @retries),
timeout: (timeout || @tim... | ruby | def translate key = nil, scope: nil, retries: nil, timeout: nil
Google::Cloud.translate key, project_id: @project, credentials: @keyfile,
scope: scope,
retries: (retries || @retries),
timeout: (timeout || @tim... | [
"def",
"translate",
"key",
"=",
"nil",
",",
"scope",
":",
"nil",
",",
"retries",
":",
"nil",
",",
"timeout",
":",
"nil",
"Google",
"::",
"Cloud",
".",
"translate",
"key",
",",
"project_id",
":",
"@project",
",",
"credentials",
":",
"@keyfile",
",",
"sc... | Creates a new object for connecting to the Cloud Translation API. Each
call creates a new connection.
Like other Cloud Platform services, Google Cloud Translation API supports
authentication using a project ID and OAuth 2.0 credentials. In addition,
it supports authentication using a public API access key. (If bot... | [
"Creates",
"a",
"new",
"object",
"for",
"connecting",
"to",
"the",
"Cloud",
"Translation",
"API",
".",
"Each",
"call",
"creates",
"a",
"new",
"connection",
"."
] | 846c1a57250ac860ef4de1b54853a480ab2ff702 | https://github.com/googleapis/google-cloud-ruby/blob/846c1a57250ac860ef4de1b54853a480ab2ff702/google-cloud-translate/lib/google-cloud-translate.rb#L74-L79 | train | Translate the content of the image. | [
30522,
13366,
17637,
3145,
1027,
9152,
2140,
1010,
9531,
1024,
9152,
2140,
1010,
2128,
21011,
1024,
9152,
2140,
1010,
2051,
5833,
1024,
9152,
2140,
8224,
1024,
1024,
6112,
1012,
17637,
3145,
1010,
2622,
1035,
8909,
1024,
1030,
2622,
1010,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
meew0/discordrb | lib/discordrb/bot.rb | Discordrb.Bot.add_await! | def add_await!(type, attributes = {})
raise "You can't await an AwaitEvent!" if type == Discordrb::Events::AwaitEvent
timeout = attributes[:timeout]
raise ArgumentError, 'Timeout must be a number > 0' if timeout&.is_a?(Numeric) && !timeout&.positive?
mutex = Mutex.new
cv = ConditionVaria... | ruby | def add_await!(type, attributes = {})
raise "You can't await an AwaitEvent!" if type == Discordrb::Events::AwaitEvent
timeout = attributes[:timeout]
raise ArgumentError, 'Timeout must be a number > 0' if timeout&.is_a?(Numeric) && !timeout&.positive?
mutex = Mutex.new
cv = ConditionVaria... | [
"def",
"add_await!",
"(",
"type",
",",
"attributes",
"=",
"{",
"}",
")",
"raise",
"\"You can't await an AwaitEvent!\"",
"if",
"type",
"==",
"Discordrb",
"::",
"Events",
"::",
"AwaitEvent",
"timeout",
"=",
"attributes",
"[",
":timeout",
"]",
"raise",
"ArgumentErr... | Awaits an event, blocking the current thread until a response is received.
@param type [Class] The event class that should be listened for.
@option attributes [Numeric] :timeout the amount of time to wait for a response before returning `nil`. Waits forever if omitted.
@return [Event, nil] The event object that was ... | [
"Awaits",
"an",
"event",
"blocking",
"the",
"current",
"thread",
"until",
"a",
"response",
"is",
"received",
"."
] | 764298a1ff0be69a1853b510d736f21c2b91a2fe | https://github.com/meew0/discordrb/blob/764298a1ff0be69a1853b510d736f21c2b91a2fe/lib/discordrb/bot.rb#L619-L650 | train | Add a await event to the event queue. | [
30522,
13366,
5587,
1035,
26751,
999,
1006,
2828,
1010,
30524,
29165,
1010,
1005,
2051,
5833,
2442,
2022,
1037,
2193,
1028,
1014,
1005,
2065,
2051,
5833,
1004,
1012,
2003,
1035,
1037,
1029,
1006,
16371,
25531,
1007,
1004,
1004,
999,
2051,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
github/licensed | lib/licensed/configuration.rb | Licensed.AppConfiguration.enabled? | def enabled?(source_type)
# the default is false if any sources are set to true, true otherwise
default = !self["sources"].any? { |_, enabled| enabled }
self["sources"].fetch(source_type, default)
end | ruby | def enabled?(source_type)
# the default is false if any sources are set to true, true otherwise
default = !self["sources"].any? { |_, enabled| enabled }
self["sources"].fetch(source_type, default)
end | [
"def",
"enabled?",
"(",
"source_type",
")",
"# the default is false if any sources are set to true, true otherwise",
"default",
"=",
"!",
"self",
"[",
"\"sources\"",
"]",
".",
"any?",
"{",
"|",
"_",
",",
"enabled",
"|",
"enabled",
"}",
"self",
"[",
"\"sources\"",
... | Returns whether a source type is enabled | [
"Returns",
"whether",
"a",
"source",
"type",
"is",
"enabled"
] | afba288df344e001d43e94ad9217635a011b79c2 | https://github.com/github/licensed/blob/afba288df344e001d43e94ad9217635a011b79c2/lib/licensed/configuration.rb#L65-L69 | train | Returns whether or not the source type is enabled | [
30522,
13366,
9124,
1029,
1006,
3120,
1035,
2828,
1007,
1001,
1996,
12398,
2003,
6270,
2065,
2151,
4216,
2024,
2275,
2000,
2995,
1010,
2995,
4728,
12398,
1027,
999,
2969,
1031,
1000,
4216,
1000,
1033,
1012,
2151,
1029,
1063,
1064,
1035,
1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_web/lib/2015-08-01/generated/azure_mgmt_web/app_service_certificate_orders.rb | Azure::Web::Mgmt::V2015_08_01.AppServiceCertificateOrders.begin_create_or_update | def begin_create_or_update(resource_group_name, certificate_order_name, certificate_distinguished_name, custom_headers:nil)
response = begin_create_or_update_async(resource_group_name, certificate_order_name, certificate_distinguished_name, custom_headers:custom_headers).value!
response.body unless response... | ruby | def begin_create_or_update(resource_group_name, certificate_order_name, certificate_distinguished_name, custom_headers:nil)
response = begin_create_or_update_async(resource_group_name, certificate_order_name, certificate_distinguished_name, custom_headers:custom_headers).value!
response.body unless response... | [
"def",
"begin_create_or_update",
"(",
"resource_group_name",
",",
"certificate_order_name",
",",
"certificate_distinguished_name",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"begin_create_or_update_async",
"(",
"resource_group_name",
",",
"certificate_order_name",... | Create or update a certificate purchase order.
Create or update a certificate purchase order.
@param resource_group_name [String] Name of the resource group to which the
resource belongs.
@param certificate_order_name [String] Name of the certificate order.
@param certificate_distinguished_name [AppServiceCertif... | [
"Create",
"or",
"update",
"a",
"certificate",
"purchase",
"order",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_web/lib/2015-08-01/generated/azure_mgmt_web/app_service_certificate_orders.rb#L2052-L2055 | train | Creates or updates a certificate order or certificate distinguished name. | [
30522,
13366,
4088,
1035,
3443,
1035,
2030,
1035,
10651,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
8196,
1035,
2344,
1035,
2171,
1010,
8196,
1035,
5182,
1035,
2171,
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... |
decidim/decidim | decidim-core/app/services/decidim/action_logger.rb | Decidim.ActionLogger.extra_data | def extra_data
{
component: {
manifest_name: component.try(:manifest_name),
title: title_for(component)
}.compact,
participatory_space: {
manifest_name: participatory_space_manifest_name,
title: title_for(participatory_space)
}.compact,
... | ruby | def extra_data
{
component: {
manifest_name: component.try(:manifest_name),
title: title_for(component)
}.compact,
participatory_space: {
manifest_name: participatory_space_manifest_name,
title: title_for(participatory_space)
}.compact,
... | [
"def",
"extra_data",
"{",
"component",
":",
"{",
"manifest_name",
":",
"component",
".",
"try",
"(",
":manifest_name",
")",
",",
"title",
":",
"title_for",
"(",
"component",
")",
"}",
".",
"compact",
",",
"participatory_space",
":",
"{",
"manifest_name",
":"... | Private: Defines some extra data that will be saved in the action log `extra`
field.
Returns a Hash. | [
"Private",
":",
"Defines",
"some",
"extra",
"data",
"that",
"will",
"be",
"saved",
"in",
"the",
"action",
"log",
"extra",
"field",
"."
] | 6e2b14e559a63088669904e3c5c49a5180700cf7 | https://github.com/decidim/decidim/blob/6e2b14e559a63088669904e3c5c49a5180700cf7/decidim-core/app/services/decidim/action_logger.rb#L101-L120 | train | Returns extra data for the object | [
30522,
13366,
4469,
1035,
2951,
1063,
6922,
1024,
1063,
19676,
1035,
2171,
1024,
6922,
1012,
3046,
1006,
1024,
19676,
1035,
2171,
1007,
1010,
2516,
1024,
2516,
1035,
2005,
1006,
6922,
1007,
1065,
1012,
9233,
1010,
2112,
28775,
4502,
7062,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
watir/watir | lib/watir/js_execution.rb | Watir.JSExecution.fire_event | def fire_event(event_name)
event_name = event_name.to_s.sub(/^on/, '').downcase
element_call { execute_js :fireEvent, @element, event_name }
end | ruby | def fire_event(event_name)
event_name = event_name.to_s.sub(/^on/, '').downcase
element_call { execute_js :fireEvent, @element, event_name }
end | [
"def",
"fire_event",
"(",
"event_name",
")",
"event_name",
"=",
"event_name",
".",
"to_s",
".",
"sub",
"(",
"/",
"/",
",",
"''",
")",
".",
"downcase",
"element_call",
"{",
"execute_js",
":fireEvent",
",",
"@element",
",",
"event_name",
"}",
"end"
] | Simulates JavaScript events on element.
Note that you may omit "on" from event name.
@example
browser.button(name: "new_user_button").fire_event :click
browser.button(name: "new_user_button").fire_event "mousemove"
browser.button(name: "new_user_button").fire_event "onmouseover"
@param [String, Symbol] ev... | [
"Simulates",
"JavaScript",
"events",
"on",
"element",
".",
"Note",
"that",
"you",
"may",
"omit",
"on",
"from",
"event",
"name",
"."
] | 2d8db09811c6221ae401b85b2f61f5fa66e463a3 | https://github.com/watir/watir/blob/2d8db09811c6221ae401b85b2f61f5fa66e463a3/lib/watir/js_execution.rb#L22-L26 | train | Fire an event on the element. | [
30522,
13366,
2543,
1035,
2724,
1006,
30524,
2655,
1063,
15389,
1035,
1046,
2015,
1024,
2543,
18697,
3372,
1010,
1030,
5783,
1010,
2724,
1035,
2171,
1065,
2203,
102,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/role.rb | Aws::IAM.Role.delete | def delete(options = {})
options = options.merge(role_name: @name)
resp = @client.delete_role(options)
resp.data
end | ruby | def delete(options = {})
options = options.merge(role_name: @name)
resp = @client.delete_role(options)
resp.data
end | [
"def",
"delete",
"(",
"options",
"=",
"{",
"}",
")",
"options",
"=",
"options",
".",
"merge",
"(",
"role_name",
":",
"@name",
")",
"resp",
"=",
"@client",
".",
"delete_role",
"(",
"options",
")",
"resp",
".",
"data",
"end"
] | @example Request syntax with placeholder values
role.delete()
@param [Hash] options ({})
@return [EmptyStructure] | [
"@example",
"Request",
"syntax",
"with",
"placeholder",
"values"
] | e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d | https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-iam/lib/aws-sdk-iam/role.rb#L286-L290 | train | Delete a role | [
30522,
13366,
3972,
12870,
1006,
7047,
1027,
1063,
1065,
1007,
7047,
1027,
7047,
1012,
13590,
1006,
2535,
1035,
2171,
1024,
1030,
2171,
1007,
24501,
2361,
1027,
1030,
7396,
1012,
3972,
12870,
1035,
2535,
1006,
7047,
1007,
24501,
2361,
1012,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
aws/aws-sdk-ruby | gems/aws-sdk-iam/lib/aws-sdk-iam/user.rb | Aws::IAM.User.update | def update(options = {})
options = options.merge(user_name: @name)
resp = @client.update_user(options)
User.new(
name: options[:new_user_name],
client: @client
)
end | ruby | def update(options = {})
options = options.merge(user_name: @name)
resp = @client.update_user(options)
User.new(
name: options[:new_user_name],
client: @client
)
end | [
"def",
"update",
"(",
"options",
"=",
"{",
"}",
")",
"options",
"=",
"options",
".",
"merge",
"(",
"user_name",
":",
"@name",
")",
"resp",
"=",
"@client",
".",
"update_user",
"(",
"options",
")",
"User",
".",
"new",
"(",
"name",
":",
"options",
"[",
... | @example Request syntax with placeholder values
user = user.update({
new_path: "pathType",
new_user_name: "userNameType",
})
@param [Hash] options ({})
@option options [String] :new_path
New path for the IAM user. Include this parameter only if you're
changing the user's path.
This paramete... | [
"@example",
"Request",
"syntax",
"with",
"placeholder",
"values"
] | e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d | https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-iam/lib/aws-sdk-iam/user.rb#L656-L663 | train | Update the user | [
30522,
13366,
10651,
1006,
7047,
1027,
1063,
1065,
1007,
7047,
1027,
7047,
1012,
13590,
1006,
5310,
1035,
2171,
1024,
1030,
2171,
1007,
24501,
2361,
1027,
1030,
7396,
1012,
10651,
1035,
5310,
1006,
7047,
1007,
5310,
1012,
2047,
1006,
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... |
danger/danger | lib/danger/plugin_support/plugin_linter.rb | Danger.PluginLinter.apply_rules | def apply_rules(json, type, rules)
rules.each do |rule|
next unless rule.function.call(json)
rule.metadata = json
rule.type = type
case rule.modifier
when :warning
warnings << rule
when :error
errors << rule
end
end
end | ruby | def apply_rules(json, type, rules)
rules.each do |rule|
next unless rule.function.call(json)
rule.metadata = json
rule.type = type
case rule.modifier
when :warning
warnings << rule
when :error
errors << rule
end
end
end | [
"def",
"apply_rules",
"(",
"json",
",",
"type",
",",
"rules",
")",
"rules",
".",
"each",
"do",
"|",
"rule",
"|",
"next",
"unless",
"rule",
".",
"function",
".",
"call",
"(",
"json",
")",
"rule",
".",
"metadata",
"=",
"json",
"rule",
".",
"type",
"=... | Runs the rule, if it fails then additional metadata
is added to the rule (for printing later) and it's
added to either `warnings` or `errors`. | [
"Runs",
"the",
"rule",
"if",
"it",
"fails",
"then",
"additional",
"metadata",
"is",
"added",
"to",
"the",
"rule",
"(",
"for",
"printing",
"later",
")",
"and",
"it",
"s",
"added",
"to",
"either",
"warnings",
"or",
"errors",
"."
] | 0d6d09f2d949c287fe75202d947374042b0679f4 | https://github.com/danger/danger/blob/0d6d09f2d949c287fe75202d947374042b0679f4/lib/danger/plugin_support/plugin_linter.rb#L146-L159 | train | Apply rules to the given JSON | [
30522,
13366,
6611,
1035,
3513,
1006,
1046,
3385,
1010,
2828,
1010,
3513,
1007,
3513,
1012,
2169,
2079,
1064,
3627,
1064,
2279,
4983,
3627,
1012,
3853,
1012,
2655,
1006,
1046,
3385,
1007,
3627,
1012,
27425,
1027,
1046,
3385,
3627,
1012,
2... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
appium/ruby_lib | lib/appium_lib/driver.rb | Appium.Driver.set_wait | def set_wait(timeout = nil)
timeout = @core.default_wait if timeout.nil?
@driver.manage.timeouts.implicit_wait = timeout
end | ruby | def set_wait(timeout = nil)
timeout = @core.default_wait if timeout.nil?
@driver.manage.timeouts.implicit_wait = timeout
end | [
"def",
"set_wait",
"(",
"timeout",
"=",
"nil",
")",
"timeout",
"=",
"@core",
".",
"default_wait",
"if",
"timeout",
".",
"nil?",
"@driver",
".",
"manage",
".",
"timeouts",
".",
"implicit_wait",
"=",
"timeout",
"end"
] | Set implicit wait. Default to @core.default_wait.
@example
set_wait 2
set_wait # @core.default_wait
@param timeout [Integer] the timeout in seconds
@return [void] | [
"Set",
"implicit",
"wait",
".",
"Default",
"to",
"@core",
".",
"default_wait",
"."
] | 1f5898400dd1928bfe42ddd5f842d1f8738f2f76 | https://github.com/appium/ruby_lib/blob/1f5898400dd1928bfe42ddd5f842d1f8738f2f76/lib/appium_lib/driver.rb#L586-L589 | train | Set the wait time for the operation to complete | [
30522,
13366,
2275,
1035,
3524,
1006,
2051,
5833,
1027,
9152,
2140,
1007,
2051,
5833,
1027,
1030,
4563,
1012,
12398,
1035,
3524,
2065,
2051,
5833,
1012,
9152,
2140,
1029,
1030,
4062,
1012,
6133,
1012,
2051,
12166,
1012,
24655,
1035,
3524,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
rollbar/rollbar-gem | lib/rollbar/notifier.rb | Rollbar.Notifier.build_item | def build_item(level, message, exception, extra, context)
options = {
:level => level,
:message => message,
:exception => exception,
:extra => extra,
:configuration => configuration,
:logger => logger,
:scope => scope_object,
:notifier => self,
... | ruby | def build_item(level, message, exception, extra, context)
options = {
:level => level,
:message => message,
:exception => exception,
:extra => extra,
:configuration => configuration,
:logger => logger,
:scope => scope_object,
:notifier => self,
... | [
"def",
"build_item",
"(",
"level",
",",
"message",
",",
"exception",
",",
"extra",
",",
"context",
")",
"options",
"=",
"{",
":level",
"=>",
"level",
",",
":message",
"=>",
"message",
",",
":exception",
"=>",
"exception",
",",
":extra",
"=>",
"extra",
",... | Payload building functions | [
"Payload",
"building",
"functions"
] | 83ef1acca2b0b1d1b74ff8ef29435ca82e8ca1d6 | https://github.com/rollbar/rollbar-gem/blob/83ef1acca2b0b1d1b74ff8ef29435ca82e8ca1d6/lib/rollbar/notifier.rb#L476-L493 | train | Build an item | [
30522,
13366,
3857,
1035,
8875,
1006,
2504,
1010,
4471,
1010,
6453,
1010,
4469,
1010,
6123,
1007,
7047,
1027,
1063,
1024,
2504,
1027,
1028,
2504,
1010,
1024,
4471,
1027,
1028,
4471,
1010,
1024,
6453,
1027,
1028,
6453,
1010,
1024,
4469,
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... |
decidim/decidim | decidim-core/lib/decidim/form_builder.rb | Decidim.FormBuilder.social_field | def social_field(type, name, handlers, options = {})
tabs_id = sanitize_tabs_selector(options[:tabs_id] || "#{object_name}-#{name}-tabs")
label_tabs = content_tag(:div, class: "label--tabs") do
field_label = label_i18n(name, options[:label] || label_for(name))
tabs_panels = "".html_safe
... | ruby | def social_field(type, name, handlers, options = {})
tabs_id = sanitize_tabs_selector(options[:tabs_id] || "#{object_name}-#{name}-tabs")
label_tabs = content_tag(:div, class: "label--tabs") do
field_label = label_i18n(name, options[:label] || label_for(name))
tabs_panels = "".html_safe
... | [
"def",
"social_field",
"(",
"type",
",",
"name",
",",
"handlers",
",",
"options",
"=",
"{",
"}",
")",
"tabs_id",
"=",
"sanitize_tabs_selector",
"(",
"options",
"[",
":tabs_id",
"]",
"||",
"\"#{object_name}-#{name}-tabs\"",
")",
"label_tabs",
"=",
"content_tag",
... | Public: Generates an form field for each social.
type - The form field's type, like `text_area` or `text_input`
name - The name of the field
handlers - The social handlers to be created
options - The set of options to send to the field
Renders form fields for each locale. | [
"Public",
":",
"Generates",
"an",
"form",
"field",
"for",
"each",
"social",
"."
] | 6e2b14e559a63088669904e3c5c49a5180700cf7 | https://github.com/decidim/decidim/blob/6e2b14e559a63088669904e3c5c49a5180700cf7/decidim-core/lib/decidim/form_builder.rb#L114-L146 | train | Creates a social field with the given name and handlers. | [
30522,
13366,
2591,
1035,
2492,
1006,
2828,
1010,
2171,
1010,
28213,
2015,
1010,
7047,
1027,
1063,
1065,
1007,
21628,
2015,
1035,
8909,
1027,
2624,
25090,
4371,
1035,
21628,
2015,
1035,
27000,
1006,
7047,
1031,
1024,
21628,
2015,
1035,
8909... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_hdinsight/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/script_actions.rb | Azure::Hdinsight::Mgmt::V2015_03_01_preview.ScriptActions.delete_with_http_info | def delete_with_http_info(resource_group_name, cluster_name, script_name, custom_headers:nil)
delete_async(resource_group_name, cluster_name, script_name, custom_headers:custom_headers).value!
end | ruby | def delete_with_http_info(resource_group_name, cluster_name, script_name, custom_headers:nil)
delete_async(resource_group_name, cluster_name, script_name, custom_headers:custom_headers).value!
end | [
"def",
"delete_with_http_info",
"(",
"resource_group_name",
",",
"cluster_name",
",",
"script_name",
",",
"custom_headers",
":",
"nil",
")",
"delete_async",
"(",
"resource_group_name",
",",
"cluster_name",
",",
"script_name",
",",
"custom_headers",
":custom_headers",
")... | Deletes a specified persisted script action of the cluster.
@param resource_group_name [String] The name of the resource group.
@param cluster_name [String] The name of the cluster.
@param script_name [String] The name of the script.
@param custom_headers [Hash{String => String}] A hash of custom headers that
wil... | [
"Deletes",
"a",
"specified",
"persisted",
"script",
"action",
"of",
"the",
"cluster",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_hdinsight/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/script_actions.rb#L50-L52 | train | Deletes the specified script from the specified cluster. | [
30522,
13366,
3972,
12870,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
9324,
1035,
2171,
1010,
5896,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3972,
12870,
1035,
2004,
6038,
2278,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/job_executions.rb | Azure::SQL::Mgmt::V2017_03_01_preview.JobExecutions.begin_create_or_update_with_http_info | def begin_create_or_update_with_http_info(resource_group_name, server_name, job_agent_name, job_name, job_execution_id, custom_headers:nil)
begin_create_or_update_async(resource_group_name, server_name, job_agent_name, job_name, job_execution_id, custom_headers:custom_headers).value!
end | ruby | def begin_create_or_update_with_http_info(resource_group_name, server_name, job_agent_name, job_name, job_execution_id, custom_headers:nil)
begin_create_or_update_async(resource_group_name, server_name, job_agent_name, job_name, job_execution_id, custom_headers:custom_headers).value!
end | [
"def",
"begin_create_or_update_with_http_info",
"(",
"resource_group_name",
",",
"server_name",
",",
"job_agent_name",
",",
"job_name",
",",
"job_execution_id",
",",
"custom_headers",
":",
"nil",
")",
"begin_create_or_update_async",
"(",
"resource_group_name",
",",
"server_... | Creates or updates a job execution.
@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 job_agent_name [String] The name of the job age... | [
"Creates",
"or",
"updates",
"a",
"job",
"execution",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/job_executions.rb#L763-L765 | train | Creates or updates a job execution. | [
30522,
13366,
4088,
1035,
3443,
1035,
2030,
1035,
10651,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
8241,
1035,
2171,
1010,
3105,
1035,
4005,
1035,
2171,
1010,
3105,
1035,
2171,
1010,
3105,
1035,
7781,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/fixtures.rb | ActiveRecord.FixtureSet.table_rows | def table_rows
# allow a standard key to be used for doing defaults in YAML
fixtures.delete("DEFAULTS")
TableRows.new(
table_name,
model_class: model_class,
fixtures: fixtures,
config: config,
).to_hash
end | ruby | def table_rows
# allow a standard key to be used for doing defaults in YAML
fixtures.delete("DEFAULTS")
TableRows.new(
table_name,
model_class: model_class,
fixtures: fixtures,
config: config,
).to_hash
end | [
"def",
"table_rows",
"# allow a standard key to be used for doing defaults in YAML",
"fixtures",
".",
"delete",
"(",
"\"DEFAULTS\"",
")",
"TableRows",
".",
"new",
"(",
"table_name",
",",
"model_class",
":",
"model_class",
",",
"fixtures",
":",
"fixtures",
",",
"config",... | Returns a hash of rows to be inserted. The key is the table, the value is
a list of rows to insert to that table. | [
"Returns",
"a",
"hash",
"of",
"rows",
"to",
"be",
"inserted",
".",
"The",
"key",
"is",
"the",
"table",
"the",
"value",
"is",
"a",
"list",
"of",
"rows",
"to",
"insert",
"to",
"that",
"table",
"."
] | 85a8bc644be69908f05740a5886ec19cd3679df5 | https://github.com/rails/rails/blob/85a8bc644be69908f05740a5886ec19cd3679df5/activerecord/lib/active_record/fixtures.rb#L651-L661 | train | Returns the table rows in the current object. | [
30522,
13366,
2795,
1035,
10281,
1001,
3499,
1037,
3115,
3145,
2000,
2022,
2109,
2005,
2725,
12398,
2015,
1999,
8038,
19968,
17407,
1012,
3972,
12870,
1006,
1000,
12398,
2015,
1000,
1007,
2795,
10524,
2015,
1012,
2047,
1006,
2795,
1035,
217... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
troessner/reek | lib/reek/context_builder.rb | Reek.ContextBuilder.process_defs | def process_defs(exp, parent)
inside_new_context(Context::SingletonMethodContext, exp, parent) do
increase_statement_count_by(exp.body)
process(exp)
end
end | ruby | def process_defs(exp, parent)
inside_new_context(Context::SingletonMethodContext, exp, parent) do
increase_statement_count_by(exp.body)
process(exp)
end
end | [
"def",
"process_defs",
"(",
"exp",
",",
"parent",
")",
"inside_new_context",
"(",
"Context",
"::",
"SingletonMethodContext",
",",
"exp",
",",
"parent",
")",
"do",
"increase_statement_count_by",
"(",
"exp",
".",
"body",
")",
"process",
"(",
"exp",
")",
"end",
... | Handles `defs` nodes ("define singleton").
An input example that would trigger this method would be:
def self.call_me; foo = 2; bar = 5; end
Given the above example we would count 2 statements overall. | [
"Handles",
"defs",
"nodes",
"(",
"define",
"singleton",
")",
"."
] | 8c6b5c0c6228a6981ab48543457889f9ea984054 | https://github.com/troessner/reek/blob/8c6b5c0c6228a6981ab48543457889f9ea984054/lib/reek/context_builder.rb#L138-L143 | train | Process definitions | [
30522,
13366,
2832,
1035,
13366,
2015,
1006,
4654,
2361,
1010,
6687,
1007,
2503,
1035,
2047,
1035,
6123,
1006,
6123,
1024,
1024,
28159,
11368,
6806,
16409,
28040,
18413,
1010,
4654,
2361,
1010,
6687,
1007,
2079,
3623,
1035,
4861,
1035,
4175... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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.