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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
danger/danger | lib/danger/plugin_support/plugin_linter.rb | Danger.PluginLinter.apply_rules | def apply_rules(json, type, rules)
rules.each do |rule|
next unless rule.function.call(json)
rule.metadata = json
rule.type = type
case rule.modifier
when :warning
warnings << rule
when :error
errors << rule
end
end
end | ruby | def apply_rules(json, type, rules)
rules.each do |rule|
next unless rule.function.call(json)
rule.metadata = json
rule.type = type
case rule.modifier
when :warning
warnings << rule
when :error
errors << rule
end
end
end | [
"def",
"apply_rules",
"(",
"json",
",",
"type",
",",
"rules",
")",
"rules",
".",
"each",
"do",
"|",
"rule",
"|",
"next",
"unless",
"rule",
".",
"function",
".",
"call",
"(",
"json",
")",
"rule",
".",
"metadata",
"=",
"json",
"rule",
".",
"type",
"=... | Runs the rule, if it fails then additional metadata
is added to the rule (for printing later) and it's
added to either `warnings` or `errors`. | [
"Runs",
"the",
"rule",
"if",
"it",
"fails",
"then",
"additional",
"metadata",
"is",
"added",
"to",
"the",
"rule",
"(",
"for",
"printing",
"later",
")",
"and",
"it",
"s",
"added",
"to",
"either",
"warnings",
"or",
"errors",
"."
] | 0d6d09f2d949c287fe75202d947374042b0679f4 | https://github.com/danger/danger/blob/0d6d09f2d949c287fe75202d947374042b0679f4/lib/danger/plugin_support/plugin_linter.rb#L146-L159 | train | Apply rules to the given JSON | [
30522,
13366,
6611,
1035,
3513,
1006,
1046,
3385,
1010,
2828,
1010,
3513,
1007,
3513,
1012,
2169,
2079,
1064,
3627,
1064,
2279,
4983,
3627,
1012,
3853,
1012,
2655,
1006,
1046,
3385,
1007,
3627,
1012,
27425,
1027,
1046,
3385,
3627,
1012,
2... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | data/azure_service_fabric/lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb | Azure::ServiceFabric::V6_2_0_9.ServiceFabricClientAPIs.delete_backup_policy | def delete_backup_policy(backup_policy_name, timeout:60, custom_headers:nil)
response = delete_backup_policy_async(backup_policy_name, timeout:timeout, custom_headers:custom_headers).value!
nil
end | ruby | def delete_backup_policy(backup_policy_name, timeout:60, custom_headers:nil)
response = delete_backup_policy_async(backup_policy_name, timeout:timeout, custom_headers:custom_headers).value!
nil
end | [
"def",
"delete_backup_policy",
"(",
"backup_policy_name",
",",
"timeout",
":",
"60",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"delete_backup_policy_async",
"(",
"backup_policy_name",
",",
"timeout",
":",
"timeout",
",",
"custom_headers",
":custom_heade... | Deletes the backup policy.
Deletes an existing backup policy. A backup policy must be created before it
can be deleted. A currently active backup policy, associated with any Service
Fabric application, service or partition, cannot be deleted without first
deleting the mapping.
@param backup_policy_name [String] ... | [
"Deletes",
"the",
"backup",
"policy",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_service_fabric/lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb#L22328-L22331 | train | Deletes the backup policy. | [
30522,
13366,
3972,
12870,
1035,
10200,
1035,
3343,
1006,
10200,
1035,
3343,
1035,
2171,
1010,
2051,
5833,
1024,
3438,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
3972,
12870,
1035,
10200,
1035,
3343,
1035,
2004,
6038... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
rails/rails | actionpack/lib/action_controller/metal/head.rb | ActionController.Head.head | def head(status, options = {})
if status.is_a?(Hash)
raise ArgumentError, "#{status.inspect} is not a valid value for `status`."
end
status ||= :ok
location = options.delete(:location)
content_type = options.delete(:content_type)
options.each do |key, value|
header... | ruby | def head(status, options = {})
if status.is_a?(Hash)
raise ArgumentError, "#{status.inspect} is not a valid value for `status`."
end
status ||= :ok
location = options.delete(:location)
content_type = options.delete(:content_type)
options.each do |key, value|
header... | [
"def",
"head",
"(",
"status",
",",
"options",
"=",
"{",
"}",
")",
"if",
"status",
".",
"is_a?",
"(",
"Hash",
")",
"raise",
"ArgumentError",
",",
"\"#{status.inspect} is not a valid value for `status`.\"",
"end",
"status",
"||=",
":ok",
"location",
"=",
"options"... | Returns a response that has no content (merely headers). The options
argument is interpreted to be a hash of header names and values.
This allows you to easily return a response that consists only of
significant headers:
head :created, location: person_path(@person)
head :created, location: @person
It can ... | [
"Returns",
"a",
"response",
"that",
"has",
"no",
"content",
"(",
"merely",
"headers",
")",
".",
"The",
"options",
"argument",
"is",
"interpreted",
"to",
"be",
"a",
"hash",
"of",
"header",
"names",
"and",
"values",
".",
"This",
"allows",
"you",
"to",
"eas... | 85a8bc644be69908f05740a5886ec19cd3679df5 | https://github.com/rails/rails/blob/85a8bc644be69908f05740a5886ec19cd3679df5/actionpack/lib/action_controller/metal/head.rb#L21-L46 | train | Returns a hash of HTTP headers. | [
30522,
13366,
2132,
1006,
3570,
1010,
7047,
1027,
1063,
1065,
1007,
2065,
3570,
1012,
2003,
1035,
1037,
1029,
1006,
23325,
1007,
5333,
6685,
2121,
29165,
1010,
1000,
1001,
1063,
3570,
1012,
22459,
1065,
2003,
2025,
1037,
9398,
3643,
2005,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | data/azure_cognitiveservices_luisauthoring/lib/2.0/generated/azure_cognitiveservices_luisauthoring/model.rb | Azure::CognitiveServices::LuisAuthoring::V2_0.Model.update_hierarchical_entity_child_with_http_info | def update_hierarchical_entity_child_with_http_info(app_id, version_id, h_entity_id, h_child_id, hierarchical_child_model_update_object, custom_headers:nil)
update_hierarchical_entity_child_async(app_id, version_id, h_entity_id, h_child_id, hierarchical_child_model_update_object, custom_headers:custom_headers).va... | ruby | def update_hierarchical_entity_child_with_http_info(app_id, version_id, h_entity_id, h_child_id, hierarchical_child_model_update_object, custom_headers:nil)
update_hierarchical_entity_child_async(app_id, version_id, h_entity_id, h_child_id, hierarchical_child_model_update_object, custom_headers:custom_headers).va... | [
"def",
"update_hierarchical_entity_child_with_http_info",
"(",
"app_id",
",",
"version_id",
",",
"h_entity_id",
",",
"h_child_id",
",",
"hierarchical_child_model_update_object",
",",
"custom_headers",
":",
"nil",
")",
"update_hierarchical_entity_child_async",
"(",
"app_id",
"... | Renames a single child in an existing hierarchical entity model in a version
of the application.
@param app_id The application ID.
@param version_id [String] The version ID.
@param h_entity_id The hierarchical entity extractor ID.
@param h_child_id The hierarchical entity extractor child ID.
@param hierarchical_... | [
"Renames",
"a",
"single",
"child",
"in",
"an",
"existing",
"hierarchical",
"entity",
"model",
"in",
"a",
"version",
"of",
"the",
"application",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_cognitiveservices_luisauthoring/lib/2.0/generated/azure_cognitiveservices_luisauthoring/model.rb#L5113-L5115 | train | Updates a hierarchical entity child. | [
30522,
13366,
10651,
1035,
25835,
1035,
9178,
1035,
2775,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
10439,
1035,
8909,
1010,
2544,
1035,
8909,
1010,
1044,
1035,
9178,
1035,
8909,
1010,
1044,
1035,
2775,
1035,
8909,
1010,
25835,
1035,
2775,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
middleman/middleman | middleman-core/lib/middleman-core/rack.rb | Middleman.Rack.not_found | def not_found(res, path)
path = ::Rack::Utils.escape_html(path)
res.status = 404
res.write "<html><head></head><body><h1>File Not Found</h1><p>#{path}</p></body></html>"
res.finish
end | ruby | def not_found(res, path)
path = ::Rack::Utils.escape_html(path)
res.status = 404
res.write "<html><head></head><body><h1>File Not Found</h1><p>#{path}</p></body></html>"
res.finish
end | [
"def",
"not_found",
"(",
"res",
",",
"path",
")",
"path",
"=",
"::",
"Rack",
"::",
"Utils",
".",
"escape_html",
"(",
"path",
")",
"res",
".",
"status",
"=",
"404",
"res",
".",
"write",
"\"<html><head></head><body><h1>File Not Found</h1><p>#{path}</p></body></html>... | Halt request and return 404 | [
"Halt",
"request",
"and",
"return",
"404"
] | a0dd9f78094813162895511e8516e0c5507cee50 | https://github.com/middleman/middleman/blob/a0dd9f78094813162895511e8516e0c5507cee50/middleman-core/lib/middleman-core/rack.rb#L122-L127 | train | Write a 404 response | [
30522,
13366,
2025,
1035,
2179,
1006,
24501,
1010,
4130,
1007,
4130,
1027,
1024,
1024,
14513,
1024,
1024,
21183,
12146,
30524,
16129,
1028,
1026,
2132,
1028,
1026,
1013,
2132,
1028,
1026,
2303,
1028,
1026,
1044,
2487,
1028,
5371,
2025,
2179... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
typhoeus/typhoeus | lib/typhoeus/request.rb | Typhoeus.Request.url | def url
easy = EasyFactory.new(self).get
url = easy.url
Typhoeus::Pool.release(easy)
url
end | ruby | def url
easy = EasyFactory.new(self).get
url = easy.url
Typhoeus::Pool.release(easy)
url
end | [
"def",
"url",
"easy",
"=",
"EasyFactory",
".",
"new",
"(",
"self",
")",
".",
"get",
"url",
"=",
"easy",
".",
"url",
"Typhoeus",
"::",
"Pool",
".",
"release",
"(",
"easy",
")",
"url",
"end"
] | Creates a new request.
@example Simplest request.
response = Typhoeus::Request.new("www.example.com").run
@example Request with url parameters.
response = Typhoeus::Request.new(
"www.example.com",
params: {a: 1}
).run
@example Request with a body.
response = Typhoeus::Request.new(
"www.... | [
"Creates",
"a",
"new",
"request",
"."
] | d072aaf6edcf46d54d6a6bce45286629bf4e5af6 | https://github.com/typhoeus/typhoeus/blob/d072aaf6edcf46d54d6a6bce45286629bf4e5af6/lib/typhoeus/request.rb#L129-L134 | train | Get the url of the current object | [
30522,
13366,
24471,
2140,
3733,
1027,
3733,
21450,
1012,
2047,
1006,
2969,
1007,
1012,
2131,
24471,
2140,
1027,
3733,
1012,
24471,
2140,
5939,
8458,
8913,
2271,
1024,
1024,
4770,
1012,
2713,
1006,
3733,
1007,
24471,
2140,
2203,
102,
0,
0... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
fastlane/fastlane | frameit/lib/frameit/editor.rb | Frameit.Editor.fetch_config | def fetch_config
return @config if @config
config_path = File.join(File.expand_path("..", screenshot.path), "Framefile.json")
config_path = File.join(File.expand_path("../..", screenshot.path), "Framefile.json") unless File.exist?(config_path)
file = ConfigParser.new.load(config_path)
ret... | ruby | def fetch_config
return @config if @config
config_path = File.join(File.expand_path("..", screenshot.path), "Framefile.json")
config_path = File.join(File.expand_path("../..", screenshot.path), "Framefile.json") unless File.exist?(config_path)
file = ConfigParser.new.load(config_path)
ret... | [
"def",
"fetch_config",
"return",
"@config",
"if",
"@config",
"config_path",
"=",
"File",
".",
"join",
"(",
"File",
".",
"expand_path",
"(",
"\"..\"",
",",
"screenshot",
".",
"path",
")",
",",
"\"Framefile.json\"",
")",
"config_path",
"=",
"File",
".",
"join"... | Loads the config (colors, background, texts, etc.)
Don't use this method to access the actual text and use `fetch_texts` instead | [
"Loads",
"the",
"config",
"(",
"colors",
"background",
"texts",
"etc",
".",
")",
"Don",
"t",
"use",
"this",
"method",
"to",
"access",
"the",
"actual",
"text",
"and",
"use",
"fetch_texts",
"instead"
] | 457c5d647c77f0e078dafa5129da616914e002c5 | https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/frameit/lib/frameit/editor.rb#L493-L501 | train | Fetch the config file at the last position | [
30522,
13366,
18584,
1035,
9530,
8873,
2290,
2709,
1030,
9530,
8873,
2290,
2065,
1030,
9530,
8873,
2290,
9530,
8873,
2290,
1035,
4130,
1027,
5371,
1012,
3693,
1006,
5371,
1012,
7818,
1035,
4130,
1006,
1000,
1012,
1012,
1000,
1010,
12117,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/util/storage.rb | Axlsx.Storage.data= | def data=(v)
Axlsx::validate_string(v)
self.type = TYPES[:stream] unless @type
@size = v.size
@data = v.bytes.to_a
end | ruby | def data=(v)
Axlsx::validate_string(v)
self.type = TYPES[:stream] unless @type
@size = v.size
@data = v.bytes.to_a
end | [
"def",
"data",
"=",
"(",
"v",
")",
"Axlsx",
"::",
"validate_string",
"(",
"v",
")",
"self",
".",
"type",
"=",
"TYPES",
"[",
":stream",
"]",
"unless",
"@type",
"@size",
"=",
"v",
".",
"size",
"@data",
"=",
"v",
".",
"bytes",
".",
"to_a",
"end"
] | Set the data associated with the stream. If the stream type is undefined, we automatically specify the storage as a stream type. # with the exception of storages that are type root, all storages with data should be type stream.
@param [String] v The data for this storages stream
@return [Array] | [
"Set",
"the",
"data",
"associated",
"with",
"the",
"stream",
".",
"If",
"the",
"stream",
"type",
"is",
"undefined",
"we",
"automatically",
"specify",
"the",
"storage",
"as",
"a",
"stream",
"type",
".",
"#",
"with",
"the",
"exception",
"of",
"storages",
"th... | c593a08b2a929dac7aa8dc418b55e26b4c49dc34 | https://github.com/randym/axlsx/blob/c593a08b2a929dac7aa8dc418b55e26b4c49dc34/lib/axlsx/util/storage.rb#L79-L84 | train | Set the data of the file. | [
30522,
13366,
2951,
1027,
1006,
1058,
1007,
22260,
4877,
2595,
1024,
1024,
9398,
3686,
1035,
5164,
1006,
1058,
1007,
2969,
1012,
2828,
1027,
4127,
1031,
1024,
5460,
1033,
4983,
1030,
2828,
1030,
2946,
1027,
30524,
2951,
1027,
1058,
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... |
sds/haml-lint | lib/haml_lint/linter.rb | HamlLint.Linter.following_node_line | def following_node_line(node)
[
[node.children.first, next_node(node)].compact.map(&:line),
@document.source_lines.count + 1,
].flatten.min
end | ruby | def following_node_line(node)
[
[node.children.first, next_node(node)].compact.map(&:line),
@document.source_lines.count + 1,
].flatten.min
end | [
"def",
"following_node_line",
"(",
"node",
")",
"[",
"[",
"node",
".",
"children",
".",
"first",
",",
"next_node",
"(",
"node",
")",
"]",
".",
"compact",
".",
"map",
"(",
":line",
")",
",",
"@document",
".",
"source_lines",
".",
"count",
"+",
"1",
",... | Returns the line of the "following node" (child of this node or sibling or
the last line in the file).
@param node [HamlLint::Tree::Node] | [
"Returns",
"the",
"line",
"of",
"the",
"following",
"node",
"(",
"child",
"of",
"this",
"node",
"or",
"sibling",
"or",
"the",
"last",
"line",
"in",
"the",
"file",
")",
"."
] | 024c773667e54cf88db938c2b368977005d70ee8 | https://github.com/sds/haml-lint/blob/024c773667e54cf88db938c2b368977005d70ee8/lib/haml_lint/linter.rb#L167-L172 | train | Returns the number of lines following the given node. | [
30522,
13366,
2206,
1035,
13045,
1035,
2240,
1006,
13045,
1007,
1031,
1031,
13045,
1012,
2336,
1012,
2034,
1010,
2279,
1035,
13045,
1006,
13045,
1007,
1033,
1012,
9233,
1012,
4949,
1006,
1004,
1024,
2240,
1007,
1010,
1030,
6254,
1012,
3120,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
sporkmonger/addressable | lib/addressable/uri.rb | Addressable.URI.tld= | def tld=(new_tld)
replaced_tld = domain.sub(/#{tld}\z/, new_tld)
self.host = PublicSuffix::Domain.new(replaced_tld).to_s
end | ruby | def tld=(new_tld)
replaced_tld = domain.sub(/#{tld}\z/, new_tld)
self.host = PublicSuffix::Domain.new(replaced_tld).to_s
end | [
"def",
"tld",
"=",
"(",
"new_tld",
")",
"replaced_tld",
"=",
"domain",
".",
"sub",
"(",
"/",
"#{",
"tld",
"}",
"\\z",
"/",
",",
"new_tld",
")",
"self",
".",
"host",
"=",
"PublicSuffix",
"::",
"Domain",
".",
"new",
"(",
"replaced_tld",
")",
".",
"to... | Sets the top-level domain for this URI.
@param [String, #to_str] new_tld The new top-level domain. | [
"Sets",
"the",
"top",
"-",
"level",
"domain",
"for",
"this",
"URI",
"."
] | 5894c95a7768435cb46d1355954611dbd194832e | https://github.com/sporkmonger/addressable/blob/5894c95a7768435cb46d1355954611dbd194832e/lib/addressable/uri.rb#L1184-L1187 | train | Replace the tld with the new tld | [
30522,
13366,
1056,
6392,
1027,
1006,
2047,
1035,
30524,
2595,
1024,
1024,
5884,
1012,
2047,
1006,
2999,
1035,
1056,
6392,
1007,
1012,
2000,
1035,
1055,
2203,
102,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
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_deployed_application_info_list_with_http_info | def get_deployed_application_info_list_with_http_info(node_name, timeout:60, include_health_state:false, continuation_token:nil, max_results:0, custom_headers:nil)
get_deployed_application_info_list_async(node_name, timeout:timeout, include_health_state:include_health_state, continuation_token:continuation_token,... | ruby | def get_deployed_application_info_list_with_http_info(node_name, timeout:60, include_health_state:false, continuation_token:nil, max_results:0, custom_headers:nil)
get_deployed_application_info_list_async(node_name, timeout:timeout, include_health_state:include_health_state, continuation_token:continuation_token,... | [
"def",
"get_deployed_application_info_list_with_http_info",
"(",
"node_name",
",",
"timeout",
":",
"60",
",",
"include_health_state",
":",
"false",
",",
"continuation_token",
":",
"nil",
",",
"max_results",
":",
"0",
",",
"custom_headers",
":",
"nil",
")",
"get_depl... | Gets the list of applications deployed on a Service Fabric node.
Gets the list of applications deployed on a Service Fabric node. The results
do not include information about deployed system applications unless
explicitly queried for by ID. Results encompass deployed applications in
active, activating, and downloa... | [
"Gets",
"the",
"list",
"of",
"applications",
"deployed",
"on",
"a",
"Service",
"Fabric",
"node",
"."
] | 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#L8446-L8448 | train | Gets the list of applications deployed to a Service Fabric node. | [
30522,
13366,
2131,
1035,
7333,
1035,
4646,
1035,
18558,
1035,
2862,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
13045,
1035,
2171,
1010,
2051,
5833,
1024,
3438,
1010,
2421,
1035,
2740,
1035,
2110,
1024,
6270,
1010,
13633,
1035,
19204,
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... |
fastlane/fastlane | supply/lib/supply/client.rb | Supply.Client.apk_listings | def apk_listings(apk_version_code)
ensure_active_edit!
result = call_google_api do
client.list_apk_listings(
current_package_name,
current_edit.id,
apk_version_code
)
end
return (result.listings || []).map do |row|
ApkListing.new(row.recent... | ruby | def apk_listings(apk_version_code)
ensure_active_edit!
result = call_google_api do
client.list_apk_listings(
current_package_name,
current_edit.id,
apk_version_code
)
end
return (result.listings || []).map do |row|
ApkListing.new(row.recent... | [
"def",
"apk_listings",
"(",
"apk_version_code",
")",
"ensure_active_edit!",
"result",
"=",
"call_google_api",
"do",
"client",
".",
"list_apk_listings",
"(",
"current_package_name",
",",
"current_edit",
".",
"id",
",",
"apk_version_code",
")",
"end",
"return",
"(",
"... | Get a list of all apk listings (changelogs) - returns the list | [
"Get",
"a",
"list",
"of",
"all",
"apk",
"listings",
"(",
"changelogs",
")",
"-",
"returns",
"the",
"list"
] | 457c5d647c77f0e078dafa5129da616914e002c5 | https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/supply/lib/supply/client.rb#L223-L237 | train | Returns an array of ApkListing objects for the current edit. | [
30522,
13366,
9706,
2243,
1035,
26213,
1006,
9706,
2243,
1035,
2544,
1035,
3642,
1007,
5676,
1035,
3161,
1035,
10086,
999,
2765,
1027,
2655,
1035,
8224,
1035,
17928,
2079,
7396,
1012,
2862,
1035,
9706,
2243,
1035,
26213,
1006,
2783,
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_stream_analytics/lib/2016-03-01/generated/azure_mgmt_stream_analytics/transformations.rb | Azure::StreamAnalytics::Mgmt::V2016_03_01.Transformations.create_or_replace_with_http_info | def create_or_replace_with_http_info(transformation, resource_group_name, job_name, transformation_name, if_match:nil, if_none_match:nil, custom_headers:nil)
create_or_replace_async(transformation, resource_group_name, job_name, transformation_name, if_match:if_match, if_none_match:if_none_match, custom_headers:c... | ruby | def create_or_replace_with_http_info(transformation, resource_group_name, job_name, transformation_name, if_match:nil, if_none_match:nil, custom_headers:nil)
create_or_replace_async(transformation, resource_group_name, job_name, transformation_name, if_match:if_match, if_none_match:if_none_match, custom_headers:c... | [
"def",
"create_or_replace_with_http_info",
"(",
"transformation",
",",
"resource_group_name",
",",
"job_name",
",",
"transformation_name",
",",
"if_match",
":",
"nil",
",",
"if_none_match",
":",
"nil",
",",
"custom_headers",
":",
"nil",
")",
"create_or_replace_async",
... | Creates a transformation or replaces an already existing transformation under
an existing streaming job.
@param transformation [Transformation] The definition of the transformation
that will be used to create a new transformation or replace the existing one
under the streaming job.
@param resource_group_name [Str... | [
"Creates",
"a",
"transformation",
"or",
"replaces",
"an",
"already",
"existing",
"transformation",
"under",
"an",
"existing",
"streaming",
"job",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_stream_analytics/lib/2016-03-01/generated/azure_mgmt_stream_analytics/transformations.rb#L75-L77 | train | Creates or replaces a transformation in the specified resource group. | [
30522,
13366,
3443,
1035,
2030,
1035,
5672,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
8651,
1010,
7692,
1035,
2177,
1035,
2171,
1010,
3105,
1035,
2171,
1010,
8651,
1035,
2171,
1010,
2065,
1035,
2674,
1024,
9152,
2140,
1010,
2065,
1035,
3... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
aws/aws-sdk-ruby | gems/aws-sdk-ec2/lib/aws-sdk-ec2/resource.rb | Aws::EC2.Resource.import_key_pair | def import_key_pair(options = {})
resp = @client.import_key_pair(options)
KeyPairInfo.new(
name: resp.data.key_name,
client: @client
)
end | ruby | def import_key_pair(options = {})
resp = @client.import_key_pair(options)
KeyPairInfo.new(
name: resp.data.key_name,
client: @client
)
end | [
"def",
"import_key_pair",
"(",
"options",
"=",
"{",
"}",
")",
"resp",
"=",
"@client",
".",
"import_key_pair",
"(",
"options",
")",
"KeyPairInfo",
".",
"new",
"(",
"name",
":",
"resp",
".",
"data",
".",
"key_name",
",",
"client",
":",
"@client",
")",
"e... | @example Request syntax with placeholder values
keypairinfo = ec2.import_key_pair({
dry_run: false,
key_name: "String", # required
public_key_material: "data", # required
})
@param [Hash] options ({})
@option options [Boolean] :dry_run
Checks whether you have the required permissions for the ... | [
"@example",
"Request",
"syntax",
"with",
"placeholder",
"values"
] | e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d | https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-ec2/lib/aws-sdk-ec2/resource.rb#L1093-L1099 | train | Import a key pair | [
30522,
13366,
12324,
1035,
3145,
1035,
3940,
1006,
7047,
1027,
1063,
1065,
1007,
24501,
2361,
1027,
1030,
7396,
1012,
12324,
1035,
3145,
1035,
3940,
1006,
7047,
1007,
3145,
4502,
15735,
2078,
14876,
1012,
2047,
1006,
2171,
1024,
24501,
2361... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | 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_application_type_info_list_by_name | def get_application_type_info_list_by_name(application_type_name, application_type_version:nil, exclude_application_parameters:false, continuation_token:nil, max_results:0, timeout:60, custom_headers:nil)
response = get_application_type_info_list_by_name_async(application_type_name, application_type_version:appli... | ruby | def get_application_type_info_list_by_name(application_type_name, application_type_version:nil, exclude_application_parameters:false, continuation_token:nil, max_results:0, timeout:60, custom_headers:nil)
response = get_application_type_info_list_by_name_async(application_type_name, application_type_version:appli... | [
"def",
"get_application_type_info_list_by_name",
"(",
"application_type_name",
",",
"application_type_version",
":",
"nil",
",",
"exclude_application_parameters",
":",
"false",
",",
"continuation_token",
":",
"nil",
",",
"max_results",
":",
"0",
",",
"timeout",
":",
"60... | Gets the list of application types in the Service Fabric cluster matching
exactly the specified name.
Returns the information about the application types that are provisioned or
in the process of being provisioned in the Service Fabric cluster. These
results are of application types whose name match exactly the on... | [
"Gets",
"the",
"list",
"of",
"application",
"types",
"in",
"the",
"Service",
"Fabric",
"cluster",
"matching",
"exactly",
"the",
"specified",
"name",
"."
] | 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#L4895-L4898 | train | Gets the list of information about the specified application type. | [
30522,
13366,
2131,
1035,
4646,
1035,
2828,
1035,
18558,
1035,
2862,
1035,
2011,
1035,
2171,
1006,
4646,
1035,
2828,
1035,
2171,
1010,
4646,
1035,
2828,
1035,
2544,
1024,
9152,
2140,
1010,
23329,
1035,
4646,
1035,
11709,
1024,
6270,
1010,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_edgegateway/lib/2019-03-01/generated/azure_mgmt_edgegateway/triggers.rb | Azure::EdgeGateway::Mgmt::V2019_03_01.Triggers.delete | def delete(device_name, name, resource_group_name, custom_headers:nil)
response = delete_async(device_name, name, resource_group_name, custom_headers:custom_headers).value!
nil
end | ruby | def delete(device_name, name, resource_group_name, custom_headers:nil)
response = delete_async(device_name, name, resource_group_name, custom_headers:custom_headers).value!
nil
end | [
"def",
"delete",
"(",
"device_name",
",",
"name",
",",
"resource_group_name",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"delete_async",
"(",
"device_name",
",",
"name",
",",
"resource_group_name",
",",
"custom_headers",
":custom_headers",
")",
".",
... | Deletes the trigger on the gateway device.
@param device_name [String] The device name.
@param name [String] The trigger name.
@param resource_group_name [String] The resource group name.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request. | [
"Deletes",
"the",
"trigger",
"on",
"the",
"gateway",
"device",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_edgegateway/lib/2019-03-01/generated/azure_mgmt_edgegateway/triggers.rb#L273-L276 | train | Deletes a specific virtual network interface. | [
30522,
13366,
3972,
12870,
1006,
5080,
1035,
2171,
1010,
2171,
1010,
7692,
1035,
2177,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
3972,
12870,
1035,
2004,
6038,
2278,
1006,
5080,
1035,
2171,
1010,
2171,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
samvera/hyrax | app/services/hyrax/admin_set_service.rb | Hyrax.AdminSetService.count_files | def count_files(admin_sets)
file_counts = Hash.new(0)
admin_sets.each do |admin_set|
query = "{!join from=file_set_ids_ssim to=id}isPartOf_ssim:#{admin_set.id}"
file_results = ActiveFedora::SolrService.instance.conn.get(
ActiveFedora::SolrService.select_path,
... | ruby | def count_files(admin_sets)
file_counts = Hash.new(0)
admin_sets.each do |admin_set|
query = "{!join from=file_set_ids_ssim to=id}isPartOf_ssim:#{admin_set.id}"
file_results = ActiveFedora::SolrService.instance.conn.get(
ActiveFedora::SolrService.select_path,
... | [
"def",
"count_files",
"(",
"admin_sets",
")",
"file_counts",
"=",
"Hash",
".",
"new",
"(",
"0",
")",
"admin_sets",
".",
"each",
"do",
"|",
"admin_set",
"|",
"query",
"=",
"\"{!join from=file_set_ids_ssim to=id}isPartOf_ssim:#{admin_set.id}\"",
"file_results",
"=",
"... | Count number of files from admin set works
@param [Array] AdminSets to count files in
@return [Hash] admin set id keys and file count values | [
"Count",
"number",
"of",
"files",
"from",
"admin",
"set",
"works"
] | e2b4f56e829a53b1f11296324736e9d5b8c9ee5f | https://github.com/samvera/hyrax/blob/e2b4f56e829a53b1f11296324736e9d5b8c9ee5f/app/services/hyrax/admin_set_service.rb#L56-L68 | train | Count the number of files in a given admin set | [
30522,
13366,
4175,
1035,
6764,
1006,
4748,
10020,
1035,
4520,
1007,
5371,
1035,
9294,
1027,
23325,
1012,
2047,
1006,
1014,
1007,
4748,
10020,
1035,
4520,
1012,
2169,
2079,
1064,
4748,
10020,
1035,
2275,
1064,
23032,
1027,
1000,
1063,
999,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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_service_backup_list | def get_service_backup_list(service_id, timeout:60, latest:false, start_date_time_filter:nil, end_date_time_filter:nil, continuation_token:nil, max_results:0, custom_headers:nil)
response = get_service_backup_list_async(service_id, timeout:timeout, latest:latest, start_date_time_filter:start_date_time_filter, end... | ruby | def get_service_backup_list(service_id, timeout:60, latest:false, start_date_time_filter:nil, end_date_time_filter:nil, continuation_token:nil, max_results:0, custom_headers:nil)
response = get_service_backup_list_async(service_id, timeout:timeout, latest:latest, start_date_time_filter:start_date_time_filter, end... | [
"def",
"get_service_backup_list",
"(",
"service_id",
",",
"timeout",
":",
"60",
",",
"latest",
":",
"false",
",",
"start_date_time_filter",
":",
"nil",
",",
"end_date_time_filter",
":",
"nil",
",",
"continuation_token",
":",
"nil",
",",
"max_results",
":",
"0",
... | Gets the list of backups available for every partition in this service.
Returns a list of backups available for every partition in this Service
Fabric service. The server enumerates all the backups available in the backup
store configured in the backup policy. It also allows filtering of the result
based on start ... | [
"Gets",
"the",
"list",
"of",
"backups",
"available",
"for",
"every",
"partition",
"in",
"this",
"service",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_service_fabric/lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb#L24303-L24306 | train | Gets the backup list of the service. | [
30522,
13366,
2131,
1035,
2326,
1035,
10200,
1035,
2862,
1006,
2326,
1035,
8909,
1010,
2051,
5833,
1024,
3438,
1010,
6745,
1024,
6270,
1010,
2707,
1035,
3058,
1035,
2051,
1035,
11307,
1024,
9152,
2140,
1010,
2203,
1035,
3058,
1035,
2051,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
decidim/decidim | decidim-core/lib/decidim/form_builder.rb | Decidim.FormBuilder.scopes_picker | def scopes_picker(attribute, options = {})
picker_options = {
id: "#{@object_name}_#{attribute}",
class: "picker-#{options[:multiple] ? "multiple" : "single"}",
name: "#{@object_name}[#{attribute}]"
}
picker_options[:class] += " is-invalid-input" if error?(attribute)
pr... | ruby | def scopes_picker(attribute, options = {})
picker_options = {
id: "#{@object_name}_#{attribute}",
class: "picker-#{options[:multiple] ? "multiple" : "single"}",
name: "#{@object_name}[#{attribute}]"
}
picker_options[:class] += " is-invalid-input" if error?(attribute)
pr... | [
"def",
"scopes_picker",
"(",
"attribute",
",",
"options",
"=",
"{",
"}",
")",
"picker_options",
"=",
"{",
"id",
":",
"\"#{@object_name}_#{attribute}\"",
",",
"class",
":",
"\"picker-#{options[:multiple] ? \"multiple\" : \"single\"}\"",
",",
"name",
":",
"\"#{@object_nam... | Public: Generates a picker field for scope selection.
attribute - The name of the field (usually scope_id)
options - An optional Hash with options:
- multiple - Multiple mode, to allow multiple scopes selection.
- label - Show label?
- checkboxes_on_top - Show checked picker values on top (defa... | [
"Public",
":",
"Generates",
"a",
"picker",
"field",
"for",
"scope",
"selection",
"."
] | 6e2b14e559a63088669904e3c5c49a5180700cf7 | https://github.com/decidim/decidim/blob/6e2b14e559a63088669904e3c5c49a5180700cf7/decidim-core/lib/decidim/form_builder.rb#L247-L267 | train | Generates a picker for the given attribute. | [
30522,
13366,
9531,
2015,
1035,
4060,
2121,
1006,
17961,
1010,
7047,
1027,
1063,
1065,
1007,
4060,
2121,
1035,
7047,
1027,
1063,
8909,
1024,
1000,
1001,
1063,
1030,
4874,
1035,
2171,
1065,
1035,
1001,
1063,
17961,
1065,
1000,
1010,
2465,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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 | runtime/ms_rest_azure/lib/ms_rest_azure/azure_service_client.rb | MsRestAzure.AzureServiceClient.get_async_with_async_operation_deserialization | def get_async_with_async_operation_deserialization(request)
result = get_async_common(request)
result.body = AsyncOperationStatus.deserialize_object(result.body)
result
end | ruby | def get_async_with_async_operation_deserialization(request)
result = get_async_common(request)
result.body = AsyncOperationStatus.deserialize_object(result.body)
result
end | [
"def",
"get_async_with_async_operation_deserialization",
"(",
"request",
")",
"result",
"=",
"get_async_common",
"(",
"request",
")",
"result",
".",
"body",
"=",
"AsyncOperationStatus",
".",
"deserialize_object",
"(",
"result",
".",
"body",
")",
"result",
"end"
] | Retrieves data by given URL.
@param request [MsRest::HttpOperationRequest] the URL.
@return [MsRest::HttpOperationResponse] the response. | [
"Retrieves",
"data",
"by",
"given",
"URL",
".",
"@param",
"request",
"[",
"MsRest",
"::",
"HttpOperationRequest",
"]",
"the",
"URL",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/runtime/ms_rest_azure/lib/ms_rest_azure/azure_service_client.rb#L245-L251 | train | Get the async with async operation deserialization | [
30522,
13366,
2131,
1035,
2004,
6038,
2278,
1035,
2007,
1035,
2004,
6038,
2278,
1035,
3169,
1035,
4078,
11610,
22731,
1006,
5227,
1007,
2765,
1027,
2131,
1035,
2004,
6038,
2278,
1035,
2691,
1006,
5227,
1007,
2765,
1012,
2303,
1027,
2004,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_network/lib/2019-02-01/generated/azure_mgmt_network/application_security_groups.rb | Azure::Network::Mgmt::V2019_02_01.ApplicationSecurityGroups.begin_update_tags_with_http_info | def begin_update_tags_with_http_info(resource_group_name, application_security_group_name, parameters, custom_headers:nil)
begin_update_tags_async(resource_group_name, application_security_group_name, parameters, custom_headers:custom_headers).value!
end | ruby | def begin_update_tags_with_http_info(resource_group_name, application_security_group_name, parameters, custom_headers:nil)
begin_update_tags_async(resource_group_name, application_security_group_name, parameters, custom_headers:custom_headers).value!
end | [
"def",
"begin_update_tags_with_http_info",
"(",
"resource_group_name",
",",
"application_security_group_name",
",",
"parameters",
",",
"custom_headers",
":",
"nil",
")",
"begin_update_tags_async",
"(",
"resource_group_name",
",",
"application_security_group_name",
",",
"paramet... | Updates an application security group's tags.
@param resource_group_name [String] The name of the resource group.
@param application_security_group_name [String] The name of the application
security group.
@param parameters [TagsObject] Parameters supplied to update application
security group tags.
@param custom... | [
"Updates",
"an",
"application",
"security",
"group",
"s",
"tags",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_network/lib/2019-02-01/generated/azure_mgmt_network/application_security_groups.rb#L661-L663 | train | Updates a list of tags associated with the application security group. | [
30522,
13366,
4088,
1035,
10651,
1035,
22073,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
4646,
1035,
3036,
1035,
2177,
1035,
2171,
1010,
11709,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
4088,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
rmosolgo/graphql-ruby | lib/graphql/schema.rb | GraphQL.Schema.to_definition | def to_definition(only: nil, except: nil, context: {})
GraphQL::Schema::Printer.print_schema(self, only: only, except: except, context: context)
end | ruby | def to_definition(only: nil, except: nil, context: {})
GraphQL::Schema::Printer.print_schema(self, only: only, except: except, context: context)
end | [
"def",
"to_definition",
"(",
"only",
":",
"nil",
",",
"except",
":",
"nil",
",",
"context",
":",
"{",
"}",
")",
"GraphQL",
"::",
"Schema",
"::",
"Printer",
".",
"print_schema",
"(",
"self",
",",
"only",
":",
"only",
",",
"except",
":",
"except",
",",... | Return the GraphQL IDL for the schema
@param context [Hash]
@param only [<#call(member, ctx)>]
@param except [<#call(member, ctx)>]
@return [String] | [
"Return",
"the",
"GraphQL",
"IDL",
"for",
"the",
"schema"
] | d5be13a816f220b9efbabeaa69a3e56fedf311f5 | https://github.com/rmosolgo/graphql-ruby/blob/d5be13a816f220b9efbabeaa69a3e56fedf311f5/lib/graphql/schema.rb#L658-L660 | train | Returns the definition of the schema. | [
30522,
13366,
2000,
1035,
6210,
1006,
2069,
1024,
9152,
2140,
1010,
3272,
1024,
9152,
2140,
1010,
6123,
1024,
1063,
1065,
1007,
10629,
4160,
2140,
1024,
1024,
8040,
28433,
1024,
1024,
15041,
1012,
6140,
1035,
8040,
28433,
1006,
2969,
1010,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
GeorgeKaraszi/ActiveRecordExtended | lib/active_record_extended/utilities.rb | ActiveRecordExtended.Utilities.nested_alias_escape | def nested_alias_escape(query, alias_name)
sql_query = Arel::Nodes::Grouping.new(to_arel_sql(query))
Arel::Nodes::As.new(sql_query, to_arel_sql(double_quote(alias_name)))
end | ruby | def nested_alias_escape(query, alias_name)
sql_query = Arel::Nodes::Grouping.new(to_arel_sql(query))
Arel::Nodes::As.new(sql_query, to_arel_sql(double_quote(alias_name)))
end | [
"def",
"nested_alias_escape",
"(",
"query",
",",
"alias_name",
")",
"sql_query",
"=",
"Arel",
"::",
"Nodes",
"::",
"Grouping",
".",
"new",
"(",
"to_arel_sql",
"(",
"query",
")",
")",
"Arel",
"::",
"Nodes",
"::",
"As",
".",
"new",
"(",
"sql_query",
",",
... | Applies aliases to the given query
Ex: `SELECT * FROM users` => `(SELECT * FROM users) AS "members"` | [
"Applies",
"aliases",
"to",
"the",
"given",
"query",
"Ex",
":",
"SELECT",
"*",
"FROM",
"users",
"=",
">",
"(",
"SELECT",
"*",
"FROM",
"users",
")",
"AS",
"members"
] | aca74eebb64b9957a2c8765bef6e43c7d5736fd8 | https://github.com/GeorgeKaraszi/ActiveRecordExtended/blob/aca74eebb64b9957a2c8765bef6e43c7d5736fd8/lib/active_record_extended/utilities.rb#L31-L34 | train | escape the alias name in the query | [
30522,
13366,
9089,
2098,
1035,
14593,
1035,
4019,
1006,
23032,
1010,
14593,
1035,
2171,
1007,
29296,
1035,
23032,
1027,
2024,
2140,
1024,
1024,
14164,
1024,
1024,
19765,
1012,
2047,
1006,
2000,
1035,
2024,
2140,
1035,
29296,
1006,
23032,
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... |
fastlane/fastlane | fastlane_core/lib/fastlane_core/project.rb | FastlaneCore.Project.build_settings | def build_settings(key: nil, optional: true)
unless @build_settings
if is_workspace
if schemes.count == 0
UI.user_error!("Could not find any schemes for Xcode workspace at path '#{self.path}'. Please make sure that the schemes you want to use are marked as `Shared` from Xcode.")
... | ruby | def build_settings(key: nil, optional: true)
unless @build_settings
if is_workspace
if schemes.count == 0
UI.user_error!("Could not find any schemes for Xcode workspace at path '#{self.path}'. Please make sure that the schemes you want to use are marked as `Shared` from Xcode.")
... | [
"def",
"build_settings",
"(",
"key",
":",
"nil",
",",
"optional",
":",
"true",
")",
"unless",
"@build_settings",
"if",
"is_workspace",
"if",
"schemes",
".",
"count",
"==",
"0",
"UI",
".",
"user_error!",
"(",
"\"Could not find any schemes for Xcode workspace at path ... | Get the build settings for our project
e.g. to properly get the DerivedData folder
@param [String] The key of which we want the value for (e.g. "PRODUCT_NAME") | [
"Get",
"the",
"build",
"settings",
"for",
"our",
"project",
"e",
".",
"g",
".",
"to",
"properly",
"get",
"the",
"DerivedData",
"folder"
] | 457c5d647c77f0e078dafa5129da616914e002c5 | https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/fastlane_core/lib/fastlane_core/project.rb#L341-L382 | train | Get the build settings for the current project. | [
30522,
13366,
3857,
1035,
10906,
1006,
3145,
1024,
9152,
2140,
1010,
11887,
1024,
2995,
1007,
4983,
1030,
3857,
1035,
10906,
2065,
2003,
1035,
2573,
15327,
2065,
11683,
1012,
4175,
1027,
1027,
1014,
21318,
1012,
5310,
1035,
7561,
999,
1006,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
fastlane/fastlane | spaceship/lib/spaceship/tunes/tunes_client.rb | Spaceship.TunesClient.upload_purchase_review_screenshot | def upload_purchase_review_screenshot(app_id, upload_image)
data = du_client.upload_purchase_review_screenshot(app_id, upload_image, content_provider_id, sso_token_for_image)
{
"value" => {
"assetToken" => data["token"],
"sortOrder" => 0,
"type" => du_clie... | ruby | def upload_purchase_review_screenshot(app_id, upload_image)
data = du_client.upload_purchase_review_screenshot(app_id, upload_image, content_provider_id, sso_token_for_image)
{
"value" => {
"assetToken" => data["token"],
"sortOrder" => 0,
"type" => du_clie... | [
"def",
"upload_purchase_review_screenshot",
"(",
"app_id",
",",
"upload_image",
")",
"data",
"=",
"du_client",
".",
"upload_purchase_review_screenshot",
"(",
"app_id",
",",
"upload_image",
",",
"content_provider_id",
",",
"sso_token_for_image",
")",
"{",
"\"value\"",
"=... | Uploads an In-App-Purchase Review screenshot
@param app_id (AppId): The id of the app
@param upload_image (UploadFile): The icon to upload
@return [JSON] the screenshot data, ready to be added to an In-App-Purchase | [
"Uploads",
"an",
"In",
"-",
"App",
"-",
"Purchase",
"Review",
"screenshot"
] | 457c5d647c77f0e078dafa5129da616914e002c5 | https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/spaceship/lib/spaceship/tunes/tunes_client.rb#L798-L812 | train | Upload a purchased review screenshot to the server | [
30522,
13366,
2039,
11066,
1035,
5309,
1035,
3319,
1035,
12117,
12326,
1006,
10439,
1035,
8909,
1010,
2039,
11066,
1035,
3746,
1007,
2951,
1027,
4241,
1035,
7396,
1012,
2039,
11066,
1035,
5309,
1035,
3319,
1035,
12117,
12326,
1006,
10439,
1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | data/azure_service_fabric/lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb | Azure::ServiceFabric::V6_2_0_9.ServiceFabricClientAPIs.provision_application_type | def provision_application_type(provision_application_type_description_base_required_body_param, timeout:60, custom_headers:nil)
response = provision_application_type_async(provision_application_type_description_base_required_body_param, timeout:timeout, custom_headers:custom_headers).value!
nil
end | ruby | def provision_application_type(provision_application_type_description_base_required_body_param, timeout:60, custom_headers:nil)
response = provision_application_type_async(provision_application_type_description_base_required_body_param, timeout:timeout, custom_headers:custom_headers).value!
nil
end | [
"def",
"provision_application_type",
"(",
"provision_application_type_description_base_required_body_param",
",",
"timeout",
":",
"60",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"provision_application_type_async",
"(",
"provision_application_type_description_base_req... | Provisions or registers a Service Fabric application type with the cluster
using the '.sfpkg' package in the external store or using the application
package in the image store.
Provisions a Service Fabric application type with the cluster. The provision
is required before any new applications can be instantiated.
... | [
"Provisions",
"or",
"registers",
"a",
"Service",
"Fabric",
"application",
"type",
"with",
"the",
"cluster",
"using",
"the",
".",
"sfpkg",
"package",
"in",
"the",
"external",
"store",
"or",
"using",
"the",
"application",
"package",
"in",
"the",
"image",
"store"... | 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#L5076-L5079 | train | Provision the application type description base required body. | [
30522,
13366,
9347,
1035,
4646,
1035,
2828,
1006,
9347,
1035,
4646,
1035,
2828,
1035,
6412,
1035,
2918,
1035,
3223,
1035,
2303,
1035,
11498,
2213,
1010,
2051,
5833,
1024,
3438,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
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.update_with_http_info | def update_with_http_info(resource_group_name, vault_name, parameters, custom_headers:nil)
update_async(resource_group_name, vault_name, parameters, custom_headers:custom_headers).value!
end | ruby | def update_with_http_info(resource_group_name, vault_name, parameters, custom_headers:nil)
update_async(resource_group_name, vault_name, parameters, custom_headers:custom_headers).value!
end | [
"def",
"update_with_http_info",
"(",
"resource_group_name",
",",
"vault_name",
",",
"parameters",
",",
"custom_headers",
":",
"nil",
")",
"update_async",
"(",
"resource_group_name",
",",
"vault_name",
",",
"parameters",
",",
"custom_headers",
":custom_headers",
")",
"... | Update a key vault in the specified subscription.
@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 [VaultPatchParameters] Parameters to patch the vault
@param custom_headers [Hash{String => String}] A has... | [
"Update",
"a",
"key",
"vault",
"in",
"the",
"specified",
"subscription",
"."
] | 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#L102-L104 | train | Updates a key vault. | [
30522,
13366,
10651,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
11632,
1035,
2171,
1010,
11709,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
10651,
1035,
2004,
6038,
2278,
1006,
7692,
1035,
2177... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_policy/lib/2018-05-01/generated/azure_mgmt_policy/policy_definitions.rb | Azure::Policy::Mgmt::V2018_05_01.PolicyDefinitions.create_or_update_at_management_group | def create_or_update_at_management_group(policy_definition_name, parameters, management_group_id, custom_headers:nil)
response = create_or_update_at_management_group_async(policy_definition_name, parameters, management_group_id, custom_headers:custom_headers).value!
response.body unless response.nil?
en... | ruby | def create_or_update_at_management_group(policy_definition_name, parameters, management_group_id, custom_headers:nil)
response = create_or_update_at_management_group_async(policy_definition_name, parameters, management_group_id, custom_headers:custom_headers).value!
response.body unless response.nil?
en... | [
"def",
"create_or_update_at_management_group",
"(",
"policy_definition_name",
",",
"parameters",
",",
"management_group_id",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"create_or_update_at_management_group_async",
"(",
"policy_definition_name",
",",
"parameters",
... | Creates or updates a policy definition in a management group.
This operation creates or updates a policy definition in the given management
group with the given name.
@param policy_definition_name [String] The name of the policy definition to
create.
@param parameters [PolicyDefinition] The policy definition pro... | [
"Creates",
"or",
"updates",
"a",
"policy",
"definition",
"in",
"a",
"management",
"group",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_policy/lib/2018-05-01/generated/azure_mgmt_policy/policy_definitions.rb#L436-L439 | train | Creates or updates a policy definition at management group scope. | [
30522,
13366,
3443,
1035,
2030,
1035,
10651,
1035,
2012,
1035,
2968,
1035,
2177,
1006,
3343,
1035,
6210,
1035,
2171,
1010,
11709,
1010,
2968,
1035,
2177,
1035,
8909,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
3443,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
phusion/passenger | src/ruby_supportlib/phusion_passenger/utils.rb | PhusionPassenger.Utils.print_exception | def print_exception(current_location, exception, destination = nil)
if !exception.is_a?(SystemExit)
data = exception.backtrace_string(current_location)
if defined?(DebugLogging) && self.is_a?(DebugLogging)
error(data)
else
destination ||= STDERR
destination.pu... | ruby | def print_exception(current_location, exception, destination = nil)
if !exception.is_a?(SystemExit)
data = exception.backtrace_string(current_location)
if defined?(DebugLogging) && self.is_a?(DebugLogging)
error(data)
else
destination ||= STDERR
destination.pu... | [
"def",
"print_exception",
"(",
"current_location",
",",
"exception",
",",
"destination",
"=",
"nil",
")",
"if",
"!",
"exception",
".",
"is_a?",
"(",
"SystemExit",
")",
"data",
"=",
"exception",
".",
"backtrace_string",
"(",
"current_location",
")",
"if",
"defi... | Print the given exception, including the stack trace, to STDERR.
+current_location+ is a string which describes where the code is
currently at. Usually the current class name will be enough.
It may be nil.
This method requires 'ruby_core_enhancements'. If 'debug_logging'
is loaded and included in the current mod... | [
"Print",
"the",
"given",
"exception",
"including",
"the",
"stack",
"trace",
"to",
"STDERR",
"."
] | 970964b53e0ba86959acdf40f06c99b0c4a128ca | https://github.com/phusion/passenger/blob/970964b53e0ba86959acdf40f06c99b0c4a128ca/src/ruby_supportlib/phusion_passenger/utils.rb#L83-L94 | train | Print the exception to the given destination | [
30522,
13366,
6140,
1035,
6453,
30524,
9152,
2140,
1007,
2065,
999,
6453,
1012,
2003,
1035,
1037,
1029,
1006,
2291,
10288,
4183,
1007,
2951,
1027,
6453,
1012,
2067,
6494,
3401,
1035,
5164,
1006,
2783,
1035,
3295,
1007,
2065,
4225,
1029,
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... |
sumoheavy/jira-ruby | lib/jira/request_client.rb | JIRA.RequestClient.request | def request(*args)
response = make_request(*args)
# binding.pry unless response.kind_of?(Net::HTTPSuccess)
raise HTTPError, response unless response.is_a?(Net::HTTPSuccess)
response
end | ruby | def request(*args)
response = make_request(*args)
# binding.pry unless response.kind_of?(Net::HTTPSuccess)
raise HTTPError, response unless response.is_a?(Net::HTTPSuccess)
response
end | [
"def",
"request",
"(",
"*",
"args",
")",
"response",
"=",
"make_request",
"(",
"args",
")",
"# binding.pry unless response.kind_of?(Net::HTTPSuccess)",
"raise",
"HTTPError",
",",
"response",
"unless",
"response",
".",
"is_a?",
"(",
"Net",
"::",
"HTTPSuccess",
")",
... | Returns the response if the request was successful (HTTP::2xx) and
raises a JIRA::HTTPError if it was not successful, with the response
attached. | [
"Returns",
"the",
"response",
"if",
"the",
"request",
"was",
"successful",
"(",
"HTTP",
"::",
"2xx",
")",
"and",
"raises",
"a",
"JIRA",
"::",
"HTTPError",
"if",
"it",
"was",
"not",
"successful",
"with",
"the",
"response",
"attached",
"."
] | 25e896f227ab81c528e9678708cb546d2f62f018 | https://github.com/sumoheavy/jira-ruby/blob/25e896f227ab81c528e9678708cb546d2f62f018/lib/jira/request_client.rb#L12-L17 | train | Make a request to the server | [
30522,
13366,
5227,
1006,
1008,
12098,
5620,
1007,
3433,
1027,
2191,
1035,
5227,
1006,
1008,
12098,
5620,
1007,
1001,
8031,
1012,
29198,
4983,
3433,
1012,
2785,
1035,
1997,
1029,
1006,
5658,
1024,
1024,
16770,
14194,
9623,
2015,
1007,
5333,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
cheezy/page-object | lib/page-object/accessors.rb | PageObject.Accessors.in_iframe | def in_iframe(identifier, frame=nil, &block)
frame = frame.nil? ? [] : frame.dup
frame << {iframe: identifier}
block.call(frame)
end | ruby | def in_iframe(identifier, frame=nil, &block)
frame = frame.nil? ? [] : frame.dup
frame << {iframe: identifier}
block.call(frame)
end | [
"def",
"in_iframe",
"(",
"identifier",
",",
"frame",
"=",
"nil",
",",
"&",
"block",
")",
"frame",
"=",
"frame",
".",
"nil?",
"?",
"[",
"]",
":",
"frame",
".",
"dup",
"frame",
"<<",
"{",
"iframe",
":",
"identifier",
"}",
"block",
".",
"call",
"(",
... | Identify an element as existing within an iframe. A frame parameter
is passed to the block and must be passed to the other calls to PageObject.
You can nest calls to in_frame by passing the frame to the next level.
@example
in_iframe(:id => 'frame_id') do |frame|
text_field(:first_name, :id => 'fname', :fr... | [
"Identify",
"an",
"element",
"as",
"existing",
"within",
"an",
"iframe",
".",
"A",
"frame",
"parameter",
"is",
"passed",
"to",
"the",
"block",
"and",
"must",
"be",
"passed",
"to",
"the",
"other",
"calls",
"to",
"PageObject",
".",
"You",
"can",
"nest",
"c... | 850d775bf63768fbb1551a34480195785fe8e193 | https://github.com/cheezy/page-object/blob/850d775bf63768fbb1551a34480195785fe8e193/lib/page-object/accessors.rb#L176-L180 | train | Adds an iframe to the frame. | [
30522,
13366,
1999,
1035,
2065,
6444,
2063,
1006,
8909,
4765,
18095,
1010,
4853,
1027,
9152,
2140,
1010,
1004,
3796,
1007,
4853,
1027,
4853,
1012,
9152,
2140,
1029,
1029,
1031,
1033,
1024,
4853,
1012,
4241,
2361,
4853,
1026,
1026,
1063,
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_links/lib/2016-09-01/generated/azure_mgmt_links/resource_links.rb | Azure::Links::Mgmt::V2016_09_01.ResourceLinks.list_at_subscription_next | def list_at_subscription_next(next_page_link, custom_headers:nil)
response = list_at_subscription_next_async(next_page_link, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def list_at_subscription_next(next_page_link, custom_headers:nil)
response = list_at_subscription_next_async(next_page_link, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"list_at_subscription_next",
"(",
"next_page_link",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"list_at_subscription_next_async",
"(",
"next_page_link",
",",
"custom_headers",
":custom_headers",
")",
".",
"value!",
"response",
".",
"body",
"unless",... | Gets all the linked resources for the subscription.
@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 [ResourceLinkResult] operation results. | [
"Gets",
"all",
"the",
"linked",
"resources",
"for",
"the",
"subscription",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_links/lib/2016-09-01/generated/azure_mgmt_links/resource_links.rb#L541-L544 | train | Gets the list of the elastic advisors. | [
30522,
13366,
2862,
1035,
2012,
1035,
15002,
1035,
2279,
1006,
2279,
1035,
3931,
1035,
4957,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
2862,
1035,
2012,
1035,
15002,
1035,
2279,
1035,
2004,
6038,
2278,
1006,
2279,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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_edgegateway/lib/2019-03-01/generated/azure_mgmt_edgegateway/roles.rb | Azure::EdgeGateway::Mgmt::V2019_03_01.Roles.begin_create_or_update_with_http_info | def begin_create_or_update_with_http_info(device_name, name, role, resource_group_name, custom_headers:nil)
begin_create_or_update_async(device_name, name, role, resource_group_name, custom_headers:custom_headers).value!
end | ruby | def begin_create_or_update_with_http_info(device_name, name, role, resource_group_name, custom_headers:nil)
begin_create_or_update_async(device_name, name, role, resource_group_name, custom_headers:custom_headers).value!
end | [
"def",
"begin_create_or_update_with_http_info",
"(",
"device_name",
",",
"name",
",",
"role",
",",
"resource_group_name",
",",
"custom_headers",
":",
"nil",
")",
"begin_create_or_update_async",
"(",
"device_name",
",",
"name",
",",
"role",
",",
"resource_group_name",
... | Create or update a role.
@param device_name [String] The device name.
@param name [String] The role name.
@param role [Role] The role properties.
@param resource_group_name [String] The resource group name.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP req... | [
"Create",
"or",
"update",
"a",
"role",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_edgegateway/lib/2019-03-01/generated/azure_mgmt_edgegateway/roles.rb#L327-L329 | train | Creates or updates a virtual network interface. | [
30522,
13366,
4088,
1035,
3443,
1035,
2030,
1035,
10651,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
5080,
1035,
2171,
1010,
2171,
1010,
2535,
1010,
7692,
1035,
2177,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
4088,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_automation/lib/2015-10-31/generated/azure_mgmt_automation/job_operations.rb | Azure::Automation::Mgmt::V2015_10_31.JobOperations.suspend_with_http_info | def suspend_with_http_info(resource_group_name, automation_account_name, job_id, custom_headers:nil)
suspend_async(resource_group_name, automation_account_name, job_id, custom_headers:custom_headers).value!
end | ruby | def suspend_with_http_info(resource_group_name, automation_account_name, job_id, custom_headers:nil)
suspend_async(resource_group_name, automation_account_name, job_id, custom_headers:custom_headers).value!
end | [
"def",
"suspend_with_http_info",
"(",
"resource_group_name",
",",
"automation_account_name",
",",
"job_id",
",",
"custom_headers",
":",
"nil",
")",
"suspend_async",
"(",
"resource_group_name",
",",
"automation_account_name",
",",
"job_id",
",",
"custom_headers",
":custom_... | Suspend the job identified by jobId.
@param resource_group_name [String] Name of an Azure Resource group.
@param automation_account_name [String] The name of the automation account.
@param job_id The job id.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP req... | [
"Suspend",
"the",
"job",
"identified",
"by",
"jobId",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_automation/lib/2015-10-31/generated/azure_mgmt_automation/job_operations.rb#L262-L264 | train | Suspends a managed job. | [
30522,
13366,
28324,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
19309,
1035,
4070,
1035,
2171,
1010,
3105,
1035,
8909,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
28324,
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... |
meew0/discordrb | lib/discordrb/bot.rb | Discordrb.Bot.voice_connect | def voice_connect(chan, encrypted = true)
chan = channel(chan.resolve_id)
server_id = chan.server.id
@should_encrypt_voice = encrypted
if @voices[chan.id]
debug('Voice bot exists already! Destroying it')
@voices[chan.id].destroy
@voices.delete(chan.id)
end
d... | ruby | def voice_connect(chan, encrypted = true)
chan = channel(chan.resolve_id)
server_id = chan.server.id
@should_encrypt_voice = encrypted
if @voices[chan.id]
debug('Voice bot exists already! Destroying it')
@voices[chan.id].destroy
@voices.delete(chan.id)
end
d... | [
"def",
"voice_connect",
"(",
"chan",
",",
"encrypted",
"=",
"true",
")",
"chan",
"=",
"channel",
"(",
"chan",
".",
"resolve_id",
")",
"server_id",
"=",
"chan",
".",
"server",
".",
"id",
"@should_encrypt_voice",
"=",
"encrypted",
"if",
"@voices",
"[",
"chan... | Connects to a voice channel, initializes network connections and returns the {Voice::VoiceBot} over which audio
data can then be sent. After connecting, the bot can also be accessed using {#voice}. If the bot is already
connected to voice, the existing connection will be terminated - you don't have to call
{Discordr... | [
"Connects",
"to",
"a",
"voice",
"channel",
"initializes",
"network",
"connections",
"and",
"returns",
"the",
"{",
"Voice",
"::",
"VoiceBot",
"}",
"over",
"which",
"audio",
"data",
"can",
"then",
"be",
"sent",
".",
"After",
"connecting",
"the",
"bot",
"can",
... | 764298a1ff0be69a1853b510d736f21c2b91a2fe | https://github.com/meew0/discordrb/blob/764298a1ff0be69a1853b510d736f21c2b91a2fe/lib/discordrb/bot.rb#L317-L338 | train | Connect to a voice channel | [
30522,
13366,
2376,
1035,
7532,
1006,
9212,
1010,
4372,
26775,
22571,
3064,
1027,
2995,
1007,
9212,
1027,
3149,
1006,
9212,
1012,
10663,
1035,
8909,
1007,
8241,
1035,
8909,
1027,
9212,
1012,
8241,
1012,
8909,
1030,
2323,
1035,
4372,
26775,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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.4.0.36/generated/azure_service_fabric/service_fabric_client_apis.rb | Azure::ServiceFabric::V6_4_0_36.ServiceFabricClientAPIs.get_cluster_version | def get_cluster_version(timeout:60, custom_headers:nil)
response = get_cluster_version_async(timeout:timeout, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def get_cluster_version(timeout:60, custom_headers:nil)
response = get_cluster_version_async(timeout:timeout, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"get_cluster_version",
"(",
"timeout",
":",
"60",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"get_cluster_version_async",
"(",
"timeout",
":",
"timeout",
",",
"custom_headers",
":custom_headers",
")",
".",
"value!",
"response",
".",
"body",
... | Get the current Service Fabric cluster version.
If a cluster upgrade is happening, then this API will return the lowest
(older) version of the current and target cluster runtime versions.
@param timeout [Integer] The server timeout for performing the operation in
seconds. This timeout specifies the time duration ... | [
"Get",
"the",
"current",
"Service",
"Fabric",
"cluster",
"version",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_service_fabric/lib/6.4.0.36/generated/azure_service_fabric/service_fabric_client_apis.rb#L3249-L3252 | train | Gets the cluster version of the current Service Fabric cluster. | [
30522,
13366,
2131,
1035,
9324,
1035,
2544,
1006,
2051,
5833,
1024,
3438,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
2131,
1035,
9324,
1035,
2544,
1035,
2004,
6038,
2278,
1006,
2051,
5833,
1024,
2051,
5833,
1010,
7... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
daddyz/phonelib | lib/phonelib/phone_analyzer.rb | Phonelib.PhoneAnalyzer.national_and_data | def national_and_data(data, country_match, not_valid = false)
result = data.select { |k, _v| k != :types && k != :formats }
phone = country_match.to_a.last
result[:national] = phone
result[:format] = number_format(phone, data[Core::FORMATS])
result.merge! all_number_types(phone, data[Core:... | ruby | def national_and_data(data, country_match, not_valid = false)
result = data.select { |k, _v| k != :types && k != :formats }
phone = country_match.to_a.last
result[:national] = phone
result[:format] = number_format(phone, data[Core::FORMATS])
result.merge! all_number_types(phone, data[Core:... | [
"def",
"national_and_data",
"(",
"data",
",",
"country_match",
",",
"not_valid",
"=",
"false",
")",
"result",
"=",
"data",
".",
"select",
"{",
"|",
"k",
",",
"_v",
"|",
"k",
"!=",
":types",
"&&",
"k",
"!=",
":formats",
"}",
"phone",
"=",
"country_match... | returns national number and analyzing results for provided phone number
==== Attributes
* +data+ - country data
* +country_match+ - result of match of phone within full regex
* +not_valid+ - specifies that number is not valid by general desc pattern | [
"returns",
"national",
"number",
"and",
"analyzing",
"results",
"for",
"provided",
"phone",
"number"
] | aa0023eab7c896b71275bf342bc7f49735cbdbbf | https://github.com/daddyz/phonelib/blob/aa0023eab7c896b71275bf342bc7f49735cbdbbf/lib/phonelib/phone_analyzer.rb#L144-L153 | train | Returns national and format data for the phone | [
30522,
13366,
2120,
1035,
1998,
1035,
2951,
1006,
2951,
1010,
2406,
1035,
2674,
1010,
2025,
1035,
9398,
1027,
6270,
1007,
2765,
1027,
2951,
1012,
7276,
1063,
1064,
1047,
1010,
1035,
1058,
1064,
1047,
999,
1027,
1024,
4127,
1004,
1004,
104... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_web/lib/2018-02-01/generated/azure_mgmt_web/diagnostics.rb | Azure::Web::Mgmt::V2018_02_01.Diagnostics.get_site_detector_response | def get_site_detector_response(resource_group_name, site_name, detector_name, start_time:nil, end_time:nil, time_grain:nil, custom_headers:nil)
response = get_site_detector_response_async(resource_group_name, site_name, detector_name, start_time:start_time, end_time:end_time, time_grain:time_grain, custom_headers... | ruby | def get_site_detector_response(resource_group_name, site_name, detector_name, start_time:nil, end_time:nil, time_grain:nil, custom_headers:nil)
response = get_site_detector_response_async(resource_group_name, site_name, detector_name, start_time:start_time, end_time:end_time, time_grain:time_grain, custom_headers... | [
"def",
"get_site_detector_response",
"(",
"resource_group_name",
",",
"site_name",
",",
"detector_name",
",",
"start_time",
":",
"nil",
",",
"end_time",
":",
"nil",
",",
"time_grain",
":",
"nil",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"get_site... | Get site detector response
Get site detector response
@param resource_group_name [String] Name of the resource group to which the
resource belongs.
@param site_name [String] Site Name
@param detector_name [String] Detector Resource Name
@param start_time [DateTime] Start Time
@param end_time [DateTime] End Tim... | [
"Get",
"site",
"detector",
"response"
] | 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#L367-L370 | train | Gets the response of a site detector. | [
30522,
13366,
2131,
1035,
2609,
1035,
19034,
1035,
3433,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2609,
1035,
2171,
1010,
19034,
1035,
2171,
1010,
2707,
1035,
2051,
1024,
9152,
2140,
1010,
2203,
1035,
2051,
1024,
9152,
2140,
1010,
2051,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_web/lib/2016-03-01/generated/azure_mgmt_web/web_site_management_client.rb | Azure::Web::Mgmt::V2016_03_01.WebSiteManagementClient.update_publishing_user | def update_publishing_user(user_details, custom_headers:nil)
response = update_publishing_user_async(user_details, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def update_publishing_user(user_details, custom_headers:nil)
response = update_publishing_user_async(user_details, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"update_publishing_user",
"(",
"user_details",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"update_publishing_user_async",
"(",
"user_details",
",",
"custom_headers",
":custom_headers",
")",
".",
"value!",
"response",
".",
"body",
"unless",
"respon... | Updates publishing user
Updates publishing user
@param user_details [User] Details of publishing user
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request.
@return [User] operation results. | [
"Updates",
"publishing",
"user"
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_web/lib/2016-03-01/generated/azure_mgmt_web/web_site_management_client.rb#L245-L248 | train | Updates the publishing user. | [
30522,
13366,
10651,
1035,
4640,
1035,
5310,
1006,
5310,
1035,
4751,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
10651,
1035,
4640,
1035,
5310,
1035,
2004,
6038,
2278,
1006,
5310,
1035,
4751,
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... |
randym/axlsx | lib/axlsx/drawing/pic.rb | Axlsx.Pic.to_xml_string | def to_xml_string(str = '')
str << '<xdr:pic>'
str << '<xdr:nvPicPr>'
str << ('<xdr:cNvPr id="2" name="' << name.to_s << '" descr="' << descr.to_s << '">')
hyperlink.to_xml_string(str) if hyperlink.is_a?(Hyperlink)
str << '</xdr:cNvPr><xdr:cNvPicPr>'
picture_locking.to_xml_string(str... | ruby | def to_xml_string(str = '')
str << '<xdr:pic>'
str << '<xdr:nvPicPr>'
str << ('<xdr:cNvPr id="2" name="' << name.to_s << '" descr="' << descr.to_s << '">')
hyperlink.to_xml_string(str) if hyperlink.is_a?(Hyperlink)
str << '</xdr:cNvPr><xdr:cNvPicPr>'
picture_locking.to_xml_string(str... | [
"def",
"to_xml_string",
"(",
"str",
"=",
"''",
")",
"str",
"<<",
"'<xdr:pic>'",
"str",
"<<",
"'<xdr:nvPicPr>'",
"str",
"<<",
"(",
"'<xdr:cNvPr id=\"2\" name=\"'",
"<<",
"name",
".",
"to_s",
"<<",
"'\" descr=\"'",
"<<",
"descr",
".",
"to_s",
"<<",
"'\">'",
")... | Serializes the object
@param [String] str
@return [String] | [
"Serializes",
"the",
"object"
] | c593a08b2a929dac7aa8dc418b55e26b4c49dc34 | https://github.com/randym/axlsx/blob/c593a08b2a929dac7aa8dc418b55e26b4c49dc34/lib/axlsx/drawing/pic.rb#L168-L185 | train | Returns the XML string for this object. | [
30522,
13366,
2000,
1035,
20950,
1035,
5164,
1006,
2358,
2099,
1027,
1005,
1005,
1007,
2358,
2099,
1026,
1026,
1005,
1026,
1060,
13626,
1024,
30524,
1026,
1026,
1006,
1005,
1026,
1060,
13626,
1024,
27166,
2615,
18098,
8909,
1027,
1000,
1016... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/asset.rb | Sprockets.Asset.write_to | def write_to(filename)
FileUtils.mkdir_p File.dirname(filename)
PathUtils.atomic_write(filename) do |f|
f.write source
end
nil
end | ruby | def write_to(filename)
FileUtils.mkdir_p File.dirname(filename)
PathUtils.atomic_write(filename) do |f|
f.write source
end
nil
end | [
"def",
"write_to",
"(",
"filename",
")",
"FileUtils",
".",
"mkdir_p",
"File",
".",
"dirname",
"(",
"filename",
")",
"PathUtils",
".",
"atomic_write",
"(",
"filename",
")",
"do",
"|",
"f",
"|",
"f",
".",
"write",
"source",
"end",
"nil",
"end"
] | Deprecated: Save asset to disk.
filename - String target
Returns nothing. | [
"Deprecated",
":",
"Save",
"asset",
"to",
"disk",
"."
] | 9e3f0d8e98c44f57e67bc138db87bb8469bf5ddd | https://github.com/rails/sprockets/blob/9e3f0d8e98c44f57e67bc138db87bb8469bf5ddd/lib/sprockets/asset.rb#L160-L168 | train | Write the source to the given filename. | [
30522,
13366,
4339,
1035,
2000,
1006,
5371,
18442,
1007,
5371,
21823,
4877,
1012,
12395,
4305,
2099,
1035,
1052,
5371,
1012,
16101,
18442,
1006,
5371,
18442,
1007,
4130,
21823,
4877,
1012,
9593,
1035,
4339,
1006,
5371,
18442,
1007,
2079,
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_event_hub/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/namespaces.rb | Azure::EventHub::Mgmt::V2018_01_01_preview.Namespaces.create_or_update_network_rule_set | def create_or_update_network_rule_set(resource_group_name, namespace_name, parameters, custom_headers:nil)
response = create_or_update_network_rule_set_async(resource_group_name, namespace_name, parameters, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def create_or_update_network_rule_set(resource_group_name, namespace_name, parameters, custom_headers:nil)
response = create_or_update_network_rule_set_async(resource_group_name, namespace_name, parameters, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"create_or_update_network_rule_set",
"(",
"resource_group_name",
",",
"namespace_name",
",",
"parameters",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"create_or_update_network_rule_set_async",
"(",
"resource_group_name",
",",
"namespace_name",
",",
"par... | Create or update NetworkRuleSet for a Namespace.
@param resource_group_name [String] Name of the resource group within the
Azure subscription.
@param namespace_name [String] The Namespace name
@param parameters [NetworkRuleSet] The Namespace IpFilterRule.
@param custom_headers [Hash{String => String}] A hash of c... | [
"Create",
"or",
"update",
"NetworkRuleSet",
"for",
"a",
"Namespace",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_event_hub/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/namespaces.rb#L1359-L1362 | train | Creates or updates a network rule set in the specified namespace. | [
30522,
13366,
3443,
1035,
2030,
1035,
10651,
1035,
2897,
1035,
3627,
1035,
2275,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
3415,
15327,
1035,
2171,
1010,
11709,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
3443,
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_automation/lib/2015-10-31/generated/azure_mgmt_automation/module_model_operations.rb | Azure::Automation::Mgmt::V2015_10_31.ModuleModelOperations.update_with_http_info | def update_with_http_info(resource_group_name, automation_account_name, module_name, parameters, custom_headers:nil)
update_async(resource_group_name, automation_account_name, module_name, parameters, custom_headers:custom_headers).value!
end | ruby | def update_with_http_info(resource_group_name, automation_account_name, module_name, parameters, custom_headers:nil)
update_async(resource_group_name, automation_account_name, module_name, parameters, custom_headers:custom_headers).value!
end | [
"def",
"update_with_http_info",
"(",
"resource_group_name",
",",
"automation_account_name",
",",
"module_name",
",",
"parameters",
",",
"custom_headers",
":",
"nil",
")",
"update_async",
"(",
"resource_group_name",
",",
"automation_account_name",
",",
"module_name",
",",
... | Update the module identified by module name.
@param resource_group_name [String] Name of an Azure Resource group.
@param automation_account_name [String] The name of the automation account.
@param module_name [String] The name of module.
@param parameters [ModuleUpdateParameters] The update parameters for module.
... | [
"Update",
"the",
"module",
"identified",
"by",
"module",
"name",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_automation/lib/2015-10-31/generated/azure_mgmt_automation/module_model_operations.rb#L363-L365 | train | Updates a module s index. | [
30522,
13366,
10651,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
19309,
1035,
4070,
1035,
2171,
1010,
11336,
1035,
2171,
1010,
11709,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
10651,
1035,
200... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_customer_insights/lib/2017-01-01/generated/azure_mgmt_customer_insights/views.rb | Azure::CustomerInsights::Mgmt::V2017_01_01.Views.delete | def delete(resource_group_name, hub_name, view_name, user_id, custom_headers:nil)
response = delete_async(resource_group_name, hub_name, view_name, user_id, custom_headers:custom_headers).value!
nil
end | ruby | def delete(resource_group_name, hub_name, view_name, user_id, custom_headers:nil)
response = delete_async(resource_group_name, hub_name, view_name, user_id, custom_headers:custom_headers).value!
nil
end | [
"def",
"delete",
"(",
"resource_group_name",
",",
"hub_name",
",",
"view_name",
",",
"user_id",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"delete_async",
"(",
"resource_group_name",
",",
"hub_name",
",",
"view_name",
",",
"user_id",
",",
"custom_h... | Deletes a view in the specified hub.
@param resource_group_name [String] The name of the resource group.
@param hub_name [String] The name of the hub.
@param view_name [String] The name of the view.
@param user_id [String] The user ID. Use * to retreive hub level view.
@param custom_headers [Hash{String => String... | [
"Deletes",
"a",
"view",
"in",
"the",
"specified",
"hub",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_customer_insights/lib/2017-01-01/generated/azure_mgmt_customer_insights/views.rb#L346-L349 | train | Deletes a view from the hub. | [
30522,
13366,
3972,
12870,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
9594,
1035,
2171,
1010,
3193,
1035,
2171,
1010,
5310,
1035,
8909,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
3972,
12870,
1035,
2004,
6038,
2278,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
jnunemaker/httparty | lib/httparty.rb | HTTParty.ClassMethods.http_proxy | def http_proxy(addr = nil, port = nil, user = nil, pass = nil)
default_options[:http_proxyaddr] = addr
default_options[:http_proxyport] = port
default_options[:http_proxyuser] = user
default_options[:http_proxypass] = pass
end | ruby | def http_proxy(addr = nil, port = nil, user = nil, pass = nil)
default_options[:http_proxyaddr] = addr
default_options[:http_proxyport] = port
default_options[:http_proxyuser] = user
default_options[:http_proxypass] = pass
end | [
"def",
"http_proxy",
"(",
"addr",
"=",
"nil",
",",
"port",
"=",
"nil",
",",
"user",
"=",
"nil",
",",
"pass",
"=",
"nil",
")",
"default_options",
"[",
":http_proxyaddr",
"]",
"=",
"addr",
"default_options",
"[",
":http_proxyport",
"]",
"=",
"port",
"defau... | Allows setting http proxy information to be used
class Foo
include HTTParty
http_proxy 'http://foo.com', 80, 'user', 'pass'
end | [
"Allows",
"setting",
"http",
"proxy",
"information",
"to",
"be",
"used"
] | b4099defba01231d2faaaa2660476f867e096bfb | https://github.com/jnunemaker/httparty/blob/b4099defba01231d2faaaa2660476f867e096bfb/lib/httparty.rb#L95-L100 | train | Set http proxy options | [
30522,
13366,
8299,
1035,
24540,
1006,
5587,
2099,
1027,
9152,
2140,
1010,
3417,
1027,
9152,
2140,
1010,
5310,
1027,
9152,
2140,
1010,
3413,
1027,
9152,
2140,
1007,
12398,
1035,
7047,
1031,
1024,
8299,
1035,
24540,
4215,
13626,
1033,
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... |
sds/overcommit | lib/overcommit/hook/pre_commit/flay.rb | Overcommit::Hook::PreCommit.Flay.run | def run
command = ['flay', '--mass', @config['mass_threshold'].to_s, '--fuzzy', @config['fuzzy'].to_s]
# Use a more liberal detection method
command += ['--liberal'] if @config['liberal']
messages = []
# Run the command for each file
applicable_files.each do |file|
result = e... | ruby | def run
command = ['flay', '--mass', @config['mass_threshold'].to_s, '--fuzzy', @config['fuzzy'].to_s]
# Use a more liberal detection method
command += ['--liberal'] if @config['liberal']
messages = []
# Run the command for each file
applicable_files.each do |file|
result = e... | [
"def",
"run",
"command",
"=",
"[",
"'flay'",
",",
"'--mass'",
",",
"@config",
"[",
"'mass_threshold'",
"]",
".",
"to_s",
",",
"'--fuzzy'",
",",
"@config",
"[",
"'fuzzy'",
"]",
".",
"to_s",
"]",
"# Use a more liberal detection method",
"command",
"+=",
"[",
"... | Flay prints two kinds of messages:
1) IDENTICAL code found in :defn (mass*2 = MASS)
file_path_1.rb:LINE_1
file_path_2.rb:LINE_2
2) Similar code found in :defn (mass = MASS)
file_path_1.rb:LINE_1
file_path_2.rb:LINE_2 | [
"Flay",
"prints",
"two",
"kinds",
"of",
"messages",
":"
] | 35d60adb41da942178b789560968e3ad030b0ac7 | https://github.com/sds/overcommit/blob/35d60adb41da942178b789560968e3ad030b0ac7/lib/overcommit/hook/pre_commit/flay.rb#L19-L36 | train | Run the command | [
30522,
13366,
2448,
3094,
1027,
1031,
1005,
13109,
4710,
1005,
1010,
1005,
1011,
1011,
3742,
1005,
1010,
1030,
9530,
8873,
2290,
1031,
1005,
3742,
1035,
11207,
1005,
1033,
1012,
2000,
1035,
1055,
1010,
1005,
1011,
1011,
18001,
1005,
1010,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | 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_deployed_service_replica_info_list_with_http_info | def get_deployed_service_replica_info_list_with_http_info(node_name, application_id, partition_id:nil, service_manifest_name:nil, timeout:60, custom_headers:nil)
get_deployed_service_replica_info_list_async(node_name, application_id, partition_id:partition_id, service_manifest_name:service_manifest_name, timeout:... | ruby | def get_deployed_service_replica_info_list_with_http_info(node_name, application_id, partition_id:nil, service_manifest_name:nil, timeout:60, custom_headers:nil)
get_deployed_service_replica_info_list_async(node_name, application_id, partition_id:partition_id, service_manifest_name:service_manifest_name, timeout:... | [
"def",
"get_deployed_service_replica_info_list_with_http_info",
"(",
"node_name",
",",
"application_id",
",",
"partition_id",
":",
"nil",
",",
"service_manifest_name",
":",
"nil",
",",
"timeout",
":",
"60",
",",
"custom_headers",
":",
"nil",
")",
"get_deployed_service_r... | Gets the list of replicas deployed on a Service Fabric node.
Gets the list containing the information about replicas deployed on a Service
Fabric node. The information include partition ID, replica ID, status of the
replica, name of the service, name of the service type, and other
information. Use PartitionId or S... | [
"Gets",
"the",
"list",
"of",
"replicas",
"deployed",
"on",
"a",
"Service",
"Fabric",
"node",
"."
] | 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#L15355-L15357 | train | Gets the list of service replicas deployed to a node. | [
30522,
13366,
2131,
1035,
7333,
1035,
2326,
1035,
15059,
1035,
18558,
1035,
2862,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
13045,
1035,
2171,
1010,
4646,
1035,
8909,
1010,
13571,
1035,
8909,
1024,
9152,
2140,
1010,
2326,
1035,
19676,
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.get_name_exists_info_with_http_info | def get_name_exists_info_with_http_info(name_id, timeout:60, custom_headers:nil)
get_name_exists_info_async(name_id, timeout:timeout, custom_headers:custom_headers).value!
end | ruby | def get_name_exists_info_with_http_info(name_id, timeout:60, custom_headers:nil)
get_name_exists_info_async(name_id, timeout:timeout, custom_headers:custom_headers).value!
end | [
"def",
"get_name_exists_info_with_http_info",
"(",
"name_id",
",",
"timeout",
":",
"60",
",",
"custom_headers",
":",
"nil",
")",
"get_name_exists_info_async",
"(",
"name_id",
",",
"timeout",
":",
"timeout",
",",
"custom_headers",
":custom_headers",
")",
".",
"value!... | Returns whether the Service Fabric name exists.
Returns whether the specified Service Fabric name exists.
@param name_id [String] The Service Fabric name, without the 'fabric:' URI
scheme.
@param timeout [Integer] The server timeout for performing the operation in
seconds. This timeout specifies the time duratio... | [
"Returns",
"whether",
"the",
"Service",
"Fabric",
"name",
"exists",
"."
] | 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#L26249-L26251 | train | Gets information about the specified name. | [
30522,
13366,
2131,
1035,
2171,
1035,
6526,
1035,
18558,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
2171,
1035,
8909,
1010,
2051,
5833,
1024,
3438,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
2131,
1035,
2171,
1035,
6526,
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... |
aws/aws-sdk-ruby | gems/aws-sdk-glacier/lib/aws-sdk-glacier/notification.rb | Aws::Glacier.Notification.wait_until | def wait_until(options = {}, &block)
self_copy = self.dup
attempts = 0
options[:max_attempts] = 10 unless options.key?(:max_attempts)
options[:delay] ||= 10
options[:poller] = Proc.new do
attempts += 1
if block.call(self_copy)
[:success, self_copy]
else
... | ruby | def wait_until(options = {}, &block)
self_copy = self.dup
attempts = 0
options[:max_attempts] = 10 unless options.key?(:max_attempts)
options[:delay] ||= 10
options[:poller] = Proc.new do
attempts += 1
if block.call(self_copy)
[:success, self_copy]
else
... | [
"def",
"wait_until",
"(",
"options",
"=",
"{",
"}",
",",
"&",
"block",
")",
"self_copy",
"=",
"self",
".",
"dup",
"attempts",
"=",
"0",
"options",
"[",
":max_attempts",
"]",
"=",
"10",
"unless",
"options",
".",
"key?",
"(",
":max_attempts",
")",
"optio... | @deprecated Use [Aws::Glacier::Client] #wait_until instead
Waiter polls an API operation until a resource enters a desired
state.
@note The waiting operation is performed on a copy. The original resource remains unchanged
## Basic Usage
Waiter will polls until it is successful, it fails by
entering a terminal... | [
"@deprecated",
"Use",
"[",
"Aws",
"::",
"Glacier",
"::",
"Client",
"]",
"#wait_until",
"instead"
] | e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d | https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-glacier/lib/aws-sdk-glacier/notification.rb#L171-L186 | train | Wait until the block returns true | [
30522,
13366,
3524,
1035,
2127,
1006,
7047,
1027,
1063,
1065,
1010,
1004,
3796,
1007,
2969,
1035,
6100,
1027,
2969,
1012,
4241,
2361,
4740,
1027,
1014,
7047,
1031,
1024,
4098,
1035,
4740,
1033,
1027,
2184,
4983,
7047,
1012,
3145,
1029,
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_automation/lib/2015-10-31/generated/azure_mgmt_automation/webhook_operations.rb | Azure::Automation::Mgmt::V2015_10_31.WebhookOperations.update_with_http_info | def update_with_http_info(resource_group_name, automation_account_name, webhook_name, parameters, custom_headers:nil)
update_async(resource_group_name, automation_account_name, webhook_name, parameters, custom_headers:custom_headers).value!
end | ruby | def update_with_http_info(resource_group_name, automation_account_name, webhook_name, parameters, custom_headers:nil)
update_async(resource_group_name, automation_account_name, webhook_name, parameters, custom_headers:custom_headers).value!
end | [
"def",
"update_with_http_info",
"(",
"resource_group_name",
",",
"automation_account_name",
",",
"webhook_name",
",",
"parameters",
",",
"custom_headers",
":",
"nil",
")",
"update_async",
"(",
"resource_group_name",
",",
"automation_account_name",
",",
"webhook_name",
","... | Update the webhook identified by webhook name.
@param resource_group_name [String] Name of an Azure Resource group.
@param automation_account_name [String] The name of the automation account.
@param webhook_name [String] The webhook name.
@param parameters [WebhookUpdateParameters] The update parameters for
webho... | [
"Update",
"the",
"webhook",
"identified",
"by",
"webhook",
"name",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_automation/lib/2015-10-31/generated/azure_mgmt_automation/webhook_operations.rb#L467-L469 | train | Updates an existing webhook. | [
30522,
13366,
10651,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
19309,
1035,
4070,
1035,
2171,
1010,
4773,
6806,
6559,
1035,
2171,
1010,
11709,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
10651... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
meew0/discordrb | lib/discordrb/bot.rb | Discordrb.Bot.update_presence | def update_presence(data)
# Friends list presences have no server ID so ignore these to not cause an error
return unless data['guild_id']
user_id = data['user']['id'].to_i
server_id = data['guild_id'].to_i
server = server(server_id)
return unless server
member_is_new = false
... | ruby | def update_presence(data)
# Friends list presences have no server ID so ignore these to not cause an error
return unless data['guild_id']
user_id = data['user']['id'].to_i
server_id = data['guild_id'].to_i
server = server(server_id)
return unless server
member_is_new = false
... | [
"def",
"update_presence",
"(",
"data",
")",
"# Friends list presences have no server ID so ignore these to not cause an error",
"return",
"unless",
"data",
"[",
"'guild_id'",
"]",
"user_id",
"=",
"data",
"[",
"'user'",
"]",
"[",
"'id'",
"]",
".",
"to_i",
"server_id",
... | ## ## ######## ######## ######## ## ## ### ##
### ## ## ## ## ## ### ## ## ## ## ##
#### ## ## ## ## ## #### ## ## ## ##
## ## ## ## ###### ######## ## ## ## ## ## ##
## #### ## ## ## ## ## ... | [
"##",
"##",
"########",
"########",
"########",
"##",
"##",
"###",
"##",
"###",
"##",
"##",
"##",
"##",
"##",
"###",
"##",
"##",
"##",
"##",
"##",
"####",
"##",
"##",
"##",
"##",
"##",
"####",
"##",
"##",
"##",
"##",
"##",
"##",
"##",
"##",
"##... | 764298a1ff0be69a1853b510d736f21c2b91a2fe | https://github.com/meew0/discordrb/blob/764298a1ff0be69a1853b510d736f21c2b91a2fe/lib/discordrb/bot.rb#L726-L760 | train | Update presence information for a user | [
30522,
13366,
10651,
1035,
3739,
1006,
2951,
1007,
1001,
2814,
2862,
3739,
2015,
2031,
2053,
8241,
8909,
2061,
8568,
2122,
2000,
2025,
3426,
2019,
7561,
2709,
4983,
2951,
1031,
1005,
9054,
1035,
8909,
1005,
1033,
5310,
1035,
8909,
1027,
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... |
decidim/decidim | decidim-core/app/services/decidim/continuity_badge_tracker.rb | Decidim.ContinuityBadgeTracker.track! | def track!(date)
@subject.with_lock do
last_session_at = status.try(:last_session_at) || date
current_streak = status.try(:current_streak) || 1
streak = if last_session_at == date
current_streak
elsif last_session_at == date - 1.day
c... | ruby | def track!(date)
@subject.with_lock do
last_session_at = status.try(:last_session_at) || date
current_streak = status.try(:current_streak) || 1
streak = if last_session_at == date
current_streak
elsif last_session_at == date - 1.day
c... | [
"def",
"track!",
"(",
"date",
")",
"@subject",
".",
"with_lock",
"do",
"last_session_at",
"=",
"status",
".",
"try",
"(",
":last_session_at",
")",
"||",
"date",
"current_streak",
"=",
"status",
".",
"try",
"(",
":current_streak",
")",
"||",
"1",
"streak",
... | Initializes the class with a polymorphic subject
subject - A in instance of a subclass of ActiveRecord::Base to be tracked
Public: Tracks the past activity of a user to update the continuity badge's
score. It will set it to the amount of consecutive days a user has logged into
the system.
date - The date of the... | [
"Initializes",
"the",
"class",
"with",
"a",
"polymorphic",
"subject"
] | 6e2b14e559a63088669904e3c5c49a5180700cf7 | https://github.com/decidim/decidim/blob/6e2b14e559a63088669904e3c5c49a5180700cf7/decidim-core/app/services/decidim/continuity_badge_tracker.rb#L22-L38 | train | Track the current streak of the current session | [
30522,
30524,
1006,
1024,
2197,
1035,
5219,
1035,
2012,
1007,
1064,
1064,
3058,
2783,
1035,
9039,
1027,
3570,
1012,
3046,
1006,
1024,
2783,
1035,
9039,
1007,
1064,
1064,
1015,
9039,
1027,
2065,
2197,
1035,
5219,
1035,
2012,
1027,
1027,
30... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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 | screengrab/lib/screengrab/runner.rb | Screengrab.Runner.if_device_path_exists | def if_device_path_exists(device_serial, device_path)
return if run_adb_command("adb -s #{device_serial} shell ls #{device_path}",
print_all: false,
print_command: false).include?('No such file')
yield(device_path)
rescue
# Some vers... | ruby | def if_device_path_exists(device_serial, device_path)
return if run_adb_command("adb -s #{device_serial} shell ls #{device_path}",
print_all: false,
print_command: false).include?('No such file')
yield(device_path)
rescue
# Some vers... | [
"def",
"if_device_path_exists",
"(",
"device_serial",
",",
"device_path",
")",
"return",
"if",
"run_adb_command",
"(",
"\"adb -s #{device_serial} shell ls #{device_path}\"",
",",
"print_all",
":",
"false",
",",
"print_command",
":",
"false",
")",
".",
"include?",
"(",
... | Some device commands fail if executed against a device path that does not exist, so this helper method
provides a way to conditionally execute a block only if the provided path exists on the device. | [
"Some",
"device",
"commands",
"fail",
"if",
"executed",
"against",
"a",
"device",
"path",
"that",
"does",
"not",
"exist",
"so",
"this",
"helper",
"method",
"provides",
"a",
"way",
"to",
"conditionally",
"execute",
"a",
"block",
"only",
"if",
"the",
"provided... | 457c5d647c77f0e078dafa5129da616914e002c5 | https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/screengrab/lib/screengrab/runner.rb#L349-L358 | train | If the device path exists in the ADB server then the block is called. | [
30522,
13366,
2065,
1035,
5080,
1035,
4130,
1035,
6526,
1006,
5080,
1035,
7642,
1010,
5080,
1035,
4130,
1007,
2709,
2065,
2448,
1035,
4748,
2497,
1035,
3094,
1006,
1000,
4748,
2497,
1011,
1055,
1001,
1063,
5080,
1035,
7642,
1065,
5806,
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... |
RailsEventStore/rails_event_store | ruby_event_store/lib/ruby_event_store/specification.rb | RubyEventStore.Specification.from | def from(start)
raise InvalidPageStart if start.nil? || start.empty?
raise EventNotFound.new(start) unless reader.has_event?(start)
Specification.new(reader, result.dup { |r| r.start = start })
end | ruby | def from(start)
raise InvalidPageStart if start.nil? || start.empty?
raise EventNotFound.new(start) unless reader.has_event?(start)
Specification.new(reader, result.dup { |r| r.start = start })
end | [
"def",
"from",
"(",
"start",
")",
"raise",
"InvalidPageStart",
"if",
"start",
".",
"nil?",
"||",
"start",
".",
"empty?",
"raise",
"EventNotFound",
".",
"new",
"(",
"start",
")",
"unless",
"reader",
".",
"has_event?",
"(",
"start",
")",
"Specification",
"."... | Limits the query to events before or after another event.
{http://railseventstore.org/docs/read/ Find out more}.
@param start [String] id of event to start reading from.
@return [Specification] | [
"Limits",
"the",
"query",
"to",
"events",
"before",
"or",
"after",
"another",
"event",
".",
"{",
"http",
":",
"//",
"railseventstore",
".",
"org",
"/",
"docs",
"/",
"read",
"/",
"Find",
"out",
"more",
"}",
"."
] | 3ee4f3148499794154ee6fec74ccf6d4670d85ac | https://github.com/RailsEventStore/rails_event_store/blob/3ee4f3148499794154ee6fec74ccf6d4670d85ac/ruby_event_store/lib/ruby_event_store/specification.rb#L27-L31 | train | Returns a new Specification object from the given start. | [
30522,
13366,
2013,
1006,
2707,
1007,
5333,
19528,
13704,
14117,
2102,
2065,
2707,
1012,
9152,
2140,
1029,
1064,
1064,
2707,
1012,
4064,
1029,
5333,
2724,
17048,
14876,
8630,
1012,
2047,
1006,
2707,
1007,
4983,
8068,
1012,
2038,
1035,
2724,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_network/lib/2019-02-01/generated/azure_mgmt_network/ddos_custom_policies.rb | Azure::Network::Mgmt::V2019_02_01.DdosCustomPolicies.begin_delete | def begin_delete(resource_group_name, ddos_custom_policy_name, custom_headers:nil)
response = begin_delete_async(resource_group_name, ddos_custom_policy_name, custom_headers:custom_headers).value!
nil
end | ruby | def begin_delete(resource_group_name, ddos_custom_policy_name, custom_headers:nil)
response = begin_delete_async(resource_group_name, ddos_custom_policy_name, custom_headers:custom_headers).value!
nil
end | [
"def",
"begin_delete",
"(",
"resource_group_name",
",",
"ddos_custom_policy_name",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"begin_delete_async",
"(",
"resource_group_name",
",",
"ddos_custom_policy_name",
",",
"custom_headers",
":custom_headers",
")",
"."... | Deletes the specified DDoS custom policy.
@param resource_group_name [String] The name of the resource group.
@param ddos_custom_policy_name [String] The name of the DDoS custom policy.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request. | [
"Deletes",
"the",
"specified",
"DDoS",
"custom",
"policy",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_network/lib/2019-02-01/generated/azure_mgmt_network/ddos_custom_policies.rb#L255-L258 | train | Deletes the specified DDoS custom policy. | [
30522,
13366,
4088,
1035,
3972,
12870,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
20315,
2891,
1035,
7661,
1035,
3343,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
4088,
1035,
3972,
12870,
1035,
2004,
6038,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_resources_management/lib/2018-03-01-preview/generated/azure_mgmt_resources_management/management_groups.rb | Azure::ResourcesManagement::Mgmt::V2018_03_01_preview.ManagementGroups.begin_create_or_update_with_http_info | def begin_create_or_update_with_http_info(group_id, create_management_group_request, cache_control:'no-cache', custom_headers:nil)
begin_create_or_update_async(group_id, create_management_group_request, cache_control:cache_control, custom_headers:custom_headers).value!
end | ruby | def begin_create_or_update_with_http_info(group_id, create_management_group_request, cache_control:'no-cache', custom_headers:nil)
begin_create_or_update_async(group_id, create_management_group_request, cache_control:cache_control, custom_headers:custom_headers).value!
end | [
"def",
"begin_create_or_update_with_http_info",
"(",
"group_id",
",",
"create_management_group_request",
",",
"cache_control",
":",
"'no-cache'",
",",
"custom_headers",
":",
"nil",
")",
"begin_create_or_update_async",
"(",
"group_id",
",",
"create_management_group_request",
"... | Create or update a management group. If a management group is already created
and a subsequent create request is issued with different properties, the
management group properties will be updated.
@param group_id [String] Management Group ID.
@param create_management_group_request [CreateManagementGroupRequest]
Ma... | [
"Create",
"or",
"update",
"a",
"management",
"group",
".",
"If",
"a",
"management",
"group",
"is",
"already",
"created",
"and",
"a",
"subsequent",
"create",
"request",
"is",
"issued",
"with",
"different",
"properties",
"the",
"management",
"group",
"properties",... | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_resources_management/lib/2018-03-01-preview/generated/azure_mgmt_resources_management/management_groups.rb#L491-L493 | train | Creates or updates a management group. | [
30522,
13366,
4088,
1035,
3443,
1035,
2030,
1035,
10651,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
2177,
1035,
8909,
1010,
3443,
1035,
2968,
1035,
2177,
30524,
2030,
1035,
10651,
1035,
2004,
6038,
2278,
1006,
2177,
1035,
8909,
1010,
3443,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | data/azure_cognitiveservices_luisauthoring/lib/2.0/generated/azure_cognitiveservices_luisauthoring/model.rb | Azure::CognitiveServices::LuisAuthoring::V2_0.Model.add_composite_entity_child_with_http_info | def add_composite_entity_child_with_http_info(app_id, version_id, c_entity_id, composite_child_model_create_object, custom_headers:nil)
add_composite_entity_child_async(app_id, version_id, c_entity_id, composite_child_model_create_object, custom_headers:custom_headers).value!
end | ruby | def add_composite_entity_child_with_http_info(app_id, version_id, c_entity_id, composite_child_model_create_object, custom_headers:nil)
add_composite_entity_child_async(app_id, version_id, c_entity_id, composite_child_model_create_object, custom_headers:custom_headers).value!
end | [
"def",
"add_composite_entity_child_with_http_info",
"(",
"app_id",
",",
"version_id",
",",
"c_entity_id",
",",
"composite_child_model_create_object",
",",
"custom_headers",
":",
"nil",
")",
"add_composite_entity_child_async",
"(",
"app_id",
",",
"version_id",
",",
"c_entity... | Creates a single child in an existing composite entity model in a version of
the application.
@param app_id The application ID.
@param version_id [String] The version ID.
@param c_entity_id The composite entity extractor ID.
@param composite_child_model_create_object [CompositeChildModelCreateObject]
A model obj... | [
"Creates",
"a",
"single",
"child",
"in",
"an",
"existing",
"composite",
"entity",
"model",
"in",
"a",
"version",
"of",
"the",
"application",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_cognitiveservices_luisauthoring/lib/2.0/generated/azure_cognitiveservices_luisauthoring/model.rb#L5452-L5454 | train | Adds a composite entity child to the application version. | [
30522,
13366,
5587,
1035,
12490,
1035,
9178,
1035,
2775,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
10439,
1035,
8909,
1010,
2544,
1035,
8909,
1010,
1039,
1035,
9178,
1035,
8909,
1010,
12490,
1035,
2775,
1035,
2944,
1035,
3443,
1035,
4874,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
rails/rails | actionpack/lib/action_dispatch/http/response.rb | ActionDispatch.Response.cookies | def cookies
cookies = {}
if header = get_header(SET_COOKIE)
header = header.split("\n") if header.respond_to?(:to_str)
header.each do |cookie|
if pair = cookie.split(";").first
key, value = pair.split("=").map { |v| Rack::Utils.unescape(v) }
cookies[key] = v... | ruby | def cookies
cookies = {}
if header = get_header(SET_COOKIE)
header = header.split("\n") if header.respond_to?(:to_str)
header.each do |cookie|
if pair = cookie.split(";").first
key, value = pair.split("=").map { |v| Rack::Utils.unescape(v) }
cookies[key] = v... | [
"def",
"cookies",
"cookies",
"=",
"{",
"}",
"if",
"header",
"=",
"get_header",
"(",
"SET_COOKIE",
")",
"header",
"=",
"header",
".",
"split",
"(",
"\"\\n\"",
")",
"if",
"header",
".",
"respond_to?",
"(",
":to_str",
")",
"header",
".",
"each",
"do",
"|"... | Returns the response cookies, converted to a Hash of (name => value) pairs
assert_equal 'AuthorOfNewPage', r.cookies['author'] | [
"Returns",
"the",
"response",
"cookies",
"converted",
"to",
"a",
"Hash",
"of",
"(",
"name",
"=",
">",
"value",
")",
"pairs"
] | 85a8bc644be69908f05740a5886ec19cd3679df5 | https://github.com/rails/rails/blob/85a8bc644be69908f05740a5886ec19cd3679df5/actionpack/lib/action_dispatch/http/response.rb#L393-L405 | train | Get the cookies from the request | [
30522,
13366,
16324,
16324,
1027,
1063,
1065,
2065,
20346,
1027,
2131,
1035,
20346,
1006,
2275,
1035,
17387,
1007,
20346,
1027,
20346,
1012,
3975,
1006,
1000,
1032,
1050,
1000,
1007,
2065,
20346,
1012,
6869,
1035,
2000,
1029,
1006,
1024,
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... |
hashicorp/vault-ruby | lib/vault/api/sys/auth.rb | Vault.Sys.auth_tune | def auth_tune(path)
json = client.get("/v1/sys/auth/#{encode_path(path)}/tune")
return AuthConfig.decode(json)
rescue HTTPError => e
return nil if e.code == 404
raise
end | ruby | def auth_tune(path)
json = client.get("/v1/sys/auth/#{encode_path(path)}/tune")
return AuthConfig.decode(json)
rescue HTTPError => e
return nil if e.code == 404
raise
end | [
"def",
"auth_tune",
"(",
"path",
")",
"json",
"=",
"client",
".",
"get",
"(",
"\"/v1/sys/auth/#{encode_path(path)}/tune\"",
")",
"return",
"AuthConfig",
".",
"decode",
"(",
"json",
")",
"rescue",
"HTTPError",
"=>",
"e",
"return",
"nil",
"if",
"e",
".",
"code... | Read the given auth path's configuration.
@example
Vault.sys.auth_tune("github") #=> #<Vault::AuthConfig "default_lease_ttl"=3600, "max_lease_ttl"=7200>
@param [String] path
the path to retrieve configuration for
@return [AuthConfig]
configuration of the given auth path | [
"Read",
"the",
"given",
"auth",
"path",
"s",
"configuration",
"."
] | 02f0532a802ba1a2a0d8703a4585dab76eb9d864 | https://github.com/hashicorp/vault-ruby/blob/02f0532a802ba1a2a0d8703a4585dab76eb9d864/lib/vault/api/sys/auth.rb#L89-L95 | train | Get the auth tune for a given path | [
30522,
13366,
8740,
2705,
1035,
8694,
1006,
4130,
1007,
1046,
3385,
1027,
7396,
1012,
2131,
1006,
1000,
1013,
1058,
2487,
1013,
25353,
2015,
1013,
8740,
2705,
1013,
1001,
1063,
4372,
16044,
1035,
4130,
1006,
4130,
1007,
1065,
1013,
8694,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_service_fabric/lib/2017-07-01-preview/generated/azure_mgmt_service_fabric/version.rb | Azure::ServiceFabric::Mgmt::V2017_07_01_preview.Version.begin_put_with_http_info | def begin_put_with_http_info(subscription_id, resource_group_name, cluster_name, application_type_name, version, api_version, parameters, custom_headers:nil)
begin_put_async(subscription_id, resource_group_name, cluster_name, application_type_name, version, api_version, parameters, custom_headers:custom_headers).... | ruby | def begin_put_with_http_info(subscription_id, resource_group_name, cluster_name, application_type_name, version, api_version, parameters, custom_headers:nil)
begin_put_async(subscription_id, resource_group_name, cluster_name, application_type_name, version, api_version, parameters, custom_headers:custom_headers).... | [
"def",
"begin_put_with_http_info",
"(",
"subscription_id",
",",
"resource_group_name",
",",
"cluster_name",
",",
"application_type_name",
",",
"version",
",",
"api_version",
",",
"parameters",
",",
"custom_headers",
":",
"nil",
")",
"begin_put_async",
"(",
"subscription... | Provisions an application type version resource.
@param subscription_id [String] The customer subscription identifier
@param resource_group_name [String] The name of the resource group.
@param cluster_name [String] The name of the cluster resource
@param application_type_name [String] The name of the application t... | [
"Provisions",
"an",
"application",
"type",
"version",
"resource",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_service_fabric/lib/2017-07-01-preview/generated/azure_mgmt_service_fabric/version.rb#L377-L379 | train | Updates an existing cluster application type. | [
30522,
13366,
4088,
1035,
2404,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
15002,
1035,
8909,
1010,
7692,
1035,
2177,
1035,
2171,
1010,
9324,
1035,
2171,
1010,
4646,
1035,
2828,
1035,
2171,
1010,
2544,
1010,
17928,
1035,
2544,
1010,
11709,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | data/azure_service_fabric/lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb | Azure::ServiceFabric::V6_2_0_9.ServiceFabricClientAPIs.start_application_upgrade_with_http_info | def start_application_upgrade_with_http_info(application_id, application_upgrade_description, timeout:60, custom_headers:nil)
start_application_upgrade_async(application_id, application_upgrade_description, timeout:timeout, custom_headers:custom_headers).value!
end | ruby | def start_application_upgrade_with_http_info(application_id, application_upgrade_description, timeout:60, custom_headers:nil)
start_application_upgrade_async(application_id, application_upgrade_description, timeout:timeout, custom_headers:custom_headers).value!
end | [
"def",
"start_application_upgrade_with_http_info",
"(",
"application_id",
",",
"application_upgrade_description",
",",
"timeout",
":",
"60",
",",
"custom_headers",
":",
"nil",
")",
"start_application_upgrade_async",
"(",
"application_id",
",",
"application_upgrade_description",... | Starts upgrading an application in the Service Fabric cluster.
Validates the supplied application upgrade parameters and starts upgrading
the application if the parameters are valid.
@param application_id [String] The identity of the application. This is
typically the full name of the application without the 'fab... | [
"Starts",
"upgrading",
"an",
"application",
"in",
"the",
"Service",
"Fabric",
"cluster",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_service_fabric/lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb#L7758-L7760 | train | Starts an upgrade of the specified application. | [
30522,
13366,
2707,
1035,
4646,
1035,
12200,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
4646,
1035,
8909,
1010,
4646,
1035,
12200,
1035,
6412,
1010,
2051,
5833,
1024,
3438,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
2707,
1035,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
rails/rails | activejob/lib/active_job/core.rb | ActiveJob.Core.serialize | def serialize
{
"job_class" => self.class.name,
"job_id" => job_id,
"provider_job_id" => provider_job_id,
"queue_name" => queue_name,
"priority" => priority,
"arguments" => serialize_arguments_if_needed(arguments),
"executions" => executions,
... | ruby | def serialize
{
"job_class" => self.class.name,
"job_id" => job_id,
"provider_job_id" => provider_job_id,
"queue_name" => queue_name,
"priority" => priority,
"arguments" => serialize_arguments_if_needed(arguments),
"executions" => executions,
... | [
"def",
"serialize",
"{",
"\"job_class\"",
"=>",
"self",
".",
"class",
".",
"name",
",",
"\"job_id\"",
"=>",
"job_id",
",",
"\"provider_job_id\"",
"=>",
"provider_job_id",
",",
"\"queue_name\"",
"=>",
"queue_name",
",",
"\"priority\"",
"=>",
"priority",
",",
"\"a... | Creates a new job instance. Takes the arguments that will be
passed to the perform method.
Returns a hash with the job data that can safely be passed to the
queuing adapter. | [
"Creates",
"a",
"new",
"job",
"instance",
".",
"Takes",
"the",
"arguments",
"that",
"will",
"be",
"passed",
"to",
"the",
"perform",
"method",
".",
"Returns",
"a",
"hash",
"with",
"the",
"job",
"data",
"that",
"can",
"safely",
"be",
"passed",
"to",
"the",... | 85a8bc644be69908f05740a5886ec19cd3679df5 | https://github.com/rails/rails/blob/85a8bc644be69908f05740a5886ec19cd3679df5/activejob/lib/active_job/core.rb#L92-L106 | train | Serialize the object to be serialized into a JSON object. | [
30522,
13366,
7642,
4697,
1063,
1000,
3105,
1035,
2465,
1000,
1027,
1028,
2969,
1012,
2465,
1012,
2171,
1010,
1000,
3105,
1035,
8909,
1000,
1027,
1028,
3105,
1035,
8909,
1010,
1000,
10802,
1035,
3105,
1035,
8909,
1000,
1027,
1028,
10802,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
ankane/pgsync | lib/pgsync/client.rb | PgSync.Client.perform | def perform
return if @exit
args, opts = @arguments, @options
[:to, :from, :to_safe, :exclude, :schemas].each do |opt|
opts[opt] ||= config[opt.to_s]
end
map_deprecations(args, opts)
if opts[:init]
setup(db_config_file(args[0]) || config_file || ".pgsync.yml")
... | ruby | def perform
return if @exit
args, opts = @arguments, @options
[:to, :from, :to_safe, :exclude, :schemas].each do |opt|
opts[opt] ||= config[opt.to_s]
end
map_deprecations(args, opts)
if opts[:init]
setup(db_config_file(args[0]) || config_file || ".pgsync.yml")
... | [
"def",
"perform",
"return",
"if",
"@exit",
"args",
",",
"opts",
"=",
"@arguments",
",",
"@options",
"[",
":to",
",",
":from",
",",
":to_safe",
",",
":exclude",
",",
":schemas",
"]",
".",
"each",
"do",
"|",
"opt",
"|",
"opts",
"[",
"opt",
"]",
"||=",
... | TODO clean up this mess | [
"TODO",
"clean",
"up",
"this",
"mess"
] | 2aa4741538ca09070efe86de6dd1281e13a1b5c5 | https://github.com/ankane/pgsync/blob/2aa4741538ca09070efe86de6dd1281e13a1b5c5/lib/pgsync/client.rb#L12-L28 | train | Perform the necessary tasks | [
30522,
13366,
4685,
2709,
2065,
1030,
6164,
12098,
5620,
1010,
23569,
2015,
1027,
1030,
9918,
1010,
1030,
7047,
1031,
1024,
2000,
1010,
1024,
2013,
1010,
1024,
2000,
1035,
3647,
1010,
1024,
23329,
1010,
1024,
8040,
28433,
2015,
1033,
1012,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_batch/lib/2017-09-01/generated/azure_mgmt_batch/certificate_operations.rb | Azure::Batch::Mgmt::V2017_09_01.CertificateOperations.cancel_deletion_with_http_info | def cancel_deletion_with_http_info(resource_group_name, account_name, certificate_name, custom_headers:nil)
cancel_deletion_async(resource_group_name, account_name, certificate_name, custom_headers:custom_headers).value!
end | ruby | def cancel_deletion_with_http_info(resource_group_name, account_name, certificate_name, custom_headers:nil)
cancel_deletion_async(resource_group_name, account_name, certificate_name, custom_headers:custom_headers).value!
end | [
"def",
"cancel_deletion_with_http_info",
"(",
"resource_group_name",
",",
"account_name",
",",
"certificate_name",
",",
"custom_headers",
":",
"nil",
")",
"cancel_deletion_async",
"(",
"resource_group_name",
",",
"account_name",
",",
"certificate_name",
",",
"custom_headers... | Cancels a failed deletion of a certificate from the specified account.
If you try to delete a certificate that is being used by a pool or compute
node, the status of the certificate changes to deleteFailed. If you decide
that you want to continue using the certificate, you can use this operation
to set the status ... | [
"Cancels",
"a",
"failed",
"deletion",
"of",
"a",
"certificate",
"from",
"the",
"specified",
"account",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_batch/lib/2017-09-01/generated/azure_mgmt_batch/certificate_operations.rb#L555-L557 | train | Cancels deletion of a certificate. | [
30522,
13366,
17542,
1035,
3972,
20624,
2239,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
30524,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
7661,
1035,
20346,
2015,
1007,
1012,
3643,
999,
2203,
102,
0,
0,
0,
0,
0,
0,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/group_users.rb | Azure::ApiManagement::Mgmt::V2016_07_07.GroupUsers.add | def add(resource_group_name, service_name, group_id, uid, custom_headers:nil)
response = add_async(resource_group_name, service_name, group_id, uid, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def add(resource_group_name, service_name, group_id, uid, custom_headers:nil)
response = add_async(resource_group_name, service_name, group_id, uid, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"add",
"(",
"resource_group_name",
",",
"service_name",
",",
"group_id",
",",
"uid",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"add_async",
"(",
"resource_group_name",
",",
"service_name",
",",
"group_id",
",",
"uid",
",",
"custom_headers",... | Adds a user to the specified group.
@param resource_group_name [String] The name of the resource group.
@param service_name [String] The name of the API Management service.
@param group_id [String] Group identifier. Must be unique in the current API
Management service instance.
@param uid [String] User identifier... | [
"Adds",
"a",
"user",
"to",
"the",
"specified",
"group",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_api_management/lib/2016-07-07/generated/azure_mgmt_api_management/group_users.rb#L202-L205 | train | Adds a new group to the specified App Service Environment. | [
30522,
13366,
5587,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2326,
1035,
2171,
1010,
2177,
1035,
8909,
1010,
21318,
2094,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
5587,
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... |
sensu/sensu | lib/sensu/utilities.rb | Sensu.Utilities.determine_check_cron_time | def determine_check_cron_time(check)
cron_parser = CronParser.new(check[:cron])
current_time = Time.now
next_cron_time = cron_parser.next(current_time)
next_cron_time - current_time
end | ruby | def determine_check_cron_time(check)
cron_parser = CronParser.new(check[:cron])
current_time = Time.now
next_cron_time = cron_parser.next(current_time)
next_cron_time - current_time
end | [
"def",
"determine_check_cron_time",
"(",
"check",
")",
"cron_parser",
"=",
"CronParser",
".",
"new",
"(",
"check",
"[",
":cron",
"]",
")",
"current_time",
"=",
"Time",
".",
"now",
"next_cron_time",
"=",
"cron_parser",
".",
"next",
"(",
"current_time",
")",
"... | Determine the next check cron time.
@param check [Hash] definition. | [
"Determine",
"the",
"next",
"check",
"cron",
"time",
"."
] | 51319e4b58c8d9986f101ad71ff729aa3e51e951 | https://github.com/sensu/sensu/blob/51319e4b58c8d9986f101ad71ff729aa3e51e951/lib/sensu/utilities.rb#L390-L395 | train | Determine the cron time for a check | [
30522,
13366,
5646,
1035,
4638,
1035,
13675,
2239,
1035,
2051,
1006,
4638,
1007,
13675,
2239,
1035,
11968,
8043,
1027,
13675,
2239,
19362,
8043,
1012,
2047,
1006,
4638,
1031,
1024,
13675,
2239,
1033,
1007,
2783,
1035,
2051,
1027,
2051,
1012... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
aws/aws-sdk-ruby | gems/aws-sdk-rds/lib/aws-sdk-rds/resource.rb | Aws::RDS.Resource.db_parameter_groups | def db_parameter_groups(options = {})
batches = Enumerator.new do |y|
resp = @client.describe_db_parameter_groups(options)
resp.each_page do |page|
batch = []
page.data.db_parameter_groups.each do |d|
batch << DBParameterGroup.new(
name: d.db_parameter... | ruby | def db_parameter_groups(options = {})
batches = Enumerator.new do |y|
resp = @client.describe_db_parameter_groups(options)
resp.each_page do |page|
batch = []
page.data.db_parameter_groups.each do |d|
batch << DBParameterGroup.new(
name: d.db_parameter... | [
"def",
"db_parameter_groups",
"(",
"options",
"=",
"{",
"}",
")",
"batches",
"=",
"Enumerator",
".",
"new",
"do",
"|",
"y",
"|",
"resp",
"=",
"@client",
".",
"describe_db_parameter_groups",
"(",
"options",
")",
"resp",
".",
"each_page",
"do",
"|",
"page",
... | @example Request syntax with placeholder values
db_parameter_groups = rds.db_parameter_groups({
db_parameter_group_name: "String",
filters: [
{
name: "String", # required
values: ["String"], # required
},
],
})
@param [Hash] options ({})
@option options [String] :... | [
"@example",
"Request",
"syntax",
"with",
"placeholder",
"values"
] | e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d | https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-rds/lib/aws-sdk-rds/resource.rb#L1928-L1944 | train | Returns a collection of DBParameterGroups | [
30522,
13366,
16962,
1035,
16381,
1035,
2967,
1006,
7047,
1027,
1063,
1065,
1007,
14108,
2229,
1027,
4372,
17897,
16259,
1012,
2047,
2079,
1064,
1061,
1064,
24501,
2361,
1027,
1030,
7396,
1012,
6235,
1035,
16962,
1035,
16381,
1035,
2967,
10... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/user_identities.rb | Azure::ApiManagement::Mgmt::V2016_10_10.UserIdentities.list_by_users | def list_by_users(resource_group_name, service_name, uid, custom_headers:nil)
response = list_by_users_async(resource_group_name, service_name, uid, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def list_by_users(resource_group_name, service_name, uid, custom_headers:nil)
response = list_by_users_async(resource_group_name, service_name, uid, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"list_by_users",
"(",
"resource_group_name",
",",
"service_name",
",",
"uid",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"list_by_users_async",
"(",
"resource_group_name",
",",
"service_name",
",",
"uid",
",",
"custom_headers",
":custom_headers",
... | Lists all user identities.
@param resource_group_name [String] The name of the resource group.
@param service_name [String] The name of the API Management service.
@param uid [String] User identifier. Must be unique in the current API
Management service instance.
@param custom_headers [Hash{String => String}] A h... | [
"Lists",
"all",
"user",
"identities",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/user_identities.rb#L36-L39 | train | Gets the list of the elastic advisors that are associated with the user. | [
30522,
13366,
2862,
1035,
2011,
1035,
5198,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2326,
1035,
2171,
1010,
21318,
2094,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
30524,
7661,
1035,
20346,
2015,
1024,
7661,
1035,
20346,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | data/azure_cognitiveservices_contentmoderator/lib/1.0/generated/azure_cognitiveservices_contentmoderator/reviews.rb | Azure::CognitiveServices::ContentModerator::V1_0.Reviews.add_video_transcript_moderation_result | def add_video_transcript_moderation_result(content_type, team_name, review_id, transcript_moderation_body, custom_headers:nil)
response = add_video_transcript_moderation_result_async(content_type, team_name, review_id, transcript_moderation_body, custom_headers:custom_headers).value!
nil
end | ruby | def add_video_transcript_moderation_result(content_type, team_name, review_id, transcript_moderation_body, custom_headers:nil)
response = add_video_transcript_moderation_result_async(content_type, team_name, review_id, transcript_moderation_body, custom_headers:custom_headers).value!
nil
end | [
"def",
"add_video_transcript_moderation_result",
"(",
"content_type",
",",
"team_name",
",",
"review_id",
",",
"transcript_moderation_body",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"add_video_transcript_moderation_result_async",
"(",
"content_type",
",",
"t... | This API adds a transcript screen text result file for a video review.
Transcript screen text result file is a result of Screen Text API . In order
to generate transcript screen text result file , a transcript file has to be
screened for profanity using Screen Text API.
@param content_type [String] The content typ... | [
"This",
"API",
"adds",
"a",
"transcript",
"screen",
"text",
"result",
"file",
"for",
"a",
"video",
"review",
".",
"Transcript",
"screen",
"text",
"result",
"file",
"is",
"a",
"result",
"of",
"Screen",
"Text",
"API",
".",
"In",
"order",
"to",
"generate",
... | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_cognitiveservices_contentmoderator/lib/1.0/generated/azure_cognitiveservices_contentmoderator/reviews.rb#L1143-L1146 | train | Add a transcript moderation result to a video review. | [
30522,
13366,
5587,
1035,
2678,
1035,
24051,
1035,
5549,
8156,
1035,
2765,
1006,
4180,
1035,
2828,
1010,
2136,
1035,
2171,
1010,
3319,
1035,
8909,
1010,
24051,
1035,
5549,
8156,
1035,
2303,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_network/lib/2018-10-01/generated/azure_mgmt_network/connection_monitors.rb | Azure::Network::Mgmt::V2018_10_01.ConnectionMonitors.stop_async | def stop_async(resource_group_name, network_watcher_name, connection_monitor_name, custom_headers:nil)
# Send request
promise = begin_stop_async(resource_group_name, network_watcher_name, connection_monitor_name, custom_headers:custom_headers)
promise = promise.then do |response|
# Defining d... | ruby | def stop_async(resource_group_name, network_watcher_name, connection_monitor_name, custom_headers:nil)
# Send request
promise = begin_stop_async(resource_group_name, network_watcher_name, connection_monitor_name, custom_headers:custom_headers)
promise = promise.then do |response|
# Defining d... | [
"def",
"stop_async",
"(",
"resource_group_name",
",",
"network_watcher_name",
",",
"connection_monitor_name",
",",
"custom_headers",
":",
"nil",
")",
"# Send request",
"promise",
"=",
"begin_stop_async",
"(",
"resource_group_name",
",",
"network_watcher_name",
",",
"conne... | @param resource_group_name [String] The name of the resource group containing
Network Watcher.
@param network_watcher_name [String] The name of the Network Watcher
resource.
@param connection_monitor_name [String] The name of the connection monitor.
@param custom_headers [Hash{String => String}] A hash of custom h... | [
"@param",
"resource_group_name",
"[",
"String",
"]",
"The",
"name",
"of",
"the",
"resource",
"group",
"containing",
"Network",
"Watcher",
".",
"@param",
"network_watcher_name",
"[",
"String",
"]",
"The",
"name",
"of",
"the",
"Network",
"Watcher",
"resource",
"."... | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_network/lib/2018-10-01/generated/azure_mgmt_network/connection_monitors.rb#L250-L264 | train | Stops a connection monitor. | [
30522,
13366,
2644,
1035,
2004,
6038,
2278,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2897,
1035,
3422,
2121,
1035,
2171,
1010,
4434,
1035,
8080,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
1001,
4604,
5227,
4872,
1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
rails/rails | activerecord/lib/active_record/persistence.rb | ActiveRecord.Persistence.becomes! | def becomes!(klass)
became = becomes(klass)
sti_type = nil
if !klass.descends_from_active_record?
sti_type = klass.sti_name
end
became.public_send("#{klass.inheritance_column}=", sti_type)
became
end | ruby | def becomes!(klass)
became = becomes(klass)
sti_type = nil
if !klass.descends_from_active_record?
sti_type = klass.sti_name
end
became.public_send("#{klass.inheritance_column}=", sti_type)
became
end | [
"def",
"becomes!",
"(",
"klass",
")",
"became",
"=",
"becomes",
"(",
"klass",
")",
"sti_type",
"=",
"nil",
"if",
"!",
"klass",
".",
"descends_from_active_record?",
"sti_type",
"=",
"klass",
".",
"sti_name",
"end",
"became",
".",
"public_send",
"(",
"\"#{klas... | Wrapper around #becomes that also changes the instance's sti column value.
This is especially useful if you want to persist the changed class in your
database.
Note: The old instance's sti column value will be changed too, as both objects
share the same set of attributes. | [
"Wrapper",
"around",
"#becomes",
"that",
"also",
"changes",
"the",
"instance",
"s",
"sti",
"column",
"value",
".",
"This",
"is",
"especially",
"useful",
"if",
"you",
"want",
"to",
"persist",
"the",
"changed",
"class",
"in",
"your",
"database",
"."
] | 85a8bc644be69908f05740a5886ec19cd3679df5 | https://github.com/rails/rails/blob/85a8bc644be69908f05740a5886ec19cd3679df5/activerecord/lib/active_record/persistence.rb#L583-L591 | train | Returns the result of the method. | [
30522,
13366,
4150,
999,
1006,
1047,
27102,
1007,
2150,
1027,
4150,
1006,
1047,
27102,
1007,
2358,
2072,
1035,
2828,
1027,
9152,
2140,
2065,
999,
1047,
27102,
1012,
23328,
1035,
2013,
1035,
3161,
1035,
2501,
1029,
2358,
2072,
1035,
2828,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/utils.rb | Sprockets.Utils.hash_reassoc | def hash_reassoc(hash, key_a, key_b = nil, &block)
if key_b
hash_reassoc1(hash, key_a) do |value|
hash_reassoc(value, key_b, &block)
end
else
hash_reassoc1(hash, key_a, &block)
end
end | ruby | def hash_reassoc(hash, key_a, key_b = nil, &block)
if key_b
hash_reassoc1(hash, key_a) do |value|
hash_reassoc(value, key_b, &block)
end
else
hash_reassoc1(hash, key_a, &block)
end
end | [
"def",
"hash_reassoc",
"(",
"hash",
",",
"key_a",
",",
"key_b",
"=",
"nil",
",",
"&",
"block",
")",
"if",
"key_b",
"hash_reassoc1",
"(",
"hash",
",",
"key_a",
")",
"do",
"|",
"value",
"|",
"hash_reassoc",
"(",
"value",
",",
"key_b",
",",
"block",
")"... | Internal: Duplicate and store key/value on new frozen hash.
Similar to Hash#store for nested frozen hashes.
hash - Hash
key_a - Object key. Use multiple keys for nested hashes.
key_b - Object key. Use multiple keys for nested hashes.
block - Receives current value at key.
Examples
config = {paths: ["/bi... | [
"Internal",
":",
"Duplicate",
"and",
"store",
"key",
"/",
"value",
"on",
"new",
"frozen",
"hash",
"."
] | 9e3f0d8e98c44f57e67bc138db87bb8469bf5ddd | https://github.com/rails/sprockets/blob/9e3f0d8e98c44f57e67bc138db87bb8469bf5ddd/lib/sprockets/utils.rb#L61-L69 | train | reassocs a hash with a key_a and a key_b | [
30522,
13366,
23325,
1035,
2128,
12054,
10085,
1006,
23325,
1010,
3145,
1035,
1037,
1010,
3145,
1035,
1038,
1027,
9152,
2140,
1010,
1004,
3796,
1007,
2065,
3145,
1035,
1038,
23325,
1035,
2128,
12054,
10085,
2487,
1006,
23325,
1010,
3145,
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... |
fastlane/fastlane | fastlane/lib/fastlane/plugins/plugin_manager.rb | Fastlane.PluginManager.update_dependencies! | def update_dependencies!
puts("Updating plugin dependencies...")
ensure_plugins_attached!
plugins = available_plugins
if plugins.empty?
UI.user_error!("No plugins are installed")
end
with_clean_bundler_env do
cmd = "bundle update"
cmd << " #{plugins.join(' ')}... | ruby | def update_dependencies!
puts("Updating plugin dependencies...")
ensure_plugins_attached!
plugins = available_plugins
if plugins.empty?
UI.user_error!("No plugins are installed")
end
with_clean_bundler_env do
cmd = "bundle update"
cmd << " #{plugins.join(' ')}... | [
"def",
"update_dependencies!",
"puts",
"(",
"\"Updating plugin dependencies...\"",
")",
"ensure_plugins_attached!",
"plugins",
"=",
"available_plugins",
"if",
"plugins",
".",
"empty?",
"UI",
".",
"user_error!",
"(",
"\"No plugins are installed\"",
")",
"end",
"with_clean_bu... | Warning: This will exec out
This is necessary since the user might be prompted for their password | [
"Warning",
":",
"This",
"will",
"exec",
"out",
"This",
"is",
"necessary",
"since",
"the",
"user",
"might",
"be",
"prompted",
"for",
"their",
"password"
] | 457c5d647c77f0e078dafa5129da616914e002c5 | https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/fastlane/lib/fastlane/plugins/plugin_manager.rb#L189-L204 | train | Updates the dependencies of the plugin. | [
30522,
13366,
10651,
1035,
12530,
15266,
999,
8509,
1006,
1000,
2039,
16616,
13354,
2378,
12530,
15266,
1012,
1012,
1012,
1000,
1007,
5676,
1035,
13354,
7076,
1035,
4987,
999,
13354,
7076,
1027,
2800,
1035,
13354,
7076,
2065,
13354,
7076,
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... |
magnusvk/counter_culture | lib/counter_culture/counter.rb | CounterCulture.Counter.first_level_relation_foreign_key | def first_level_relation_foreign_key
first_relation = relation.first if relation.is_a?(Enumerable)
relation_reflect(first_relation).foreign_key
end | ruby | def first_level_relation_foreign_key
first_relation = relation.first if relation.is_a?(Enumerable)
relation_reflect(first_relation).foreign_key
end | [
"def",
"first_level_relation_foreign_key",
"first_relation",
"=",
"relation",
".",
"first",
"if",
"relation",
".",
"is_a?",
"(",
"Enumerable",
")",
"relation_reflect",
"(",
"first_relation",
")",
".",
"foreign_key",
"end"
] | gets the foreign key name of the relation. will look at the first
level only -- i.e., if passed an array will consider only its
first element
relation: a symbol or array of symbols; specifies the relation
that has the counter cache column | [
"gets",
"the",
"foreign",
"key",
"name",
"of",
"the",
"relation",
".",
"will",
"look",
"at",
"the",
"first",
"level",
"only",
"--",
"i",
".",
"e",
".",
"if",
"passed",
"an",
"array",
"will",
"consider",
"only",
"its",
"first",
"element"
] | 6b5bd4d6e1ee4f10f262ace7cfed5776af9520ba | https://github.com/magnusvk/counter_culture/blob/6b5bd4d6e1ee4f10f262ace7cfed5776af9520ba/lib/counter_culture/counter.rb#L264-L267 | train | Returns the foreign key of the first level relation | [
30522,
13366,
2034,
1035,
2504,
1035,
7189,
1035,
3097,
1035,
3145,
2034,
1035,
7189,
1027,
7189,
1012,
2034,
2065,
7189,
1012,
2003,
1035,
1037,
1029,
1006,
4372,
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... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_recovery_services_site_recovery/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/replication_protection_containers.rb | Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10.ReplicationProtectionContainers.switch_protection | def switch_protection(fabric_name, protection_container_name, switch_input, custom_headers:nil)
response = switch_protection_async(fabric_name, protection_container_name, switch_input, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def switch_protection(fabric_name, protection_container_name, switch_input, custom_headers:nil)
response = switch_protection_async(fabric_name, protection_container_name, switch_input, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"switch_protection",
"(",
"fabric_name",
",",
"protection_container_name",
",",
"switch_input",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"switch_protection_async",
"(",
"fabric_name",
",",
"protection_container_name",
",",
"switch_input",
",",
"cu... | Switches protection from one container to another or one replication provider
to another.
Operation to switch protection from one container to another or one
replication provider to another.
@param fabric_name [String] Unique fabric name.
@param protection_container_name [String] Protection container name.
@par... | [
"Switches",
"protection",
"from",
"one",
"container",
"to",
"another",
"or",
"one",
"replication",
"provider",
"to",
"another",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_recovery_services_site_recovery/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/replication_protection_containers.rb#L376-L379 | train | Switch protection of a protection container. | [
30522,
13366,
6942,
1035,
3860,
1006,
8313,
1035,
2171,
1010,
3860,
1035,
11661,
1035,
2171,
1010,
6942,
1035,
7953,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
6942,
1035,
3860,
1035,
2004,
6038,
2278,
1006,
8313,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_container_registry/lib/2017-06-01-preview/generated/azure_mgmt_container_registry/replications.rb | Azure::ContainerRegistry::Mgmt::V2017_06_01_preview.Replications.begin_delete_with_http_info | def begin_delete_with_http_info(resource_group_name, registry_name, replication_name, custom_headers:nil)
begin_delete_async(resource_group_name, registry_name, replication_name, custom_headers:custom_headers).value!
end | ruby | def begin_delete_with_http_info(resource_group_name, registry_name, replication_name, custom_headers:nil)
begin_delete_async(resource_group_name, registry_name, replication_name, custom_headers:custom_headers).value!
end | [
"def",
"begin_delete_with_http_info",
"(",
"resource_group_name",
",",
"registry_name",
",",
"replication_name",
",",
"custom_headers",
":",
"nil",
")",
"begin_delete_async",
"(",
"resource_group_name",
",",
"registry_name",
",",
"replication_name",
",",
"custom_headers",
... | Deletes a replication from a container registry.
@param resource_group_name [String] The name of the resource group to which
the container registry belongs.
@param registry_name [String] The name of the container registry.
@param replication_name [String] The name of the replication.
@param custom_headers [Hash{S... | [
"Deletes",
"a",
"replication",
"from",
"a",
"container",
"registry",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_container_registry/lib/2017-06-01-preview/generated/azure_mgmt_container_registry/replications.rb#L521-L523 | train | Deletes a replication specification. | [
30522,
13366,
4088,
1035,
3972,
12870,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
15584,
1035,
2171,
1010,
21647,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
4088,
1035,
3972,
12870... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_labservices/lib/2018-10-15/generated/azure_mgmt_labservices/lab_accounts.rb | Azure::Labservices::Mgmt::V2018_10_15.LabAccounts.get_regional_availability | def get_regional_availability(resource_group_name, lab_account_name, custom_headers:nil)
response = get_regional_availability_async(resource_group_name, lab_account_name, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def get_regional_availability(resource_group_name, lab_account_name, custom_headers:nil)
response = get_regional_availability_async(resource_group_name, lab_account_name, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"get_regional_availability",
"(",
"resource_group_name",
",",
"lab_account_name",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"get_regional_availability_async",
"(",
"resource_group_name",
",",
"lab_account_name",
",",
"custom_headers",
":custom_headers",
... | Get regional availability information for each size category configured under
a lab account
@param resource_group_name [String] The name of the resource group.
@param lab_account_name [String] The name of the lab Account.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added t... | [
"Get",
"regional",
"availability",
"information",
"for",
"each",
"size",
"category",
"configured",
"under",
"a",
"lab",
"account"
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_labservices/lib/2018-10-15/generated/azure_mgmt_labservices/lab_accounts.rb#L696-L699 | train | Gets the regional availability of the lab account. | [
30522,
13366,
2131,
1035,
3164,
1035,
11343,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
6845,
1035,
4070,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
2131,
1035,
3164,
1035,
11343,
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... |
samvera/hyrax | app/helpers/hyrax/collections_helper.rb | Hyrax.CollectionsHelper.single_item_action_form_fields | def single_item_action_form_fields(form, document, action)
render 'hyrax/dashboard/collections/single_item_action_fields', form: form, document: document, action: action
end | ruby | def single_item_action_form_fields(form, document, action)
render 'hyrax/dashboard/collections/single_item_action_fields', form: form, document: document, action: action
end | [
"def",
"single_item_action_form_fields",
"(",
"form",
",",
"document",
",",
"action",
")",
"render",
"'hyrax/dashboard/collections/single_item_action_fields'",
",",
"form",
":",
"form",
",",
"document",
":",
"document",
",",
"action",
":",
"action",
"end"
] | add hidden fields to a form for performing an action on a single document on a collection | [
"add",
"hidden",
"fields",
"to",
"a",
"form",
"for",
"performing",
"an",
"action",
"on",
"a",
"single",
"document",
"on",
"a",
"collection"
] | e2b4f56e829a53b1f11296324736e9d5b8c9ee5f | https://github.com/samvera/hyrax/blob/e2b4f56e829a53b1f11296324736e9d5b8c9ee5f/app/helpers/hyrax/collections_helper.rb#L74-L76 | train | Render the form fields for a single item action | [
30522,
13366,
2309,
1035,
8875,
1035,
2895,
1035,
2433,
1035,
4249,
1006,
2433,
1010,
6254,
1010,
2895,
1007,
17552,
1005,
1044,
19563,
2595,
1013,
24923,
1013,
6407,
1013,
2309,
1035,
8875,
1035,
2895,
1035,
4249,
1005,
1010,
2433,
1024,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | data/azure_cognitiveservices_customvisiontraining/lib/3.0/generated/azure_cognitiveservices_customvisiontraining/customvisiontraining_client.rb | Azure::CognitiveServices::Customvisiontraining::V3_0.CustomvisiontrainingClient.delete_prediction | def delete_prediction(project_id, ids, custom_headers:nil)
response = delete_prediction_async(project_id, ids, custom_headers:custom_headers).value!
nil
end | ruby | def delete_prediction(project_id, ids, custom_headers:nil)
response = delete_prediction_async(project_id, ids, custom_headers:custom_headers).value!
nil
end | [
"def",
"delete_prediction",
"(",
"project_id",
",",
"ids",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"delete_prediction_async",
"(",
"project_id",
",",
"ids",
",",
"custom_headers",
":custom_headers",
")",
".",
"value!",
"nil",
"end"
] | Delete a set of predicted images and their associated prediction results.
@param project_id The project id.
@param ids The prediction ids. Limited to 64.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request. | [
"Delete",
"a",
"set",
"of",
"predicted",
"images",
"and",
"their",
"associated",
"prediction",
"results",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_cognitiveservices_customvisiontraining/lib/3.0/generated/azure_cognitiveservices_customvisiontraining/customvisiontraining_client.rb#L2019-L2022 | train | Deletes a list of prediction features. | [
30522,
13366,
3972,
12870,
1035,
17547,
1006,
2622,
1035,
8909,
1010,
8909,
2015,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
3972,
12870,
1035,
17547,
1035,
2004,
6038,
2278,
1006,
2622,
1035,
8909,
1010,
8909,
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 | data/azure_key_vault/lib/2016-10-01/generated/azure_key_vault/key_vault_client.rb | Azure::KeyVault::V2016_10_01.KeyVaultClient.get_key_versions | def get_key_versions(vault_base_url, key_name, maxresults:nil, custom_headers:nil)
first_page = get_key_versions_as_lazy(vault_base_url, key_name, maxresults:maxresults, custom_headers:custom_headers)
first_page.get_all_items
end | ruby | def get_key_versions(vault_base_url, key_name, maxresults:nil, custom_headers:nil)
first_page = get_key_versions_as_lazy(vault_base_url, key_name, maxresults:maxresults, custom_headers:custom_headers)
first_page.get_all_items
end | [
"def",
"get_key_versions",
"(",
"vault_base_url",
",",
"key_name",
",",
"maxresults",
":",
"nil",
",",
"custom_headers",
":",
"nil",
")",
"first_page",
"=",
"get_key_versions_as_lazy",
"(",
"vault_base_url",
",",
"key_name",
",",
"maxresults",
":",
"maxresults",
"... | Retrieves a list of individual key versions with the same key name.
The full key identifier, attributes, and tags are provided in the response.
This operation requires the keys/list permission.
@param vault_base_url [String] The vault name, for example
https://myvault.vault.azure.net.
@param key_name [String] Th... | [
"Retrieves",
"a",
"list",
"of",
"individual",
"key",
"versions",
"with",
"the",
"same",
"key",
"name",
"."
] | 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#L809-L812 | train | Gets the versions of the specified key. | [
30522,
13366,
2131,
1035,
3145,
1035,
4617,
1006,
11632,
1035,
2918,
1035,
24471,
2140,
1010,
3145,
1035,
2171,
1010,
4098,
6072,
11314,
30524,
24471,
2140,
1010,
3145,
1035,
2171,
1010,
4098,
6072,
11314,
2015,
1024,
4098,
6072,
11314,
201... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_stor_simple8000_series/lib/2017-06-01/generated/azure_mgmt_stor_simple8000_series/device_settings.rb | Azure::StorSimple8000Series::Mgmt::V2017_06_01.DeviceSettings.update_security_settings_async | def update_security_settings_async(device_name, parameters, resource_group_name, manager_name, custom_headers:nil)
# Send request
promise = begin_update_security_settings_async(device_name, parameters, resource_group_name, manager_name, custom_headers:custom_headers)
promise = promise.then do |respon... | ruby | def update_security_settings_async(device_name, parameters, resource_group_name, manager_name, custom_headers:nil)
# Send request
promise = begin_update_security_settings_async(device_name, parameters, resource_group_name, manager_name, custom_headers:custom_headers)
promise = promise.then do |respon... | [
"def",
"update_security_settings_async",
"(",
"device_name",
",",
"parameters",
",",
"resource_group_name",
",",
"manager_name",
",",
"custom_headers",
":",
"nil",
")",
"# Send request",
"promise",
"=",
"begin_update_security_settings_async",
"(",
"device_name",
",",
"par... | @param device_name [String] The device name
@param parameters [SecuritySettingsPatch] The security settings properties to
be patched.
@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 tha... | [
"@param",
"device_name",
"[",
"String",
"]",
"The",
"device",
"name",
"@param",
"parameters",
"[",
"SecuritySettingsPatch",
"]",
"The",
"security",
"settings",
"properties",
"to",
"be",
"patched",
".",
"@param",
"resource_group_name",
"[",
"String",
"]",
"The",
... | 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/device_settings.rb#L440-L456 | train | Updates security settings of the specified device. | [
30522,
13366,
10651,
1035,
3036,
1035,
10906,
1035,
2004,
6038,
2278,
1006,
5080,
1035,
2171,
1010,
11709,
1010,
7692,
1035,
2177,
1035,
2171,
1010,
3208,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
1001,
4604,
5227,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
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.rollback_application_upgrade_with_http_info | def rollback_application_upgrade_with_http_info(application_id, timeout:60, custom_headers:nil)
rollback_application_upgrade_async(application_id, timeout:timeout, custom_headers:custom_headers).value!
end | ruby | def rollback_application_upgrade_with_http_info(application_id, timeout:60, custom_headers:nil)
rollback_application_upgrade_async(application_id, timeout:timeout, custom_headers:custom_headers).value!
end | [
"def",
"rollback_application_upgrade_with_http_info",
"(",
"application_id",
",",
"timeout",
":",
"60",
",",
"custom_headers",
":",
"nil",
")",
"rollback_application_upgrade_async",
"(",
"application_id",
",",
"timeout",
":",
"timeout",
",",
"custom_headers",
":custom_hea... | Starts rolling back the currently on-going upgrade of an application in the
Service Fabric cluster.
Starts rolling back the current application upgrade to the previous version.
This API can only be used to rollback the current in-progress upgrade that is
rolling forward to new version. If the application is not cu... | [
"Starts",
"rolling",
"back",
"the",
"currently",
"on",
"-",
"going",
"upgrade",
"of",
"an",
"application",
"in",
"the",
"Service",
"Fabric",
"cluster",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_service_fabric/lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb#L8289-L8291 | train | Rollback the upgrade of the application. | [
30522,
13366,
4897,
5963,
1035,
4646,
1035,
12200,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
4646,
1035,
8909,
1010,
2051,
5833,
1024,
3438,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
4897,
5963,
1035,
4646,
1035,
12200,
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_labservices/lib/2018-10-15/generated/azure_mgmt_labservices/global_users.rb | Azure::Labservices::Mgmt::V2018_10_15.GlobalUsers.stop_environment_async | def stop_environment_async(user_name, environment_operations_payload, custom_headers:nil)
# Send request
promise = begin_stop_environment_async(user_name, environment_operations_payload, custom_headers:custom_headers)
promise = promise.then do |response|
# Defining deserialization method.
... | ruby | def stop_environment_async(user_name, environment_operations_payload, custom_headers:nil)
# Send request
promise = begin_stop_environment_async(user_name, environment_operations_payload, custom_headers:custom_headers)
promise = promise.then do |response|
# Defining deserialization method.
... | [
"def",
"stop_environment_async",
"(",
"user_name",
",",
"environment_operations_payload",
",",
"custom_headers",
":",
"nil",
")",
"# Send request",
"promise",
"=",
"begin_stop_environment_async",
"(",
"user_name",
",",
"environment_operations_payload",
",",
"custom_headers",
... | @param user_name [String] The name of the user.
@param environment_operations_payload [EnvironmentOperationsPayload]
Represents payload for any Environment operations like get, start, stop,
connect
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request.
@re... | [
"@param",
"user_name",
"[",
"String",
"]",
"The",
"name",
"of",
"the",
"user",
".",
"@param",
"environment_operations_payload",
"[",
"EnvironmentOperationsPayload",
"]",
"Represents",
"payload",
"for",
"any",
"Environment",
"operations",
"like",
"get",
"start",
"sto... | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_labservices/lib/2018-10-15/generated/azure_mgmt_labservices/global_users.rb#L829-L843 | train | Stops an environment. | [
30522,
13366,
2644,
1035,
4044,
1035,
2004,
6038,
2278,
1006,
5310,
1035,
2171,
1010,
4044,
1035,
3136,
1035,
18093,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
1001,
4604,
5227,
4872,
1027,
4088,
1035,
2644,
1035,
4044,
1035,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | data/azure_key_vault/lib/2016-10-01/generated/azure_key_vault/key_vault_client.rb | Azure::KeyVault::V2016_10_01.KeyVaultClient.get_deleted_keys_as_lazy_with_http_info | def get_deleted_keys_as_lazy_with_http_info(vault_base_url, maxresults:nil, custom_headers:nil)
get_deleted_keys_as_lazy_async(vault_base_url, maxresults:maxresults, custom_headers:custom_headers).value!
end | ruby | def get_deleted_keys_as_lazy_with_http_info(vault_base_url, maxresults:nil, custom_headers:nil)
get_deleted_keys_as_lazy_async(vault_base_url, maxresults:maxresults, custom_headers:custom_headers).value!
end | [
"def",
"get_deleted_keys_as_lazy_with_http_info",
"(",
"vault_base_url",
",",
"maxresults",
":",
"nil",
",",
"custom_headers",
":",
"nil",
")",
"get_deleted_keys_as_lazy_async",
"(",
"vault_base_url",
",",
"maxresults",
":",
"maxresults",
",",
"custom_headers",
":custom_h... | Lists the deleted keys in the specified vault.
Retrieves a list of the keys in the Key Vault as JSON Web Key structures that
contain the public part of a deleted key. This operation includes
deletion-specific information. The Get Deleted Keys operation is applicable
for vaults enabled for soft-delete. While the op... | [
"Lists",
"the",
"deleted",
"keys",
"in",
"the",
"specified",
"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#L9712-L9714 | train | Gets the deleted keys from the specified vault. | [
30522,
13366,
2131,
1035,
17159,
1035,
6309,
1035,
2004,
1035,
13971,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
11632,
1035,
2918,
1035,
24471,
2140,
1010,
4098,
6072,
11314,
2015,
1024,
9152,
2140,
1010,
7661,
1035,
20346,
2015,
1024,
915... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_sqlvirtualmachine/lib/2017-03-01-preview/generated/azure_mgmt_sqlvirtualmachine/sql_virtual_machine_groups.rb | Azure::Sqlvirtualmachine::Mgmt::V2017_03_01_preview.SqlVirtualMachineGroups.begin_delete | def begin_delete(resource_group_name, sql_virtual_machine_group_name, custom_headers:nil)
response = begin_delete_async(resource_group_name, sql_virtual_machine_group_name, custom_headers:custom_headers).value!
nil
end | ruby | def begin_delete(resource_group_name, sql_virtual_machine_group_name, custom_headers:nil)
response = begin_delete_async(resource_group_name, sql_virtual_machine_group_name, custom_headers:custom_headers).value!
nil
end | [
"def",
"begin_delete",
"(",
"resource_group_name",
",",
"sql_virtual_machine_group_name",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"begin_delete_async",
"(",
"resource_group_name",
",",
"sql_virtual_machine_group_name",
",",
"custom_headers",
":custom_headers"... | Deletes a SQL virtual machine group.
@param resource_group_name [String] Name of the resource group that contains
the resource. You can obtain this value from the Azure Resource Manager API
or the portal.
@param sql_virtual_machine_group_name [String] Name of the SQL virtual
machine group.
@param custom_headers ... | [
"Deletes",
"a",
"SQL",
"virtual",
"machine",
"group",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_sqlvirtualmachine/lib/2017-03-01-preview/generated/azure_mgmt_sqlvirtualmachine/sql_virtual_machine_groups.rb#L587-L590 | train | Deletes a SQL virtual machine group. | [
30522,
13366,
4088,
1035,
3972,
12870,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
29296,
1035,
7484,
1035,
3698,
1035,
2177,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
4088,
1035,
3972,
12870,
30524,
29296... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/2017-04-01/generated/azure_mgmt_service_bus/disaster_recovery_configs.rb | Azure::ServiceBus::Mgmt::V2017_04_01.DisasterRecoveryConfigs.get_with_http_info | def get_with_http_info(resource_group_name, namespace_name, alias_parameter, custom_headers:nil)
get_async(resource_group_name, namespace_name, alias_parameter, custom_headers:custom_headers).value!
end | ruby | def get_with_http_info(resource_group_name, namespace_name, alias_parameter, custom_headers:nil)
get_async(resource_group_name, namespace_name, alias_parameter, custom_headers:custom_headers).value!
end | [
"def",
"get_with_http_info",
"(",
"resource_group_name",
",",
"namespace_name",
",",
"alias_parameter",
",",
"custom_headers",
":",
"nil",
")",
"get_async",
"(",
"resource_group_name",
",",
"namespace_name",
",",
"alias_parameter",
",",
"custom_headers",
":custom_headers"... | Retrieves Alias(Disaster Recovery configuration) for primary or secondary
namespace
@param resource_group_name [String] Name of the Resource group within the
Azure subscription.
@param namespace_name [String] The namespace name
@param alias_parameter [String] The Disaster Recovery configuration name
@param custo... | [
"Retrieves",
"Alias",
"(",
"Disaster",
"Recovery",
"configuration",
")",
"for",
"primary",
"or",
"secondary",
"namespace"
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_service_bus/lib/2017-04-01/generated/azure_mgmt_service_bus/disaster_recovery_configs.rb#L480-L482 | train | Gets the namespace alias. | [
30522,
13366,
2131,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
3415,
15327,
1035,
2171,
1010,
14593,
1035,
16381,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
2131,
1035,
2004,
6038,
2278,
1006,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
CocoaPods/Xcodeproj | lib/xcodeproj/workspace.rb | Xcodeproj.Workspace.save_as | def save_as(path)
FileUtils.mkdir_p(path)
File.open(File.join(path, 'contents.xcworkspacedata'), 'w') do |out|
out << to_s
end
end | ruby | def save_as(path)
FileUtils.mkdir_p(path)
File.open(File.join(path, 'contents.xcworkspacedata'), 'w') do |out|
out << to_s
end
end | [
"def",
"save_as",
"(",
"path",
")",
"FileUtils",
".",
"mkdir_p",
"(",
"path",
")",
"File",
".",
"open",
"(",
"File",
".",
"join",
"(",
"path",
",",
"'contents.xcworkspacedata'",
")",
",",
"'w'",
")",
"do",
"|",
"out",
"|",
"out",
"<<",
"to_s",
"end",... | Saves the workspace at the given `xcworkspace` path.
@param [String] path
the path where to save the project.
@return [void] | [
"Saves",
"the",
"workspace",
"at",
"the",
"given",
"xcworkspace",
"path",
"."
] | 3be1684437a6f8e69c7836ad4c85a2b78663272f | https://github.com/CocoaPods/Xcodeproj/blob/3be1684437a6f8e69c7836ad4c85a2b78663272f/lib/xcodeproj/workspace.rb#L179-L184 | train | Save the current object to a file | [
30522,
13366,
3828,
1035,
2004,
1006,
4130,
1007,
5371,
21823,
4877,
1012,
12395,
4305,
2099,
1035,
1052,
1006,
4130,
1007,
5371,
1012,
2330,
1006,
5371,
1012,
3693,
1006,
4130,
1010,
1005,
8417,
1012,
1060,
2278,
9316,
15327,
2850,
2696,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_labservices/lib/2018-10-15/generated/azure_mgmt_labservices/lab_accounts.rb | Azure::Labservices::Mgmt::V2018_10_15.LabAccounts.create_lab | def create_lab(resource_group_name, lab_account_name, create_lab_properties, custom_headers:nil)
response = create_lab_async(resource_group_name, lab_account_name, create_lab_properties, custom_headers:custom_headers).value!
nil
end | ruby | def create_lab(resource_group_name, lab_account_name, create_lab_properties, custom_headers:nil)
response = create_lab_async(resource_group_name, lab_account_name, create_lab_properties, custom_headers:custom_headers).value!
nil
end | [
"def",
"create_lab",
"(",
"resource_group_name",
",",
"lab_account_name",
",",
"create_lab_properties",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"create_lab_async",
"(",
"resource_group_name",
",",
"lab_account_name",
",",
"create_lab_properties",
",",
"... | Create a lab in a lab account.
@param resource_group_name [String] The name of the resource group.
@param lab_account_name [String] The name of the lab Account.
@param create_lab_properties [CreateLabProperties] Properties for creating a
managed lab and a default environment setting
@param custom_headers [Hash{St... | [
"Create",
"a",
"lab",
"in",
"a",
"lab",
"account",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_labservices/lib/2018-10-15/generated/azure_mgmt_labservices/lab_accounts.rb#L601-L604 | train | Creates a lab in a lab account. | [
30522,
13366,
3443,
1035,
6845,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
6845,
1035,
4070,
1035,
2171,
1010,
3443,
1035,
6845,
1035,
5144,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
3443,
1035,
6845,
1035,
2004,
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... |
rocketjob/symmetric-encryption | lib/symmetric_encryption/reader.rb | SymmetricEncryption.Reader.read | def read(length = nil, outbuf = nil)
data = outbuf.to_s.clear
remaining_length = length
until remaining_length == 0 || eof?
read_block(remaining_length) if @read_buffer.empty?
if remaining_length && remaining_length < @read_buffer.length
data << @read_buffer.sli... | ruby | def read(length = nil, outbuf = nil)
data = outbuf.to_s.clear
remaining_length = length
until remaining_length == 0 || eof?
read_block(remaining_length) if @read_buffer.empty?
if remaining_length && remaining_length < @read_buffer.length
data << @read_buffer.sli... | [
"def",
"read",
"(",
"length",
"=",
"nil",
",",
"outbuf",
"=",
"nil",
")",
"data",
"=",
"outbuf",
".",
"to_s",
".",
"clear",
"remaining_length",
"=",
"length",
"until",
"remaining_length",
"==",
"0",
"||",
"eof?",
"read_block",
"(",
"remaining_length",
")",... | Read from the stream and return the decrypted data
See IOS#read
Reads at most length bytes from the I/O stream, or to the end of file if
length is omitted or is nil. length must be a non-negative integer or nil.
At end of file, it returns nil if no more data is available, or the last
remaining bytes | [
"Read",
"from",
"the",
"stream",
"and",
"return",
"the",
"decrypted",
"data",
"See",
"IOS#read"
] | 064ba8d57ffac44a3ed80f5e76fa1a54d660ff98 | https://github.com/rocketjob/symmetric-encryption/blob/064ba8d57ffac44a3ed80f5e76fa1a54d660ff98/lib/symmetric_encryption/reader.rb#L187-L206 | train | Read the next block of bytes from the stream. | [
30522,
13366,
3191,
1006,
3091,
1027,
9152,
2140,
1010,
2041,
8569,
2546,
1027,
9152,
2140,
1007,
2951,
1027,
2041,
8569,
2546,
1012,
2000,
1035,
1055,
1012,
3154,
3588,
1035,
3091,
1027,
3091,
2127,
3588,
1035,
3091,
1027,
1027,
1014,
10... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | data/azure_cognitiveservices_customvisionprediction/lib/2.0/generated/azure_cognitiveservices_customvisionprediction/customvisionprediction_client.rb | Azure::CognitiveServices::Customvisionprediction::V2_0.CustomvisionpredictionClient.predict_image_url_with_http_info | def predict_image_url_with_http_info(project_id, image_url, iteration_id:nil, application:nil, custom_headers:nil)
predict_image_url_async(project_id, image_url, iteration_id:iteration_id, application:application, custom_headers:custom_headers).value!
end | ruby | def predict_image_url_with_http_info(project_id, image_url, iteration_id:nil, application:nil, custom_headers:nil)
predict_image_url_async(project_id, image_url, iteration_id:iteration_id, application:application, custom_headers:custom_headers).value!
end | [
"def",
"predict_image_url_with_http_info",
"(",
"project_id",
",",
"image_url",
",",
"iteration_id",
":",
"nil",
",",
"application",
":",
"nil",
",",
"custom_headers",
":",
"nil",
")",
"predict_image_url_async",
"(",
"project_id",
",",
"image_url",
",",
"iteration_i... | Predict an image url and saves the result
@param project_id The project id
@param image_url [ImageUrl] An {Iris.Web.Api.Models.ImageUrl} that contains
the url of the image to be evaluated
@param iteration_id Optional. Specifies the id of a particular iteration to
evaluate against.
The default iteration for the p... | [
"Predict",
"an",
"image",
"url",
"and",
"saves",
"the",
"result"
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_cognitiveservices_customvisionprediction/lib/2.0/generated/azure_cognitiveservices_customvisionprediction/customvisionprediction_client.rb#L151-L153 | train | Predict an image url. | [
30522,
13366,
16014,
1035,
3746,
1035,
24471,
2140,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
2622,
1035,
8909,
1010,
3746,
1035,
24471,
2140,
1010,
27758,
1035,
8909,
1024,
9152,
2140,
1010,
4646,
1024,
9152,
2140,
1010,
7661,
1035,
20346... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_scheduler/lib/2016-03-01/generated/azure_mgmt_scheduler/job_collections.rb | Azure::Scheduler::Mgmt::V2016_03_01.JobCollections.begin_enable | def begin_enable(resource_group_name, job_collection_name, custom_headers:nil)
response = begin_enable_async(resource_group_name, job_collection_name, custom_headers:custom_headers).value!
nil
end | ruby | def begin_enable(resource_group_name, job_collection_name, custom_headers:nil)
response = begin_enable_async(resource_group_name, job_collection_name, custom_headers:custom_headers).value!
nil
end | [
"def",
"begin_enable",
"(",
"resource_group_name",
",",
"job_collection_name",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"begin_enable_async",
"(",
"resource_group_name",
",",
"job_collection_name",
",",
"custom_headers",
":custom_headers",
")",
".",
"val... | Enables all of the jobs in the job collection.
@param resource_group_name [String] The resource group name.
@param job_collection_name [String] The job collection name.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request. | [
"Enables",
"all",
"of",
"the",
"jobs",
"in",
"the",
"job",
"collection",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_scheduler/lib/2016-03-01/generated/azure_mgmt_scheduler/job_collections.rb#L714-L717 | train | Enables the specified job collection. | [
30522,
13366,
4088,
1035,
9585,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
3105,
1035,
3074,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
4088,
1035,
9585,
1035,
2004,
6038,
2278,
1006,
7692,
1035,
2177,
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... |
kpumuk/meta-tags | lib/meta_tags/renderer.rb | MetaTags.Renderer.process_array | def process_array(tags, property, content, **opts)
content.each { |v| process_tree(tags, property, v, **opts) }
end | ruby | def process_array(tags, property, content, **opts)
content.each { |v| process_tree(tags, property, v, **opts) }
end | [
"def",
"process_array",
"(",
"tags",
",",
"property",
",",
"content",
",",
"**",
"opts",
")",
"content",
".",
"each",
"{",
"|",
"v",
"|",
"process_tree",
"(",
"tags",
",",
"property",
",",
"v",
",",
"**",
"opts",
")",
"}",
"end"
] | Recursive method to process a hash with meta tags
@param [Array<Tag>] tags a buffer object to store tag in.
@param [String, Symbol] property a Hash or a String to render as meta tag.
@param [Array] content array of nested meta tag attributes or values. | [
"Recursive",
"method",
"to",
"process",
"a",
"hash",
"with",
"meta",
"tags"
] | 03585f95edf96cd17024c5c155ce46ec8bc47232 | https://github.com/kpumuk/meta-tags/blob/03585f95edf96cd17024c5c155ce46ec8bc47232/lib/meta_tags/renderer.rb#L236-L238 | train | Process an array of arrays | [
30522,
13366,
2832,
1035,
9140,
1006,
22073,
1010,
3200,
1010,
4180,
1010,
1008,
1008,
23569,
2015,
1007,
4180,
1012,
2169,
1063,
1064,
1058,
1064,
2832,
1035,
3392,
1006,
22073,
1010,
3200,
1010,
1058,
1010,
1008,
1008,
23569,
2015,
1007,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/databases.rb | Azure::SQL::Mgmt::V2014_04_01.Databases.begin_create_import_operation_with_http_info | def begin_create_import_operation_with_http_info(resource_group_name, server_name, database_name, parameters, custom_headers:nil)
begin_create_import_operation_async(resource_group_name, server_name, database_name, parameters, custom_headers:custom_headers).value!
end | ruby | def begin_create_import_operation_with_http_info(resource_group_name, server_name, database_name, parameters, custom_headers:nil)
begin_create_import_operation_async(resource_group_name, server_name, database_name, parameters, custom_headers:custom_headers).value!
end | [
"def",
"begin_create_import_operation_with_http_info",
"(",
"resource_group_name",
",",
"server_name",
",",
"database_name",
",",
"parameters",
",",
"custom_headers",
":",
"nil",
")",
"begin_create_import_operation_async",
"(",
"resource_group_name",
",",
"server_name",
",",
... | Creates an import operation that imports a bacpac into an existing database.
The existing database must be empty.
@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] ... | [
"Creates",
"an",
"import",
"operation",
"that",
"imports",
"a",
"bacpac",
"into",
"an",
"existing",
"database",
".",
"The",
"existing",
"database",
"must",
"be",
"empty",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/databases.rb#L1906-L1908 | train | Creates an import operation. | [
30522,
13366,
4088,
1035,
3443,
1035,
12324,
1035,
3169,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
8241,
1035,
2171,
1010,
7809,
1035,
2171,
1010,
11709,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/sync_groups.rb | Azure::SQL::Mgmt::V2015_05_01_preview.SyncGroups.list_hub_schemas_as_lazy | def list_hub_schemas_as_lazy(resource_group_name, server_name, database_name, sync_group_name, custom_headers:nil)
response = list_hub_schemas_async(resource_group_name, server_name, database_name, sync_group_name, custom_headers:custom_headers).value!
unless response.nil?
page = response.body
... | ruby | def list_hub_schemas_as_lazy(resource_group_name, server_name, database_name, sync_group_name, custom_headers:nil)
response = list_hub_schemas_async(resource_group_name, server_name, database_name, sync_group_name, custom_headers:custom_headers).value!
unless response.nil?
page = response.body
... | [
"def",
"list_hub_schemas_as_lazy",
"(",
"resource_group_name",
",",
"server_name",
",",
"database_name",
",",
"sync_group_name",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"list_hub_schemas_async",
"(",
"resource_group_name",
",",
"server_name",
",",
"data... | Gets a collection of hub database schemas.
@param resource_group_name [String] The name of the resource group that
contains the resource. You can obtain this value from the Azure Resource
Manager API or the portal.
@param server_name [String] The name of the server.
@param database_name [String] The name of the d... | [
"Gets",
"a",
"collection",
"of",
"hub",
"database",
"schemas",
"."
] | 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_groups.rb#L1804-L1813 | train | Gets the list of hub schemas for a given database. | [
30522,
13366,
2862,
1035,
9594,
1035,
8040,
28433,
2015,
1035,
2004,
1035,
13971,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
8241,
1035,
2171,
1010,
7809,
1035,
2171,
1010,
26351,
1035,
2177,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_service_fabric/lib/2017-07-01-preview/generated/azure_mgmt_service_fabric/clusters.rb | Azure::ServiceFabric::Mgmt::V2017_07_01_preview.Clusters.begin_create_with_http_info | def begin_create_with_http_info(resource_group_name, cluster_name, api_version, subscription_id, parameters, custom_headers:nil)
begin_create_async(resource_group_name, cluster_name, api_version, subscription_id, parameters, custom_headers:custom_headers).value!
end | ruby | def begin_create_with_http_info(resource_group_name, cluster_name, api_version, subscription_id, parameters, custom_headers:nil)
begin_create_async(resource_group_name, cluster_name, api_version, subscription_id, parameters, custom_headers:custom_headers).value!
end | [
"def",
"begin_create_with_http_info",
"(",
"resource_group_name",
",",
"cluster_name",
",",
"api_version",
",",
"subscription_id",
",",
"parameters",
",",
"custom_headers",
":",
"nil",
")",
"begin_create_async",
"(",
"resource_group_name",
",",
"cluster_name",
",",
"api... | Create a ServiceFabric cluster
Create cluster resource
@param resource_group_name [String] The name of the resource group.
@param cluster_name [String] The name of the cluster resource
@param api_version [String] The version of the API.
@param subscription_id [String] The customer subscription identifier
@para... | [
"Create",
"a",
"ServiceFabric",
"cluster"
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_service_fabric/lib/2017-07-01-preview/generated/azure_mgmt_service_fabric/clusters.rb#L572-L574 | train | Creates a new cluster. | [
30522,
13366,
4088,
1035,
3443,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
9324,
1035,
2171,
1010,
17928,
1035,
2544,
1010,
15002,
1035,
8909,
1010,
11709,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
puppetlabs/puppet | lib/puppet/module_tool/contents_description.rb | Puppet::ModuleTool.ContentsDescription.data | def data
unless @data
@data = []
type_names = []
for module_filename in Dir[File.join(@module_path, "lib/puppet/type/*.rb")]
require module_filename
type_name = File.basename(module_filename, ".rb")
type_names << type_name
for provider_filename in D... | ruby | def data
unless @data
@data = []
type_names = []
for module_filename in Dir[File.join(@module_path, "lib/puppet/type/*.rb")]
require module_filename
type_name = File.basename(module_filename, ".rb")
type_names << type_name
for provider_filename in D... | [
"def",
"data",
"unless",
"@data",
"@data",
"=",
"[",
"]",
"type_names",
"=",
"[",
"]",
"for",
"module_filename",
"in",
"Dir",
"[",
"File",
".",
"join",
"(",
"@module_path",
",",
"\"lib/puppet/type/*.rb\"",
")",
"]",
"require",
"module_filename",
"type_name",
... | Return types for this module. Result is an array of hashes, each of which
describes a Puppet type. The type description hash structure is:
* :name => Name of this Puppet type.
* :doc => Documentation for this type.
* :properties => Array of hashes representing the type's properties, each
containing :name and :do... | [
"Return",
"types",
"for",
"this",
"module",
".",
"Result",
"is",
"an",
"array",
"of",
"hashes",
"each",
"of",
"which",
"describes",
"a",
"Puppet",
"type",
".",
"The",
"type",
"description",
"hash",
"structure",
"is",
":",
"*",
":",
"name",
"=",
">",
"N... | 4baeed97cbb7571ddc6635f0a24debe2e8b22cd3 | https://github.com/puppetlabs/puppet/blob/4baeed97cbb7571ddc6635f0a24debe2e8b22cd3/lib/puppet/module_tool/contents_description.rb#L31-L60 | train | Get the data of the type | [
30522,
13366,
2951,
4983,
1030,
2951,
1030,
2951,
1027,
1031,
1033,
2828,
1035,
3415,
1027,
1031,
1033,
2005,
11336,
1035,
5371,
18442,
1999,
16101,
1031,
5371,
1012,
3693,
1006,
1030,
11336,
1035,
4130,
1010,
1000,
5622,
2497,
1013,
13997,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_recovery_services/lib/2016-06-01/generated/azure_mgmt_recovery_services/vault_extended_info_operations.rb | Azure::RecoveryServices::Mgmt::V2016_06_01.VaultExtendedInfoOperations.create_or_update_with_http_info | def create_or_update_with_http_info(resource_group_name, vault_name, resource_resource_extended_info_details, custom_headers:nil)
create_or_update_async(resource_group_name, vault_name, resource_resource_extended_info_details, custom_headers:custom_headers).value!
end | ruby | def create_or_update_with_http_info(resource_group_name, vault_name, resource_resource_extended_info_details, custom_headers:nil)
create_or_update_async(resource_group_name, vault_name, resource_resource_extended_info_details, custom_headers:custom_headers).value!
end | [
"def",
"create_or_update_with_http_info",
"(",
"resource_group_name",
",",
"vault_name",
",",
"resource_resource_extended_info_details",
",",
"custom_headers",
":",
"nil",
")",
"create_or_update_async",
"(",
"resource_group_name",
",",
"vault_name",
",",
"resource_resource_exte... | Create vault extended info.
@param resource_group_name [String] The name of the resource group where the
recovery services vault is present.
@param vault_name [String] The name of the recovery services vault.
@param resource_resource_extended_info_details [VaultExtendedInfoResource]
Details of ResourceExtendedInf... | [
"Create",
"vault",
"extended",
"info",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_recovery_services/lib/2016-06-01/generated/azure_mgmt_recovery_services/vault_extended_info_operations.rb#L150-L152 | train | Creates or updates a resource extended info. | [
30522,
13366,
3443,
1035,
2030,
1035,
10651,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
11632,
1035,
2171,
1010,
7692,
1035,
7692,
1035,
3668,
1035,
18558,
1035,
4751,
1010,
7661,
1035,
20346,
2015,
1024,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
chloerei/alipay | lib/alipay/client.rb | Alipay.Client.verify? | def verify?(params)
params = Utils.stringify_keys(params)
return false if params['sign_type'] != @sign_type
sign = params.delete('sign')
# sign_type does not use in notify sign
params.delete('sign_type')
string = params_to_string(params)
case @sign_type
when 'RSA'
... | ruby | def verify?(params)
params = Utils.stringify_keys(params)
return false if params['sign_type'] != @sign_type
sign = params.delete('sign')
# sign_type does not use in notify sign
params.delete('sign_type')
string = params_to_string(params)
case @sign_type
when 'RSA'
... | [
"def",
"verify?",
"(",
"params",
")",
"params",
"=",
"Utils",
".",
"stringify_keys",
"(",
"params",
")",
"return",
"false",
"if",
"params",
"[",
"'sign_type'",
"]",
"!=",
"@sign_type",
"sign",
"=",
"params",
".",
"delete",
"(",
"'sign'",
")",
"# sign_type ... | Verify Alipay notification.
Example:
params = {
out_trade_no: '20160401000000',
trade_status: 'TRADE_SUCCESS'
sign_type: 'RSA2',
sign: '...'
}
alipay_client.verify?(params)
# => true / false | [
"Verify",
"Alipay",
"notification",
"."
] | a525989b659da970e08bc8fcd1b004453bfed89f | https://github.com/chloerei/alipay/blob/a525989b659da970e08bc8fcd1b004453bfed89f/lib/alipay/client.rb#L158-L174 | train | verify? | [
30522,
13366,
20410,
1029,
1006,
11498,
5244,
1007,
11498,
5244,
1027,
21183,
12146,
1012,
5164,
8757,
1035,
6309,
1006,
11498,
5244,
1007,
2709,
6270,
2065,
11498,
5244,
1031,
1005,
3696,
1035,
2828,
1005,
1033,
999,
1027,
1030,
3696,
1035... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_compute/lib/2018-04-01/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb | Azure::Compute::Mgmt::V2018_04_01.VirtualMachineScaleSets.redeploy_async | def redeploy_async(resource_group_name, vm_scale_set_name, vm_instance_ids:nil, custom_headers:nil)
# Send request
promise = begin_redeploy_async(resource_group_name, vm_scale_set_name, vm_instance_ids:vm_instance_ids, custom_headers:custom_headers)
promise = promise.then do |response|
# Defi... | ruby | def redeploy_async(resource_group_name, vm_scale_set_name, vm_instance_ids:nil, custom_headers:nil)
# Send request
promise = begin_redeploy_async(resource_group_name, vm_scale_set_name, vm_instance_ids:vm_instance_ids, custom_headers:custom_headers)
promise = promise.then do |response|
# Defi... | [
"def",
"redeploy_async",
"(",
"resource_group_name",
",",
"vm_scale_set_name",
",",
"vm_instance_ids",
":",
"nil",
",",
"custom_headers",
":",
"nil",
")",
"# Send request",
"promise",
"=",
"begin_redeploy_async",
"(",
"resource_group_name",
",",
"vm_scale_set_name",
","... | @param resource_group_name [String] The name of the resource group.
@param vm_scale_set_name [String] The name of the VM scale set.
@param vm_instance_ids [VirtualMachineScaleSetVMInstanceIDs] A list of
virtual machine instance IDs from the VM scale set.
@param custom_headers [Hash{String => String}] A hash of cust... | [
"@param",
"resource_group_name",
"[",
"String",
"]",
"The",
"name",
"of",
"the",
"resource",
"group",
".",
"@param",
"vm_scale_set_name",
"[",
"String",
"]",
"The",
"name",
"of",
"the",
"VM",
"scale",
"set",
".",
"@param",
"vm_instance_ids",
"[",
"VirtualMachi... | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_compute/lib/2018-04-01/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb#L946-L960 | train | Redeploy a virtual machine in a VM scale set. | [
30522,
13366,
2417,
13699,
4135,
2100,
1035,
2004,
6038,
2278,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
1058,
2213,
1035,
4094,
1035,
2275,
1035,
2171,
1010,
1058,
2213,
1035,
6013,
1035,
8909,
2015,
1024,
9152,
2140,
1010,
7661,
1035,
2... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_recovery_services_backup/lib/2016-06-01/generated/azure_mgmt_recovery_services_backup/item_level_recovery_connections.rb | Azure::RecoveryServicesBackup::Mgmt::V2016_06_01.ItemLevelRecoveryConnections.revoke_with_http_info | def revoke_with_http_info(vault_name, resource_group_name, fabric_name, container_name, protected_item_name, recovery_point_id, custom_headers:nil)
revoke_async(vault_name, resource_group_name, fabric_name, container_name, protected_item_name, recovery_point_id, custom_headers:custom_headers).value!
end | ruby | def revoke_with_http_info(vault_name, resource_group_name, fabric_name, container_name, protected_item_name, recovery_point_id, custom_headers:nil)
revoke_async(vault_name, resource_group_name, fabric_name, container_name, protected_item_name, recovery_point_id, custom_headers:custom_headers).value!
end | [
"def",
"revoke_with_http_info",
"(",
"vault_name",
",",
"resource_group_name",
",",
"fabric_name",
",",
"container_name",
",",
"protected_item_name",
",",
"recovery_point_id",
",",
"custom_headers",
":",
"nil",
")",
"revoke_async",
"(",
"vault_name",
",",
"resource_grou... | Revokes an iSCSI connection which can be used to download a script. Executing
this script opens a file explorer displaying all recoverable files and
folders. This is an asynchronous operation.
@param vault_name [String] The name of the Recovery Services vault.
@param resource_group_name [String] The name of the re... | [
"Revokes",
"an",
"iSCSI",
"connection",
"which",
"can",
"be",
"used",
"to",
"download",
"a",
"script",
".",
"Executing",
"this",
"script",
"opens",
"a",
"file",
"explorer",
"displaying",
"all",
"recoverable",
"files",
"and",
"folders",
".",
"This",
"is",
"an... | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_recovery_services_backup/lib/2016-06-01/generated/azure_mgmt_recovery_services_backup/item_level_recovery_connections.rb#L74-L76 | train | Revoke the specified Recovery Point. | [
30522,
13366,
7065,
11045,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
11632,
1035,
2171,
1010,
7692,
1035,
2177,
1035,
2171,
1010,
8313,
1035,
2171,
1010,
11661,
1035,
2171,
1010,
5123,
1035,
8875,
1035,
2171,
1010,
7233,
1035,
2391,
1035,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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.