repo stringclasses 235
values | path stringlengths 11 168 | func_name stringlengths 12 143 | original_string stringlengths 83 6.91k | language stringclasses 1
value | code stringlengths 83 6.91k | code_tokens listlengths 15 1.01k | docstring stringlengths 5 25.7k | docstring_tokens listlengths 1 427 | sha stringclasses 235
values | url stringlengths 99 268 | partition stringclasses 1
value | summary stringlengths 7 202 | input_ids listlengths 502 502 | token_type_ids listlengths 502 502 | attention_mask listlengths 502 502 | labels listlengths 502 502 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
decidim/decidim | decidim-core/app/constraints/decidim/current_component.rb | Decidim.CurrentComponent.matches? | def matches?(request)
env = request.env
@participatory_space = env["decidim.current_participatory_space"]
return false unless @participatory_space
current_component(env, request.params) ? true : false
end | ruby | def matches?(request)
env = request.env
@participatory_space = env["decidim.current_participatory_space"]
return false unless @participatory_space
current_component(env, request.params) ? true : false
end | [
"def",
"matches?",
"(",
"request",
")",
"env",
"=",
"request",
".",
"env",
"@participatory_space",
"=",
"env",
"[",
"\"decidim.current_participatory_space\"",
"]",
"return",
"false",
"unless",
"@participatory_space",
"current_component",
"(",
"env",
",",
"request",
... | Public: Initializes the class.
manifest - The manifest of the component to check against.
Public: Matches the request against a component and injects it into the
environment.
request - The request that holds the current component relevant information.
Returns a true if the request matched, false otherwi... | [
"Public",
":",
"Initializes",
"the",
"class",
"."
] | 6e2b14e559a63088669904e3c5c49a5180700cf7 | https://github.com/decidim/decidim/blob/6e2b14e559a63088669904e3c5c49a5180700cf7/decidim-core/app/constraints/decidim/current_component.rb#L20-L27 | train | Returns true if the current component matches the current component. | [
30522,
13366,
3503,
1029,
1006,
5227,
1007,
4372,
2615,
1027,
5227,
1012,
4372,
2615,
1030,
2112,
28775,
4502,
7062,
1035,
2686,
1027,
4372,
2615,
1031,
1000,
11703,
28173,
2213,
1012,
2783,
1035,
2112,
28775,
4502,
7062,
1035,
2686,
1000,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_media_services/lib/2018-07-01/generated/azure_mgmt_media_services/live_events.rb | Azure::MediaServices::Mgmt::V2018_07_01.LiveEvents.stop_async | def stop_async(resource_group_name, account_name, live_event_name, parameters, custom_headers:nil)
# Send request
promise = begin_stop_async(resource_group_name, account_name, live_event_name, parameters, custom_headers:custom_headers)
promise = promise.then do |response|
# Defining deseriali... | ruby | def stop_async(resource_group_name, account_name, live_event_name, parameters, custom_headers:nil)
# Send request
promise = begin_stop_async(resource_group_name, account_name, live_event_name, parameters, custom_headers:custom_headers)
promise = promise.then do |response|
# Defining deseriali... | [
"def",
"stop_async",
"(",
"resource_group_name",
",",
"account_name",
",",
"live_event_name",
",",
"parameters",
",",
"custom_headers",
":",
"nil",
")",
"# Send request",
"promise",
"=",
"begin_stop_async",
"(",
"resource_group_name",
",",
"account_name",
",",
"live_e... | @param resource_group_name [String] The name of the resource group within the
Azure subscription.
@param account_name [String] The Media Services account name.
@param live_event_name [String] The name of the Live Event.
@param parameters [LiveEventActionInput] LiveEvent stop parameters
@param custom_headers [Hash{... | [
"@param",
"resource_group_name",
"[",
"String",
"]",
"The",
"name",
"of",
"the",
"resource",
"group",
"within",
"the",
"Azure",
"subscription",
".",
"@param",
"account_name",
"[",
"String",
"]",
"The",
"Media",
"Services",
"account",
"name",
".",
"@param",
"li... | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_media_services/lib/2018-07-01/generated/azure_mgmt_media_services/live_events.rb#L453-L467 | train | Stops a live event. | [
30522,
13366,
2644,
1035,
2004,
6038,
2278,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
4070,
1035,
2171,
1010,
2444,
1035,
2724,
1035,
2171,
1010,
11709,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
1001,
4604,
5227,
4872,
1027,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
roo-rb/roo | lib/roo/excelx.rb | Roo.Excelx.process_zipfile | def process_zipfile(zipfilename_or_stream)
@sheet_files = []
unless is_stream?(zipfilename_or_stream)
zip_file = Zip::File.open(zipfilename_or_stream)
else
zip_file = Zip::CentralDirectory.new
zip_file.read_from_stream zipfilename_or_stream
end
process_zipfile_ent... | ruby | def process_zipfile(zipfilename_or_stream)
@sheet_files = []
unless is_stream?(zipfilename_or_stream)
zip_file = Zip::File.open(zipfilename_or_stream)
else
zip_file = Zip::CentralDirectory.new
zip_file.read_from_stream zipfilename_or_stream
end
process_zipfile_ent... | [
"def",
"process_zipfile",
"(",
"zipfilename_or_stream",
")",
"@sheet_files",
"=",
"[",
"]",
"unless",
"is_stream?",
"(",
"zipfilename_or_stream",
")",
"zip_file",
"=",
"Zip",
"::",
"File",
".",
"open",
"(",
"zipfilename_or_stream",
")",
"else",
"zip_file",
"=",
... | Extracts all needed files from the zip file | [
"Extracts",
"all",
"needed",
"files",
"from",
"the",
"zip",
"file"
] | 4ec1104f0c3c2a29711c0c907371cd2be12bcc3c | https://github.com/roo-rb/roo/blob/4ec1104f0c3c2a29711c0c907371cd2be12bcc3c/lib/roo/excelx.rb#L394-L405 | train | process a zip file | [
30522,
13366,
2832,
1035,
14101,
8873,
2571,
1006,
14101,
8873,
20844,
4168,
1035,
2030,
1035,
5460,
1007,
1030,
7123,
1035,
6764,
1027,
1031,
1033,
4983,
2003,
1035,
5460,
1029,
1006,
14101,
8873,
20844,
4168,
1035,
2030,
1035,
5460,
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... |
mikel/mail | lib/mail/utilities.rb | Mail.Utilities.constantize | def constantize( str )
str.to_s.split(/[-_]/).map { |v| v.capitalize }.to_s
end | ruby | def constantize( str )
str.to_s.split(/[-_]/).map { |v| v.capitalize }.to_s
end | [
"def",
"constantize",
"(",
"str",
")",
"str",
".",
"to_s",
".",
"split",
"(",
"/",
"/",
")",
".",
"map",
"{",
"|",
"v",
"|",
"v",
".",
"capitalize",
"}",
".",
"to_s",
"end"
] | Takes an underscored word and turns it into a class name
Example:
constantize("hello") #=> "Hello"
constantize("hello-there") #=> "HelloThere"
constantize("hello-there-mate") #=> "HelloThereMate" | [
"Takes",
"an",
"underscored",
"word",
"and",
"turns",
"it",
"into",
"a",
"class",
"name"
] | fb53fb369eb2bf0494ac70675970c90cdcc3f495 | https://github.com/mikel/mail/blob/fb53fb369eb2bf0494ac70675970c90cdcc3f495/lib/mail/utilities.rb#L199-L201 | train | Convert a string to a string of the correct type. | [
30522,
13366,
5377,
4697,
1006,
2358,
2099,
1007,
2358,
2099,
30524,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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 | lib/linguist/generated.rb | Linguist.Generated.generated_jni_header? | def generated_jni_header?
return false unless extname == '.h'
return false unless lines.count > 2
return lines[0].include?("/* DO NOT EDIT THIS FILE - it is machine generated */") &&
lines[1].include?("#include <jni.h>")
end | ruby | def generated_jni_header?
return false unless extname == '.h'
return false unless lines.count > 2
return lines[0].include?("/* DO NOT EDIT THIS FILE - it is machine generated */") &&
lines[1].include?("#include <jni.h>")
end | [
"def",
"generated_jni_header?",
"return",
"false",
"unless",
"extname",
"==",
"'.h'",
"return",
"false",
"unless",
"lines",
".",
"count",
">",
"2",
"return",
"lines",
"[",
"0",
"]",
".",
"include?",
"(",
"\"/* DO NOT EDIT THIS FILE - it is machine generated */\"",
"... | Internal: Is the blob a C/C++ header generated by the Java JNI tool javah?
Returns true or false. | [
"Internal",
":",
"Is",
"the",
"blob",
"a",
"C",
"/",
"C",
"++",
"header",
"generated",
"by",
"the",
"Java",
"JNI",
"tool",
"javah?"
] | 9116c90fcbb82ac03b4b33c58cfbde1fcf745e99 | https://github.com/github/linguist/blob/9116c90fcbb82ac03b4b33c58cfbde1fcf745e99/lib/linguist/generated.rb#L335-L341 | train | Returns true if the generated jni header is a machine generated file. | [
30522,
13366,
7013,
1035,
1046,
3490,
1035,
20346,
1029,
2709,
6270,
4983,
4654,
2102,
18442,
1027,
1027,
1005,
1012,
1044,
1005,
2709,
6270,
4983,
3210,
1012,
4175,
1028,
1016,
2709,
3210,
1031,
1014,
1033,
1012,
2421,
1029,
1006,
1000,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
aws/aws-sdk-ruby | gems/aws-sdk-autoscaling/lib/aws-sdk-autoscaling/lifecycle_hook.rb | Aws::AutoScaling.LifecycleHook.record_heartbeat | def record_heartbeat(options = {})
options = options.merge(
auto_scaling_group_name: @group_name,
lifecycle_hook_name: @name
)
resp = @client.record_lifecycle_action_heartbeat(options)
resp.data
end | ruby | def record_heartbeat(options = {})
options = options.merge(
auto_scaling_group_name: @group_name,
lifecycle_hook_name: @name
)
resp = @client.record_lifecycle_action_heartbeat(options)
resp.data
end | [
"def",
"record_heartbeat",
"(",
"options",
"=",
"{",
"}",
")",
"options",
"=",
"options",
".",
"merge",
"(",
"auto_scaling_group_name",
":",
"@group_name",
",",
"lifecycle_hook_name",
":",
"@name",
")",
"resp",
"=",
"@client",
".",
"record_lifecycle_action_heartbe... | @example Request syntax with placeholder values
lifecycle_hook.record_heartbeat({
lifecycle_action_token: "LifecycleActionToken",
instance_id: "XmlStringMaxLen19",
})
@param [Hash] options ({})
@option options [String] :lifecycle_action_token
A token that uniquely identifies a specific lifecycle a... | [
"@example",
"Request",
"syntax",
"with",
"placeholder",
"values"
] | e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d | https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-autoscaling/lib/aws-sdk-autoscaling/lifecycle_hook.rb#L364-L371 | train | Record the heartbeat of the lifecycle hook | [
30522,
13366,
2501,
1035,
12251,
1006,
7047,
1027,
1063,
1065,
1007,
7047,
1027,
7047,
1012,
13590,
1006,
8285,
1035,
25169,
1035,
2177,
1035,
2171,
1024,
1030,
2177,
1035,
2171,
1010,
2166,
23490,
1035,
8103,
1035,
2171,
1024,
1030,
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... |
aws/aws-sdk-ruby | gems/aws-sdk-autoscaling/lib/aws-sdk-autoscaling/auto_scaling_group.rb | Aws::AutoScaling.AutoScalingGroup.delete | def delete(options = {})
options = options.merge(auto_scaling_group_name: @name)
resp = @client.delete_auto_scaling_group(options)
resp.data
end | ruby | def delete(options = {})
options = options.merge(auto_scaling_group_name: @name)
resp = @client.delete_auto_scaling_group(options)
resp.data
end | [
"def",
"delete",
"(",
"options",
"=",
"{",
"}",
")",
"options",
"=",
"options",
".",
"merge",
"(",
"auto_scaling_group_name",
":",
"@name",
")",
"resp",
"=",
"@client",
".",
"delete_auto_scaling_group",
"(",
"options",
")",
"resp",
".",
"data",
"end"
] | @example Request syntax with placeholder values
auto_scaling_group.delete({
force_delete: false,
})
@param [Hash] options ({})
@option options [Boolean] :force_delete
Specifies that the group is to be deleted along with all instances
associated with the group, without waiting for all instances to be... | [
"@example",
"Request",
"syntax",
"with",
"placeholder",
"values"
] | e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d | https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-autoscaling/lib/aws-sdk-autoscaling/auto_scaling_group.rb#L401-L405 | train | Delete the Auto Scaling Group | [
30522,
13366,
3972,
12870,
1006,
7047,
1027,
1063,
1065,
1007,
7047,
1027,
7047,
1012,
13590,
1006,
8285,
1035,
25169,
1035,
2177,
1035,
2171,
1024,
1030,
2171,
1007,
24501,
2361,
1027,
1030,
7396,
1012,
3972,
12870,
1035,
8285,
1035,
25169... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
watir/watir | lib/watir/elements/element.rb | Watir.Element.element_call | def element_call(precondition = nil, &block)
caller = caller_locations(1, 1)[0].label
already_locked = Wait.timer.locked?
Wait.timer = Wait::Timer.new(timeout: Watir.default_timeout) unless already_locked
begin
check_condition(precondition, caller)
Watir.logger.debug "-> `Execut... | ruby | def element_call(precondition = nil, &block)
caller = caller_locations(1, 1)[0].label
already_locked = Wait.timer.locked?
Wait.timer = Wait::Timer.new(timeout: Watir.default_timeout) unless already_locked
begin
check_condition(precondition, caller)
Watir.logger.debug "-> `Execut... | [
"def",
"element_call",
"(",
"precondition",
"=",
"nil",
",",
"&",
"block",
")",
"caller",
"=",
"caller_locations",
"(",
"1",
",",
"1",
")",
"[",
"0",
"]",
".",
"label",
"already_locked",
"=",
"Wait",
".",
"timer",
".",
"locked?",
"Wait",
".",
"timer",
... | TODO: - this will get addressed with Watir::Executor implementation
rubocop:disable Metrics/AbcSize
rubocop:disable Metrics/MethodLength
rubocop:disable Metrics/PerceivedComplexity
rubocop:disable Metrics/CyclomaticComplexity: | [
"TODO",
":",
"-",
"this",
"will",
"get",
"addressed",
"with",
"Watir",
"::",
"Executor",
"implementation",
"rubocop",
":",
"disable",
"Metrics",
"/",
"AbcSize",
"rubocop",
":",
"disable",
"Metrics",
"/",
"MethodLength",
"rubocop",
":",
"disable",
"Metrics",
"/... | 2d8db09811c6221ae401b85b2f61f5fa66e463a3 | https://github.com/watir/watir/blob/2d8db09811c6221ae401b85b2f61f5fa66e463a3/lib/watir/elements/element.rb#L781-L816 | train | This method is called by the element_call method. | [
30522,
13366,
5783,
1035,
2655,
1006,
3653,
8663,
20562,
1027,
9152,
2140,
1010,
1004,
3796,
1007,
20587,
1027,
20587,
1035,
5269,
1006,
1015,
1010,
1015,
1007,
1031,
1014,
1033,
1012,
3830,
2525,
1035,
5299,
1027,
3524,
1012,
25309,
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... |
mikel/mail | lib/mail/network/retriever_methods/base.rb | Mail.Retriever.last | def last(options = nil, &block)
options = options ? Hash[options] : {}
options[:what] = :last
options[:count] ||= 1
find(options, &block)
end | ruby | def last(options = nil, &block)
options = options ? Hash[options] : {}
options[:what] = :last
options[:count] ||= 1
find(options, &block)
end | [
"def",
"last",
"(",
"options",
"=",
"nil",
",",
"&",
"block",
")",
"options",
"=",
"options",
"?",
"Hash",
"[",
"options",
"]",
":",
"{",
"}",
"options",
"[",
":what",
"]",
"=",
":last",
"options",
"[",
":count",
"]",
"||=",
"1",
"find",
"(",
"op... | Get the most recent received email(s)
Possible options:
count: number of emails to retrieve. The default value is 1.
order: order of emails returned. Possible values are :asc or :desc. Default value is :asc. | [
"Get",
"the",
"most",
"recent",
"received",
"email",
"(",
"s",
")"
] | fb53fb369eb2bf0494ac70675970c90cdcc3f495 | https://github.com/mikel/mail/blob/fb53fb369eb2bf0494ac70675970c90cdcc3f495/lib/mail/network/retriever_methods/base.rb#L27-L32 | train | Returns the last element in the list | [
30522,
13366,
2197,
1006,
7047,
1027,
9152,
2140,
1010,
1004,
3796,
1007,
7047,
1027,
7047,
1029,
23325,
1031,
7047,
1033,
1024,
1063,
1065,
7047,
1031,
1024,
2054,
1033,
1027,
1024,
2197,
7047,
1031,
1024,
4175,
1033,
1064,
1064,
1027,
1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_compute/lib/2018-04-01/generated/azure_mgmt_compute/virtual_machine_extensions.rb | Azure::Compute::Mgmt::V2018_04_01.VirtualMachineExtensions.begin_create_or_update_with_http_info | def begin_create_or_update_with_http_info(resource_group_name, vm_name, vm_extension_name, extension_parameters, custom_headers:nil)
begin_create_or_update_async(resource_group_name, vm_name, vm_extension_name, extension_parameters, custom_headers:custom_headers).value!
end | ruby | def begin_create_or_update_with_http_info(resource_group_name, vm_name, vm_extension_name, extension_parameters, custom_headers:nil)
begin_create_or_update_async(resource_group_name, vm_name, vm_extension_name, extension_parameters, custom_headers:custom_headers).value!
end | [
"def",
"begin_create_or_update_with_http_info",
"(",
"resource_group_name",
",",
"vm_name",
",",
"vm_extension_name",
",",
"extension_parameters",
",",
"custom_headers",
":",
"nil",
")",
"begin_create_or_update_async",
"(",
"resource_group_name",
",",
"vm_name",
",",
"vm_ex... | The operation to create or update the extension.
@param resource_group_name [String] The name of the resource group.
@param vm_name [String] The name of the virtual machine where the extension
should be created or updated.
@param vm_extension_name [String] The name of the virtual machine extension.
@param extensi... | [
"The",
"operation",
"to",
"create",
"or",
"update",
"the",
"extension",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_compute/lib/2018-04-01/generated/azure_mgmt_compute/virtual_machine_extensions.rb#L399-L401 | train | Creates or updates an extension. | [
30522,
13366,
4088,
1035,
3443,
1035,
2030,
1035,
10651,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
1058,
30524,
1035,
10651,
1035,
2004,
6038,
2278,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
1058,
2213,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
magnusvk/counter_culture | lib/counter_culture/counter.rb | CounterCulture.Counter.relation_reflect | def relation_reflect(relation)
relation = relation.is_a?(Enumerable) ? relation.dup : [relation]
# go from one relation to the next until we hit the last reflect object
klass = model
while relation.size > 0
cur_relation = relation.shift
reflect = klass.reflect_on_association(cur... | ruby | def relation_reflect(relation)
relation = relation.is_a?(Enumerable) ? relation.dup : [relation]
# go from one relation to the next until we hit the last reflect object
klass = model
while relation.size > 0
cur_relation = relation.shift
reflect = klass.reflect_on_association(cur... | [
"def",
"relation_reflect",
"(",
"relation",
")",
"relation",
"=",
"relation",
".",
"is_a?",
"(",
"Enumerable",
")",
"?",
"relation",
".",
"dup",
":",
"[",
"relation",
"]",
"# go from one relation to the next until we hit the last reflect object",
"klass",
"=",
"model"... | gets the reflect object on the given relation
relation: a symbol or array of symbols; specifies the relation
that has the counter cache column | [
"gets",
"the",
"reflect",
"object",
"on",
"the",
"given",
"relation"
] | 6b5bd4d6e1ee4f10f262ace7cfed5776af9520ba | https://github.com/magnusvk/counter_culture/blob/6b5bd4d6e1ee4f10f262ace7cfed5776af9520ba/lib/counter_culture/counter.rb#L158-L177 | train | reflect the relation on the current model | [
30522,
13366,
7189,
1035,
8339,
1006,
7189,
1007,
7189,
1027,
7189,
1012,
2003,
1035,
1037,
1029,
1006,
4372,
17897,
16670,
1007,
1029,
7189,
1012,
4241,
2361,
1024,
1031,
7189,
1033,
1001,
2175,
2013,
2028,
7189,
2000,
1996,
2279,
2127,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
aws/aws-sdk-ruby | gems/aws-sdk-rds/lib/aws-sdk-rds/event_subscription.rb | Aws::RDS.EventSubscription.add_subscriber | def add_subscriber(options = {})
options = options.merge(subscription_name: @name)
resp = @client.add_source_identifier_to_subscription(options)
EventSubscription.new(
name: resp.data.event_subscription.cust_subscription_id,
data: resp.data.event_subscription,
client: @client
... | ruby | def add_subscriber(options = {})
options = options.merge(subscription_name: @name)
resp = @client.add_source_identifier_to_subscription(options)
EventSubscription.new(
name: resp.data.event_subscription.cust_subscription_id,
data: resp.data.event_subscription,
client: @client
... | [
"def",
"add_subscriber",
"(",
"options",
"=",
"{",
"}",
")",
"options",
"=",
"options",
".",
"merge",
"(",
"subscription_name",
":",
"@name",
")",
"resp",
"=",
"@client",
".",
"add_source_identifier_to_subscription",
"(",
"options",
")",
"EventSubscription",
"."... | @!group Actions
@example Request syntax with placeholder values
eventsubscription = event_subscription.add_subscriber({
source_identifier: "String", # required
})
@param [Hash] options ({})
@option options [required, String] :source_identifier
The identifier of the event source to be added.
Constr... | [
"@!group",
"Actions",
"@example",
"Request",
"syntax",
"with",
"placeholder",
"values"
] | e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d | https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-rds/lib/aws-sdk-rds/event_subscription.rb#L256-L264 | train | Add a subscriber to this source | [
30522,
13366,
5587,
1035,
4942,
29234,
2099,
1006,
7047,
1027,
1063,
1065,
1007,
7047,
1027,
7047,
1012,
13590,
1006,
15002,
1035,
2171,
1024,
1030,
2171,
1007,
24501,
2361,
1027,
1030,
7396,
1012,
5587,
1035,
3120,
1035,
8909,
4765,
18095,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/sync_agents.rb | Azure::SQL::Mgmt::V2015_05_01_preview.SyncAgents.list_linked_databases_next | def list_linked_databases_next(next_page_link, custom_headers:nil)
response = list_linked_databases_next_async(next_page_link, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def list_linked_databases_next(next_page_link, custom_headers:nil)
response = list_linked_databases_next_async(next_page_link, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"list_linked_databases_next",
"(",
"next_page_link",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"list_linked_databases_next_async",
"(",
"next_page_link",
",",
"custom_headers",
":custom_headers",
")",
".",
"value!",
"response",
".",
"body",
"unless... | Lists databases linked to a sync agent.
@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 [SyncAgentLinkedDatabaseListResult] operation results. | [
"Lists",
"databases",
"linked",
"to",
"a",
"sync",
"agent",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/sync_agents.rb#L859-L862 | train | Gets the list of linked databases. | [
30522,
13366,
2862,
1035,
5799,
1035,
17881,
1035,
2279,
1006,
2279,
1035,
30524,
1027,
2862,
1035,
5799,
1035,
17881,
1035,
2279,
1035,
2004,
6038,
2278,
1006,
2279,
1035,
3931,
1035,
4957,
1010,
7661,
1035,
20346,
2015,
1024,
7661,
1035,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_netapp/lib/2017-08-15-preview/generated/azure_mgmt_netapp/volumes.rb | Azure::NetApp::Mgmt::V2017_08_15_preview.Volumes.create_or_update_async | def create_or_update_async(body, resource_group_name, account_name, pool_name, volume_name, custom_headers:nil)
# Send request
promise = begin_create_or_update_async(body, resource_group_name, account_name, pool_name, volume_name, custom_headers:custom_headers)
promise = promise.then do |response|
... | ruby | def create_or_update_async(body, resource_group_name, account_name, pool_name, volume_name, custom_headers:nil)
# Send request
promise = begin_create_or_update_async(body, resource_group_name, account_name, pool_name, volume_name, custom_headers:custom_headers)
promise = promise.then do |response|
... | [
"def",
"create_or_update_async",
"(",
"body",
",",
"resource_group_name",
",",
"account_name",
",",
"pool_name",
",",
"volume_name",
",",
"custom_headers",
":",
"nil",
")",
"# Send request",
"promise",
"=",
"begin_create_or_update_async",
"(",
"body",
",",
"resource_g... | @param body [Volume] Volume object supplied in the body of the operation.
@param resource_group_name [String] The name of the resource group.
@param account_name [String] The name of the NetApp account
@param pool_name [String] The name of the capacity pool
@param volume_name [String] The name of the volume
@param... | [
"@param",
"body",
"[",
"Volume",
"]",
"Volume",
"object",
"supplied",
"in",
"the",
"body",
"of",
"the",
"operation",
".",
"@param",
"resource_group_name",
"[",
"String",
"]",
"The",
"name",
"of",
"the",
"resource",
"group",
".",
"@param",
"account_name",
"["... | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_netapp/lib/2017-08-15-preview/generated/azure_mgmt_netapp/volumes.rb#L256-L272 | train | Creates or updates a volume. | [
30522,
13366,
3443,
1035,
2030,
1035,
10651,
1035,
2004,
6038,
2278,
1006,
2303,
1010,
7692,
1035,
2177,
1035,
2171,
1010,
4070,
1035,
2171,
1010,
4770,
1035,
2171,
1010,
3872,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
mongodb/mongo-ruby-driver | lib/mongo/write_concern.rb | Mongo.WriteConcern.get | def get(options)
return options if options.is_a?(Unacknowledged) || options.is_a?(Acknowledged)
if options
validate!(options)
if unacknowledged?(options)
Unacknowledged.new(options)
else
Acknowledged.new(options)
end
end
end | ruby | def get(options)
return options if options.is_a?(Unacknowledged) || options.is_a?(Acknowledged)
if options
validate!(options)
if unacknowledged?(options)
Unacknowledged.new(options)
else
Acknowledged.new(options)
end
end
end | [
"def",
"get",
"(",
"options",
")",
"return",
"options",
"if",
"options",
".",
"is_a?",
"(",
"Unacknowledged",
")",
"||",
"options",
".",
"is_a?",
"(",
"Acknowledged",
")",
"if",
"options",
"validate!",
"(",
"options",
")",
"if",
"unacknowledged?",
"(",
"op... | Create a write concern object for the provided options.
@example Get a write concern.
Mongo::WriteConcern.get(:w => 1)
@param [ Hash ] options The options to instantiate with.
@option options :w [ Integer, String ] The number of servers or the
custom mode to acknowledge.
@option options :j [ true, false ] ... | [
"Create",
"a",
"write",
"concern",
"object",
"for",
"the",
"provided",
"options",
"."
] | dca26d0870cb3386fad9ccc1d17228097c1fe1c8 | https://github.com/mongodb/mongo-ruby-driver/blob/dca26d0870cb3386fad9ccc1d17228097c1fe1c8/lib/mongo/write_concern.rb#L78-L88 | train | Returns the object that is used to create the object. | [
30522,
13366,
2131,
1006,
7047,
1007,
2709,
7047,
2065,
7047,
1012,
2003,
1035,
1037,
1029,
1006,
14477,
3600,
19779,
3709,
5999,
1007,
1064,
1064,
7047,
1012,
2003,
1035,
1037,
1029,
1006,
8969,
1007,
2065,
7047,
9398,
3686,
999,
1006,
7... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
castwide/solargraph | lib/solargraph/api_map.rb | Solargraph.ApiMap.catalog | def catalog bundle
new_map_hash = {}
# Bundle always needs to be merged if it adds or removes sources
merged = (bundle.sources.length == source_map_hash.values.length)
bundle.sources.each do |source|
if source_map_hash.key?(source.filename)
if source_map_hash[source.filename].c... | ruby | def catalog bundle
new_map_hash = {}
# Bundle always needs to be merged if it adds or removes sources
merged = (bundle.sources.length == source_map_hash.values.length)
bundle.sources.each do |source|
if source_map_hash.key?(source.filename)
if source_map_hash[source.filename].c... | [
"def",
"catalog",
"bundle",
"new_map_hash",
"=",
"{",
"}",
"# Bundle always needs to be merged if it adds or removes sources",
"merged",
"=",
"(",
"bundle",
".",
"sources",
".",
"length",
"==",
"source_map_hash",
".",
"values",
".",
"length",
")",
"bundle",
".",
"so... | Catalog a bundle.
@param bundle [Bundle]
@return [self] | [
"Catalog",
"a",
"bundle",
"."
] | 47badb5d151aca775ccbe6c470236089eae7839d | https://github.com/castwide/solargraph/blob/47badb5d151aca775ccbe6c470236089eae7839d/lib/solargraph/api_map.rb#L64-L123 | train | This method is used to create a catalog from a bundle | [
30522,
13366,
12105,
14012,
2047,
1035,
4949,
1035,
23325,
1027,
1063,
1065,
1001,
14012,
2467,
3791,
2000,
2022,
5314,
2065,
2009,
9909,
2030,
20362,
4216,
5314,
1027,
1006,
14012,
1012,
4216,
1012,
3091,
1027,
1027,
3120,
1035,
4949,
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... |
fastlane/fastlane | fastlane_core/lib/fastlane_core/configuration/commander_generator.rb | FastlaneCore.CommanderGenerator.generate | def generate(options, command: nil)
# First, enable `always_trace`, to show the stack trace
always_trace!
used_switches = []
options.each do |option|
next if option.description.to_s.empty? # "private" options
next unless option.display_in_shell
short_switch = option.sho... | ruby | def generate(options, command: nil)
# First, enable `always_trace`, to show the stack trace
always_trace!
used_switches = []
options.each do |option|
next if option.description.to_s.empty? # "private" options
next unless option.display_in_shell
short_switch = option.sho... | [
"def",
"generate",
"(",
"options",
",",
"command",
":",
"nil",
")",
"# First, enable `always_trace`, to show the stack trace",
"always_trace!",
"used_switches",
"=",
"[",
"]",
"options",
".",
"each",
"do",
"|",
"option",
"|",
"next",
"if",
"option",
".",
"descript... | Calls the appropriate methods for commander to show the available parameters | [
"Calls",
"the",
"appropriate",
"methods",
"for",
"commander",
"to",
"show",
"the",
"available",
"parameters"
] | 457c5d647c77f0e078dafa5129da616914e002c5 | https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/fastlane_core/lib/fastlane_core/configuration/commander_generator.rb#L11-L90 | train | Generate the options for the command. | [
30522,
13366,
9699,
1006,
7047,
1010,
3094,
1024,
9152,
2140,
1007,
1001,
2034,
1010,
9585,
1036,
2467,
1035,
7637,
1036,
1010,
2000,
2265,
1996,
9991,
7637,
2467,
1035,
7637,
999,
2109,
1035,
15924,
1027,
1031,
1033,
7047,
1012,
2169,
20... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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.patch_with_http_info | def patch_with_http_info(resource_group_name, job_collection_name, job_collection, custom_headers:nil)
patch_async(resource_group_name, job_collection_name, job_collection, custom_headers:custom_headers).value!
end | ruby | def patch_with_http_info(resource_group_name, job_collection_name, job_collection, custom_headers:nil)
patch_async(resource_group_name, job_collection_name, job_collection, custom_headers:custom_headers).value!
end | [
"def",
"patch_with_http_info",
"(",
"resource_group_name",
",",
"job_collection_name",
",",
"job_collection",
",",
"custom_headers",
":",
"nil",
")",
"patch_async",
"(",
"resource_group_name",
",",
"job_collection_name",
",",
"job_collection",
",",
"custom_headers",
":cus... | Patches an existing job collection.
@param resource_group_name [String] The resource group name.
@param job_collection_name [String] The job collection name.
@param job_collection [JobCollectionDefinition] The job collection
definition.
@param custom_headers [Hash{String => String}] A hash of custom headers that
... | [
"Patches",
"an",
"existing",
"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#L433-L435 | train | Patch a job collection. | [
30522,
13366,
8983,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
3105,
1035,
3074,
1035,
2171,
1010,
3105,
1035,
3074,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
8983,
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... |
puppetlabs/puppet | lib/puppet/type.rb | Puppet.Type.to_hash | def to_hash
rethash = {}
@parameters.each do |name, obj|
rethash[name] = obj.value
end
rethash
end | ruby | def to_hash
rethash = {}
@parameters.each do |name, obj|
rethash[name] = obj.value
end
rethash
end | [
"def",
"to_hash",
"rethash",
"=",
"{",
"}",
"@parameters",
".",
"each",
"do",
"|",
"name",
",",
"obj",
"|",
"rethash",
"[",
"name",
"]",
"=",
"obj",
".",
"value",
"end",
"rethash",
"end"
] | @todo the comment says: "Convert our object to a hash. This just includes properties."
@todo this is confused, again it is the @parameters instance variable that is consulted, and
each value is copied - does it contain "properties" and "parameters" or both? Does it contain
meta-parameters?
@return [Hash{ ??? ... | [
"@todo",
"the",
"comment",
"says",
":",
"Convert",
"our",
"object",
"to",
"a",
"hash",
".",
"This",
"just",
"includes",
"properties",
".",
"@todo",
"this",
"is",
"confused",
"again",
"it",
"is",
"the",
"@parameters",
"instance",
"variable",
"that",
"is",
"... | 4baeed97cbb7571ddc6635f0a24debe2e8b22cd3 | https://github.com/puppetlabs/puppet/blob/4baeed97cbb7571ddc6635f0a24debe2e8b22cd3/lib/puppet/type.rb#L856-L864 | train | Returns a hash of the parameters | [
30522,
13366,
2000,
1035,
23325,
2128,
8322,
4095,
1027,
1063,
1065,
1030,
11709,
1012,
2169,
2079,
1064,
2171,
1010,
27885,
3501,
1064,
2128,
8322,
4095,
1031,
2171,
1033,
1027,
27885,
3501,
1012,
3643,
2203,
2128,
8322,
4095,
2203,
102,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
puppetlabs/puppet | lib/puppet/forge/errors.rb | Puppet::Forge::Errors.SSLVerifyError.multiline | def multiline
message = []
message << _('Could not connect via HTTPS to %{uri}') % { uri: @uri }
message << _(' Unable to verify the SSL certificate')
message << _(' The certificate may not be signed by a valid CA')
message << _(' The CA bundle included with OpenSSL may not be valid... | ruby | def multiline
message = []
message << _('Could not connect via HTTPS to %{uri}') % { uri: @uri }
message << _(' Unable to verify the SSL certificate')
message << _(' The certificate may not be signed by a valid CA')
message << _(' The CA bundle included with OpenSSL may not be valid... | [
"def",
"multiline",
"message",
"=",
"[",
"]",
"message",
"<<",
"_",
"(",
"'Could not connect via HTTPS to %{uri}'",
")",
"%",
"{",
"uri",
":",
"@uri",
"}",
"message",
"<<",
"_",
"(",
"' Unable to verify the SSL certificate'",
")",
"message",
"<<",
"_",
"(",
"... | @option options [String] :uri The URI that failed
@option options [String] :original the original exception
Return a multiline version of the error message
@return [String] the multiline version of the error message | [
"@option",
"options",
"[",
"String",
"]",
":",
"uri",
"The",
"URI",
"that",
"failed",
"@option",
"options",
"[",
"String",
"]",
":",
"original",
"the",
"original",
"exception",
"Return",
"a",
"multiline",
"version",
"of",
"the",
"error",
"message"
] | 4baeed97cbb7571ddc6635f0a24debe2e8b22cd3 | https://github.com/puppetlabs/puppet/blob/4baeed97cbb7571ddc6635f0a24debe2e8b22cd3/lib/puppet/forge/errors.rb#L34-L41 | train | Returns a multiline list of the errors that occurred. | [
30522,
13366,
4800,
4179,
4471,
1027,
1031,
1033,
4471,
1026,
1026,
1035,
1006,
1005,
2071,
2025,
7532,
3081,
16770,
2000,
1003,
1063,
24471,
2072,
1065,
1005,
1007,
1003,
1063,
24471,
2072,
1024,
1030,
24471,
2072,
1065,
4471,
1026,
1026,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
sds/scss-lint | lib/scss_lint/rake_task.rb | SCSSLint.RakeTask.default_description | def default_description
description = 'Run `scss-lint'
description += " --config #{config}" if config
description += " #{args}" if args
description += " #{files.join(' ')}" if files.any?
description += ' [files...]`'
description
end | ruby | def default_description
description = 'Run `scss-lint'
description += " --config #{config}" if config
description += " #{args}" if args
description += " #{files.join(' ')}" if files.any?
description += ' [files...]`'
description
end | [
"def",
"default_description",
"description",
"=",
"'Run `scss-lint'",
"description",
"+=",
"\" --config #{config}\"",
"if",
"config",
"description",
"+=",
"\" #{args}\"",
"if",
"args",
"description",
"+=",
"\" #{files.join(' ')}\"",
"if",
"files",
".",
"any?",
"descriptio... | Friendly description that shows the full command that will be executed. | [
"Friendly",
"description",
"that",
"shows",
"the",
"full",
"command",
"that",
"will",
"be",
"executed",
"."
] | e99afe4ede041a431a06e585c12ce82f6ad50116 | https://github.com/sds/scss-lint/blob/e99afe4ede041a431a06e585c12ce82f6ad50116/lib/scss_lint/rake_task.rb#L115-L122 | train | Returns a string with the description of the command. | [
30522,
13366,
12398,
1035,
6412,
6412,
1027,
1005,
2448,
1036,
8040,
4757,
1011,
11409,
2102,
1005,
6412,
1009,
1027,
1000,
1011,
1011,
9530,
8873,
2290,
1001,
1063,
9530,
8873,
2290,
1065,
1000,
2065,
9530,
8873,
2290,
6412,
1009,
1027,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | data/azure_cognitiveservices_luisauthoring/lib/2.0/generated/azure_cognitiveservices_luisauthoring/examples.rb | Azure::CognitiveServices::LuisAuthoring::V2_0.Examples.batch | def batch(app_id, version_id, example_label_object_array, custom_headers:nil)
response = batch_async(app_id, version_id, example_label_object_array, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def batch(app_id, version_id, example_label_object_array, custom_headers:nil)
response = batch_async(app_id, version_id, example_label_object_array, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"batch",
"(",
"app_id",
",",
"version_id",
",",
"example_label_object_array",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"batch_async",
"(",
"app_id",
",",
"version_id",
",",
"example_label_object_array",
",",
"custom_headers",
":custom_headers",
... | Adds a batch of labeled example utterances to a version of the application.
@param app_id The application ID.
@param version_id [String] The version ID.
@param example_label_object_array [Array<ExampleLabelObject>] Array of
example utterances.
@param custom_headers [Hash{String => String}] A hash of custom header... | [
"Adds",
"a",
"batch",
"of",
"labeled",
"example",
"utterances",
"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/examples.rb#L141-L144 | train | Batch the list of labels in a version of the application. | [
30522,
13366,
14108,
1006,
10439,
1035,
8909,
1010,
2544,
1035,
8909,
1010,
2742,
1035,
3830,
1035,
4874,
1035,
9140,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
14108,
1035,
2004,
6038,
2278,
1006,
10439,
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... |
opal/opal | opal/corelib/marshal/read_buffer.rb | Marshal.ReadBuffer.read_struct | def read_struct
klass_name = read(cache: false)
klass = safe_const_get(klass_name)
attributes = read_hash(cache: false)
args = attributes.values_at(*klass.members)
result = klass.new(*args)
@object_cache << result
result
end | ruby | def read_struct
klass_name = read(cache: false)
klass = safe_const_get(klass_name)
attributes = read_hash(cache: false)
args = attributes.values_at(*klass.members)
result = klass.new(*args)
@object_cache << result
result
end | [
"def",
"read_struct",
"klass_name",
"=",
"read",
"(",
"cache",
":",
"false",
")",
"klass",
"=",
"safe_const_get",
"(",
"klass_name",
")",
"attributes",
"=",
"read_hash",
"(",
"cache",
":",
"false",
")",
"args",
"=",
"attributes",
".",
"values_at",
"(",
"kl... | Reads and returns a Struct from an input stream
@example
Point = Struct.new(:x, :y)
Point.new(100, 200)
is encoded as
'S', :Point, {:x => 100, :y => 200} | [
"Reads",
"and",
"returns",
"a",
"Struct",
"from",
"an",
"input",
"stream"
] | 41aedc0fd62aab00d3c117ba0caf00206bedd981 | https://github.com/opal/opal/blob/41aedc0fd62aab00d3c117ba0caf00206bedd981/opal/corelib/marshal/read_buffer.rb#L328-L336 | train | Read a struct and return a new object. | [
30522,
13366,
3191,
1035,
2358,
6820,
6593,
1047,
27102,
1035,
2171,
1027,
3191,
1006,
17053,
1024,
6270,
1007,
1047,
27102,
1027,
3647,
1035,
9530,
3367,
1035,
2131,
1006,
1047,
27102,
1035,
2171,
1007,
12332,
1027,
3191,
1035,
23325,
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... |
randym/axlsx | lib/axlsx/drawing/marker.rb | Axlsx.Marker.parse_coord_args | def parse_coord_args(x, y=0)
if x.is_a?(String)
x, y = *Axlsx::name_to_indices(x)
end
if x.is_a?(Cell)
x, y = *x.pos
end
if x.is_a?(Array)
x, y = *x
end
[x, y]
end | ruby | def parse_coord_args(x, y=0)
if x.is_a?(String)
x, y = *Axlsx::name_to_indices(x)
end
if x.is_a?(Cell)
x, y = *x.pos
end
if x.is_a?(Array)
x, y = *x
end
[x, y]
end | [
"def",
"parse_coord_args",
"(",
"x",
",",
"y",
"=",
"0",
")",
"if",
"x",
".",
"is_a?",
"(",
"String",
")",
"x",
",",
"y",
"=",
"Axlsx",
"::",
"name_to_indices",
"(",
"x",
")",
"end",
"if",
"x",
".",
"is_a?",
"(",
"Cell",
")",
"x",
",",
"y",
"... | handles multiple inputs for setting the position of a marker
@see Chart#start_at | [
"handles",
"multiple",
"inputs",
"for",
"setting",
"the",
"position",
"of",
"a",
"marker"
] | c593a08b2a929dac7aa8dc418b55e26b4c49dc34 | https://github.com/randym/axlsx/blob/c593a08b2a929dac7aa8dc418b55e26b4c49dc34/lib/axlsx/drawing/marker.rb#L68-L79 | train | Parse the coord_args for the given cell | [
30522,
13366,
11968,
3366,
1035,
2522,
8551,
1035,
12098,
5620,
1006,
1060,
1010,
1061,
1027,
1014,
1007,
2065,
1060,
1012,
2003,
1035,
1037,
1029,
1006,
5164,
1007,
1060,
1010,
1061,
1027,
1008,
22260,
4877,
30524,
1035,
29299,
1006,
1060,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
apache/thrift | lib/rb/lib/thrift/protocol/json_protocol.rb | Thrift.JsonProtocol.read_json_double | def read_json_double
@context.read(@reader)
num = 0
if (@reader.peek == @@kJSONStringDelimiter)
str = read_json_string(true)
# Check for NaN, Infinity and -Infinity
if (str == @@kThriftNan)
num = (+1.0/0.0)/(+1.0/0.0)
elsif (str == @@kThriftInfinity)
... | ruby | def read_json_double
@context.read(@reader)
num = 0
if (@reader.peek == @@kJSONStringDelimiter)
str = read_json_string(true)
# Check for NaN, Infinity and -Infinity
if (str == @@kThriftNan)
num = (+1.0/0.0)/(+1.0/0.0)
elsif (str == @@kThriftInfinity)
... | [
"def",
"read_json_double",
"@context",
".",
"read",
"(",
"@reader",
")",
"num",
"=",
"0",
"if",
"(",
"@reader",
".",
"peek",
"==",
"@@kJSONStringDelimiter",
")",
"str",
"=",
"read_json_string",
"(",
"true",
")",
"# Check for NaN, Infinity and -Infinity",
"if",
"... | Reads a JSON number or string and interprets it as a double. | [
"Reads",
"a",
"JSON",
"number",
"or",
"string",
"and",
"interprets",
"it",
"as",
"a",
"double",
"."
] | 27d8387c49a49fcf193893f834e9766ae0b051c1 | https://github.com/apache/thrift/blob/27d8387c49a49fcf193893f834e9766ae0b051c1/lib/rb/lib/thrift/protocol/json_protocol.rb#L599-L635 | train | Read a double value from the JSON stream. | [
30522,
13366,
3191,
1035,
1046,
3385,
1035,
3313,
1030,
6123,
1012,
3191,
1006,
1030,
8068,
1007,
16371,
2213,
1027,
1014,
2065,
1006,
1030,
8068,
1012,
19043,
1027,
1027,
1030,
1030,
1047,
22578,
5644,
18886,
3070,
9247,
27605,
3334,
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_network/lib/2019-02-01/generated/azure_mgmt_network/application_gateways.rb | Azure::Network::Mgmt::V2019_02_01.ApplicationGateways.delete | def delete(resource_group_name, application_gateway_name, custom_headers:nil)
response = delete_async(resource_group_name, application_gateway_name, custom_headers:custom_headers).value!
nil
end | ruby | def delete(resource_group_name, application_gateway_name, custom_headers:nil)
response = delete_async(resource_group_name, application_gateway_name, custom_headers:custom_headers).value!
nil
end | [
"def",
"delete",
"(",
"resource_group_name",
",",
"application_gateway_name",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"delete_async",
"(",
"resource_group_name",
",",
"application_gateway_name",
",",
"custom_headers",
":custom_headers",
")",
".",
"value... | Deletes the specified application gateway.
@param resource_group_name [String] The name of the resource group.
@param application_gateway_name [String] The name of the application gateway.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request. | [
"Deletes",
"the",
"specified",
"application",
"gateway",
"."
] | 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#L32-L35 | train | Deletes an application gateway. | [
30522,
13366,
3972,
12870,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
4646,
1035,
11909,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
3972,
12870,
1035,
2004,
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... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_container_registry/lib/2018-09-01/generated/azure_mgmt_container_registry/runs.rb | Azure::ContainerRegistry::Mgmt::V2018_09_01.Runs.update | def update(resource_group_name, registry_name, run_id, run_update_parameters, custom_headers:nil)
response = update_async(resource_group_name, registry_name, run_id, run_update_parameters, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def update(resource_group_name, registry_name, run_id, run_update_parameters, custom_headers:nil)
response = update_async(resource_group_name, registry_name, run_id, run_update_parameters, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"update",
"(",
"resource_group_name",
",",
"registry_name",
",",
"run_id",
",",
"run_update_parameters",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"update_async",
"(",
"resource_group_name",
",",
"registry_name",
",",
"run_id",
",",
"run_update... | Patch the run properties.
@param resource_group_name [String] The name of the resource group to which
the container registry belongs.
@param registry_name [String] The name of the container registry.
@param run_id [String] The run ID.
@param run_update_parameters [RunUpdateParameters] The run update properties.
... | [
"Patch",
"the",
"run",
"properties",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_container_registry/lib/2018-09-01/generated/azure_mgmt_container_registry/runs.rb#L254-L257 | train | Updates a run. | [
30522,
13366,
10651,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
15584,
1035,
2171,
1010,
2448,
1035,
8909,
1010,
2448,
1035,
10651,
1035,
11709,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
10651,
1035,
2004,
6038,
2278... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
projectcypress/health-data-standards | lib/hqmf-parser/2.0/document_helpers/doc_population_helper.rb | HQMF2.DocumentPopulationHelper.remove_population_preconditions | def remove_population_preconditions(doc)
# population sections
pop_ids = doc.xpath("//cda:populationCriteriaSection/cda:component[@typeCode='COMP']/*/cda:id",
HQMF2::Document::NAMESPACES)
# find the population entries and get their ids
pop_ids.each do |p_id|
doc... | ruby | def remove_population_preconditions(doc)
# population sections
pop_ids = doc.xpath("//cda:populationCriteriaSection/cda:component[@typeCode='COMP']/*/cda:id",
HQMF2::Document::NAMESPACES)
# find the population entries and get their ids
pop_ids.each do |p_id|
doc... | [
"def",
"remove_population_preconditions",
"(",
"doc",
")",
"# population sections",
"pop_ids",
"=",
"doc",
".",
"xpath",
"(",
"\"//cda:populationCriteriaSection/cda:component[@typeCode='COMP']/*/cda:id\"",
",",
"HQMF2",
"::",
"Document",
"::",
"NAMESPACES",
")",
"# find the p... | If a precondition references a population, remove it | [
"If",
"a",
"precondition",
"references",
"a",
"population",
"remove",
"it"
] | 252d4f0927c513eacde6b9ea41b76faa1423c34b | https://github.com/projectcypress/health-data-standards/blob/252d4f0927c513eacde6b9ea41b76faa1423c34b/lib/hqmf-parser/2.0/document_helpers/doc_population_helper.rb#L21-L30 | train | remove the population preconditions | [
30522,
13366,
6366,
1035,
2313,
1035,
3653,
8663,
20562,
2015,
1006,
9986,
1007,
1001,
2313,
5433,
3769,
1035,
8909,
2015,
1027,
9986,
1012,
26726,
8988,
1006,
1000,
1013,
1013,
3729,
2050,
1024,
2313,
26775,
21646,
7951,
18491,
1013,
3729,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
ffaker/ffaker | lib/ffaker/tweet.rb | FFaker.Tweet.tweet | def tweet(args = {})
options = {
num_hashtags: [0, rand(1..10) - 6].max,
num_mentions: [0, rand(1..10) - 8].max,
reply: (rand(1..10) == 1),
body_length: rand(20..140)
}.merge(args)
my_reply = options[:reply] ? "#{mention} " : ''
my_mentions = options[:num_mention... | ruby | def tweet(args = {})
options = {
num_hashtags: [0, rand(1..10) - 6].max,
num_mentions: [0, rand(1..10) - 8].max,
reply: (rand(1..10) == 1),
body_length: rand(20..140)
}.merge(args)
my_reply = options[:reply] ? "#{mention} " : ''
my_mentions = options[:num_mention... | [
"def",
"tweet",
"(",
"args",
"=",
"{",
"}",
")",
"options",
"=",
"{",
"num_hashtags",
":",
"[",
"0",
",",
"rand",
"(",
"1",
"..",
"10",
")",
"-",
"6",
"]",
".",
"max",
",",
"num_mentions",
":",
"[",
"0",
",",
"rand",
"(",
"1",
"..",
"10",
"... | Options
num_hashtags: How many hashtags (default: (skewed (40%) 1-4))
num_mentions: How many mentions (default: (skewed (20% 1-2))
reply: Add reply? (default: (random 10%)
body_length: Target length (rand(20..140)) (will be <= target) | [
"Options",
"num_hashtags",
":",
"How",
"many",
"hashtags",
"(",
"default",
":",
"(",
"skewed",
"(",
"40%",
")",
"1",
"-",
"4",
"))",
"num_mentions",
":",
"How",
"many",
"mentions",
"(",
"default",
":",
"(",
"skewed",
"(",
"20%",
"1",
"-",
"2",
"))",
... | 9570ac54874fec66a99b9c86401fb878f1e3e951 | https://github.com/ffaker/ffaker/blob/9570ac54874fec66a99b9c86401fb878f1e3e951/lib/ffaker/tweet.rb#L13-L31 | train | Returns a tweet with the given options | [
30522,
13366,
1056,
28394,
2102,
1006,
12098,
5620,
1027,
1063,
1065,
1007,
7047,
1027,
1063,
16371,
2213,
1035,
23325,
15900,
2015,
1024,
1031,
1014,
1010,
14566,
1006,
1015,
1012,
1012,
2184,
1007,
1011,
1020,
1033,
1012,
4098,
1010,
1637... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
mongodb/mongo-ruby-driver | lib/mongo/server.rb | Mongo.Server.handle_auth_failure! | def handle_auth_failure!
yield
rescue Mongo::Error::SocketTimeoutError
# possibly cluster is slow, do not give up on it
raise
rescue Mongo::Error::SocketError
# non-timeout network error
unknown!
pool.disconnect!
raise
rescue Auth::Unauthorized
# auth error, k... | ruby | def handle_auth_failure!
yield
rescue Mongo::Error::SocketTimeoutError
# possibly cluster is slow, do not give up on it
raise
rescue Mongo::Error::SocketError
# non-timeout network error
unknown!
pool.disconnect!
raise
rescue Auth::Unauthorized
# auth error, k... | [
"def",
"handle_auth_failure!",
"yield",
"rescue",
"Mongo",
"::",
"Error",
"::",
"SocketTimeoutError",
"# possibly cluster is slow, do not give up on it",
"raise",
"rescue",
"Mongo",
"::",
"Error",
"::",
"SocketError",
"# non-timeout network error",
"unknown!",
"pool",
".",
... | Handle authentication failure.
@example Handle possible authentication failure.
server.handle_auth_failure! do
Auth.get(user).login(self)
end
@raise [ Auth::Unauthorized ] If the authentication failed.
@return [ Object ] The result of the block execution.
@since 2.3.0 | [
"Handle",
"authentication",
"failure",
"."
] | dca26d0870cb3386fad9ccc1d17228097c1fe1c8 | https://github.com/mongodb/mongo-ruby-driver/blob/dca26d0870cb3386fad9ccc1d17228097c1fe1c8/lib/mongo/server.rb#L367-L381 | train | handle auth failure | [
30522,
13366,
5047,
1035,
8740,
2705,
1035,
4945,
999,
10750,
5343,
12256,
3995,
1024,
1024,
7561,
1024,
1024,
22278,
7292,
5833,
2121,
29165,
1001,
4298,
9324,
2003,
4030,
1010,
2079,
2025,
2507,
2039,
2006,
2009,
5333,
5343,
12256,
3995,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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_provisioned_fabric_config_version_info_list | def get_provisioned_fabric_config_version_info_list(config_version:nil, timeout:60, custom_headers:nil)
response = get_provisioned_fabric_config_version_info_list_async(config_version:config_version, timeout:timeout, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def get_provisioned_fabric_config_version_info_list(config_version:nil, timeout:60, custom_headers:nil)
response = get_provisioned_fabric_config_version_info_list_async(config_version:config_version, timeout:timeout, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"get_provisioned_fabric_config_version_info_list",
"(",
"config_version",
":",
"nil",
",",
"timeout",
":",
"60",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"get_provisioned_fabric_config_version_info_list_async",
"(",
"config_version",
":config_version",
... | Gets a list of fabric config versions that are provisioned in a Service
Fabric cluster.
Gets a list of information about fabric config versions that are provisioned
in the cluster. The parameter ConfigVersion can be used to optionally filter
the output to only that particular version.
@param config_version [Stri... | [
"Gets",
"a",
"list",
"of",
"fabric",
"config",
"versions",
"that",
"are",
"provisioned",
"in",
"a",
"Service",
"Fabric",
"cluster",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_service_fabric/lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb#L1675-L1678 | train | Gets the list of provisioned fabric configurations. | [
30522,
13366,
2131,
1035,
9347,
2098,
1035,
8313,
1035,
9530,
8873,
2290,
1035,
2544,
1035,
18558,
1035,
2862,
1006,
9530,
8873,
2290,
1035,
2544,
1024,
9152,
2140,
1010,
2051,
5833,
1024,
3438,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
tongueroo/jets | lib/jets/mega/request.rb | Jets::Mega.Request.puts_rack_output | def puts_rack_output
return unless File.exist?(JETS_OUTPUT)
puts IO.readlines(JETS_OUTPUT)
File.truncate(JETS_OUTPUT, 0)
end | ruby | def puts_rack_output
return unless File.exist?(JETS_OUTPUT)
puts IO.readlines(JETS_OUTPUT)
File.truncate(JETS_OUTPUT, 0)
end | [
"def",
"puts_rack_output",
"return",
"unless",
"File",
".",
"exist?",
"(",
"JETS_OUTPUT",
")",
"puts",
"IO",
".",
"readlines",
"(",
"JETS_OUTPUT",
")",
"File",
".",
"truncate",
"(",
"JETS_OUTPUT",
",",
"0",
")",
"end"
] | Grab the rack output from the /tmp/jets-output.log and puts it back in the
main process' stdout | [
"Grab",
"the",
"rack",
"output",
"from",
"the",
"/",
"tmp",
"/",
"jets",
"-",
"output",
".",
"log",
"and",
"puts",
"it",
"back",
"in",
"the",
"main",
"process",
"stdout"
] | 46943a519224067e58aa3e2d5656e3ca083150f9 | https://github.com/tongueroo/jets/blob/46943a519224067e58aa3e2d5656e3ca083150f9/lib/jets/mega/request.rb#L74-L78 | train | Prints the output of the Rack output | [
30522,
13366,
8509,
1035,
14513,
1035,
6434,
2709,
4983,
5371,
1012,
4839,
1029,
1006,
9924,
1035,
6434,
1007,
8509,
22834,
1012,
3191,
12735,
1006,
9924,
1035,
6434,
1007,
5371,
1012,
19817,
4609,
16280,
1006,
9924,
1035,
6434,
1010,
1014,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
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... |
mikker/passwordless | lib/passwordless/controller_helpers.rb | Passwordless.ControllerHelpers.build_passwordless_session | def build_passwordless_session(authenticatable)
Session.new.tap do |us|
us.remote_addr = request.remote_addr
us.user_agent = request.env["HTTP_USER_AGENT"]
us.authenticatable = authenticatable
end
end | ruby | def build_passwordless_session(authenticatable)
Session.new.tap do |us|
us.remote_addr = request.remote_addr
us.user_agent = request.env["HTTP_USER_AGENT"]
us.authenticatable = authenticatable
end
end | [
"def",
"build_passwordless_session",
"(",
"authenticatable",
")",
"Session",
".",
"new",
".",
"tap",
"do",
"|",
"us",
"|",
"us",
".",
"remote_addr",
"=",
"request",
".",
"remote_addr",
"us",
".",
"user_agent",
"=",
"request",
".",
"env",
"[",
"\"HTTP_USER_AG... | Build a new Passwordless::Session from an _authenticatable_ record.
Set's `user_agent` and `remote_addr` from Rails' `request`.
@param authenticatable [ActiveRecord::Base] Instance of an
authenticatable Rails model
@return [Session] the new Session object
@see ModelHelpers#passwordless_with | [
"Build",
"a",
"new",
"Passwordless",
"::",
"Session",
"from",
"an",
"_authenticatable_",
"record",
".",
"Set",
"s",
"user_agent",
"and",
"remote_addr",
"from",
"Rails",
"request",
"."
] | 80d3e00c78114aed01f336514a236dfc17d0a91a | https://github.com/mikker/passwordless/blob/80d3e00c78114aed01f336514a236dfc17d0a91a/lib/passwordless/controller_helpers.rb#L12-L18 | train | Creates a new session for the user | [
30522,
13366,
3857,
1035,
20786,
3238,
1035,
5219,
1006,
14469,
27892,
1007,
5219,
1012,
2047,
1012,
11112,
2079,
1064,
2149,
1064,
2149,
1012,
6556,
1035,
5587,
2099,
1027,
5227,
1012,
6556,
1035,
5587,
2099,
2149,
1012,
5310,
1035,
4005,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
aws/aws-sdk-ruby | gems/aws-sdk-rds/lib/aws-sdk-rds/db_instance.rb | Aws::RDS.DBInstance.log_files | def log_files(options = {})
batches = Enumerator.new do |y|
options = options.merge(db_instance_identifier: @id)
resp = @client.describe_db_log_files(options)
resp.each_page do |page|
batch = []
page.data.describe_db_log_files.each do |d|
batch << DBLogFile.... | ruby | def log_files(options = {})
batches = Enumerator.new do |y|
options = options.merge(db_instance_identifier: @id)
resp = @client.describe_db_log_files(options)
resp.each_page do |page|
batch = []
page.data.describe_db_log_files.each do |d|
batch << DBLogFile.... | [
"def",
"log_files",
"(",
"options",
"=",
"{",
"}",
")",
"batches",
"=",
"Enumerator",
".",
"new",
"do",
"|",
"y",
"|",
"options",
"=",
"options",
".",
"merge",
"(",
"db_instance_identifier",
":",
"@id",
")",
"resp",
"=",
"@client",
".",
"describe_db_log_... | @example Request syntax with placeholder values
log_files = db_instance.log_files({
filename_contains: "String",
file_last_written: 1,
file_size: 1,
filters: [
{
name: "String", # required
values: ["String"], # required
},
],
})
@param [Hash] options ({})... | [
"@example",
"Request",
"syntax",
"with",
"placeholder",
"values"
] | e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d | https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-rds/lib/aws-sdk-rds/db_instance.rb#L2937-L2955 | train | Returns a collection of all log files in the database. | [
30522,
13366,
8833,
1035,
6764,
1006,
7047,
1027,
1063,
1065,
1007,
14108,
2229,
1027,
4372,
17897,
16259,
1012,
2047,
2079,
1064,
1061,
1064,
7047,
1027,
7047,
1012,
13590,
1006,
16962,
1035,
6013,
1035,
8909,
4765,
18095,
1024,
1030,
8909... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_stor_simple8000_series/lib/2017-06-01/generated/azure_mgmt_stor_simple8000_series/cloud_appliances.rb | Azure::StorSimple8000Series::Mgmt::V2017_06_01.CloudAppliances.provision_async | def provision_async(parameters, resource_group_name, manager_name, custom_headers:nil)
# Send request
promise = begin_provision_async(parameters, resource_group_name, manager_name, custom_headers:custom_headers)
promise = promise.then do |response|
# Defining deserialization method.
d... | ruby | def provision_async(parameters, resource_group_name, manager_name, custom_headers:nil)
# Send request
promise = begin_provision_async(parameters, resource_group_name, manager_name, custom_headers:custom_headers)
promise = promise.then do |response|
# Defining deserialization method.
d... | [
"def",
"provision_async",
"(",
"parameters",
",",
"resource_group_name",
",",
"manager_name",
",",
"custom_headers",
":",
"nil",
")",
"# Send request",
"promise",
"=",
"begin_provision_async",
"(",
"parameters",
",",
"resource_group_name",
",",
"manager_name",
",",
"c... | @param parameters [CloudAppliance] The cloud appliance
@param resource_group_name [String] The resource group name
@param manager_name [String] The manager name
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request.
@return [Concurrent::Promise] promise whi... | [
"@param",
"parameters",
"[",
"CloudAppliance",
"]",
"The",
"cloud",
"appliance",
"@param",
"resource_group_name",
"[",
"String",
"]",
"The",
"resource",
"group",
"name",
"@param",
"manager_name",
"[",
"String",
"]",
"The",
"manager",
"name",
"@param",
"custom_head... | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_stor_simple8000_series/lib/2017-06-01/generated/azure_mgmt_stor_simple8000_series/cloud_appliances.rb#L142-L156 | train | Provision a service managed entity. | [
30522,
13366,
9347,
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,
9347,
1035,
2004,
6038,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
grpc/grpc | src/ruby/lib/grpc/generic/active_call.rb | GRPC.ActiveCall.request_response | def request_response(req, metadata: {})
raise_error_if_already_executed
ops = {
SEND_MESSAGE => @marshal.call(req),
SEND_CLOSE_FROM_CLIENT => nil,
RECV_INITIAL_METADATA => nil,
RECV_MESSAGE => nil,
RECV_STATUS_ON_CLIENT => nil
}
@send_initial_md_mutex.sync... | ruby | def request_response(req, metadata: {})
raise_error_if_already_executed
ops = {
SEND_MESSAGE => @marshal.call(req),
SEND_CLOSE_FROM_CLIENT => nil,
RECV_INITIAL_METADATA => nil,
RECV_MESSAGE => nil,
RECV_STATUS_ON_CLIENT => nil
}
@send_initial_md_mutex.sync... | [
"def",
"request_response",
"(",
"req",
",",
"metadata",
":",
"{",
"}",
")",
"raise_error_if_already_executed",
"ops",
"=",
"{",
"SEND_MESSAGE",
"=>",
"@marshal",
".",
"call",
"(",
"req",
")",
",",
"SEND_CLOSE_FROM_CLIENT",
"=>",
"nil",
",",
"RECV_INITIAL_METADAT... | request_response sends a request to a GRPC server, and returns the
response.
@param req [Object] the request sent to the server
@param metadata [Hash] metadata to be sent to the server. If a value is
a list, multiple metadata for its key are sent
@return [Object] the response received from the server | [
"request_response",
"sends",
"a",
"request",
"to",
"a",
"GRPC",
"server",
"and",
"returns",
"the",
"response",
"."
] | f3937f0e55227a4ef3a23f895d3b204a947610f8 | https://github.com/grpc/grpc/blob/f3937f0e55227a4ef3a23f895d3b204a947610f8/src/ruby/lib/grpc/generic/active_call.rb#L350-L379 | train | Send a request to the client | [
30522,
13366,
5227,
1035,
3433,
1006,
2128,
4160,
1010,
27425,
1024,
1063,
1065,
1007,
5333,
1035,
7561,
1035,
2065,
1035,
2525,
1035,
6472,
23092,
1027,
1063,
4604,
1035,
4471,
1027,
1028,
1030,
8610,
1012,
2655,
1006,
2128,
4160,
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... |
roo-rb/roo | lib/roo/excelx.rb | Roo.Excelx.each_row_streaming | def each_row_streaming(options = {})
sheet = sheet_for(options.delete(:sheet))
if block_given?
sheet.each_row(options) { |row| yield row }
else
sheet.to_enum(:each_row, options)
end
end | ruby | def each_row_streaming(options = {})
sheet = sheet_for(options.delete(:sheet))
if block_given?
sheet.each_row(options) { |row| yield row }
else
sheet.to_enum(:each_row, options)
end
end | [
"def",
"each_row_streaming",
"(",
"options",
"=",
"{",
"}",
")",
"sheet",
"=",
"sheet_for",
"(",
"options",
".",
"delete",
"(",
":sheet",
")",
")",
"if",
"block_given?",
"sheet",
".",
"each_row",
"(",
"options",
")",
"{",
"|",
"row",
"|",
"yield",
"row... | Yield an array of Excelx::Cell
Takes options for sheet, pad_cells, and max_rows | [
"Yield",
"an",
"array",
"of",
"Excelx",
"::",
"Cell",
"Takes",
"options",
"for",
"sheet",
"pad_cells",
"and",
"max_rows"
] | 4ec1104f0c3c2a29711c0c907371cd2be12bcc3c | https://github.com/roo-rb/roo/blob/4ec1104f0c3c2a29711c0c907371cd2be12bcc3c/lib/roo/excelx.rb#L296-L303 | train | Iterate over each row of the workbook | [
30522,
13366,
2169,
1035,
5216,
1035,
11058,
1006,
7047,
1027,
1063,
1065,
1007,
7123,
1027,
7123,
1035,
2005,
1006,
7047,
1012,
3972,
12870,
1006,
1024,
7123,
1007,
1007,
2065,
3796,
1035,
2445,
1029,
7123,
1012,
2169,
1035,
5216,
1006,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_logic/lib/2016-06-01/generated/azure_mgmt_logic/workflow_triggers.rb | Azure::Logic::Mgmt::V2016_06_01.WorkflowTriggers.set_state_with_http_info | def set_state_with_http_info(resource_group_name, workflow_name, trigger_name, set_state, custom_headers:nil)
set_state_async(resource_group_name, workflow_name, trigger_name, set_state, custom_headers:custom_headers).value!
end | ruby | def set_state_with_http_info(resource_group_name, workflow_name, trigger_name, set_state, custom_headers:nil)
set_state_async(resource_group_name, workflow_name, trigger_name, set_state, custom_headers:custom_headers).value!
end | [
"def",
"set_state_with_http_info",
"(",
"resource_group_name",
",",
"workflow_name",
",",
"trigger_name",
",",
"set_state",
",",
"custom_headers",
":",
"nil",
")",
"set_state_async",
"(",
"resource_group_name",
",",
"workflow_name",
",",
"trigger_name",
",",
"set_state"... | Sets the state of a workflow trigger.
@param resource_group_name [String] The resource group name.
@param workflow_name [String] The workflow name.
@param trigger_name [String] The workflow trigger name.
@param set_state [SetTriggerStateActionDefinition] The workflow trigger
state.
@param custom_headers [Hash{St... | [
"Sets",
"the",
"state",
"of",
"a",
"workflow",
"trigger",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_logic/lib/2016-06-01/generated/azure_mgmt_logic/workflow_triggers.rb#L515-L517 | train | Sets the state of a workflow trigger. | [
30522,
13366,
2275,
1035,
2110,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2147,
12314,
1035,
2171,
1010,
9495,
1035,
2171,
1010,
2275,
1035,
2110,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_network/lib/2019-02-01/generated/azure_mgmt_network/application_gateways.rb | Azure::Network::Mgmt::V2019_02_01.ApplicationGateways.list_available_ssl_options | def list_available_ssl_options(custom_headers:nil)
response = list_available_ssl_options_async(custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def list_available_ssl_options(custom_headers:nil)
response = list_available_ssl_options_async(custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"list_available_ssl_options",
"(",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"list_available_ssl_options_async",
"(",
"custom_headers",
":custom_headers",
")",
".",
"value!",
"response",
".",
"body",
"unless",
"response",
".",
"nil?",
"end"
] | Lists available Ssl options for configuring Ssl policy.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request.
@return [ApplicationGatewayAvailableSslOptions] operation results. | [
"Lists",
"available",
"Ssl",
"options",
"for",
"configuring",
"Ssl",
"policy",
"."
] | 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#L981-L984 | train | Gets the available SSL options for the current application. | [
30522,
13366,
2862,
1035,
2800,
1035,
7020,
2140,
1035,
7047,
1006,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
2862,
1035,
2800,
1035,
7020,
2140,
1035,
7047,
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... |
watir/watir | lib/watir/legacy_wait.rb | Watir.EventuallyPresent.when_present | def when_present(timeout = nil)
msg = '#when_present'
repl_msg = '#wait_until_present if a wait is still needed'
Watir.logger.deprecate msg, repl_msg, ids: [:when_present]
timeout ||= Watir.default_timeout
message = "waiting for #{selector_string} to become present"
if block_given?... | ruby | def when_present(timeout = nil)
msg = '#when_present'
repl_msg = '#wait_until_present if a wait is still needed'
Watir.logger.deprecate msg, repl_msg, ids: [:when_present]
timeout ||= Watir.default_timeout
message = "waiting for #{selector_string} to become present"
if block_given?... | [
"def",
"when_present",
"(",
"timeout",
"=",
"nil",
")",
"msg",
"=",
"'#when_present'",
"repl_msg",
"=",
"'#wait_until_present if a wait is still needed'",
"Watir",
".",
"logger",
".",
"deprecate",
"msg",
",",
"repl_msg",
",",
"ids",
":",
"[",
":when_present",
"]",... | Waits until the element is present.
@example
browser.text_field(name: "new_user_first_name").when_present.click
browser.text_field(name: "new_user_first_name").when_present { |field| field.set "Watir" }
browser.text_field(name: "new_user_first_name").when_present(60).text
@param [Integer] timeout seconds t... | [
"Waits",
"until",
"the",
"element",
"is",
"present",
"."
] | 2d8db09811c6221ae401b85b2f61f5fa66e463a3 | https://github.com/watir/watir/blob/2d8db09811c6221ae401b85b2f61f5fa66e463a3/lib/watir/legacy_wait.rb#L79-L93 | train | Returns the result of the when_present decorator. | [
30522,
13366,
2043,
1035,
2556,
1006,
2051,
5833,
1027,
9152,
2140,
1007,
5796,
2290,
1027,
1005,
1001,
2043,
1035,
2556,
1005,
16360,
2140,
1035,
5796,
2290,
1027,
1005,
1001,
3524,
1035,
2127,
1035,
2556,
2065,
1037,
3524,
2003,
2145,
2... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_network/lib/2018-07-01/generated/azure_mgmt_network/virtual_network_gateways.rb | Azure::Network::Mgmt::V2018_07_01.VirtualNetworkGateways.begin_generatevpnclientpackage | def begin_generatevpnclientpackage(resource_group_name, virtual_network_gateway_name, parameters, custom_headers:nil)
response = begin_generatevpnclientpackage_async(resource_group_name, virtual_network_gateway_name, parameters, custom_headers:custom_headers).value!
response.body unless response.nil?
en... | ruby | def begin_generatevpnclientpackage(resource_group_name, virtual_network_gateway_name, parameters, custom_headers:nil)
response = begin_generatevpnclientpackage_async(resource_group_name, virtual_network_gateway_name, parameters, custom_headers:custom_headers).value!
response.body unless response.nil?
en... | [
"def",
"begin_generatevpnclientpackage",
"(",
"resource_group_name",
",",
"virtual_network_gateway_name",
",",
"parameters",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"begin_generatevpnclientpackage_async",
"(",
"resource_group_name",
",",
"virtual_network_gatewa... | Generates VPN client package for P2S client of the virtual network gateway in
the specified resource group.
@param resource_group_name [String] The name of the resource group.
@param virtual_network_gateway_name [String] The name of the virtual network
gateway.
@param parameters [VpnClientParameters] Parameters s... | [
"Generates",
"VPN",
"client",
"package",
"for",
"P2S",
"client",
"of",
"the",
"virtual",
"network",
"gateway",
"in",
"the",
"specified",
"resource",
"group",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_network/lib/2018-07-01/generated/azure_mgmt_network/virtual_network_gateways.rb#L1602-L1605 | train | Generates a VPN client package for P2S client. | [
30522,
13366,
4088,
1035,
9699,
2615,
2361,
12273,
8751,
3372,
23947,
4270,
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,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_container_registry/lib/2018-09-01/generated/azure_mgmt_container_registry/tasks.rb | Azure::ContainerRegistry::Mgmt::V2018_09_01.Tasks.create | def create(resource_group_name, registry_name, task_name, task_create_parameters, custom_headers:nil)
response = create_async(resource_group_name, registry_name, task_name, task_create_parameters, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def create(resource_group_name, registry_name, task_name, task_create_parameters, custom_headers:nil)
response = create_async(resource_group_name, registry_name, task_name, task_create_parameters, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"create",
"(",
"resource_group_name",
",",
"registry_name",
",",
"task_name",
",",
"task_create_parameters",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"create_async",
"(",
"resource_group_name",
",",
"registry_name",
",",
"task_name",
",",
"tas... | Creates a task for a container registry with the specified parameters.
@param resource_group_name [String] The name of the resource group to which
the container registry belongs.
@param registry_name [String] The name of the container registry.
@param task_name [String] The name of the container registry task.
@p... | [
"Creates",
"a",
"task",
"for",
"a",
"container",
"registry",
"with",
"the",
"specified",
"parameters",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_container_registry/lib/2018-09-01/generated/azure_mgmt_container_registry/tasks.rb#L242-L245 | train | Creates a task in a container registry. | [
30522,
13366,
3443,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
15584,
1035,
2171,
1010,
4708,
1035,
2171,
1010,
4708,
1035,
3443,
1035,
11709,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
3443,
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 | data/azure_key_vault/lib/2016-10-01/generated/azure_key_vault/key_vault_client.rb | Azure::KeyVault::V2016_10_01.KeyVaultClient.get_certificate_policy | def get_certificate_policy(vault_base_url, certificate_name, custom_headers:nil)
response = get_certificate_policy_async(vault_base_url, certificate_name, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def get_certificate_policy(vault_base_url, certificate_name, custom_headers:nil)
response = get_certificate_policy_async(vault_base_url, certificate_name, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"get_certificate_policy",
"(",
"vault_base_url",
",",
"certificate_name",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"get_certificate_policy_async",
"(",
"vault_base_url",
",",
"certificate_name",
",",
"custom_headers",
":custom_headers",
")",
".",
... | Lists the policy for a certificate.
The GetCertificatePolicy operation returns the specified certificate policy
resources in the specified key vault. This operation requires the
certificates/get permission.
@param vault_base_url [String] The vault name, for example
https://myvault.vault.azure.net.
@param certif... | [
"Lists",
"the",
"policy",
"for",
"a",
"certificate",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_key_vault/lib/2016-10-01/generated/azure_key_vault/key_vault_client.rb#L5570-L5573 | train | Gets the policy for a specified certificate. | [
30522,
13366,
2131,
1035,
8196,
1035,
3343,
1006,
11632,
1035,
2918,
1035,
24471,
2140,
1010,
8196,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
2131,
1035,
8196,
1035,
3343,
1035,
2004,
6038,
2278,
1006,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_network/lib/2019-02-01/generated/azure_mgmt_network/application_gateways.rb | Azure::Network::Mgmt::V2019_02_01.ApplicationGateways.start_async | def start_async(resource_group_name, application_gateway_name, custom_headers:nil)
# Send request
promise = begin_start_async(resource_group_name, application_gateway_name, custom_headers:custom_headers)
promise = promise.then do |response|
# Defining deserialization method.
deseriali... | ruby | def start_async(resource_group_name, application_gateway_name, custom_headers:nil)
# Send request
promise = begin_start_async(resource_group_name, application_gateway_name, custom_headers:custom_headers)
promise = promise.then do |response|
# Defining deserialization method.
deseriali... | [
"def",
"start_async",
"(",
"resource_group_name",
",",
"application_gateway_name",
",",
"custom_headers",
":",
"nil",
")",
"# Send request",
"promise",
"=",
"begin_start_async",
"(",
"resource_group_name",
",",
"application_gateway_name",
",",
"custom_headers",
":custom_hea... | @param resource_group_name [String] The name of the resource group.
@param application_gateway_name [String] The name of the application gateway.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request.
@return [Concurrent::Promise] promise which provides asyn... | [
"@param",
"resource_group_name",
"[",
"String",
"]",
"The",
"name",
"of",
"the",
"resource",
"group",
".",
"@param",
"application_gateway_name",
"[",
"String",
"]",
"The",
"name",
"of",
"the",
"application",
"gateway",
".",
"@param",
"custom_headers",
"[",
"Hash... | 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#L440-L454 | train | Starts an application gateway in an application group. | [
30522,
13366,
2707,
1035,
2004,
6038,
2278,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
4646,
1035,
11909,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
1001,
4604,
5227,
4872,
1027,
4088,
1035,
30524,
1001,
12854,
4078,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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_key_vault/lib/2018-02-14/generated/azure_mgmt_key_vault/vaults.rb | Azure::KeyVault::Mgmt::V2018_02_14.Vaults.get_deleted | def get_deleted(vault_name, location, custom_headers:nil)
response = get_deleted_async(vault_name, location, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def get_deleted(vault_name, location, custom_headers:nil)
response = get_deleted_async(vault_name, location, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"get_deleted",
"(",
"vault_name",
",",
"location",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"get_deleted_async",
"(",
"vault_name",
",",
"location",
",",
"custom_headers",
":custom_headers",
")",
".",
"value!",
"response",
".",
"body",
"un... | Gets the deleted Azure key vault.
@param vault_name [String] The name of the vault.
@param location [String] The location of the deleted vault.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request.
@return [DeletedVault] operation results. | [
"Gets",
"the",
"deleted",
"Azure",
"key",
"vault",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_key_vault/lib/2018-02-14/generated/azure_mgmt_key_vault/vaults.rb#L777-L780 | train | Gets the deleted vaults. | [
30522,
13366,
2131,
1035,
17159,
1006,
11632,
1035,
2171,
1010,
3295,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
2131,
1035,
17159,
1035,
2004,
6038,
2278,
1006,
11632,
1035,
2171,
1010,
3295,
1010,
7661,
1035,
20346... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
meew0/discordrb | lib/discordrb/gateway.rb | Discordrb.Gateway.run_async | def run_async
@ws_thread = Thread.new do
Thread.current[:discordrb_name] = 'websocket'
connect_loop
LOGGER.warn('The WS loop exited! Not sure if this is a good thing')
end
LOGGER.debug('WS thread created! Now waiting for confirmation that everything worked')
sleep(0.5) u... | ruby | def run_async
@ws_thread = Thread.new do
Thread.current[:discordrb_name] = 'websocket'
connect_loop
LOGGER.warn('The WS loop exited! Not sure if this is a good thing')
end
LOGGER.debug('WS thread created! Now waiting for confirmation that everything worked')
sleep(0.5) u... | [
"def",
"run_async",
"@ws_thread",
"=",
"Thread",
".",
"new",
"do",
"Thread",
".",
"current",
"[",
":discordrb_name",
"]",
"=",
"'websocket'",
"connect_loop",
"LOGGER",
".",
"warn",
"(",
"'The WS loop exited! Not sure if this is a good thing'",
")",
"end",
"LOGGER",
... | Connect to the gateway server in a separate thread | [
"Connect",
"to",
"the",
"gateway",
"server",
"in",
"a",
"separate",
"thread"
] | 764298a1ff0be69a1853b510d736f21c2b91a2fe | https://github.com/meew0/discordrb/blob/764298a1ff0be69a1853b510d736f21c2b91a2fe/lib/discordrb/gateway.rb#L163-L173 | train | Run the async WS loop | [
30522,
13366,
2448,
1035,
2004,
6038,
2278,
1030,
1059,
2015,
1035,
11689,
1027,
11689,
1012,
2047,
2079,
11689,
1012,
2783,
1031,
1024,
12532,
4103,
15185,
1035,
2171,
1033,
1027,
1005,
4773,
6499,
19869,
2102,
1005,
7532,
1035,
7077,
8833... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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 | def delete_composite_entity(app_id, version_id, c_entity_id, custom_headers:nil)
response = delete_composite_entity_async(app_id, version_id, c_entity_id, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def delete_composite_entity(app_id, version_id, c_entity_id, custom_headers:nil)
response = delete_composite_entity_async(app_id, version_id, c_entity_id, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"delete_composite_entity",
"(",
"app_id",
",",
"version_id",
",",
"c_entity_id",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"delete_composite_entity_async",
"(",
"app_id",
",",
"version_id",
",",
"c_entity_id",
",",
"custom_headers",
":custom_head... | Deletes a composite entity from 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 custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request.
@return... | [
"Deletes",
"a",
"composite",
"entity",
"from",
"a",
"version",
"of",
"the",
"application",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_cognitiveservices_luisauthoring/lib/2.0/generated/azure_cognitiveservices_luisauthoring/model.rb#L2937-L2940 | train | Deletes a composite entity. | [
30522,
13366,
3972,
12870,
1035,
12490,
1035,
9178,
1006,
10439,
1035,
8909,
1010,
2544,
1035,
8909,
1010,
1039,
1035,
9178,
1035,
8909,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
3972,
12870,
1035,
12490,
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... |
samvera/hyrax | app/helpers/hyrax/hyrax_helper_behavior.rb | Hyrax.HyraxHelperBehavior.license_links | def license_links(options)
service = Hyrax.config.license_service_class.new
to_sentence(options[:value].map { |right| link_to service.label(right), right })
end | ruby | def license_links(options)
service = Hyrax.config.license_service_class.new
to_sentence(options[:value].map { |right| link_to service.label(right), right })
end | [
"def",
"license_links",
"(",
"options",
")",
"service",
"=",
"Hyrax",
".",
"config",
".",
"license_service_class",
".",
"new",
"to_sentence",
"(",
"options",
"[",
":value",
"]",
".",
"map",
"{",
"|",
"right",
"|",
"link_to",
"service",
".",
"label",
"(",
... | A Blacklight index field helper_method
@param [Hash] options from blacklight helper_method invocation. Maps license URIs to links with labels.
@return [ActiveSupport::SafeBuffer] license links, html_safe | [
"A",
"Blacklight",
"index",
"field",
"helper_method"
] | e2b4f56e829a53b1f11296324736e9d5b8c9ee5f | https://github.com/samvera/hyrax/blob/e2b4f56e829a53b1f11296324736e9d5b8c9ee5f/app/helpers/hyrax/hyrax_helper_behavior.rb#L204-L207 | train | Link to license_service_class | [
30522,
13366,
6105,
1035,
6971,
1006,
7047,
1007,
2326,
1027,
1044,
19563,
2595,
1012,
9530,
8873,
2290,
1012,
6105,
1035,
2326,
1035,
2465,
1012,
2047,
2000,
1035,
6251,
1006,
7047,
1031,
1024,
3643,
1033,
1012,
4949,
1063,
1064,
2157,
1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_network/lib/2018-01-01/generated/azure_mgmt_network/inbound_nat_rules.rb | Azure::Network::Mgmt::V2018_01_01.InboundNatRules.begin_create_or_update | def begin_create_or_update(resource_group_name, load_balancer_name, inbound_nat_rule_name, inbound_nat_rule_parameters, custom_headers:nil)
response = begin_create_or_update_async(resource_group_name, load_balancer_name, inbound_nat_rule_name, inbound_nat_rule_parameters, custom_headers:custom_headers).value!
... | ruby | def begin_create_or_update(resource_group_name, load_balancer_name, inbound_nat_rule_name, inbound_nat_rule_parameters, custom_headers:nil)
response = begin_create_or_update_async(resource_group_name, load_balancer_name, inbound_nat_rule_name, inbound_nat_rule_parameters, custom_headers:custom_headers).value!
... | [
"def",
"begin_create_or_update",
"(",
"resource_group_name",
",",
"load_balancer_name",
",",
"inbound_nat_rule_name",
",",
"inbound_nat_rule_parameters",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"begin_create_or_update_async",
"(",
"resource_group_name",
",",
... | Creates or updates a 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 inbound_nat_rule_parameters [InboundNatRule] Para... | [
"Creates",
"or",
"updates",
"a",
"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#L401-L404 | train | Creates or updates a load balancer inbound nat rule. | [
30522,
13366,
4088,
1035,
3443,
1035,
2030,
1035,
10651,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
7170,
1035,
5703,
2099,
1035,
2171,
1010,
1999,
15494,
1035,
14085,
1035,
3627,
1035,
2171,
1010,
1999,
15494,
1035,
14085,
1035,
3627,
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_event_grid/lib/2019-02-01-preview/generated/azure_mgmt_event_grid/topics.rb | Azure::EventGrid::Mgmt::V2019_02_01_preview.Topics.update_async | def update_async(resource_group_name, topic_name, topic_update_parameters, custom_headers:nil)
# Send request
promise = begin_update_async(resource_group_name, topic_name, topic_update_parameters, custom_headers:custom_headers)
promise = promise.then do |response|
# Defining deserialization m... | ruby | def update_async(resource_group_name, topic_name, topic_update_parameters, custom_headers:nil)
# Send request
promise = begin_update_async(resource_group_name, topic_name, topic_update_parameters, custom_headers:custom_headers)
promise = promise.then do |response|
# Defining deserialization m... | [
"def",
"update_async",
"(",
"resource_group_name",
",",
"topic_name",
",",
"topic_update_parameters",
",",
"custom_headers",
":",
"nil",
")",
"# Send request",
"promise",
"=",
"begin_update_async",
"(",
"resource_group_name",
",",
"topic_name",
",",
"topic_update_paramete... | @param resource_group_name [String] The name of the resource group within the
user's subscription.
@param topic_name [String] Name of the topic
@param topic_update_parameters [TopicUpdateParameters] Topic update
information
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added... | [
"@param",
"resource_group_name",
"[",
"String",
"]",
"The",
"name",
"of",
"the",
"resource",
"group",
"within",
"the",
"user",
"s",
"subscription",
".",
"@param",
"topic_name",
"[",
"String",
"]",
"Name",
"of",
"the",
"topic",
"@param",
"topic_update_parameters"... | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_event_grid/lib/2019-02-01-preview/generated/azure_mgmt_event_grid/topics.rb#L247-L263 | train | Updates a topic. | [
30522,
13366,
10651,
1035,
2004,
6038,
2278,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
8476,
1035,
2171,
1010,
8476,
1035,
10651,
1035,
11709,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
1001,
4604,
5227,
4872,
1027,
4088,
1035,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
appium/ruby_lib | lib/appium_lib/ios/element/textfield.rb | Appium.Ios.textfield | def textfield(value)
if value.is_a? Numeric
index = value
raise "#{index} is not a valid index. Must be >= 1" if index <= 0
index -= 1 # eles_by_json and _textfields_with_predicate is 0 indexed.
result = eles_by_json(_textfield_visible)[index]
raise _no_such_element if res... | ruby | def textfield(value)
if value.is_a? Numeric
index = value
raise "#{index} is not a valid index. Must be >= 1" if index <= 0
index -= 1 # eles_by_json and _textfields_with_predicate is 0 indexed.
result = eles_by_json(_textfield_visible)[index]
raise _no_such_element if res... | [
"def",
"textfield",
"(",
"value",
")",
"if",
"value",
".",
"is_a?",
"Numeric",
"index",
"=",
"value",
"raise",
"\"#{index} is not a valid index. Must be >= 1\"",
"if",
"index",
"<=",
"0",
"index",
"-=",
"1",
"# eles_by_json and _textfields_with_predicate is 0 indexed.",
... | Find the first TextField that contains value or by index.
Note: Uses XPath
@param value [String, Integer] the text to match exactly.
If int then the TextField at that index is returned.
@return [TextField] | [
"Find",
"the",
"first",
"TextField",
"that",
"contains",
"value",
"or",
"by",
"index",
".",
"Note",
":",
"Uses",
"XPath"
] | 1f5898400dd1928bfe42ddd5f842d1f8738f2f76 | https://github.com/appium/ruby_lib/blob/1f5898400dd1928bfe42ddd5f842d1f8738f2f76/lib/appium_lib/ios/element/textfield.rb#L42-L55 | train | Returns the textfield with the given value. | [
30522,
13366,
3793,
3790,
1006,
3643,
1007,
2065,
3643,
1012,
2003,
1035,
1037,
1029,
16371,
25531,
5950,
1027,
3643,
5333,
1000,
1001,
1063,
5950,
1065,
2003,
2025,
1037,
9398,
5950,
1012,
2442,
2022,
1028,
1027,
1015,
1000,
2065,
5950,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/mime.rb | Sprockets.Mime.read_file | def read_file(filename, content_type = nil)
data = File.binread(filename)
if detect = mime_type_charset_detecter(content_type)
detect.call(data).encode(Encoding::UTF_8, universal_newline: true)
else
data
end
end | ruby | def read_file(filename, content_type = nil)
data = File.binread(filename)
if detect = mime_type_charset_detecter(content_type)
detect.call(data).encode(Encoding::UTF_8, universal_newline: true)
else
data
end
end | [
"def",
"read_file",
"(",
"filename",
",",
"content_type",
"=",
"nil",
")",
"data",
"=",
"File",
".",
"binread",
"(",
"filename",
")",
"if",
"detect",
"=",
"mime_type_charset_detecter",
"(",
"content_type",
")",
"detect",
".",
"call",
"(",
"data",
")",
".",... | Public: Read file on disk with MIME type specific encoding.
filename - String path
content_type - String MIME type
Returns String file contents transcoded to UTF-8 or in its external
encoding. | [
"Public",
":",
"Read",
"file",
"on",
"disk",
"with",
"MIME",
"type",
"specific",
"encoding",
"."
] | 9e3f0d8e98c44f57e67bc138db87bb8469bf5ddd | https://github.com/rails/sprockets/blob/9e3f0d8e98c44f57e67bc138db87bb8469bf5ddd/lib/sprockets/mime.rb#L86-L94 | train | Reads a file from the given filename. | [
30522,
13366,
3191,
1035,
5371,
1006,
5371,
18442,
1010,
4180,
1035,
2828,
1027,
9152,
2140,
1007,
2951,
1027,
5371,
1012,
8026,
16416,
2094,
1006,
5371,
18442,
1007,
2065,
11487,
1027,
2771,
4168,
1035,
2828,
1035,
25869,
13462,
1035,
1148... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
onelogin/ruby-saml | lib/xml_security.rb | XMLSecurity.Document.sign_document | def sign_document(private_key, certificate, signature_method = RSA_SHA1, digest_method = SHA1)
noko = Nokogiri::XML(self.to_s) do |config|
config.options = XMLSecurity::BaseDocument::NOKOGIRI_OPTIONS
end
signature_element = REXML::Element.new("ds:Signature").add_namespace('ds', DSIG)
si... | ruby | def sign_document(private_key, certificate, signature_method = RSA_SHA1, digest_method = SHA1)
noko = Nokogiri::XML(self.to_s) do |config|
config.options = XMLSecurity::BaseDocument::NOKOGIRI_OPTIONS
end
signature_element = REXML::Element.new("ds:Signature").add_namespace('ds', DSIG)
si... | [
"def",
"sign_document",
"(",
"private_key",
",",
"certificate",
",",
"signature_method",
"=",
"RSA_SHA1",
",",
"digest_method",
"=",
"SHA1",
")",
"noko",
"=",
"Nokogiri",
"::",
"XML",
"(",
"self",
".",
"to_s",
")",
"do",
"|",
"config",
"|",
"config",
".",
... | <Signature>
<SignedInfo>
<CanonicalizationMethod />
<SignatureMethod />
<Reference>
<Transforms>
<DigestMethod>
<DigestValue>
</Reference>
<Reference /> etc.
</SignedInfo>
<SignatureValue />
<KeyInfo />
<Object />
</Signature> | [
"<Signature",
">",
"<SignedInfo",
">",
"<CanonicalizationMethod",
"/",
">",
"<SignatureMethod",
"/",
">",
"<Reference",
">",
"<Transforms",
">",
"<DigestMethod",
">",
"<DigestValue",
">",
"<",
"/",
"Reference",
">",
"<Reference",
"/",
">",
"etc",
".",
"<",
"/"... | 688d9e927d8b2d22a8b4daa870740d234b7b76c8 | https://github.com/onelogin/ruby-saml/blob/688d9e927d8b2d22a8b4daa870740d234b7b76c8/lib/xml_security.rb#L117-L172 | train | Sign the document using the given private key and certificate | [
30522,
13366,
3696,
1035,
6254,
1006,
2797,
1035,
3145,
1010,
8196,
1010,
8085,
1035,
4118,
1027,
12667,
2050,
1035,
21146,
2487,
1010,
17886,
1035,
4118,
1027,
21146,
2487,
1007,
2053,
3683,
1027,
2053,
3683,
23243,
1024,
1024,
20950,
1006... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
mongodb/mongoid | lib/mongoid/interceptable.rb | Mongoid.Interceptable.child_callback_type | def child_callback_type(kind, child)
if kind == :update
return :create if child.new_record?
return :destroy if child.flagged_for_destroy?
kind
else
kind
end
end | ruby | def child_callback_type(kind, child)
if kind == :update
return :create if child.new_record?
return :destroy if child.flagged_for_destroy?
kind
else
kind
end
end | [
"def",
"child_callback_type",
"(",
"kind",
",",
"child",
")",
"if",
"kind",
"==",
":update",
"return",
":create",
"if",
"child",
".",
"new_record?",
"return",
":destroy",
"if",
"child",
".",
"flagged_for_destroy?",
"kind",
"else",
"kind",
"end",
"end"
] | Get the name of the callback that the child should fire. This changes
depending on whether or not the child is new. A persisted parent with a
new child would fire :update from the parent, but needs to fire :create
on the child.
@example Get the callback type.
document.child_callback_type(:update, doc)
@param ... | [
"Get",
"the",
"name",
"of",
"the",
"callback",
"that",
"the",
"child",
"should",
"fire",
".",
"This",
"changes",
"depending",
"on",
"whether",
"or",
"not",
"the",
"child",
"is",
"new",
".",
"A",
"persisted",
"parent",
"with",
"a",
"new",
"child",
"would"... | 56976e32610f4c2450882b0bfe14da099f0703f4 | https://github.com/mongodb/mongoid/blob/56976e32610f4c2450882b0bfe14da099f0703f4/lib/mongoid/interceptable.rb#L213-L221 | train | Returns the callback type for a child | [
30522,
13366,
2775,
1035,
2655,
5963,
1035,
2828,
1006,
2785,
1010,
2775,
1007,
2065,
2785,
1027,
1027,
1024,
10651,
2709,
1024,
3443,
2065,
2775,
1012,
2047,
1035,
2501,
1029,
2709,
1024,
6033,
2065,
2775,
1012,
5210,
5999,
1035,
2005,
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... |
github-changelog-generator/github-changelog-generator | lib/github_changelog_generator/generator/generator_processor.rb | GitHubChangelogGenerator.Generator.filter_array_by_labels | def filter_array_by_labels(all_issues)
filtered_issues = include_issues_by_labels(all_issues)
filtered_issues = exclude_issues_by_labels(filtered_issues)
exclude_issues_without_labels(filtered_issues)
end | ruby | def filter_array_by_labels(all_issues)
filtered_issues = include_issues_by_labels(all_issues)
filtered_issues = exclude_issues_by_labels(filtered_issues)
exclude_issues_without_labels(filtered_issues)
end | [
"def",
"filter_array_by_labels",
"(",
"all_issues",
")",
"filtered_issues",
"=",
"include_issues_by_labels",
"(",
"all_issues",
")",
"filtered_issues",
"=",
"exclude_issues_by_labels",
"(",
"filtered_issues",
")",
"exclude_issues_without_labels",
"(",
"filtered_issues",
")",
... | General filtered function
@param [Array] all_issues PRs or issues
@return [Array] filtered issues | [
"General",
"filtered",
"function"
] | f18c64b5cc0d7473b059275b88385ac11ca8b564 | https://github.com/github-changelog-generator/github-changelog-generator/blob/f18c64b5cc0d7473b059275b88385ac11ca8b564/lib/github_changelog_generator/generator/generator_processor.rb#L186-L190 | train | Filter issues by labels | [
30522,
13366,
11307,
1035,
9140,
1035,
2011,
1035,
10873,
30524,
23329,
1035,
3314,
1035,
2011,
1035,
10873,
1006,
21839,
1035,
3314,
1007,
23329,
1035,
3314,
1035,
2302,
1035,
10873,
1006,
21839,
1035,
3314,
1007,
2203,
102,
0,
0,
0,
0,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_compute/lib/2018-04-01/generated/azure_mgmt_compute/virtual_machine_extensions.rb | Azure::Compute::Mgmt::V2018_04_01.VirtualMachineExtensions.begin_update_with_http_info | def begin_update_with_http_info(resource_group_name, vm_name, vm_extension_name, extension_parameters, custom_headers:nil)
begin_update_async(resource_group_name, vm_name, vm_extension_name, extension_parameters, custom_headers:custom_headers).value!
end | ruby | def begin_update_with_http_info(resource_group_name, vm_name, vm_extension_name, extension_parameters, custom_headers:nil)
begin_update_async(resource_group_name, vm_name, vm_extension_name, extension_parameters, custom_headers:custom_headers).value!
end | [
"def",
"begin_update_with_http_info",
"(",
"resource_group_name",
",",
"vm_name",
",",
"vm_extension_name",
",",
"extension_parameters",
",",
"custom_headers",
":",
"nil",
")",
"begin_update_async",
"(",
"resource_group_name",
",",
"vm_name",
",",
"vm_extension_name",
","... | The operation to update the extension.
@param resource_group_name [String] The name of the resource group.
@param vm_name [String] The name of the virtual machine where the extension
should be updated.
@param vm_extension_name [String] The name of the virtual machine extension.
@param extension_parameters [Virtua... | [
"The",
"operation",
"to",
"update",
"the",
"extension",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_compute/lib/2018-04-01/generated/azure_mgmt_compute/virtual_machine_extensions.rb#L522-L524 | train | Updates an extension. | [
30522,
13366,
4088,
1035,
10651,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
1058,
2213,
1035,
2171,
1010,
30524,
10651,
1035,
2004,
6038,
2278,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
1058,
2213,
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/mongoid/reloadable.rb | Mongoid.Reloadable.extract_embedded_attributes | def extract_embedded_attributes(attributes)
atomic_position.split(".").inject(attributes) do |attrs, part|
attrs = attrs[part =~ /\d/ ? part.to_i : part]
attrs
end
end | ruby | def extract_embedded_attributes(attributes)
atomic_position.split(".").inject(attributes) do |attrs, part|
attrs = attrs[part =~ /\d/ ? part.to_i : part]
attrs
end
end | [
"def",
"extract_embedded_attributes",
"(",
"attributes",
")",
"atomic_position",
".",
"split",
"(",
"\".\"",
")",
".",
"inject",
"(",
"attributes",
")",
"do",
"|",
"attrs",
",",
"part",
"|",
"attrs",
"=",
"attrs",
"[",
"part",
"=~",
"/",
"\\d",
"/",
"?",... | Extract only the desired embedded document from the attributes.
@example Extract the embedded document.
document.extract_embedded_attributes(attributes)
@param [ Hash ] attributes The document in the db.
@return [ Hash ] The document's extracted attributes.
@since 2.3.2 | [
"Extract",
"only",
"the",
"desired",
"embedded",
"document",
"from",
"the",
"attributes",
"."
] | 56976e32610f4c2450882b0bfe14da099f0703f4 | https://github.com/mongodb/mongoid/blob/56976e32610f4c2450882b0bfe14da099f0703f4/lib/mongoid/reloadable.rb#L89-L94 | train | Extract the attributes from the atomic_position | [
30522,
13366,
14817,
1035,
11157,
1035,
12332,
1006,
12332,
1007,
9593,
1035,
2597,
1012,
3975,
1006,
1000,
1012,
1000,
1007,
1012,
1999,
20614,
1006,
12332,
1007,
2079,
1064,
2012,
16344,
2015,
1010,
2112,
1064,
2012,
16344,
2015,
1027,
20... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
grpc/grpc | src/ruby/lib/grpc/generic/active_call.rb | GRPC.ActiveCall.each_remote_read_then_finish | def each_remote_read_then_finish
return enum_for(:each_remote_read_then_finish) unless block_given?
loop do
resp =
begin
remote_read
rescue GRPC::Core::CallError => e
GRPC.logger.warn("In each_remote_read_then_finish: #{e}")
nil
end
... | ruby | def each_remote_read_then_finish
return enum_for(:each_remote_read_then_finish) unless block_given?
loop do
resp =
begin
remote_read
rescue GRPC::Core::CallError => e
GRPC.logger.warn("In each_remote_read_then_finish: #{e}")
nil
end
... | [
"def",
"each_remote_read_then_finish",
"return",
"enum_for",
"(",
":each_remote_read_then_finish",
")",
"unless",
"block_given?",
"loop",
"do",
"resp",
"=",
"begin",
"remote_read",
"rescue",
"GRPC",
"::",
"Core",
"::",
"CallError",
"=>",
"e",
"GRPC",
".",
"logger",
... | each_remote_read_then_finish passes each response to the given block or
returns an enumerator of the responses if no block is given.
It is like each_remote_read, but it blocks on finishing on detecting
the final message.
== Enumerator ==
* #next blocks until the remote endpoint sends a READ or FINISHED
* for e... | [
"each_remote_read_then_finish",
"passes",
"each",
"response",
"to",
"the",
"given",
"block",
"or",
"returns",
"an",
"enumerator",
"of",
"the",
"responses",
"if",
"no",
"block",
"is",
"given",
"."
] | f3937f0e55227a4ef3a23f895d3b204a947610f8 | https://github.com/grpc/grpc/blob/f3937f0e55227a4ef3a23f895d3b204a947610f8/src/ruby/lib/grpc/generic/active_call.rb#L323-L341 | train | This method is used to iterate over the remote streams and yield the response to the block. | [
30522,
13366,
2169,
1035,
6556,
1035,
3191,
1035,
2059,
1035,
3926,
2709,
4372,
2819,
1035,
2005,
1006,
1024,
2169,
1035,
6556,
1035,
3191,
1035,
2059,
1035,
3926,
1007,
4983,
3796,
1035,
2445,
1029,
7077,
2079,
24501,
2361,
1027,
4088,
6... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Katello/katello | app/models/katello/content_view_package_filter.rb | Katello.ContentViewPackageFilter.generate_clauses | def generate_clauses(repo)
package_filenames = []
self.package_rules.each do |rule|
package_filenames.concat(query_rpms(repo, rule))
end
if self.original_packages
package_filenames.concat(repo.packages_without_errata.map(&:filename))
end
{ 'filename' => { "$in" => p... | ruby | def generate_clauses(repo)
package_filenames = []
self.package_rules.each do |rule|
package_filenames.concat(query_rpms(repo, rule))
end
if self.original_packages
package_filenames.concat(repo.packages_without_errata.map(&:filename))
end
{ 'filename' => { "$in" => p... | [
"def",
"generate_clauses",
"(",
"repo",
")",
"package_filenames",
"=",
"[",
"]",
"self",
".",
"package_rules",
".",
"each",
"do",
"|",
"rule",
"|",
"package_filenames",
".",
"concat",
"(",
"query_rpms",
"(",
"repo",
",",
"rule",
")",
")",
"end",
"if",
"s... | Returns a set of Pulp/MongoDB conditions to filter out packages in the
repo repository that match parameters
@param repo [Repository] a repository containing packages to filter
@return [Array] an array of hashes with MongoDB conditions | [
"Returns",
"a",
"set",
"of",
"Pulp",
"/",
"MongoDB",
"conditions",
"to",
"filter",
"out",
"packages",
"in",
"the",
"repo",
"repository",
"that",
"match",
"parameters"
] | a1c9280067607999cae43bab89b53ba870856b76 | https://github.com/Katello/katello/blob/a1c9280067607999cae43bab89b53ba870856b76/app/models/katello/content_view_package_filter.rb#L14-L25 | train | Generate the clauses for the given repository. | [
30522,
13366,
9699,
1035,
24059,
1006,
16360,
2080,
1007,
7427,
1035,
5371,
18442,
2015,
1027,
1031,
1033,
2969,
1012,
7427,
1035,
3513,
1012,
2169,
2079,
1064,
3627,
1064,
7427,
1035,
5371,
18442,
2015,
1012,
9530,
11266,
1006,
23032,
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... |
minimagick/minimagick | lib/mini_magick/image.rb | MiniMagick.Image.layers | def layers
layers_count = identify.lines.count
layers_count.times.map do |idx|
MiniMagick::Image.new("#{path}[#{idx}]")
end
end | ruby | def layers
layers_count = identify.lines.count
layers_count.times.map do |idx|
MiniMagick::Image.new("#{path}[#{idx}]")
end
end | [
"def",
"layers",
"layers_count",
"=",
"identify",
".",
"lines",
".",
"count",
"layers_count",
".",
"times",
".",
"map",
"do",
"|",
"idx",
"|",
"MiniMagick",
"::",
"Image",
".",
"new",
"(",
"\"#{path}[#{idx}]\"",
")",
"end",
"end"
] | Returns layers of the image. For example, JPEGs are 1-layered, but
formats like PSDs, GIFs and PDFs can have multiple layers/frames/pages.
@example
image = MiniMagick::Image.new("document.pdf")
image.pages.each_with_index do |page, idx|
page.write("page#{idx}.pdf")
end
@return [Array<MiniMagick::Image... | [
"Returns",
"layers",
"of",
"the",
"image",
".",
"For",
"example",
"JPEGs",
"are",
"1",
"-",
"layered",
"but",
"formats",
"like",
"PSDs",
"GIFs",
"and",
"PDFs",
"can",
"have",
"multiple",
"layers",
"/",
"frames",
"/",
"pages",
"."
] | d484786f35e91f107836d3c86aca61d50a35820b | https://github.com/minimagick/minimagick/blob/d484786f35e91f107836d3c86aca61d50a35820b/lib/mini_magick/image.rb#L315-L320 | train | Returns an array of the image objects for the image. | [
30522,
13366,
9014,
9014,
1035,
4175,
1027,
6709,
1012,
3210,
1012,
4175,
9014,
1035,
4175,
1012,
2335,
1012,
4949,
2079,
1064,
8909,
2595,
1064,
7163,
2863,
12863,
2243,
1024,
1024,
3746,
1012,
2047,
1006,
1000,
1001,
1063,
4130,
1065,
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_service_bus/lib/2015-08-01/generated/azure_mgmt_service_bus/namespaces.rb | Azure::ServiceBus::Mgmt::V2015_08_01.Namespaces.begin_delete | def begin_delete(resource_group_name, namespace_name, custom_headers:nil)
response = begin_delete_async(resource_group_name, namespace_name, custom_headers:custom_headers).value!
nil
end | ruby | def begin_delete(resource_group_name, namespace_name, custom_headers:nil)
response = begin_delete_async(resource_group_name, namespace_name, custom_headers:custom_headers).value!
nil
end | [
"def",
"begin_delete",
"(",
"resource_group_name",
",",
"namespace_name",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"begin_delete_async",
"(",
"resource_group_name",
",",
"namespace_name",
",",
"custom_headers",
":custom_headers",
")",
".",
"value!",
"n... | Deletes an existing namespace. This operation also removes all associated
resources under the namespace.
@param resource_group_name [String] Name of the Resource group within the
Azure subscription.
@param namespace_name [String] The namespace name
@param custom_headers [Hash{String => String}] A hash of custom h... | [
"Deletes",
"an",
"existing",
"namespace",
".",
"This",
"operation",
"also",
"removes",
"all",
"associated",
"resources",
"under",
"the",
"namespace",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_service_bus/lib/2015-08-01/generated/azure_mgmt_service_bus/namespaces.rb#L1393-L1396 | train | Deletes a namespace. | [
30522,
13366,
4088,
1035,
3972,
12870,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
3415,
15327,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
4088,
1035,
3972,
12870,
1035,
2004,
6038,
2278,
1006,
7692,
1035,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | data/azure_service_fabric/lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb | Azure::ServiceFabric::V6_2_0_9.ServiceFabricClientAPIs.create_application | def create_application(application_description, timeout:60, custom_headers:nil)
response = create_application_async(application_description, timeout:timeout, custom_headers:custom_headers).value!
nil
end | ruby | def create_application(application_description, timeout:60, custom_headers:nil)
response = create_application_async(application_description, timeout:timeout, custom_headers:custom_headers).value!
nil
end | [
"def",
"create_application",
"(",
"application_description",
",",
"timeout",
":",
"60",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"create_application_async",
"(",
"application_description",
",",
"timeout",
":",
"timeout",
",",
"custom_headers",
":custom... | Creates a Service Fabric application.
Creates a Service Fabric application using the specified description.
@param application_description [ApplicationDescription] Description for
creating an application.
@param timeout [Integer] The server timeout for performing the operation in
seconds. This timeout specifies ... | [
"Creates",
"a",
"Service",
"Fabric",
"application",
"."
] | 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#L6063-L6066 | train | Creates an application. | [
30522,
13366,
3443,
1035,
4646,
1006,
4646,
1035,
6412,
1010,
2051,
5833,
1024,
3438,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
3443,
1035,
4646,
1035,
2004,
6038,
2278,
1006,
4646,
1035,
6412,
1010,
2051,
5833,
1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
sds/overcommit | lib/overcommit/configuration_validator.rb | Overcommit.ConfigurationValidator.check_hook_name_format | def check_hook_name_format(hash)
errors = []
Overcommit::Utils.supported_hook_type_classes.each do |hook_type|
hash.fetch(hook_type) { {} }.each_key do |hook_name|
next if hook_name == 'ALL'
unless hook_name.match?(/\A[A-Za-z0-9]+\z/)
errors << "#{hook_type}::#{hook... | ruby | def check_hook_name_format(hash)
errors = []
Overcommit::Utils.supported_hook_type_classes.each do |hook_type|
hash.fetch(hook_type) { {} }.each_key do |hook_name|
next if hook_name == 'ALL'
unless hook_name.match?(/\A[A-Za-z0-9]+\z/)
errors << "#{hook_type}::#{hook... | [
"def",
"check_hook_name_format",
"(",
"hash",
")",
"errors",
"=",
"[",
"]",
"Overcommit",
"::",
"Utils",
".",
"supported_hook_type_classes",
".",
"each",
"do",
"|",
"hook_type",
"|",
"hash",
".",
"fetch",
"(",
"hook_type",
")",
"{",
"{",
"}",
"}",
".",
"... | Prints an error message and raises an exception if a hook has an
invalid name, since this can result in strange errors elsewhere. | [
"Prints",
"an",
"error",
"message",
"and",
"raises",
"an",
"exception",
"if",
"a",
"hook",
"has",
"an",
"invalid",
"name",
"since",
"this",
"can",
"result",
"in",
"strange",
"errors",
"elsewhere",
"."
] | 35d60adb41da942178b789560968e3ad030b0ac7 | https://github.com/sds/overcommit/blob/35d60adb41da942178b789560968e3ad030b0ac7/lib/overcommit/configuration_validator.rb#L98-L121 | train | Check the hook name format | [
30522,
13366,
4638,
1035,
8103,
1035,
2171,
1035,
4289,
1006,
23325,
1007,
10697,
1027,
1031,
1033,
2058,
9006,
22930,
1024,
1024,
21183,
12146,
1012,
3569,
1035,
8103,
1035,
2828,
1035,
4280,
1012,
2169,
2079,
1064,
8103,
1035,
2828,
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... |
grpc/grpc | src/ruby/lib/grpc/generic/bidi_call.rb | GRPC.BidiCall.read_using_run_batch | def read_using_run_batch
ops = { RECV_MESSAGE => nil }
ops[RECV_INITIAL_METADATA] = nil unless @metadata_received
begin
batch_result = @call.run_batch(ops)
unless @metadata_received
@call.metadata = batch_result.metadata
@metadata_received = true
end
... | ruby | def read_using_run_batch
ops = { RECV_MESSAGE => nil }
ops[RECV_INITIAL_METADATA] = nil unless @metadata_received
begin
batch_result = @call.run_batch(ops)
unless @metadata_received
@call.metadata = batch_result.metadata
@metadata_received = true
end
... | [
"def",
"read_using_run_batch",
"ops",
"=",
"{",
"RECV_MESSAGE",
"=>",
"nil",
"}",
"ops",
"[",
"RECV_INITIAL_METADATA",
"]",
"=",
"nil",
"unless",
"@metadata_received",
"begin",
"batch_result",
"=",
"@call",
".",
"run_batch",
"(",
"ops",
")",
"unless",
"@metadata... | performs a read using @call.run_batch, ensures metadata is set up | [
"performs",
"a",
"read",
"using"
] | f3937f0e55227a4ef3a23f895d3b204a947610f8 | https://github.com/grpc/grpc/blob/f3937f0e55227a4ef3a23f895d3b204a947610f8/src/ruby/lib/grpc/generic/bidi_call.rb#L124-L139 | train | Reads the message from the server using the batched call. | [
30522,
13366,
3191,
1035,
2478,
1035,
2448,
1035,
14108,
23092,
1027,
1063,
28667,
2615,
1035,
4471,
1027,
1028,
9152,
2140,
1065,
23092,
1031,
28667,
2615,
1035,
3988,
1035,
27425,
1033,
1027,
9152,
2140,
4983,
1030,
27425,
1035,
2363,
408... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_web/lib/2018-02-01/generated/azure_mgmt_web/diagnostics.rb | Azure::Web::Mgmt::V2018_02_01.Diagnostics.list_site_detector_responses_slot_with_http_info | def list_site_detector_responses_slot_with_http_info(resource_group_name, site_name, slot, custom_headers:nil)
list_site_detector_responses_slot_async(resource_group_name, site_name, slot, custom_headers:custom_headers).value!
end | ruby | def list_site_detector_responses_slot_with_http_info(resource_group_name, site_name, slot, custom_headers:nil)
list_site_detector_responses_slot_async(resource_group_name, site_name, slot, custom_headers:custom_headers).value!
end | [
"def",
"list_site_detector_responses_slot_with_http_info",
"(",
"resource_group_name",
",",
"site_name",
",",
"slot",
",",
"custom_headers",
":",
"nil",
")",
"list_site_detector_responses_slot_async",
"(",
"resource_group_name",
",",
"site_name",
",",
"slot",
",",
"custom_h... | List Site Detector Responses
List Site Detector Responses
@param resource_group_name [String] Name of the resource group to which the
resource belongs.
@param site_name [String] Site Name
@param slot [String] Slot Name
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added t... | [
"List",
"Site",
"Detector",
"Responses"
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_web/lib/2018-02-01/generated/azure_mgmt_web/diagnostics.rb#L1397-L1399 | train | Gets the list of detector responses for a site. | [
30522,
13366,
2862,
1035,
2609,
1035,
19034,
1035,
10960,
1035,
10453,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2609,
1035,
2171,
1010,
10453,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
2862... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
square/connect-ruby-sdk | lib/square_connect/api/transactions_api.rb | SquareConnect.TransactionsApi.retrieve_transaction | def retrieve_transaction(location_id, transaction_id, opts = {})
data, _status_code, _headers = retrieve_transaction_with_http_info(location_id, transaction_id, opts)
return data
end | ruby | def retrieve_transaction(location_id, transaction_id, opts = {})
data, _status_code, _headers = retrieve_transaction_with_http_info(location_id, transaction_id, opts)
return data
end | [
"def",
"retrieve_transaction",
"(",
"location_id",
",",
"transaction_id",
",",
"opts",
"=",
"{",
"}",
")",
"data",
",",
"_status_code",
",",
"_headers",
"=",
"retrieve_transaction_with_http_info",
"(",
"location_id",
",",
"transaction_id",
",",
"opts",
")",
"retur... | RetrieveTransaction
Retrieves details for a single transaction.
@param location_id The ID of the transaction's associated location.
@param transaction_id The ID of the transaction to retrieve.
@param [Hash] opts the optional parameters
@return [RetrieveTransactionResponse] | [
"RetrieveTransaction",
"Retrieves",
"details",
"for",
"a",
"single",
"transaction",
"."
] | 798eb9ded716f23b9f1518386f1c311a34bca8bf | https://github.com/square/connect-ruby-sdk/blob/798eb9ded716f23b9f1518386f1c311a34bca8bf/lib/square_connect/api/transactions_api.rb#L347-L350 | train | Retrieve a single transaction | [
30522,
13366,
12850,
1035,
12598,
1006,
3295,
1035,
8909,
1010,
12598,
1035,
8909,
1010,
23569,
2015,
1027,
1063,
1065,
1007,
2951,
1010,
1035,
3570,
1035,
3642,
1010,
1035,
20346,
2015,
1027,
12850,
1035,
12598,
1035,
2007,
1035,
8299,
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_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/api_management_services.rb | Azure::ApiManagement::Mgmt::V2016_10_10.ApiManagementServices.begin_update_hostname_with_http_info | def begin_update_hostname_with_http_info(resource_group_name, service_name, parameters, custom_headers:nil)
begin_update_hostname_async(resource_group_name, service_name, parameters, custom_headers:custom_headers).value!
end | ruby | def begin_update_hostname_with_http_info(resource_group_name, service_name, parameters, custom_headers:nil)
begin_update_hostname_async(resource_group_name, service_name, parameters, custom_headers:custom_headers).value!
end | [
"def",
"begin_update_hostname_with_http_info",
"(",
"resource_group_name",
",",
"service_name",
",",
"parameters",
",",
"custom_headers",
":",
"nil",
")",
"begin_update_hostname_async",
"(",
"resource_group_name",
",",
"service_name",
",",
"parameters",
",",
"custom_headers... | Creates, updates, or deletes the custom hostnames for an API Management
service. The custom hostname can be applied to the Proxy and Portal endpoint.
This is a long running operation and could take several minutes to complete.
@param resource_group_name [String] The name of the resource group.
@param service_name ... | [
"Creates",
"updates",
"or",
"deletes",
"the",
"custom",
"hostnames",
"for",
"an",
"API",
"Management",
"service",
".",
"The",
"custom",
"hostname",
"can",
"be",
"applied",
"to",
"the",
"Proxy",
"and",
"Portal",
"endpoint",
".",
"This",
"is",
"a",
"long",
"... | 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#L1587-L1589 | train | Updates the hostname of the specified App Service Environment. | [
30522,
13366,
4088,
1035,
10651,
1035,
3677,
18442,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2326,
1035,
2171,
1010,
11709,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
4088,
1035,
10651,
1035... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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_items_api.rb | SquareConnect.V1ItemsApi.remove_modifier_list | def remove_modifier_list(location_id, modifier_list_id, item_id, opts = {})
data, _status_code, _headers = remove_modifier_list_with_http_info(location_id, modifier_list_id, item_id, opts)
return data
end | ruby | def remove_modifier_list(location_id, modifier_list_id, item_id, opts = {})
data, _status_code, _headers = remove_modifier_list_with_http_info(location_id, modifier_list_id, item_id, opts)
return data
end | [
"def",
"remove_modifier_list",
"(",
"location_id",
",",
"modifier_list_id",
",",
"item_id",
",",
"opts",
"=",
"{",
"}",
")",
"data",
",",
"_status_code",
",",
"_headers",
"=",
"remove_modifier_list_with_http_info",
"(",
"location_id",
",",
"modifier_list_id",
",",
... | RemoveModifierList
Removes a modifier list association from an item, meaning modifier options from the list can no longer be applied to the item.
@param location_id The ID of the item's associated location.
@param modifier_list_id The ID of the modifier list to remove.
@param item_id The ID of the item to remov... | [
"RemoveModifierList",
"Removes",
"a",
"modifier",
"list",
"association",
"from",
"an",
"item",
"meaning",
"modifier",
"options",
"from",
"the",
"list",
"can",
"no",
"longer",
"be",
"applied",
"to",
"the",
"item",
"."
] | 798eb9ded716f23b9f1518386f1c311a34bca8bf | https://github.com/square/connect-ruby-sdk/blob/798eb9ded716f23b9f1518386f1c311a34bca8bf/lib/square_connect/api/v1_items_api.rb#L1698-L1701 | train | Remove a modifier list from a location | [
30522,
13366,
6366,
1035,
16913,
18095,
1035,
2862,
1006,
3295,
1035,
8909,
1010,
16913,
18095,
1035,
2862,
1035,
8909,
1010,
8875,
1035,
8909,
1010,
23569,
2015,
1027,
1063,
1065,
1007,
2951,
1010,
1035,
3570,
1035,
3642,
1010,
1035,
20346... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
rails/sprockets | lib/sprockets/directive_processor.rb | Sprockets.DirectiveProcessor.extract_directives | def extract_directives(header)
processed_header = String.new("")
directives = []
header.lines.each_with_index do |line, index|
if directive = line[DIRECTIVE_PATTERN, 1]
name, *args = Shellwords.shellwords(directive)
if respond_to?("process_#{name}_directive", t... | ruby | def extract_directives(header)
processed_header = String.new("")
directives = []
header.lines.each_with_index do |line, index|
if directive = line[DIRECTIVE_PATTERN, 1]
name, *args = Shellwords.shellwords(directive)
if respond_to?("process_#{name}_directive", t... | [
"def",
"extract_directives",
"(",
"header",
")",
"processed_header",
"=",
"String",
".",
"new",
"(",
"\"\"",
")",
"directives",
"=",
"[",
"]",
"header",
".",
"lines",
".",
"each_with_index",
"do",
"|",
"line",
",",
"index",
"|",
"if",
"directive",
"=",
"... | Returns an Array of directive structures. Each structure
is an Array with the line number as the first element, the
directive name as the second element, followed by any
arguments.
[[1, "require", "foo"], [2, "require", "bar"]] | [
"Returns",
"an",
"Array",
"of",
"directive",
"structures",
".",
"Each",
"structure",
"is",
"an",
"Array",
"with",
"the",
"line",
"number",
"as",
"the",
"first",
"element",
"the",
"directive",
"name",
"as",
"the",
"second",
"element",
"followed",
"by",
"any",... | 9e3f0d8e98c44f57e67bc138db87bb8469bf5ddd | https://github.com/rails/sprockets/blob/9e3f0d8e98c44f57e67bc138db87bb8469bf5ddd/lib/sprockets/directive_processor.rb#L141-L162 | train | Extract the directives from the header | [
30522,
13366,
14817,
1035,
16449,
2015,
1006,
20346,
1007,
13995,
1035,
20346,
1027,
5164,
1012,
2047,
1006,
1000,
1000,
1007,
16449,
2015,
1027,
1031,
1033,
20346,
1012,
3210,
1012,
2169,
1035,
2007,
1035,
5950,
2079,
1064,
2240,
1010,
595... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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_agents.rb | Azure::SQL::Mgmt::V2017_03_01_preview.JobAgents.list_by_server_as_lazy | def list_by_server_as_lazy(resource_group_name, server_name, custom_headers:nil)
response = list_by_server_async(resource_group_name, server_name, custom_headers:custom_headers).value!
unless response.nil?
page = response.body
page.next_method = Proc.new do |next_page_link|
list_by... | ruby | def list_by_server_as_lazy(resource_group_name, server_name, custom_headers:nil)
response = list_by_server_async(resource_group_name, server_name, custom_headers:custom_headers).value!
unless response.nil?
page = response.body
page.next_method = Proc.new do |next_page_link|
list_by... | [
"def",
"list_by_server_as_lazy",
"(",
"resource_group_name",
",",
"server_name",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"list_by_server_async",
"(",
"resource_group_name",
",",
"server_name",
",",
"custom_headers",
":custom_headers",
")",
".",
"value!"... | Gets a list of job agents in a server.
@param resource_group_name [String] The name of the resource group that
contains the resource. You can obtain this value from the Azure Resource
Manager API or the portal.
@param server_name [String] The name of the server.
@param custom_headers [Hash{String => String}] A ha... | [
"Gets",
"a",
"list",
"of",
"job",
"agents",
"in",
"a",
"server",
"."
] | 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_agents.rb#L804-L813 | train | Gets the list of all the managed managed | [
30522,
13366,
2862,
1035,
2011,
1035,
8241,
1035,
2004,
1035,
13971,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
8241,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
2862,
1035,
2011,
1035,
8241,
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_key_vault/lib/2016-10-01/generated/azure_key_vault/key_vault_client.rb | Azure::KeyVault::V2016_10_01.KeyVaultClient.get_secrets_as_lazy | def get_secrets_as_lazy(vault_base_url, maxresults:nil, custom_headers:nil)
first_page = get_secrets_as_lazy_as_lazy(vault_base_url, maxresults:maxresults, custom_headers:custom_headers)
first_page.get_all_items
end | ruby | def get_secrets_as_lazy(vault_base_url, maxresults:nil, custom_headers:nil)
first_page = get_secrets_as_lazy_as_lazy(vault_base_url, maxresults:maxresults, custom_headers:custom_headers)
first_page.get_all_items
end | [
"def",
"get_secrets_as_lazy",
"(",
"vault_base_url",
",",
"maxresults",
":",
"nil",
",",
"custom_headers",
":",
"nil",
")",
"first_page",
"=",
"get_secrets_as_lazy_as_lazy",
"(",
"vault_base_url",
",",
"maxresults",
":",
"maxresults",
",",
"custom_headers",
":custom_h... | List secrets in a specified key vault.
The Get Secrets operation is applicable to the entire vault. However, only
the base secret identifier and its attributes are provided in the response.
Individual secret versions are not listed in the response. This operation
requires the secrets/list permission.
@param vaul... | [
"List",
"secrets",
"in",
"a",
"specified",
"key",
"vault",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_key_vault/lib/2016-10-01/generated/azure_key_vault/key_vault_client.rb#L9800-L9803 | train | Gets all the secrets for the specified vault. | [
30522,
13366,
2131,
1035,
7800,
1035,
2004,
1035,
13971,
1006,
11632,
1035,
2918,
1035,
24471,
2140,
1010,
4098,
6072,
11314,
2015,
1024,
9152,
2140,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
2034,
1035,
3931,
1027,
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... |
deivid-rodriguez/byebug | lib/byebug/frame.rb | Byebug.Frame.locals | def locals
return [] unless _binding
_binding.local_variables.each_with_object({}) do |e, a|
a[e] = _binding.local_variable_get(e)
a
end
end | ruby | def locals
return [] unless _binding
_binding.local_variables.each_with_object({}) do |e, a|
a[e] = _binding.local_variable_get(e)
a
end
end | [
"def",
"locals",
"return",
"[",
"]",
"unless",
"_binding",
"_binding",
".",
"local_variables",
".",
"each_with_object",
"(",
"{",
"}",
")",
"do",
"|",
"e",
",",
"a",
"|",
"a",
"[",
"e",
"]",
"=",
"_binding",
".",
"local_variable_get",
"(",
"e",
")",
... | Gets local variables for the frame. | [
"Gets",
"local",
"variables",
"for",
"the",
"frame",
"."
] | bf41a63858a648baa7fb621600d6451786d1572a | https://github.com/deivid-rodriguez/byebug/blob/bf41a63858a648baa7fb621600d6451786d1572a/lib/byebug/frame.rb#L50-L57 | train | Returns the array of local variables that are available in the current context. | [
30522,
13366,
10575,
2709,
1031,
1033,
4983,
1035,
8031,
1035,
8031,
1012,
2334,
1035,
10857,
1012,
2169,
1035,
2007,
1035,
4874,
1006,
1063,
1065,
1007,
2079,
1064,
1041,
1010,
1037,
1064,
1037,
1031,
1041,
1033,
1027,
1035,
8031,
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... |
fastlane/fastlane | scan/lib/scan/xcpretty_reporter_options_generator.rb | Scan.XCPrettyReporterOptionsGenerator.generate_reporter_options | def generate_reporter_options
reporter = []
valid_types = @output_types & SUPPORTED_REPORT_TYPES
valid_types.each do |raw_type|
type = raw_type.strip
output_path = File.join(File.expand_path(@output_directory), determine_output_file_name(type))
reporter << "--report #{type}"
... | ruby | def generate_reporter_options
reporter = []
valid_types = @output_types & SUPPORTED_REPORT_TYPES
valid_types.each do |raw_type|
type = raw_type.strip
output_path = File.join(File.expand_path(@output_directory), determine_output_file_name(type))
reporter << "--report #{type}"
... | [
"def",
"generate_reporter_options",
"reporter",
"=",
"[",
"]",
"valid_types",
"=",
"@output_types",
"&",
"SUPPORTED_REPORT_TYPES",
"valid_types",
".",
"each",
"do",
"|",
"raw_type",
"|",
"type",
"=",
"raw_type",
".",
"strip",
"output_path",
"=",
"File",
".",
"jo... | Intialize with values from Scan.config matching these param names | [
"Intialize",
"with",
"values",
"from",
"Scan",
".",
"config",
"matching",
"these",
"param",
"names"
] | 457c5d647c77f0e078dafa5129da616914e002c5 | https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/scan/lib/scan/xcpretty_reporter_options_generator.rb#L44-L67 | train | generates the reporter options | [
30522,
13366,
9699,
1035,
6398,
1035,
7047,
6398,
1027,
1031,
1033,
9398,
1035,
4127,
1027,
1030,
6434,
1035,
4127,
1004,
3569,
1035,
3189,
1035,
4127,
9398,
1035,
4127,
1012,
2169,
2079,
1064,
6315,
1035,
2828,
1064,
2828,
1027,
6315,
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... |
randym/axlsx | lib/axlsx/workbook/worksheet/worksheet.rb | Axlsx.Worksheet.to_xml_string | def to_xml_string str=''
add_autofilter_defined_name_to_workbook
auto_filter.apply if auto_filter.range
str << '<?xml version="1.0" encoding="UTF-8"?>'
str << worksheet_node
serializable_parts.each do |item|
item.to_xml_string(str) if item
end
str << '</worksheet>'
... | ruby | def to_xml_string str=''
add_autofilter_defined_name_to_workbook
auto_filter.apply if auto_filter.range
str << '<?xml version="1.0" encoding="UTF-8"?>'
str << worksheet_node
serializable_parts.each do |item|
item.to_xml_string(str) if item
end
str << '</worksheet>'
... | [
"def",
"to_xml_string",
"str",
"=",
"''",
"add_autofilter_defined_name_to_workbook",
"auto_filter",
".",
"apply",
"if",
"auto_filter",
".",
"range",
"str",
"<<",
"'<?xml version=\"1.0\" encoding=\"UTF-8\"?>'",
"str",
"<<",
"worksheet_node",
"serializable_parts",
".",
"each"... | Serializes the worksheet object to an xml string
This intentionally does not use nokogiri for performance reasons
@return [String] | [
"Serializes",
"the",
"worksheet",
"object",
"to",
"an",
"xml",
"string",
"This",
"intentionally",
"does",
"not",
"use",
"nokogiri",
"for",
"performance",
"reasons"
] | c593a08b2a929dac7aa8dc418b55e26b4c49dc34 | https://github.com/randym/axlsx/blob/c593a08b2a929dac7aa8dc418b55e26b4c49dc34/lib/axlsx/workbook/worksheet/worksheet.rb#L563-L572 | train | Returns xml string representation of the worksheet. | [
30522,
13366,
2000,
1035,
20950,
1035,
5164,
2358,
2099,
1027,
1005,
1005,
5587,
1035,
8285,
8873,
21928,
1035,
4225,
1035,
2171,
1035,
2000,
1035,
2147,
8654,
8285,
1035,
11307,
1012,
6611,
2065,
8285,
1035,
11307,
1012,
2846,
2358,
2099,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
lynndylanhurley/devise_token_auth | app/controllers/devise_token_auth/passwords_controller.rb | DeviseTokenAuth.PasswordsController.edit | def edit
# if a user is not found, return nil
@resource = resource_class.with_reset_password_token(resource_params[:reset_password_token])
if @resource && @resource.reset_password_period_valid?
client_id, token = @resource.create_token
# ensure that user is confirmed
@resourc... | ruby | def edit
# if a user is not found, return nil
@resource = resource_class.with_reset_password_token(resource_params[:reset_password_token])
if @resource && @resource.reset_password_period_valid?
client_id, token = @resource.create_token
# ensure that user is confirmed
@resourc... | [
"def",
"edit",
"# if a user is not found, return nil",
"@resource",
"=",
"resource_class",
".",
"with_reset_password_token",
"(",
"resource_params",
"[",
":reset_password_token",
"]",
")",
"if",
"@resource",
"&&",
"@resource",
".",
"reset_password_period_valid?",
"client_id",... | this is where users arrive after visiting the password reset confirmation link | [
"this",
"is",
"where",
"users",
"arrive",
"after",
"visiting",
"the",
"password",
"reset",
"confirmation",
"link"
] | 0727ac77e5d1cf8c065faa81ca6ddbba9cc0fe44 | https://github.com/lynndylanhurley/devise_token_auth/blob/0727ac77e5d1cf8c065faa81ca6ddbba9cc0fe44/app/controllers/devise_token_auth/passwords_controller.rb#L37-L63 | train | edit a user s password | [
30522,
13366,
10086,
1001,
2065,
1037,
5310,
2003,
2025,
2179,
1010,
2709,
9152,
2140,
1030,
7692,
1027,
7692,
1035,
2465,
1012,
2007,
1035,
25141,
1035,
20786,
1035,
19204,
1006,
7692,
1035,
11498,
5244,
1031,
1024,
25141,
1035,
20786,
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... |
randym/axlsx | lib/axlsx/drawing/num_data.rb | Axlsx.NumData.data= | def data=(values=[])
@tag_name = values.first.is_a?(Cell) ? :numCache : :numLit
values.each do |value|
value = value.is_formula? ? 0 : value.value if value.is_a?(Cell)
@pt << NumVal.new(:v => value)
end
end | ruby | def data=(values=[])
@tag_name = values.first.is_a?(Cell) ? :numCache : :numLit
values.each do |value|
value = value.is_formula? ? 0 : value.value if value.is_a?(Cell)
@pt << NumVal.new(:v => value)
end
end | [
"def",
"data",
"=",
"(",
"values",
"=",
"[",
"]",
")",
"@tag_name",
"=",
"values",
".",
"first",
".",
"is_a?",
"(",
"Cell",
")",
"?",
":numCache",
":",
":numLit",
"values",
".",
"each",
"do",
"|",
"value",
"|",
"value",
"=",
"value",
".",
"is_formu... | Creates the val objects for this data set. I am not overly confident this is going to play nicely with time and data types.
@param [Array] values An array of cells or values. | [
"Creates",
"the",
"val",
"objects",
"for",
"this",
"data",
"set",
".",
"I",
"am",
"not",
"overly",
"confident",
"this",
"is",
"going",
"to",
"play",
"nicely",
"with",
"time",
"and",
"data",
"types",
"."
] | c593a08b2a929dac7aa8dc418b55e26b4c49dc34 | https://github.com/randym/axlsx/blob/c593a08b2a929dac7aa8dc418b55e26b4c49dc34/lib/axlsx/drawing/num_data.rb#L25-L31 | train | Create a new NumVal object. | [
30522,
13366,
2951,
1027,
1006,
5300,
1027,
1031,
1033,
1007,
1030,
6415,
1035,
2171,
1027,
5300,
1012,
2034,
1012,
2003,
1035,
1037,
1029,
1006,
3526,
1007,
1029,
1024,
16371,
12458,
15395,
1024,
1024,
16371,
19968,
4183,
5300,
1012,
2169,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_key_vault/lib/2018-02-14/generated/azure_mgmt_key_vault/vaults.rb | Azure::KeyVault::Mgmt::V2018_02_14.Vaults.create_or_update_async | def create_or_update_async(resource_group_name, vault_name, parameters, custom_headers:nil)
# Send request
promise = begin_create_or_update_async(resource_group_name, vault_name, parameters, custom_headers:custom_headers)
promise = promise.then do |response|
# Defining deserialization method.... | ruby | def create_or_update_async(resource_group_name, vault_name, parameters, custom_headers:nil)
# Send request
promise = begin_create_or_update_async(resource_group_name, vault_name, parameters, custom_headers:custom_headers)
promise = promise.then do |response|
# Defining deserialization method.... | [
"def",
"create_or_update_async",
"(",
"resource_group_name",
",",
"vault_name",
",",
"parameters",
",",
"custom_headers",
":",
"nil",
")",
"# Send request",
"promise",
"=",
"begin_create_or_update_async",
"(",
"resource_group_name",
",",
"vault_name",
",",
"parameters",
... | @param resource_group_name [String] The name of the Resource Group to which
the server belongs.
@param vault_name [String] Name of the vault
@param parameters [VaultCreateOrUpdateParameters] Parameters to create or
update the vault
@param custom_headers [Hash{String => String}] A hash of custom headers that
will ... | [
"@param",
"resource_group_name",
"[",
"String",
"]",
"The",
"name",
"of",
"the",
"Resource",
"Group",
"to",
"which",
"the",
"server",
"belongs",
".",
"@param",
"vault_name",
"[",
"String",
"]",
"Name",
"of",
"the",
"vault",
"@param",
"parameters",
"[",
"Vaul... | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_key_vault/lib/2018-02-14/generated/azure_mgmt_key_vault/vaults.rb#L55-L71 | train | Creates or updates a key vault in the specified subscription. | [
30522,
13366,
3443,
1035,
2030,
1035,
10651,
1035,
2004,
6038,
2278,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
11632,
1035,
2171,
1010,
11709,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
1001,
4604,
5227,
4872,
1027,
4088,
1035,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
ruby2d/ruby2d | lib/ruby2d/window.rb | Ruby2D.Window.screenshot | def screenshot(path)
if path
ext_screenshot(path)
else
if RUBY_ENGINE == 'ruby'
time = Time.now.utc.strftime '%Y-%m-%d--%H-%M-%S'
else
time = Time.now.utc.to_i
end
ext_screenshot("./screenshot-#{time}.png")
end
end | ruby | def screenshot(path)
if path
ext_screenshot(path)
else
if RUBY_ENGINE == 'ruby'
time = Time.now.utc.strftime '%Y-%m-%d--%H-%M-%S'
else
time = Time.now.utc.to_i
end
ext_screenshot("./screenshot-#{time}.png")
end
end | [
"def",
"screenshot",
"(",
"path",
")",
"if",
"path",
"ext_screenshot",
"(",
"path",
")",
"else",
"if",
"RUBY_ENGINE",
"==",
"'ruby'",
"time",
"=",
"Time",
".",
"now",
".",
"utc",
".",
"strftime",
"'%Y-%m-%d--%H-%M-%S'",
"else",
"time",
"=",
"Time",
".",
... | Take screenshot | [
"Take",
"screenshot"
] | 43ce9805a7ae8b82b7ab8c50bf6d4c845d395dc4 | https://github.com/ruby2d/ruby2d/blob/43ce9805a7ae8b82b7ab8c50bf6d4c845d395dc4/lib/ruby2d/window.rb#L396-L407 | train | screenshots the image | [
30522,
13366,
12117,
12326,
1006,
4130,
1007,
2065,
4130,
4654,
2102,
1035,
12117,
12326,
1006,
4130,
1007,
2842,
2065,
10090,
1035,
3194,
1027,
1027,
1005,
10090,
1005,
2051,
1027,
2051,
1012,
2085,
1012,
11396,
1012,
2358,
12881,
7292,
10... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_web/lib/2015-08-01/generated/azure_mgmt_web/app_service_certificate_orders.rb | Azure::Web::Mgmt::V2015_08_01.AppServiceCertificateOrders.delete | def delete(resource_group_name, certificate_order_name, custom_headers:nil)
response = delete_async(resource_group_name, certificate_order_name, custom_headers:custom_headers).value!
nil
end | ruby | def delete(resource_group_name, certificate_order_name, custom_headers:nil)
response = delete_async(resource_group_name, certificate_order_name, custom_headers:custom_headers).value!
nil
end | [
"def",
"delete",
"(",
"resource_group_name",
",",
"certificate_order_name",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"delete_async",
"(",
"resource_group_name",
",",
"certificate_order_name",
",",
"custom_headers",
":custom_headers",
")",
".",
"value!",
... | Delete an existing certificate order.
Delete an existing certificate 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 custom_headers [Hash{String => String}] A hash of custom headers t... | [
"Delete",
"an",
"existing",
"certificate",
"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#L473-L476 | train | Deletes a certificate order. | [
30522,
13366,
3972,
12870,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
8196,
1035,
2344,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
3972,
12870,
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 | activesupport/lib/active_support/values/time_zone.rb | ActiveSupport.TimeZone.iso8601 | def iso8601(str)
parts = Date._iso8601(str)
raise ArgumentError, "invalid date" if parts.empty?
time = Time.new(
parts.fetch(:year),
parts.fetch(:mon),
parts.fetch(:mday),
parts.fetch(:hour, 0),
parts.fetch(:min, 0),
parts.fetch(:sec, 0) + parts.fetch(... | ruby | def iso8601(str)
parts = Date._iso8601(str)
raise ArgumentError, "invalid date" if parts.empty?
time = Time.new(
parts.fetch(:year),
parts.fetch(:mon),
parts.fetch(:mday),
parts.fetch(:hour, 0),
parts.fetch(:min, 0),
parts.fetch(:sec, 0) + parts.fetch(... | [
"def",
"iso8601",
"(",
"str",
")",
"parts",
"=",
"Date",
".",
"_iso8601",
"(",
"str",
")",
"raise",
"ArgumentError",
",",
"\"invalid date\"",
"if",
"parts",
".",
"empty?",
"time",
"=",
"Time",
".",
"new",
"(",
"parts",
".",
"fetch",
"(",
":year",
")",
... | Method for creating new ActiveSupport::TimeWithZone instance in time zone
of +self+ from an ISO 8601 string.
Time.zone = 'Hawaii' # => "Hawaii"
Time.zone.iso8601('1999-12-31T14:00:00') # => Fri, 31 Dec 1999 14:00:00 HST -10:00
If the time components are missing then they will be set to zer... | [
"Method",
"for",
"creating",
"new",
"ActiveSupport",
"::",
"TimeWithZone",
"instance",
"in",
"time",
"zone",
"of",
"+",
"self",
"+",
"from",
"an",
"ISO",
"8601",
"string",
"."
] | 85a8bc644be69908f05740a5886ec19cd3679df5 | https://github.com/rails/rails/blob/85a8bc644be69908f05740a5886ec19cd3679df5/activesupport/lib/active_support/values/time_zone.rb#L380-L400 | train | Returns a new object with the ISO 8601 date | [
30522,
13366,
11163,
20842,
24096,
1006,
2358,
2099,
1007,
3033,
1027,
3058,
1012,
1035,
11163,
20842,
24096,
1006,
2358,
2099,
1007,
5333,
6685,
2121,
29165,
1010,
1000,
19528,
3058,
1000,
2065,
3033,
1012,
4064,
1029,
2051,
1027,
2051,
10... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_compute/lib/2019-03-01/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb | Azure::Compute::Mgmt::V2019_03_01.VirtualMachineScaleSets.convert_to_single_placement_group_with_http_info | def convert_to_single_placement_group_with_http_info(resource_group_name, vm_scale_set_name, parameters, custom_headers:nil)
convert_to_single_placement_group_async(resource_group_name, vm_scale_set_name, parameters, custom_headers:custom_headers).value!
end | ruby | def convert_to_single_placement_group_with_http_info(resource_group_name, vm_scale_set_name, parameters, custom_headers:nil)
convert_to_single_placement_group_async(resource_group_name, vm_scale_set_name, parameters, custom_headers:custom_headers).value!
end | [
"def",
"convert_to_single_placement_group_with_http_info",
"(",
"resource_group_name",
",",
"vm_scale_set_name",
",",
"parameters",
",",
"custom_headers",
":",
"nil",
")",
"convert_to_single_placement_group_async",
"(",
"resource_group_name",
",",
"vm_scale_set_name",
",",
"par... | Converts SinglePlacementGroup property to false for a existing virtual
machine scale set.
@param resource_group_name [String] The name of the resource group.
@param vm_scale_set_name [String] The name of the virtual machine scale set
to create or update.
@param parameters [VMScaleSetConvertToSinglePlacementGroupI... | [
"Converts",
"SinglePlacementGroup",
"property",
"to",
"false",
"for",
"a",
"existing",
"virtual",
"machine",
"scale",
"set",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_compute/lib/2019-03-01/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb#L1279-L1281 | train | Convert a virtual machine to a single placement group. | [
30522,
13366,
10463,
1035,
2000,
1035,
2309,
1035,
11073,
1035,
2177,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
1058,
2213,
1035,
4094,
1035,
2275,
1035,
2171,
1010,
11709,
1010,
7661,
1035,
20346,
2015,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_stor_simple8000_series/lib/2017-06-01/generated/azure_mgmt_stor_simple8000_series/storage_account_credentials.rb | Azure::StorSimple8000Series::Mgmt::V2017_06_01.StorageAccountCredentials.get_with_http_info | def get_with_http_info(storage_account_credential_name, resource_group_name, manager_name, custom_headers:nil)
get_async(storage_account_credential_name, resource_group_name, manager_name, custom_headers:custom_headers).value!
end | ruby | def get_with_http_info(storage_account_credential_name, resource_group_name, manager_name, custom_headers:nil)
get_async(storage_account_credential_name, resource_group_name, manager_name, custom_headers:custom_headers).value!
end | [
"def",
"get_with_http_info",
"(",
"storage_account_credential_name",
",",
"resource_group_name",
",",
"manager_name",
",",
"custom_headers",
":",
"nil",
")",
"get_async",
"(",
"storage_account_credential_name",
",",
"resource_group_name",
",",
"manager_name",
",",
"custom_h... | Gets the properties of the specified storage account credential name.
@param storage_account_credential_name [String] The name of storage account
credential to be fetched.
@param resource_group_name [String] The resource group name
@param manager_name [String] The manager name
@param custom_headers [Hash{String =... | [
"Gets",
"the",
"properties",
"of",
"the",
"specified",
"storage",
"account",
"credential",
"name",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_stor_simple8000_series/lib/2017-06-01/generated/azure_mgmt_stor_simple8000_series/storage_account_credentials.rb#L147-L149 | train | Gets the specified storage account credential. | [
30522,
13366,
2131,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
5527,
1035,
4070,
1035,
13675,
14728,
19909,
1035,
2171,
1010,
7692,
1035,
2177,
1035,
2171,
1010,
3208,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
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... |
chaps-io/public_activity | lib/public_activity/roles/tracked.rb | PublicActivity.Tracked.activity | def activity(options = {})
rest = options.clone
self.activity_key = rest.delete(:key) if rest[:key]
self.activity_owner = rest.delete(:owner) if rest[:owner]
self.activity_params = rest.delete(:params) if rest[:params]
self.activity_recipient = rest.delete(:rec... | ruby | def activity(options = {})
rest = options.clone
self.activity_key = rest.delete(:key) if rest[:key]
self.activity_owner = rest.delete(:owner) if rest[:owner]
self.activity_params = rest.delete(:params) if rest[:params]
self.activity_recipient = rest.delete(:rec... | [
"def",
"activity",
"(",
"options",
"=",
"{",
"}",
")",
"rest",
"=",
"options",
".",
"clone",
"self",
".",
"activity_key",
"=",
"rest",
".",
"delete",
"(",
":key",
")",
"if",
"rest",
"[",
":key",
"]",
"self",
".",
"activity_owner",
"=",
"rest",
".",
... | A shortcut method for setting custom key, owner and parameters of {Activity}
in one line. Accepts a hash with 3 keys:
:key, :owner, :params. You can specify all of them or just the ones you want to overwrite.
== Options
[:key]
See {Common#activity_key}
[:owner]
See {Common#activity_owner}
[:params]
See... | [
"A",
"shortcut",
"method",
"for",
"setting",
"custom",
"key",
"owner",
"and",
"parameters",
"of",
"{",
"Activity",
"}",
"in",
"one",
"line",
".",
"Accepts",
"a",
"hash",
"with",
"3",
"keys",
":",
":",
"key",
":",
"owner",
":",
"params",
".",
"You",
"... | e4357cd14db67299e0cbbd656300f51b7069ea9b | https://github.com/chaps-io/public_activity/blob/e4357cd14db67299e0cbbd656300f51b7069ea9b/lib/public_activity/roles/tracked.rb#L32-L40 | train | Get the activity information for this object. | [
30522,
13366,
4023,
1006,
7047,
1027,
1063,
1065,
1007,
30524,
1024,
3145,
1007,
2065,
2717,
1031,
1024,
3145,
1033,
2969,
1012,
4023,
1035,
3954,
1027,
2717,
1012,
3972,
12870,
1006,
1024,
3954,
1007,
2065,
2717,
1031,
1024,
3954,
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... |
CocoaPods/Xcodeproj | lib/xcodeproj/project.rb | Xcodeproj.Project.embedded_targets_in_native_target | def embedded_targets_in_native_target(native_target)
native_targets.select do |target|
host_targets_for_embedded_target(target).map(&:uuid).include? native_target.uuid
end
end | ruby | def embedded_targets_in_native_target(native_target)
native_targets.select do |target|
host_targets_for_embedded_target(target).map(&:uuid).include? native_target.uuid
end
end | [
"def",
"embedded_targets_in_native_target",
"(",
"native_target",
")",
"native_targets",
".",
"select",
"do",
"|",
"target",
"|",
"host_targets_for_embedded_target",
"(",
"target",
")",
".",
"map",
"(",
":uuid",
")",
".",
"include?",
"native_target",
".",
"uuid",
... | Checks the native target for any targets in the project
that are dependent on the native target and would be
embedded in it at build time
@param [PBXNativeTarget] native target to check for
embedded targets
@return [Array<PBXNativeTarget>] A list of all targets that
are embedded in the passed ... | [
"Checks",
"the",
"native",
"target",
"for",
"any",
"targets",
"in",
"the",
"project",
"that",
"are",
"dependent",
"on",
"the",
"native",
"target",
"and",
"would",
"be",
"embedded",
"in",
"it",
"at",
"build",
"time"
] | 3be1684437a6f8e69c7836ad4c85a2b78663272f | https://github.com/CocoaPods/Xcodeproj/blob/3be1684437a6f8e69c7836ad4c85a2b78663272f/lib/xcodeproj/project.rb#L590-L594 | train | Returns the target that is embedded in the native target. | [
30522,
13366,
11157,
1035,
7889,
1035,
1999,
1035,
3128,
1035,
4539,
1006,
3128,
1035,
4539,
1007,
3128,
1035,
7889,
1012,
7276,
2079,
1064,
4539,
1064,
3677,
1035,
7889,
1035,
2005,
1035,
11157,
1035,
4539,
1006,
4539,
1007,
1012,
4949,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_compute/lib/2017-12-01/generated/azure_mgmt_compute/virtual_machines.rb | Azure::Compute::Mgmt::V2017_12_01.VirtualMachines.begin_run_command | def begin_run_command(resource_group_name, vm_name, parameters, custom_headers:nil)
response = begin_run_command_async(resource_group_name, vm_name, parameters, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def begin_run_command(resource_group_name, vm_name, parameters, custom_headers:nil)
response = begin_run_command_async(resource_group_name, vm_name, parameters, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"begin_run_command",
"(",
"resource_group_name",
",",
"vm_name",
",",
"parameters",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"begin_run_command_async",
"(",
"resource_group_name",
",",
"vm_name",
",",
"parameters",
",",
"custom_headers",
":custo... | Run command on the VM.
@param resource_group_name [String] The name of the resource group.
@param vm_name [String] The name of the virtual machine.
@param parameters [RunCommandInput] Parameters supplied to the Run command
operation.
@param custom_headers [Hash{String => String}] A hash of custom headers that
wi... | [
"Run",
"command",
"on",
"the",
"VM",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_compute/lib/2017-12-01/generated/azure_mgmt_compute/virtual_machines.rb#L2401-L2404 | train | Runs a command on a virtual machine. | [
30522,
13366,
4088,
1035,
2448,
1035,
3094,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
1058,
2213,
1035,
2171,
1010,
11709,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
4088,
1035,
2448,
1035,
3094,
1035,
2004,
6038,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
cerebris/jsonapi-resources | lib/jsonapi/resource_id_tree.rb | JSONAPI.PrimaryResourceIdTree.add_resource_fragment | def add_resource_fragment(fragment, include_related)
fragment.primary = true
init_included_relationships(fragment, include_related)
@fragments[fragment.identity] = fragment
end | ruby | def add_resource_fragment(fragment, include_related)
fragment.primary = true
init_included_relationships(fragment, include_related)
@fragments[fragment.identity] = fragment
end | [
"def",
"add_resource_fragment",
"(",
"fragment",
",",
"include_related",
")",
"fragment",
".",
"primary",
"=",
"true",
"init_included_relationships",
"(",
"fragment",
",",
"include_related",
")",
"@fragments",
"[",
"fragment",
".",
"identity",
"]",
"=",
"fragment",
... | Adds a Resource Fragment to the Resources hash
@param fragment [JSONAPI::ResourceFragment]
@param include_related [Hash]
@return [null] | [
"Adds",
"a",
"Resource",
"Fragment",
"to",
"the",
"Resources",
"hash"
] | 1ac6bba777e364eaa36706f888792b99b63d8d1a | https://github.com/cerebris/jsonapi-resources/blob/1ac6bba777e364eaa36706f888792b99b63d8d1a/lib/jsonapi/resource_id_tree.rb#L55-L61 | train | Add a fragment to the resource | [
30522,
13366,
5587,
1035,
7692,
1035,
15778,
1006,
15778,
1010,
2421,
1035,
3141,
1007,
15778,
1012,
3078,
1027,
2995,
1999,
4183,
1035,
2443,
1035,
6550,
1006,
15778,
1010,
2421,
1035,
3141,
1007,
1030,
10341,
1031,
15778,
1012,
4767,
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... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/long_term_retention_backups.rb | Azure::SQL::Mgmt::V2017_03_01_preview.LongTermRetentionBackups.get | def get(location_name, long_term_retention_server_name, long_term_retention_database_name, backup_name, custom_headers:nil)
response = get_async(location_name, long_term_retention_server_name, long_term_retention_database_name, backup_name, custom_headers:custom_headers).value!
response.body unless response... | ruby | def get(location_name, long_term_retention_server_name, long_term_retention_database_name, backup_name, custom_headers:nil)
response = get_async(location_name, long_term_retention_server_name, long_term_retention_database_name, backup_name, custom_headers:custom_headers).value!
response.body unless response... | [
"def",
"get",
"(",
"location_name",
",",
"long_term_retention_server_name",
",",
"long_term_retention_database_name",
",",
"backup_name",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"get_async",
"(",
"location_name",
",",
"long_term_retention_server_name",
",... | Gets a long term retention backup.
@param location_name [String] The location of the database.
@param long_term_retention_server_name [String] The name of the server
@param long_term_retention_database_name [String] The name of the database
@param backup_name [String] The backup name.
@param custom_headers [Hash{... | [
"Gets",
"a",
"long",
"term",
"retention",
"backup",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/long_term_retention_backups.rb#L39-L42 | train | Gets the specified long term retention policy. | [
30522,
13366,
2131,
1006,
3295,
1035,
2171,
1010,
2146,
1035,
2744,
1035,
20125,
1035,
8241,
1035,
2171,
1010,
2146,
1035,
2744,
1035,
20125,
1035,
7809,
1035,
2171,
1010,
10200,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
puppetlabs/puppet | lib/puppet/util/windows/sid.rb | Puppet::Util::Windows.SID.name_to_principal | def name_to_principal(name)
# Apparently, we accept a symbol..
name = name.to_s.strip if name
# if name is a SID string, convert it to raw bytes for use with lookup_account_sid
raw_sid_bytes = nil
begin
string_to_sid_ptr(name) do |sid_ptr|
raw_sid_bytes = sid_ptr.read_ar... | ruby | def name_to_principal(name)
# Apparently, we accept a symbol..
name = name.to_s.strip if name
# if name is a SID string, convert it to raw bytes for use with lookup_account_sid
raw_sid_bytes = nil
begin
string_to_sid_ptr(name) do |sid_ptr|
raw_sid_bytes = sid_ptr.read_ar... | [
"def",
"name_to_principal",
"(",
"name",
")",
"# Apparently, we accept a symbol..",
"name",
"=",
"name",
".",
"to_s",
".",
"strip",
"if",
"name",
"# if name is a SID string, convert it to raw bytes for use with lookup_account_sid",
"raw_sid_bytes",
"=",
"nil",
"begin",
"strin... | Convert an account name, e.g. 'Administrators' into a Principal::SID object,
e.g. 'S-1-5-32-544'. The name can be specified as 'Administrators',
'BUILTIN\Administrators', or 'S-1-5-32-544', and will return the
SID object. Returns nil if the account doesn't exist.
This method returns a SID::Principal with the accoun... | [
"Convert",
"an",
"account",
"name",
"e",
".",
"g",
".",
"Administrators",
"into",
"a",
"Principal",
"::",
"SID",
"object",
"e",
".",
"g",
".",
"S",
"-",
"1",
"-",
"5",
"-",
"32",
"-",
"544",
".",
"The",
"name",
"can",
"be",
"specified",
"as",
"Ad... | 4baeed97cbb7571ddc6635f0a24debe2e8b22cd3 | https://github.com/puppetlabs/puppet/blob/4baeed97cbb7571ddc6635f0a24debe2e8b22cd3/lib/puppet/util/windows/sid.rb#L66-L82 | train | Returns the principal for the given name. | [
30522,
13366,
2171,
1035,
2000,
1035,
4054,
1006,
2171,
1007,
1001,
4593,
1010,
2057,
5138,
1037,
6454,
1012,
1012,
2171,
1027,
2171,
1012,
2000,
1035,
1055,
1012,
6167,
2065,
2171,
1001,
2065,
2171,
2003,
1037,
15765,
5164,
1010,
10463,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
sds/scss-lint | lib/scss_lint/linter.rb | SCSSLint.Linter.add_lint | def add_lint(node_or_line_or_location, message)
@lints << Lint.new(self,
engine.filename,
extract_location(node_or_line_or_location),
message,
@config.fetch('severity', :warning).to_sym)
end | ruby | def add_lint(node_or_line_or_location, message)
@lints << Lint.new(self,
engine.filename,
extract_location(node_or_line_or_location),
message,
@config.fetch('severity', :warning).to_sym)
end | [
"def",
"add_lint",
"(",
"node_or_line_or_location",
",",
"message",
")",
"@lints",
"<<",
"Lint",
".",
"new",
"(",
"self",
",",
"engine",
".",
"filename",
",",
"extract_location",
"(",
"node_or_line_or_location",
")",
",",
"message",
",",
"@config",
".",
"fetch... | Helper for creating lint from a parse tree node
@param node_or_line_or_location [Sass::Script::Tree::Node, Fixnum,
SCSSLint::Location, Sass::Source::Position]
@param message [String] | [
"Helper",
"for",
"creating",
"lint",
"from",
"a",
"parse",
"tree",
"node"
] | e99afe4ede041a431a06e585c12ce82f6ad50116 | https://github.com/sds/scss-lint/blob/e99afe4ede041a431a06e585c12ce82f6ad50116/lib/scss_lint/linter.rb#L58-L64 | train | Adds a new lint to the list of lints. | [
30522,
13366,
5587,
1035,
11409,
2102,
1006,
13045,
1035,
2030,
1035,
2240,
1035,
2030,
1035,
3295,
1010,
4471,
1007,
1030,
11409,
3215,
1026,
1026,
11409,
2102,
1012,
2047,
1006,
2969,
1010,
3194,
1012,
5371,
18442,
1010,
14817,
1035,
3295... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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.Request.accept | def accept
@env['sinatra.accept'] ||= begin
entries = @env['HTTP_ACCEPT'].to_s.split(',')
entries.map { |e| accept_entry(e) }.sort_by(&:last).map(&:first)
end
end | ruby | def accept
@env['sinatra.accept'] ||= begin
entries = @env['HTTP_ACCEPT'].to_s.split(',')
entries.map { |e| accept_entry(e) }.sort_by(&:last).map(&:first)
end
end | [
"def",
"accept",
"@env",
"[",
"'sinatra.accept'",
"]",
"||=",
"begin",
"entries",
"=",
"@env",
"[",
"'HTTP_ACCEPT'",
"]",
".",
"to_s",
".",
"split",
"(",
"','",
")",
"entries",
".",
"map",
"{",
"|",
"e",
"|",
"accept_entry",
"(",
"e",
")",
"}",
".",
... | Returns an array of acceptable media types for the response | [
"Returns",
"an",
"array",
"of",
"acceptable",
"media",
"types",
"for",
"the",
"response"
] | 9116c90fcbb82ac03b4b33c58cfbde1fcf745e99 | https://github.com/github/linguist/blob/9116c90fcbb82ac03b4b33c58cfbde1fcf745e99/samples/Ruby/sinatra.rb#L20-L25 | train | Returns the HTTP_ACCEPT header. | [
30522,
13366,
5138,
1030,
4372,
2615,
1031,
1005,
19643,
1012,
5138,
1005,
1033,
1064,
1064,
1027,
4088,
10445,
1027,
1030,
4372,
2615,
1031,
1005,
8299,
1035,
5138,
1005,
1033,
1012,
2000,
1035,
1055,
1012,
3975,
1006,
1005,
1010,
1005,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
jeremytregunna/ruby-trello | lib/trello/label.rb | Trello.Label.save | def save
# If we have an id, just update our fields.
return update! if id
from_response client.post("/labels", {
name: name,
color: color,
idBoard: board_id,
})
end | ruby | def save
# If we have an id, just update our fields.
return update! if id
from_response client.post("/labels", {
name: name,
color: color,
idBoard: board_id,
})
end | [
"def",
"save",
"# If we have an id, just update our fields.",
"return",
"update!",
"if",
"id",
"from_response",
"client",
".",
"post",
"(",
"\"/labels\"",
",",
"{",
"name",
":",
"name",
",",
"color",
":",
"color",
",",
"idBoard",
":",
"board_id",
",",
"}",
")"... | Saves a record. | [
"Saves",
"a",
"record",
"."
] | ad79c9d8152ad5395b3b61c43170908f1912bfb2 | https://github.com/jeremytregunna/ruby-trello/blob/ad79c9d8152ad5395b3b61c43170908f1912bfb2/lib/trello/label.rb#L79-L88 | train | Save the label and its index. | [
30522,
13366,
3828,
1001,
2065,
2057,
2031,
2019,
8909,
1010,
2074,
10651,
2256,
4249,
1012,
2709,
10651,
999,
2065,
8909,
2013,
1035,
3433,
7396,
1012,
2695,
1006,
1000,
1013,
10873,
1000,
1010,
1063,
2171,
1024,
2171,
1010,
3609,
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... |
doorkeeper-gem/doorkeeper | lib/doorkeeper/config.rb | Doorkeeper.Config.validate_reuse_access_token_value | def validate_reuse_access_token_value
strategy = token_secret_strategy
return if !reuse_access_token || strategy.allows_restoring_secrets?
::Rails.logger.warn(
"You have configured both reuse_access_token " \
"AND strategy strategy '#{strategy}' that cannot restore tokens. " \
... | ruby | def validate_reuse_access_token_value
strategy = token_secret_strategy
return if !reuse_access_token || strategy.allows_restoring_secrets?
::Rails.logger.warn(
"You have configured both reuse_access_token " \
"AND strategy strategy '#{strategy}' that cannot restore tokens. " \
... | [
"def",
"validate_reuse_access_token_value",
"strategy",
"=",
"token_secret_strategy",
"return",
"if",
"!",
"reuse_access_token",
"||",
"strategy",
".",
"allows_restoring_secrets?",
"::",
"Rails",
".",
"logger",
".",
"warn",
"(",
"\"You have configured both reuse_access_token ... | Determine whether +reuse_access_token+ and a non-restorable
+token_secret_strategy+ have both been activated.
In that case, disable reuse_access_token value and warn the user. | [
"Determine",
"whether",
"+",
"reuse_access_token",
"+",
"and",
"a",
"non",
"-",
"restorable",
"+",
"token_secret_strategy",
"+",
"have",
"both",
"been",
"activated",
"."
] | f1be81891c3d54a42928c1b9e03c5d6833b8af87 | https://github.com/doorkeeper-gem/doorkeeper/blob/f1be81891c3d54a42928c1b9e03c5d6833b8af87/lib/doorkeeper/config.rb#L460-L470 | train | Validate reuse_access_token and token_secret_strategy_value | [
30522,
13366,
9398,
3686,
1035,
2128,
8557,
1035,
3229,
1035,
19204,
1035,
3643,
5656,
1027,
19204,
1035,
3595,
1035,
5656,
2709,
2065,
999,
2128,
8557,
1035,
3229,
1035,
19204,
1064,
1064,
5656,
1012,
4473,
1035,
16487,
1035,
7800,
1029,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
samvera/hyrax | app/services/hyrax/user_stat_importer.rb | Hyrax.UserStatImporter.rescue_and_retry | def rescue_and_retry(fail_message)
Retriable.retriable(retry_options) do
return yield
end
rescue StandardError => exception
log_message fail_message
log_message "Last exception #{exception}"
end | ruby | def rescue_and_retry(fail_message)
Retriable.retriable(retry_options) do
return yield
end
rescue StandardError => exception
log_message fail_message
log_message "Last exception #{exception}"
end | [
"def",
"rescue_and_retry",
"(",
"fail_message",
")",
"Retriable",
".",
"retriable",
"(",
"retry_options",
")",
"do",
"return",
"yield",
"end",
"rescue",
"StandardError",
"=>",
"exception",
"log_message",
"fail_message",
"log_message",
"\"Last exception #{exception}\"",
... | This method never fails. It tries multiple times and finally logs the exception | [
"This",
"method",
"never",
"fails",
".",
"It",
"tries",
"multiple",
"times",
"and",
"finally",
"logs",
"the",
"exception"
] | e2b4f56e829a53b1f11296324736e9d5b8c9ee5f | https://github.com/samvera/hyrax/blob/e2b4f56e829a53b1f11296324736e9d5b8c9ee5f/app/services/hyrax/user_stat_importer.rb#L79-L86 | train | Yields the block and retries the block. | [
30522,
13366,
5343,
1035,
1998,
1035,
2128,
11129,
1006,
8246,
1035,
4471,
1007,
2128,
18886,
3085,
1012,
2128,
18886,
3085,
1006,
2128,
11129,
1035,
7047,
1007,
2079,
2709,
10750,
2203,
5343,
3115,
2121,
29165,
1027,
1028,
6453,
8833,
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... |
watir/watir | lib/watir/elements/date_time_field.rb | Watir.DateTimeField.set! | def set!(date)
date = ::Time.parse date if date.is_a?(String)
message = "DateTimeField##{__callee__} only accepts instances of DateTime or Time"
raise ArgumentError, message unless [DateTime, ::Time].include?(date.class)
date_time_string = date.strftime('%Y-%m-%dT%H:%M')
element_call(:wa... | ruby | def set!(date)
date = ::Time.parse date if date.is_a?(String)
message = "DateTimeField##{__callee__} only accepts instances of DateTime or Time"
raise ArgumentError, message unless [DateTime, ::Time].include?(date.class)
date_time_string = date.strftime('%Y-%m-%dT%H:%M')
element_call(:wa... | [
"def",
"set!",
"(",
"date",
")",
"date",
"=",
"::",
"Time",
".",
"parse",
"date",
"if",
"date",
".",
"is_a?",
"(",
"String",
")",
"message",
"=",
"\"DateTimeField##{__callee__} only accepts instances of DateTime or Time\"",
"raise",
"ArgumentError",
",",
"message",
... | Enter the provided value. | [
"Enter",
"the",
"provided",
"value",
"."
] | 2d8db09811c6221ae401b85b2f61f5fa66e463a3 | https://github.com/watir/watir/blob/2d8db09811c6221ae401b85b2f61f5fa66e463a3/lib/watir/elements/date_time_field.rb#L7-L15 | train | Set the value of the field to the given value. | [
30522,
13366,
2275,
999,
1006,
3058,
1007,
3058,
1027,
1024,
1024,
2051,
1012,
11968,
3366,
3058,
2065,
3058,
1012,
2003,
1035,
1037,
1029,
1006,
5164,
1007,
4471,
1027,
1000,
3058,
7292,
3790,
1001,
1001,
1063,
1035,
1035,
2655,
4402,
10... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_locks/lib/2015-01-01/generated/azure_mgmt_locks/management_locks.rb | Azure::Locks::Mgmt::V2015_01_01.ManagementLocks.list_at_resource_group_level | def list_at_resource_group_level(resource_group_name, filter:nil, custom_headers:nil)
first_page = list_at_resource_group_level_as_lazy(resource_group_name, filter:filter, custom_headers:custom_headers)
first_page.get_all_items
end | ruby | def list_at_resource_group_level(resource_group_name, filter:nil, custom_headers:nil)
first_page = list_at_resource_group_level_as_lazy(resource_group_name, filter:filter, custom_headers:custom_headers)
first_page.get_all_items
end | [
"def",
"list_at_resource_group_level",
"(",
"resource_group_name",
",",
"filter",
":",
"nil",
",",
"custom_headers",
":",
"nil",
")",
"first_page",
"=",
"list_at_resource_group_level_as_lazy",
"(",
"resource_group_name",
",",
"filter",
":",
"filter",
",",
"custom_header... | Gets all the management locks of a resource group.
@param resource_group_name [String] Resource group name.
@param filter [String] The filter to apply on the operation.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request.
@return [Array<ManagementLockObj... | [
"Gets",
"all",
"the",
"management",
"locks",
"of",
"a",
"resource",
"group",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_locks/lib/2015-01-01/generated/azure_mgmt_locks/management_locks.rb#L843-L846 | train | Gets all the segmentation terms of the resource group. | [
30522,
13366,
2862,
1035,
2012,
1035,
7692,
1035,
2177,
1035,
2504,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
11307,
1024,
9152,
2140,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
2034,
1035,
3931,
1027,
2862,
1035,
2012,
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... |
square/connect-ruby-sdk | lib/square_connect/api/v1_items_api.rb | SquareConnect.V1ItemsApi.list_fees | def list_fees(location_id, opts = {})
data, _status_code, _headers = list_fees_with_http_info(location_id, opts)
return data
end | ruby | def list_fees(location_id, opts = {})
data, _status_code, _headers = list_fees_with_http_info(location_id, opts)
return data
end | [
"def",
"list_fees",
"(",
"location_id",
",",
"opts",
"=",
"{",
"}",
")",
"data",
",",
"_status_code",
",",
"_headers",
"=",
"list_fees_with_http_info",
"(",
"location_id",
",",
"opts",
")",
"return",
"data",
"end"
] | ListFees
Lists all of a location's fees (taxes).
@param location_id The ID of the location to list fees for.
@param [Hash] opts the optional parameters
@return [Array<V1Fee>] | [
"ListFees",
"Lists",
"all",
"of",
"a",
"location",
"s",
"fees",
"(",
"taxes",
")",
"."
] | 798eb9ded716f23b9f1518386f1c311a34bca8bf | https://github.com/square/connect-ruby-sdk/blob/798eb9ded716f23b9f1518386f1c311a34bca8bf/lib/square_connect/api/v1_items_api.rb#L1349-L1352 | train | Returns a list of fees for a location | [
30522,
13366,
2862,
1035,
9883,
1006,
3295,
1035,
8909,
1010,
23569,
2015,
1027,
1063,
1065,
1007,
2951,
1010,
1035,
3570,
1035,
3642,
1010,
1035,
20346,
2015,
1027,
2862,
1035,
30524,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/express_route_circuits.rb | Azure::Network::Mgmt::V2019_02_01.ExpressRouteCircuits.begin_update_tags_with_http_info | def begin_update_tags_with_http_info(resource_group_name, circuit_name, parameters, custom_headers:nil)
begin_update_tags_async(resource_group_name, circuit_name, parameters, custom_headers:custom_headers).value!
end | ruby | def begin_update_tags_with_http_info(resource_group_name, circuit_name, parameters, custom_headers:nil)
begin_update_tags_async(resource_group_name, circuit_name, parameters, custom_headers:custom_headers).value!
end | [
"def",
"begin_update_tags_with_http_info",
"(",
"resource_group_name",
",",
"circuit_name",
",",
"parameters",
",",
"custom_headers",
":",
"nil",
")",
"begin_update_tags_async",
"(",
"resource_group_name",
",",
"circuit_name",
",",
"parameters",
",",
"custom_headers",
":c... | Updates an express route circuit tags.
@param resource_group_name [String] The name of the resource group.
@param circuit_name [String] The name of the circuit.
@param parameters [TagsObject] Parameters supplied to update express route
circuit tags.
@param custom_headers [Hash{String => String}] A hash of custom ... | [
"Updates",
"an",
"express",
"route",
"circuit",
"tags",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_network/lib/2019-02-01/generated/azure_mgmt_network/express_route_circuits.rb#L973-L975 | train | Updates the tags of the specified express route circuit. | [
30522,
13366,
4088,
1035,
10651,
1035,
22073,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
4984,
1035,
2171,
1010,
11709,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
4088,
1035,
10651,
1035,
2207... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_operational_insights/lib/2015-03-20/generated/azure_mgmt_operational_insights/workspaces.rb | Azure::OperationalInsights::Mgmt::V2015_03_20.Workspaces.begin_get_search_results | def begin_get_search_results(resource_group_name, workspace_name, parameters, custom_headers:nil)
response = begin_get_search_results_async(resource_group_name, workspace_name, parameters, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def begin_get_search_results(resource_group_name, workspace_name, parameters, custom_headers:nil)
response = begin_get_search_results_async(resource_group_name, workspace_name, parameters, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"begin_get_search_results",
"(",
"resource_group_name",
",",
"workspace_name",
",",
"parameters",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"begin_get_search_results_async",
"(",
"resource_group_name",
",",
"workspace_name",
",",
"parameters",
",",
... | Submit a search for a given workspace. The response will contain an id to
track the search. User can use the id to poll the search status and get the
full search result later if the search takes long time to finish.
@param resource_group_name [String] The name of the resource group to get.
The name is case insensi... | [
"Submit",
"a",
"search",
"for",
"a",
"given",
"workspace",
".",
"The",
"response",
"will",
"contain",
"an",
"id",
"to",
"track",
"the",
"search",
".",
"User",
"can",
"use",
"the",
"id",
"to",
"poll",
"the",
"search",
"status",
"and",
"get",
"the",
"ful... | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_operational_insights/lib/2015-03-20/generated/azure_mgmt_operational_insights/workspaces.rb#L603-L606 | train | Gets the search results for a given workspace. | [
30522,
13366,
4088,
1035,
2131,
1035,
3945,
1035,
3463,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2573,
15327,
1035,
2171,
1010,
11709,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
4088,
1035,
2131,
1035,
3945,
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... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.