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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
square/connect-ruby-sdk | lib/square_connect/api/labor_api.rb | SquareConnect.LaborApi.get_shift | def get_shift(id, opts = {})
data, _status_code, _headers = get_shift_with_http_info(id, opts)
return data
end | ruby | def get_shift(id, opts = {})
data, _status_code, _headers = get_shift_with_http_info(id, opts)
return data
end | [
"def",
"get_shift",
"(",
"id",
",",
"opts",
"=",
"{",
"}",
")",
"data",
",",
"_status_code",
",",
"_headers",
"=",
"get_shift_with_http_info",
"(",
"id",
",",
"opts",
")",
"return",
"data",
"end"
] | GetShift
Returns a single `Shift` specified by id.
@param id UUID for the `Shift` being retrieved.
@param [Hash] opts the optional parameters
@return [GetShiftResponse] | [
"GetShift",
"Returns",
"a",
"single",
"Shift",
"specified",
"by",
"id",
"."
] | 798eb9ded716f23b9f1518386f1c311a34bca8bf | https://github.com/square/connect-ruby-sdk/blob/798eb9ded716f23b9f1518386f1c311a34bca8bf/lib/square_connect/api/labor_api.rb#L355-L358 | train | Get the first shift of a given id | [
30522,
13366,
2131,
1035,
5670,
1006,
8909,
1010,
23569,
2015,
1027,
1063,
1065,
1007,
2951,
1010,
1035,
3570,
1035,
3642,
1010,
1035,
20346,
2015,
1027,
2131,
1035,
5670,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
8909,
1010,
23569,
2015,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
lostisland/faraday | lib/faraday/encoders/nested_params_encoder.rb | Faraday.EncodeMethods.encode | def encode(params)
return nil if params.nil?
unless params.is_a?(Array)
unless params.respond_to?(:to_hash)
raise TypeError, "Can't convert #{params.class} into Hash."
end
params = params.to_hash
params = params.map do |key, value|
key = key.to_s if key.... | ruby | def encode(params)
return nil if params.nil?
unless params.is_a?(Array)
unless params.respond_to?(:to_hash)
raise TypeError, "Can't convert #{params.class} into Hash."
end
params = params.to_hash
params = params.map do |key, value|
key = key.to_s if key.... | [
"def",
"encode",
"(",
"params",
")",
"return",
"nil",
"if",
"params",
".",
"nil?",
"unless",
"params",
".",
"is_a?",
"(",
"Array",
")",
"unless",
"params",
".",
"respond_to?",
"(",
":to_hash",
")",
"raise",
"TypeError",
",",
"\"Can't convert #{params.class} in... | @param params [nil, Array, #to_hash] parameters to be encoded
@return [String] the encoded params
@raise [TypeError] if params can not be converted to a Hash | [
"@param",
"params",
"[",
"nil",
"Array",
"#to_hash",
"]",
"parameters",
"to",
"be",
"encoded"
] | 3abe9d1eea4bdf61cdf7b76ff9f1ae7e09482e70 | https://github.com/lostisland/faraday/blob/3abe9d1eea4bdf61cdf7b76ff9f1ae7e09482e70/lib/faraday/encoders/nested_params_encoder.rb#L11-L36 | train | Encode the given params to a string. | [
30522,
13366,
4372,
16044,
30524,
1035,
2000,
1029,
1006,
1024,
2000,
1035,
23325,
1007,
5333,
2828,
2121,
29165,
1010,
1000,
2064,
1005,
1056,
10463,
1001,
1063,
11498,
5244,
1012,
2465,
1065,
2046,
23325,
1012,
1000,
2203,
11498,
5244,
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_service_fabric/lib/2017-07-01-preview/generated/azure_mgmt_service_fabric/cluster_versions.rb | Azure::ServiceFabric::Mgmt::V2017_07_01_preview.ClusterVersions.get | def get(location, api_version, subscription_id, cluster_version, custom_headers:nil)
response = get_async(location, api_version, subscription_id, cluster_version, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def get(location, api_version, subscription_id, cluster_version, custom_headers:nil)
response = get_async(location, api_version, subscription_id, cluster_version, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"get",
"(",
"location",
",",
"api_version",
",",
"subscription_id",
",",
"cluster_version",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"get_async",
"(",
"location",
",",
"api_version",
",",
"subscription_id",
",",
"cluster_version",
",",
"cu... | Get cluster code versions
Get cluster code versions by location
@param location [String] The location for the cluster code versions, this is
different from cluster location
@param api_version [String] The version of the API.
@param subscription_id [String] The customer subscription identifier
@param cluster_ve... | [
"Get",
"cluster",
"code",
"versions"
] | 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/cluster_versions.rb#L40-L43 | train | Gets the cluster specification. | [
30522,
13366,
2131,
1006,
3295,
1010,
17928,
1035,
2544,
1010,
15002,
1035,
8909,
1010,
9324,
1035,
30524,
3295,
1010,
17928,
1035,
2544,
1010,
15002,
1035,
8909,
1010,
9324,
1035,
2544,
1010,
7661,
1035,
20346,
2015,
1024,
7661,
1035,
2034... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
ruby2d/ruby2d | lib/ruby2d/color.rb | Ruby2D.Color.to_f | def to_f(a)
b = []
a.each do |n|
b.push(n / 255.0)
end
return b
end | ruby | def to_f(a)
b = []
a.each do |n|
b.push(n / 255.0)
end
return b
end | [
"def",
"to_f",
"(",
"a",
")",
"b",
"=",
"[",
"]",
"a",
".",
"each",
"do",
"|",
"n",
"|",
"b",
".",
"push",
"(",
"n",
"/",
"255.0",
")",
"end",
"return",
"b",
"end"
] | Convert from Fixnum (0..255) to Float (0.0..1.0) | [
"Convert",
"from",
"Fixnum",
"(",
"0",
"..",
"255",
")",
"to",
"Float",
"(",
"0",
".",
"0",
"..",
"1",
".",
"0",
")"
] | 43ce9805a7ae8b82b7ab8c50bf6d4c845d395dc4 | https://github.com/ruby2d/ruby2d/blob/43ce9805a7ae8b82b7ab8c50bf6d4c845d395dc4/lib/ruby2d/color.rb#L111-L117 | train | Convert an array of numbers to floats | [
30522,
13366,
2000,
1035,
1042,
1006,
1037,
1007,
1038,
1027,
1031,
1033,
1037,
1012,
2169,
2079,
1064,
1050,
1064,
1038,
1012,
5245,
1006,
1050,
1013,
20637,
1012,
1014,
1007,
2203,
2709,
1038,
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... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
palkan/logidze | lib/logidze/model.rb | Logidze.Model.at_version | def at_version(version)
return self if log_data.version == version
log_entry = log_data.find_by_version(version)
return nil unless log_entry
build_dup(log_entry)
end | ruby | def at_version(version)
return self if log_data.version == version
log_entry = log_data.find_by_version(version)
return nil unless log_entry
build_dup(log_entry)
end | [
"def",
"at_version",
"(",
"version",
")",
"return",
"self",
"if",
"log_data",
".",
"version",
"==",
"version",
"log_entry",
"=",
"log_data",
".",
"find_by_version",
"(",
"version",
")",
"return",
"nil",
"unless",
"log_entry",
"build_dup",
"(",
"log_entry",
")"... | Return a dirty copy of specified version of record | [
"Return",
"a",
"dirty",
"copy",
"of",
"specified",
"version",
"of",
"record"
] | ffa0f793cb9c6fab96fa67a285341ca9aaa7ded8 | https://github.com/palkan/logidze/blob/ffa0f793cb9c6fab96fa67a285341ca9aaa7ded8/lib/logidze/model.rb#L111-L118 | train | Return a new LogEntry with the same version as this one. | [
30522,
13366,
2012,
1035,
2544,
1006,
2544,
1007,
2709,
2969,
2065,
8833,
1035,
2951,
1012,
2544,
1027,
1027,
2544,
8833,
1035,
4443,
1027,
8833,
1035,
2951,
1012,
2424,
1035,
2011,
1035,
2544,
1006,
2544,
1007,
2709,
9152,
2140,
4983,
88... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
github/linguist | samples/Ruby/sinatra.rb | Sinatra.Base.route! | def route!(base = settings, pass_block=nil)
if routes = base.routes[@request.request_method]
routes.each do |pattern, keys, conditions, block|
pass_block = process_route(pattern, keys, conditions) do |*args|
route_eval { block[*args] }
end
end
end
# Run... | ruby | def route!(base = settings, pass_block=nil)
if routes = base.routes[@request.request_method]
routes.each do |pattern, keys, conditions, block|
pass_block = process_route(pattern, keys, conditions) do |*args|
route_eval { block[*args] }
end
end
end
# Run... | [
"def",
"route!",
"(",
"base",
"=",
"settings",
",",
"pass_block",
"=",
"nil",
")",
"if",
"routes",
"=",
"base",
".",
"routes",
"[",
"@request",
".",
"request_method",
"]",
"routes",
".",
"each",
"do",
"|",
"pattern",
",",
"keys",
",",
"conditions",
","... | Run routes defined on the class and all superclasses. | [
"Run",
"routes",
"defined",
"on",
"the",
"class",
"and",
"all",
"superclasses",
"."
] | 9116c90fcbb82ac03b4b33c58cfbde1fcf745e99 | https://github.com/github/linguist/blob/9116c90fcbb82ac03b4b33c58cfbde1fcf745e99/samples/Ruby/sinatra.rb#L837-L853 | train | Run routes defined in base class. | [
30522,
13366,
2799,
999,
1006,
2918,
1027,
10906,
1010,
3413,
1035,
3796,
1027,
9152,
2140,
1007,
2065,
5847,
1027,
2918,
1012,
5847,
1031,
1030,
5227,
1012,
5227,
1035,
4118,
1033,
5847,
1012,
2169,
2079,
1064,
5418,
1010,
6309,
1010,
37... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
mongodb/mongoid | lib/mongoid/persistence_context.rb | Mongoid.PersistenceContext.collection | def collection(parent = nil)
parent ? parent.collection.with(client_options) : client[collection_name.to_sym]
end | ruby | def collection(parent = nil)
parent ? parent.collection.with(client_options) : client[collection_name.to_sym]
end | [
"def",
"collection",
"(",
"parent",
"=",
"nil",
")",
"parent",
"?",
"parent",
".",
"collection",
".",
"with",
"(",
"client_options",
")",
":",
"client",
"[",
"collection_name",
".",
"to_sym",
"]",
"end"
] | Initialize the persistence context object.
@example Create a new persistence context.
PersistenceContext.new(model, collection: 'other')
@param [ Object ] object The class or model instance for which a persistence context
should be created.
@param [ Hash ] opts The persistence context options.
@since 6.0.0... | [
"Initialize",
"the",
"persistence",
"context",
"object",
"."
] | 56976e32610f4c2450882b0bfe14da099f0703f4 | https://github.com/mongodb/mongoid/blob/56976e32610f4c2450882b0bfe14da099f0703f4/lib/mongoid/persistence_context.rb#L71-L73 | train | Returns the collection object | [
30522,
13366,
3074,
1006,
6687,
1027,
9152,
2140,
1007,
6687,
1029,
6687,
1012,
3074,
1012,
2007,
1006,
7396,
1035,
7047,
1007,
1024,
7396,
1031,
3074,
1035,
2171,
1012,
2000,
1035,
25353,
2213,
1033,
2203,
102,
0,
0,
0,
0,
0,
0,
0,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
jeremytregunna/ruby-trello | lib/trello/checklist.rb | Trello.Checklist.add_item | def add_item(name, checked = false, position = 'bottom')
client.post("/checklists/#{id}/checkItems", {name: name, checked: checked, pos: position})
end | ruby | def add_item(name, checked = false, position = 'bottom')
client.post("/checklists/#{id}/checkItems", {name: name, checked: checked, pos: position})
end | [
"def",
"add_item",
"(",
"name",
",",
"checked",
"=",
"false",
",",
"position",
"=",
"'bottom'",
")",
"client",
".",
"post",
"(",
"\"/checklists/#{id}/checkItems\"",
",",
"{",
"name",
":",
"name",
",",
"checked",
":",
"checked",
",",
"pos",
":",
"position",... | Add an item to the checklist | [
"Add",
"an",
"item",
"to",
"the",
"checklist"
] | ad79c9d8152ad5395b3b61c43170908f1912bfb2 | https://github.com/jeremytregunna/ruby-trello/blob/ad79c9d8152ad5395b3b61c43170908f1912bfb2/lib/trello/checklist.rb#L106-L108 | train | Add a check item to the check list | [
30522,
13366,
5587,
1035,
8875,
1006,
2171,
1010,
7039,
1027,
6270,
1010,
2597,
1027,
1005,
3953,
1005,
1007,
7396,
1012,
2695,
1006,
1000,
1013,
4638,
27103,
1013,
1001,
1063,
8909,
1065,
1013,
4638,
4221,
5244,
1000,
1010,
1063,
2171,
1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/blob_containers.rb | Azure::Storage::Mgmt::V2018_07_01.BlobContainers.extend_immutability_policy | def extend_immutability_policy(resource_group_name, account_name, container_name, if_match, parameters:nil, custom_headers:nil)
response = extend_immutability_policy_async(resource_group_name, account_name, container_name, if_match, parameters:parameters, custom_headers:custom_headers).value!
response.body ... | ruby | def extend_immutability_policy(resource_group_name, account_name, container_name, if_match, parameters:nil, custom_headers:nil)
response = extend_immutability_policy_async(resource_group_name, account_name, container_name, if_match, parameters:parameters, custom_headers:custom_headers).value!
response.body ... | [
"def",
"extend_immutability_policy",
"(",
"resource_group_name",
",",
"account_name",
",",
"container_name",
",",
"if_match",
",",
"parameters",
":",
"nil",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"extend_immutability_policy_async",
"(",
"resource_group... | Extends the immutabilityPeriodSinceCreationInDays of a locked
immutabilityPolicy. The only action allowed on a Locked policy will be this
action. ETag in If-Match is required for this operation.
@param resource_group_name [String] The name of the resource group within the
user's subscription. The name is case inse... | [
"Extends",
"the",
"immutabilityPeriodSinceCreationInDays",
"of",
"a",
"locked",
"immutabilityPolicy",
".",
"The",
"only",
"action",
"allowed",
"on",
"a",
"Locked",
"policy",
"will",
"be",
"this",
"action",
".",
"ETag",
"in",
"If",
"-",
"Match",
"is",
"required",... | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/blob_containers.rb#L1587-L1590 | train | Extend the immutability policy of the specified container. | [
30522,
13366,
7949,
1035,
10047,
28120,
8010,
1035,
3343,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
4070,
1035,
2171,
1010,
11661,
1035,
2171,
1010,
2065,
1035,
2674,
1010,
11709,
1024,
9152,
2140,
1010,
7661,
1035,
20346,
2015,
1024,
9152,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
voormedia/rails-erd | examples/applications/spree/lib/delegate_belongs_to.rb | DelegateBelongsTo.ClassMethods.initialize_association | def initialize_association(type, association, opts={})
raise 'Illegal or unimplemented association type.' unless [:belongs_to].include?(type.to_s.to_sym)
send type, association, opts if reflect_on_association(association).nil?
end | ruby | def initialize_association(type, association, opts={})
raise 'Illegal or unimplemented association type.' unless [:belongs_to].include?(type.to_s.to_sym)
send type, association, opts if reflect_on_association(association).nil?
end | [
"def",
"initialize_association",
"(",
"type",
",",
"association",
",",
"opts",
"=",
"{",
"}",
")",
"raise",
"'Illegal or unimplemented association type.'",
"unless",
"[",
":belongs_to",
"]",
".",
"include?",
"(",
"type",
".",
"to_s",
".",
"to_sym",
")",
"send",
... | initialize_association :belongs_to, :contact | [
"initialize_association",
":",
"belongs_to",
":",
"contact"
] | bb0ef2d3c09d1e1183fa8466d55b24d9958378c1 | https://github.com/voormedia/rails-erd/blob/bb0ef2d3c09d1e1183fa8466d55b24d9958378c1/examples/applications/spree/lib/delegate_belongs_to.rb#L41-L44 | train | Initialize an association | [
30522,
13366,
3988,
4697,
1035,
2523,
1006,
2828,
1010,
2523,
1010,
23569,
2015,
1027,
30524,
7460,
1035,
2000,
1033,
1012,
2421,
1029,
1006,
2828,
1012,
2000,
1035,
1055,
1012,
2000,
1035,
25353,
2213,
1007,
4604,
2828,
1010,
2523,
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... |
square/connect-ruby-sdk | lib/square_connect/models/order_fulfillment_recipient.rb | SquareConnect.OrderFulfillmentRecipient.list_invalid_properties | def list_invalid_properties
invalid_properties = Array.new
if !@display_name.nil? && @display_name.to_s.length > 255
invalid_properties.push("invalid value for 'display_name', the character length must be smaller than or equal to 255.")
end
if !@email_address.nil? && @email_address.to_s... | ruby | def list_invalid_properties
invalid_properties = Array.new
if !@display_name.nil? && @display_name.to_s.length > 255
invalid_properties.push("invalid value for 'display_name', the character length must be smaller than or equal to 255.")
end
if !@email_address.nil? && @email_address.to_s... | [
"def",
"list_invalid_properties",
"invalid_properties",
"=",
"Array",
".",
"new",
"if",
"!",
"@display_name",
".",
"nil?",
"&&",
"@display_name",
".",
"to_s",
".",
"length",
">",
"255",
"invalid_properties",
".",
"push",
"(",
"\"invalid value for 'display_name', the c... | Initializes the object
@param [Hash] attributes Model attributes in the form of hash
Show invalid properties with the reasons. Usually used together with valid?
@return Array for valid properies with the reasons | [
"Initializes",
"the",
"object"
] | 798eb9ded716f23b9f1518386f1c311a34bca8bf | https://github.com/square/connect-ruby-sdk/blob/798eb9ded716f23b9f1518386f1c311a34bca8bf/lib/square_connect/models/order_fulfillment_recipient.rb#L76-L91 | train | Returns an array of invalid properties | [
30522,
13366,
2862,
1035,
19528,
1035,
5144,
19528,
1035,
5144,
1027,
9140,
1012,
2047,
2065,
999,
1030,
4653,
1035,
2171,
1012,
9152,
2140,
1029,
1004,
1004,
1030,
4653,
1035,
2171,
1012,
2000,
1035,
1055,
1012,
3091,
1028,
20637,
19528,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_network/lib/2018-07-01/generated/azure_mgmt_network/virtual_network_gateway_connections.rb | Azure::Network::Mgmt::V2018_07_01.VirtualNetworkGatewayConnections.delete | def delete(resource_group_name, virtual_network_gateway_connection_name, custom_headers:nil)
response = delete_async(resource_group_name, virtual_network_gateway_connection_name, custom_headers:custom_headers).value!
nil
end | ruby | def delete(resource_group_name, virtual_network_gateway_connection_name, custom_headers:nil)
response = delete_async(resource_group_name, virtual_network_gateway_connection_name, custom_headers:custom_headers).value!
nil
end | [
"def",
"delete",
"(",
"resource_group_name",
",",
"virtual_network_gateway_connection_name",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"delete_async",
"(",
"resource_group_name",
",",
"virtual_network_gateway_connection_name",
",",
"custom_headers",
":custom_he... | Deletes the specified virtual network Gateway connection.
@param resource_group_name [String] The name of the resource group.
@param virtual_network_gateway_connection_name [String] The name of the
virtual network gateway connection.
@param custom_headers [Hash{String => String}] A hash of custom headers that
wil... | [
"Deletes",
"the",
"specified",
"virtual",
"network",
"Gateway",
"connection",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_network/lib/2018-07-01/generated/azure_mgmt_network/virtual_network_gateway_connections.rb#L177-L180 | train | Deletes a virtual network gateway connection. | [
30522,
13366,
3972,
12870,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
7484,
1035,
2897,
1035,
11909,
1035,
4434,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
3972,
12870,
1035,
2004,
6038,
2278,
1006,
7692,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_sql/lib/2017-10-01-preview/generated/azure_mgmt_sql/database_vulnerability_assessment_scans.rb | Azure::SQL::Mgmt::V2017_10_01_preview.DatabaseVulnerabilityAssessmentScans.begin_initiate_scan_with_http_info | def begin_initiate_scan_with_http_info(resource_group_name, server_name, database_name, scan_id, custom_headers:nil)
begin_initiate_scan_async(resource_group_name, server_name, database_name, scan_id, custom_headers:custom_headers).value!
end | ruby | def begin_initiate_scan_with_http_info(resource_group_name, server_name, database_name, scan_id, custom_headers:nil)
begin_initiate_scan_async(resource_group_name, server_name, database_name, scan_id, custom_headers:custom_headers).value!
end | [
"def",
"begin_initiate_scan_with_http_info",
"(",
"resource_group_name",
",",
"server_name",
",",
"database_name",
",",
"scan_id",
",",
"custom_headers",
":",
"nil",
")",
"begin_initiate_scan_async",
"(",
"resource_group_name",
",",
"server_name",
",",
"database_name",
",... | Executes a Vulnerability Assessment database scan.
@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 ... | [
"Executes",
"a",
"Vulnerability",
"Assessment",
"database",
"scan",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_sql/lib/2017-10-01-preview/generated/azure_mgmt_sql/database_vulnerability_assessment_scans.rb#L442-L444 | train | Initializes a scan. | [
30522,
13366,
4088,
1035,
17820,
1035,
13594,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
8241,
1035,
2171,
1010,
7809,
1035,
2171,
1010,
13594,
1035,
8909,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
30524... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
decidim/decidim | decidim-core/app/helpers/decidim/searches_helper.rb | Decidim.SearchesHelper.search_path_by_state_link | def search_path_by_state_link(state)
path = search_path_by(resource_type: params.dig(:filter, :resource_type), space_state: state)
is_active = params.dig(:filter, :space_state).to_s == state.to_s
link_to path, class: "order-by__tab#{" is-active" if is_active}" do
content_tag(:strong, t(state ... | ruby | def search_path_by_state_link(state)
path = search_path_by(resource_type: params.dig(:filter, :resource_type), space_state: state)
is_active = params.dig(:filter, :space_state).to_s == state.to_s
link_to path, class: "order-by__tab#{" is-active" if is_active}" do
content_tag(:strong, t(state ... | [
"def",
"search_path_by_state_link",
"(",
"state",
")",
"path",
"=",
"search_path_by",
"(",
"resource_type",
":",
"params",
".",
"dig",
"(",
":filter",
",",
":resource_type",
")",
",",
"space_state",
":",
"state",
")",
"is_active",
"=",
"params",
".",
"dig",
... | Generates the path and link to filter by space state, taking into account
the other filters applied. | [
"Generates",
"the",
"path",
"and",
"link",
"to",
"filter",
"by",
"space",
"state",
"taking",
"into",
"account",
"the",
"other",
"filters",
"applied",
"."
] | 6e2b14e559a63088669904e3c5c49a5180700cf7 | https://github.com/decidim/decidim/blob/6e2b14e559a63088669904e3c5c49a5180700cf7/decidim-core/app/helpers/decidim/searches_helper.rb#L52-L59 | train | Link to the search path by the given state | [
30522,
13366,
3945,
1035,
4130,
1035,
2011,
1035,
2110,
1035,
4957,
1006,
2110,
1007,
4130,
1027,
3945,
1035,
4130,
1035,
2011,
1006,
7692,
1035,
2828,
1024,
11498,
5244,
1012,
10667,
1006,
1024,
11307,
1010,
30524,
5244,
1012,
10667,
1006,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_media_services/lib/2018-07-01/generated/azure_mgmt_media_services/live_events.rb | Azure::MediaServices::Mgmt::V2018_07_01.LiveEvents.begin_stop_with_http_info | def begin_stop_with_http_info(resource_group_name, account_name, live_event_name, parameters, custom_headers:nil)
begin_stop_async(resource_group_name, account_name, live_event_name, parameters, custom_headers:custom_headers).value!
end | ruby | def begin_stop_with_http_info(resource_group_name, account_name, live_event_name, parameters, custom_headers:nil)
begin_stop_async(resource_group_name, account_name, live_event_name, parameters, custom_headers:custom_headers).value!
end | [
"def",
"begin_stop_with_http_info",
"(",
"resource_group_name",
",",
"account_name",
",",
"live_event_name",
",",
"parameters",
",",
"custom_headers",
":",
"nil",
")",
"begin_stop_async",
"(",
"resource_group_name",
",",
"account_name",
",",
"live_event_name",
",",
"par... | Stop Live Event
Stops an existing Live Event.
@param resource_group_name [String] The name of the resource group within the
Azure subscription.
@param account_name [String] The Media Services account name.
@param live_event_name [String] The name of the Live Event.
@param parameters [LiveEventActionInput] LiveE... | [
"Stop",
"Live",
"Event"
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_media_services/lib/2018-07-01/generated/azure_mgmt_media_services/live_events.rb#L999-L1001 | train | Stops a live event. | [
30522,
13366,
4088,
1035,
2644,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
4070,
1035,
2171,
1010,
2444,
1035,
2724,
1035,
2171,
1010,
11709,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
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... |
hanami/hanami | lib/hanami/rake_helper.rb | Hanami.RakeHelper.install | def install
desc "Load the full project"
task :environment do
require 'hanami/environment'
Hanami::Environment.new.require_project_environment
Components.resolve('all')
end
# Ruby ecosystem compatibility
#
# Most of the SaaS automatic tasks are designed after... | ruby | def install
desc "Load the full project"
task :environment do
require 'hanami/environment'
Hanami::Environment.new.require_project_environment
Components.resolve('all')
end
# Ruby ecosystem compatibility
#
# Most of the SaaS automatic tasks are designed after... | [
"def",
"install",
"desc",
"\"Load the full project\"",
"task",
":environment",
"do",
"require",
"'hanami/environment'",
"Hanami",
"::",
"Environment",
".",
"new",
".",
"require_project_environment",
"Components",
".",
"resolve",
"(",
"'all'",
")",
"end",
"# Ruby ecosyst... | @since 0.6.0
@api private
rubocop:disable Metrics/MethodLength | [
"@since",
"0",
".",
"6",
".",
"0",
"@api",
"private"
] | 8c6e5147e92ef869b25379448572da3698eacfdc | https://github.com/hanami/hanami/blob/8c6e5147e92ef869b25379448572da3698eacfdc/lib/hanami/rake_helper.rb#L21-L66 | train | Install the Hanami project | [
30522,
13366,
16500,
4078,
2278,
1000,
7170,
1996,
2440,
2622,
1000,
4708,
1024,
4044,
2079,
5478,
1005,
26048,
4328,
1013,
4044,
1005,
26048,
4328,
1024,
1024,
4044,
1012,
2047,
1012,
5478,
1035,
2622,
1035,
4044,
6177,
1012,
10663,
1006,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
aws/aws-sdk-ruby | gems/aws-sdk-rds/lib/aws-sdk-rds/db_security_group.rb | Aws::RDS.DBSecurityGroup.authorize_ingress | def authorize_ingress(options = {})
options = options.merge(db_security_group_name: @name)
resp = @client.authorize_db_security_group_ingress(options)
DBSecurityGroup.new(
name: resp.data.db_security_group.db_security_group_name,
data: resp.data.db_security_group,
client: @clie... | ruby | def authorize_ingress(options = {})
options = options.merge(db_security_group_name: @name)
resp = @client.authorize_db_security_group_ingress(options)
DBSecurityGroup.new(
name: resp.data.db_security_group.db_security_group_name,
data: resp.data.db_security_group,
client: @clie... | [
"def",
"authorize_ingress",
"(",
"options",
"=",
"{",
"}",
")",
"options",
"=",
"options",
".",
"merge",
"(",
"db_security_group_name",
":",
"@name",
")",
"resp",
"=",
"@client",
".",
"authorize_db_security_group_ingress",
"(",
"options",
")",
"DBSecurityGroup",
... | @!group Actions
@example Request syntax with placeholder values
dbsecuritygroup = db_security_group.authorize_ingress({
cidrip: "String",
ec2_security_group_name: "String",
ec2_security_group_id: "String",
ec2_security_group_owner_id: "String",
})
@param [Hash] options ({})
@option options... | [
"@!group",
"Actions",
"@example",
"Request",
"syntax",
"with",
"placeholder",
"values"
] | e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d | https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-rds/lib/aws-sdk-rds/db_security_group.rb#L230-L238 | train | Authorize an ingress to the database security group. | [
30522,
13366,
3166,
4697,
1035,
13749,
8303,
1006,
7047,
1027,
1063,
1065,
1007,
7047,
1027,
7047,
1012,
13590,
1006,
16962,
1035,
3036,
1035,
2177,
1035,
2171,
1024,
1030,
2171,
1007,
24501,
2361,
1027,
1030,
7396,
1012,
3166,
4697,
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-iam/lib/aws-sdk-iam/policy.rb | Aws::IAM.Policy.attach_role | def attach_role(options = {})
options = options.merge(policy_arn: @arn)
resp = @client.attach_role_policy(options)
resp.data
end | ruby | def attach_role(options = {})
options = options.merge(policy_arn: @arn)
resp = @client.attach_role_policy(options)
resp.data
end | [
"def",
"attach_role",
"(",
"options",
"=",
"{",
"}",
")",
"options",
"=",
"options",
".",
"merge",
"(",
"policy_arn",
":",
"@arn",
")",
"resp",
"=",
"@client",
".",
"attach_role_policy",
"(",
"options",
")",
"resp",
".",
"data",
"end"
] | @example Request syntax with placeholder values
policy.attach_role({
role_name: "roleNameType", # required
})
@param [Hash] options ({})
@option options [required, String] :role_name
The name (friendly name, not ARN) of the role to attach the policy to.
This parameter allows (through its [regex pat... | [
"@example",
"Request",
"syntax",
"with",
"placeholder",
"values"
] | e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d | https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-iam/lib/aws-sdk-iam/policy.rb#L311-L315 | train | Attach a role to a policy | [
30522,
13366,
22476,
1035,
2535,
1006,
7047,
1027,
1063,
1065,
1007,
7047,
1027,
7047,
1012,
13590,
1006,
3343,
1035,
12098,
2078,
1024,
1030,
12098,
2078,
1007,
24501,
2361,
1027,
1030,
7396,
1012,
22476,
1035,
2535,
1035,
3343,
1006,
7047... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
apache/thrift | lib/rb/lib/thrift/protocol/json_protocol.rb | Thrift.JsonProtocol.write_json_integer | def write_json_integer(num)
@context.write(trans)
escapeNum = @context.escapeNum
if (escapeNum)
trans.write(@@kJSONStringDelimiter)
end
trans.write(num.to_s);
if (escapeNum)
trans.write(@@kJSONStringDelimiter)
end
end | ruby | def write_json_integer(num)
@context.write(trans)
escapeNum = @context.escapeNum
if (escapeNum)
trans.write(@@kJSONStringDelimiter)
end
trans.write(num.to_s);
if (escapeNum)
trans.write(@@kJSONStringDelimiter)
end
end | [
"def",
"write_json_integer",
"(",
"num",
")",
"@context",
".",
"write",
"(",
"trans",
")",
"escapeNum",
"=",
"@context",
".",
"escapeNum",
"if",
"(",
"escapeNum",
")",
"trans",
".",
"write",
"(",
"@@kJSONStringDelimiter",
")",
"end",
"trans",
".",
"write",
... | Convert the given integer type to a JSON number, or a string
if the context requires it (eg: key in a map pair). | [
"Convert",
"the",
"given",
"integer",
"type",
"to",
"a",
"JSON",
"number",
"or",
"a",
"string",
"if",
"the",
"context",
"requires",
"it",
"(",
"eg",
":",
"key",
"in",
"a",
"map",
"pair",
")",
"."
] | 27d8387c49a49fcf193893f834e9766ae0b051c1 | https://github.com/apache/thrift/blob/27d8387c49a49fcf193893f834e9766ae0b051c1/lib/rb/lib/thrift/protocol/json_protocol.rb#L320-L330 | train | Write a JSON integer to the current context. | [
30522,
13366,
4339,
1035,
1046,
3385,
1035,
16109,
1006,
16371,
2213,
1007,
1030,
6123,
1012,
4339,
1006,
9099,
1007,
4019,
19172,
1027,
1030,
6123,
1012,
4019,
19172,
2065,
1006,
4019,
19172,
1007,
9099,
1012,
4339,
1006,
1030,
1030,
1047,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
aws/aws-sdk-ruby | gems/aws-sdk-ec2/lib/aws-sdk-ec2/vpc.rb | Aws::EC2.Vpc.accepted_vpc_peering_connections | def accepted_vpc_peering_connections(options = {})
batches = Enumerator.new do |y|
options = Aws::Util.deep_merge(options, filters: [{
name: "accepter-vpc-info.vpc-id",
values: [@id]
}])
resp = @client.describe_vpc_peering_connections(options)
resp.each_page do ... | ruby | def accepted_vpc_peering_connections(options = {})
batches = Enumerator.new do |y|
options = Aws::Util.deep_merge(options, filters: [{
name: "accepter-vpc-info.vpc-id",
values: [@id]
}])
resp = @client.describe_vpc_peering_connections(options)
resp.each_page do ... | [
"def",
"accepted_vpc_peering_connections",
"(",
"options",
"=",
"{",
"}",
")",
"batches",
"=",
"Enumerator",
".",
"new",
"do",
"|",
"y",
"|",
"options",
"=",
"Aws",
"::",
"Util",
".",
"deep_merge",
"(",
"options",
",",
"filters",
":",
"[",
"{",
"name",
... | @!group Associations
@example Request syntax with placeholder values
accepted_vpc_peering_connections = vpc.accepted_vpc_peering_connections({
filters: [
{
name: "String",
values: ["String"],
},
],
dry_run: false,
vpc_peering_connection_ids: ["String"],
})
@p... | [
"@!group",
"Associations",
"@example",
"Request",
"syntax",
"with",
"placeholder",
"values"
] | e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d | https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-ec2/lib/aws-sdk-ec2/vpc.rb#L755-L775 | train | Returns a list of accepted VPC peering connections | [
30522,
13366,
3970,
1035,
21210,
2278,
1035,
16740,
1035,
7264,
1006,
30524,
1012,
2784,
1035,
13590,
1006,
7047,
1010,
17736,
1024,
1031,
1063,
2171,
1024,
1000,
5138,
2121,
1011,
21210,
2278,
1011,
18558,
1012,
21210,
2278,
1011,
8909,
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... |
david942j/one_gadget | lib/one_gadget/helper.rb | OneGadget.Helper.got_functions | def got_functions(file)
arch = architecture(file)
objdump_bin = find_objdump(arch)
`#{::Shellwords.join([objdump_bin, '-T', file])} | grep -iPo 'GLIBC_.+?\\s+\\K.*'`.split
end | ruby | def got_functions(file)
arch = architecture(file)
objdump_bin = find_objdump(arch)
`#{::Shellwords.join([objdump_bin, '-T', file])} | grep -iPo 'GLIBC_.+?\\s+\\K.*'`.split
end | [
"def",
"got_functions",
"(",
"file",
")",
"arch",
"=",
"architecture",
"(",
"file",
")",
"objdump_bin",
"=",
"find_objdump",
"(",
"arch",
")",
"`",
"#{",
"::",
"Shellwords",
".",
"join",
"(",
"[",
"objdump_bin",
",",
"'-T'",
",",
"file",
"]",
")",
"}",... | Returns the names of functions from the file's global offset table.
@param [String] file
@return [Array<String>] | [
"Returns",
"the",
"names",
"of",
"functions",
"from",
"the",
"file",
"s",
"global",
"offset",
"table",
"."
] | ff6ef04541e83441bfe3c2664a6febd1640f4263 | https://github.com/david942j/one_gadget/blob/ff6ef04541e83441bfe3c2664a6febd1640f4263/lib/one_gadget/helper.rb#L328-L332 | train | Get the number of functions in a given file. | [
30522,
13366,
2288,
1035,
4972,
1006,
5371,
1007,
7905,
1027,
4294,
1006,
5371,
1007,
27885,
3501,
8566,
8737,
1035,
8026,
1027,
2424,
1035,
27885,
3501,
8566,
8737,
1006,
7905,
1007,
1036,
1001,
1063,
1024,
1024,
5806,
22104,
1012,
3693,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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_screenshot | def upload_screenshot(app_version, upload_image, device, is_messages)
raise "app_version is required" unless app_version
raise "upload_image is required" unless upload_image
raise "device is required" unless device
du_client.upload_screenshot(app_version, upload_image, content_provider_id, sso_... | ruby | def upload_screenshot(app_version, upload_image, device, is_messages)
raise "app_version is required" unless app_version
raise "upload_image is required" unless upload_image
raise "device is required" unless device
du_client.upload_screenshot(app_version, upload_image, content_provider_id, sso_... | [
"def",
"upload_screenshot",
"(",
"app_version",
",",
"upload_image",
",",
"device",
",",
"is_messages",
")",
"raise",
"\"app_version is required\"",
"unless",
"app_version",
"raise",
"\"upload_image is required\"",
"unless",
"upload_image",
"raise",
"\"device is required\"",
... | Uploads a screenshot
@param app_version (AppVersion): The version of your app
@param upload_image (UploadFile): The image to upload
@param device (string): The target device
@param is_messages (Bool): True if the screenshot is for iMessage
@return [JSON] the response | [
"Uploads",
"a",
"screenshot"
] | 457c5d647c77f0e078dafa5129da616914e002c5 | https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/spaceship/lib/spaceship/tunes/tunes_client.rb#L820-L826 | train | Upload a screenshot to the specified device. | [
30522,
13366,
2039,
11066,
1035,
12117,
12326,
1006,
10439,
1035,
2544,
1010,
2039,
11066,
1035,
3746,
1010,
5080,
1010,
2003,
1035,
7696,
1007,
5333,
1000,
10439,
1035,
2544,
2003,
3223,
1000,
4983,
10439,
1035,
2544,
5333,
1000,
2039,
110... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
cerebris/jsonapi-resources | lib/jsonapi/acts_as_resource_controller.rb | JSONAPI.ActsAsResourceController.handle_exceptions | def handle_exceptions(e)
case e
when JSONAPI::Exceptions::Error
errors = e.errors
when ActionController::ParameterMissing
errors = JSONAPI::Exceptions::ParameterMissing.new(e.param).errors
else
if JSONAPI.configuration.exception_class_whitelisted?(e)
... | ruby | def handle_exceptions(e)
case e
when JSONAPI::Exceptions::Error
errors = e.errors
when ActionController::ParameterMissing
errors = JSONAPI::Exceptions::ParameterMissing.new(e.param).errors
else
if JSONAPI.configuration.exception_class_whitelisted?(e)
... | [
"def",
"handle_exceptions",
"(",
"e",
")",
"case",
"e",
"when",
"JSONAPI",
"::",
"Exceptions",
"::",
"Error",
"errors",
"=",
"e",
".",
"errors",
"when",
"ActionController",
"::",
"ParameterMissing",
"errors",
"=",
"JSONAPI",
"::",
"Exceptions",
"::",
"Paramete... | override this to process other exceptions
Note: Be sure to either call super(e) or handle JSONAPI::Exceptions::Error and raise unhandled exceptions | [
"override",
"this",
"to",
"process",
"other",
"exceptions",
"Note",
":",
"Be",
"sure",
"to",
"either",
"call",
"super",
"(",
"e",
")",
"or",
"handle",
"JSONAPI",
"::",
"Exceptions",
"::",
"Error",
"and",
"raise",
"unhandled",
"exceptions"
] | 1ac6bba777e364eaa36706f888792b99b63d8d1a | https://github.com/cerebris/jsonapi-resources/blob/1ac6bba777e364eaa36706f888792b99b63d8d1a/lib/jsonapi/acts_as_resource_controller.rb#L268-L294 | train | Handle exceptions | [
30522,
13366,
5047,
1035,
11790,
1006,
1041,
1007,
2553,
1041,
2043,
1046,
3385,
9331,
2072,
1024,
1024,
11790,
1024,
1024,
7561,
10697,
1027,
1041,
1012,
10697,
2043,
2895,
8663,
13181,
10820,
1024,
1024,
16381,
15630,
7741,
10697,
1027,
1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
lostisland/faraday | lib/faraday/utils.rb | Faraday.Utils.deep_merge! | def deep_merge!(target, hash)
hash.each do |key, value|
target[key] = if value.is_a?(Hash) && target[key].is_a?(Hash)
deep_merge(target[key], value)
else
value
end
end
target
end | ruby | def deep_merge!(target, hash)
hash.each do |key, value|
target[key] = if value.is_a?(Hash) && target[key].is_a?(Hash)
deep_merge(target[key], value)
else
value
end
end
target
end | [
"def",
"deep_merge!",
"(",
"target",
",",
"hash",
")",
"hash",
".",
"each",
"do",
"|",
"key",
",",
"value",
"|",
"target",
"[",
"key",
"]",
"=",
"if",
"value",
".",
"is_a?",
"(",
"Hash",
")",
"&&",
"target",
"[",
"key",
"]",
".",
"is_a?",
"(",
... | Recursive hash update | [
"Recursive",
"hash",
"update"
] | 3abe9d1eea4bdf61cdf7b76ff9f1ae7e09482e70 | https://github.com/lostisland/faraday/blob/3abe9d1eea4bdf61cdf7b76ff9f1ae7e09482e70/lib/faraday/utils.rb#L89-L98 | train | Deep merge the hash with the target hash. | [
30522,
13366,
2784,
1035,
13590,
999,
1006,
4539,
1010,
23325,
1007,
23325,
1012,
2169,
2079,
1064,
3145,
1010,
3643,
1064,
4539,
1031,
3145,
1033,
1027,
2065,
3643,
1012,
2003,
1035,
1037,
1029,
1006,
23325,
1007,
1004,
1004,
4539,
1031,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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.set_certificate_contacts | def set_certificate_contacts(vault_base_url, contacts, custom_headers:nil)
response = set_certificate_contacts_async(vault_base_url, contacts, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def set_certificate_contacts(vault_base_url, contacts, custom_headers:nil)
response = set_certificate_contacts_async(vault_base_url, contacts, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"set_certificate_contacts",
"(",
"vault_base_url",
",",
"contacts",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"set_certificate_contacts_async",
"(",
"vault_base_url",
",",
"contacts",
",",
"custom_headers",
":custom_headers",
")",
".",
"value!",
... | Sets the certificate contacts for the specified key vault.
Sets the certificate contacts for the specified key vault. This operation
requires the certificates/managecontacts permission.
@param vault_base_url [String] The vault name, for example
https://myvault.vault.azure.net.
@param contacts [Contacts] The cont... | [
"Sets",
"the",
"certificate",
"contacts",
"for",
"the",
"specified",
"key",
"vault",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_key_vault/lib/2016-10-01/generated/azure_key_vault/key_vault_client.rb#L4243-L4246 | train | Sets the certificate contacts for the specified vault. | [
30522,
13366,
2275,
1035,
8196,
1035,
10402,
1006,
11632,
1035,
2918,
1035,
24471,
2140,
1010,
10402,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
2275,
1035,
8196,
1035,
10402,
1035,
2004,
6038,
2278,
1006,
11632,
103... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_redis/lib/2017-02-01/generated/azure_mgmt_redis/redis.rb | Azure::Redis::Mgmt::V2017_02_01.Redis.export_data | def export_data(resource_group_name, name, parameters, custom_headers:nil)
response = export_data_async(resource_group_name, name, parameters, custom_headers:custom_headers).value!
nil
end | ruby | def export_data(resource_group_name, name, parameters, custom_headers:nil)
response = export_data_async(resource_group_name, name, parameters, custom_headers:custom_headers).value!
nil
end | [
"def",
"export_data",
"(",
"resource_group_name",
",",
"name",
",",
"parameters",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"export_data_async",
"(",
"resource_group_name",
",",
"name",
",",
"parameters",
",",
"custom_headers",
":custom_headers",
")",... | Export data from the redis cache to blobs in a container.
@param resource_group_name [String] The name of the resource group.
@param name [String] The name of the Redis cache.
@param parameters [ExportRDBParameters] Parameters for Redis export
operation.
@param custom_headers [Hash{String => String}] A hash of cu... | [
"Export",
"data",
"from",
"the",
"redis",
"cache",
"to",
"blobs",
"in",
"a",
"container",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_redis/lib/2017-02-01/generated/azure_mgmt_redis/redis.rb#L844-L847 | train | Export a list of data structures. | [
30522,
13366,
9167,
1035,
2951,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2171,
1010,
11709,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
9167,
1035,
2951,
1035,
2004,
6038,
2278,
1006,
7692,
1035,
2177,
1035,
2171,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
hashicorp/vault-ruby | lib/vault/api/sys/auth.rb | Vault.Sys.enable_auth | def enable_auth(path, type, description = nil)
payload = { type: type }
payload[:description] = description if !description.nil?
client.post("/v1/sys/auth/#{encode_path(path)}", JSON.fast_generate(payload))
return true
end | ruby | def enable_auth(path, type, description = nil)
payload = { type: type }
payload[:description] = description if !description.nil?
client.post("/v1/sys/auth/#{encode_path(path)}", JSON.fast_generate(payload))
return true
end | [
"def",
"enable_auth",
"(",
"path",
",",
"type",
",",
"description",
"=",
"nil",
")",
"payload",
"=",
"{",
"type",
":",
"type",
"}",
"payload",
"[",
":description",
"]",
"=",
"description",
"if",
"!",
"description",
".",
"nil?",
"client",
".",
"post",
"... | Enable a particular authentication at the given path.
@example
Vault.sys.enable_auth("github", "github") #=> true
@param [String] path
the path to mount the auth
@param [String] type
the type of authentication
@param [String] description
a human-friendly description (optional)
@return [true] | [
"Enable",
"a",
"particular",
"authentication",
"at",
"the",
"given",
"path",
"."
] | 02f0532a802ba1a2a0d8703a4585dab76eb9d864 | https://github.com/hashicorp/vault-ruby/blob/02f0532a802ba1a2a0d8703a4585dab76eb9d864/lib/vault/api/sys/auth.rb#L56-L62 | train | Enable authentication for a path | [
30522,
13366,
9585,
1035,
8740,
2705,
1006,
4130,
1010,
2828,
1010,
6412,
1027,
9152,
2140,
1007,
18093,
1027,
1063,
2828,
1024,
2828,
1065,
18093,
1031,
1024,
6412,
1033,
1027,
6412,
2065,
999,
6412,
1012,
9152,
2140,
1029,
7396,
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... |
rails/sprockets | lib/sprockets/path_utils.rb | Sprockets.PathUtils.match_path_extname | def match_path_extname(path, extensions)
basename = File.basename(path)
i = basename.index('.'.freeze)
while i && i < basename.length - 1
extname = basename[i..-1]
if value = extensions[extname]
return extname, value
end
i = basename.index('.'.freeze, i+1)
... | ruby | def match_path_extname(path, extensions)
basename = File.basename(path)
i = basename.index('.'.freeze)
while i && i < basename.length - 1
extname = basename[i..-1]
if value = extensions[extname]
return extname, value
end
i = basename.index('.'.freeze, i+1)
... | [
"def",
"match_path_extname",
"(",
"path",
",",
"extensions",
")",
"basename",
"=",
"File",
".",
"basename",
"(",
"path",
")",
"i",
"=",
"basename",
".",
"index",
"(",
"'.'",
".",
"freeze",
")",
"while",
"i",
"&&",
"i",
"<",
"basename",
".",
"length",
... | Internal: Match path extnames against available extensions.
path - String
extensions - Hash of String extnames to values
Returns [String extname, Object value] or nil nothing matched. | [
"Internal",
":",
"Match",
"path",
"extnames",
"against",
"available",
"extensions",
"."
] | 9e3f0d8e98c44f57e67bc138db87bb8469bf5ddd | https://github.com/rails/sprockets/blob/9e3f0d8e98c44f57e67bc138db87bb8469bf5ddd/lib/sprockets/path_utils.rb#L202-L216 | train | match path extension with extensions | [
30522,
13366,
2674,
1035,
4130,
1035,
4654,
2102,
18442,
1006,
4130,
1010,
14305,
1007,
2918,
18442,
1027,
5371,
1012,
2918,
18442,
1006,
4130,
1007,
1045,
1027,
2918,
18442,
1012,
5950,
30524,
1031,
4654,
2102,
18442,
1033,
2709,
4654,
210... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/connection_operations.rb | Azure::Automation::Mgmt::V2015_10_31.ConnectionOperations.update_with_http_info | def update_with_http_info(resource_group_name, automation_account_name, connection_name, parameters, custom_headers:nil)
update_async(resource_group_name, automation_account_name, connection_name, parameters, custom_headers:custom_headers).value!
end | ruby | def update_with_http_info(resource_group_name, automation_account_name, connection_name, parameters, custom_headers:nil)
update_async(resource_group_name, automation_account_name, connection_name, parameters, custom_headers:custom_headers).value!
end | [
"def",
"update_with_http_info",
"(",
"resource_group_name",
",",
"automation_account_name",
",",
"connection_name",
",",
"parameters",
",",
"custom_headers",
":",
"nil",
")",
"update_async",
"(",
"resource_group_name",
",",
"automation_account_name",
",",
"connection_name",... | Update a connection.
@param resource_group_name [String] Name of an Azure Resource group.
@param automation_account_name [String] The name of the automation account.
@param connection_name [String] The parameters supplied to the update a
connection operation.
@param parameters [ConnectionUpdateParameters] The par... | [
"Update",
"a",
"connection",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_automation/lib/2015-10-31/generated/azure_mgmt_automation/connection_operations.rb#L381-L383 | train | Updates a connection. | [
30522,
13366,
10651,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
19309,
1035,
4070,
1035,
2171,
1010,
4434,
1035,
2171,
1010,
11709,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
10651,
1035,
2004... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/job_executions.rb | Azure::SQL::Mgmt::V2017_03_01_preview.JobExecutions.begin_create | def begin_create(resource_group_name, server_name, job_agent_name, job_name, custom_headers:nil)
response = begin_create_async(resource_group_name, server_name, job_agent_name, job_name, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def begin_create(resource_group_name, server_name, job_agent_name, job_name, custom_headers:nil)
response = begin_create_async(resource_group_name, server_name, job_agent_name, job_name, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"begin_create",
"(",
"resource_group_name",
",",
"server_name",
",",
"job_agent_name",
",",
"job_name",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"begin_create_async",
"(",
"resource_group_name",
",",
"server_name",
",",
"job_agent_name",
",",
... | Starts an elastic job execution.
@param resource_group_name [String] The name of the resource group that
contains the resource. You can obtain this value from the Azure Resource
Manager API or the portal.
@param server_name [String] The name of the server.
@param job_agent_name [String] The name of the job agent.... | [
"Starts",
"an",
"elastic",
"job",
"execution",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/job_executions.rb#L634-L637 | train | Creates a new job in the specified resource group. | [
30522,
13366,
4088,
1035,
3443,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
8241,
1035,
2171,
1010,
3105,
1035,
4005,
1035,
2171,
1010,
3105,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
4088,
1035,
3443,
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... |
boazsegev/combine_pdf | lib/combine_pdf/page_methods.rb | CombinePDF.Page_Methods.set_font | def set_font(font = :Helvetica)
# if the font exists, return it's name
resources[:Font] ||= {}
fonts_res = resources[:Font][:referenced_object] || resources[:Font]
fonts_res.each do |k, v|
return k if v.is_a?(Fonts::Font) && v.name && v.name == font
end
# set a secure name fo... | ruby | def set_font(font = :Helvetica)
# if the font exists, return it's name
resources[:Font] ||= {}
fonts_res = resources[:Font][:referenced_object] || resources[:Font]
fonts_res.each do |k, v|
return k if v.is_a?(Fonts::Font) && v.name && v.name == font
end
# set a secure name fo... | [
"def",
"set_font",
"(",
"font",
"=",
":Helvetica",
")",
"# if the font exists, return it's name",
"resources",
"[",
":Font",
"]",
"||=",
"{",
"}",
"fonts_res",
"=",
"resources",
"[",
":Font",
"]",
"[",
":referenced_object",
"]",
"||",
"resources",
"[",
":Font",
... | creates a font object and adds the font to the resources dictionary
returns the name of the font for the content stream.
font:: a Symbol of one of the fonts registered in the library, or:
- :"Times-Roman"
- :"Times-Bold"
- :"Times-Italic"
- :"Times-BoldItalic"
- :Helvetica
- :"Helvetica-Bold"
- :"Helvetica-Bol... | [
"creates",
"a",
"font",
"object",
"and",
"adds",
"the",
"font",
"to",
"the",
"resources",
"dictionary",
"returns",
"the",
"name",
"of",
"the",
"font",
"for",
"the",
"content",
"stream",
".",
"font",
"::",
"a",
"Symbol",
"of",
"one",
"of",
"the",
"fonts",... | 09054051019c069f551f3e60be789577c0f93900 | https://github.com/boazsegev/combine_pdf/blob/09054051019c069f551f3e60be789577c0f93900/lib/combine_pdf/page_methods.rb#L733-L750 | train | set the font name for the font object | [
30522,
13366,
2275,
1035,
15489,
1006,
15489,
1027,
1024,
2002,
2140,
19510,
5555,
1007,
1001,
2065,
1996,
15489,
6526,
1010,
2709,
2009,
1005,
1055,
2171,
4219,
1031,
1024,
15489,
1033,
1064,
1064,
1027,
1063,
1065,
15489,
2015,
1035,
2450... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
ruby/rake | lib/rake/task_manager.rb | Rake.TaskManager.make_sources | def make_sources(task_name, task_pattern, extensions)
result = extensions.map { |ext|
case ext
when /%/
task_name.pathmap(ext)
when %r{/}
ext
when /^\./
source = task_name.sub(task_pattern, ext)
source == ext ? task_name.ext(ext) : source
... | ruby | def make_sources(task_name, task_pattern, extensions)
result = extensions.map { |ext|
case ext
when /%/
task_name.pathmap(ext)
when %r{/}
ext
when /^\./
source = task_name.sub(task_pattern, ext)
source == ext ? task_name.ext(ext) : source
... | [
"def",
"make_sources",
"(",
"task_name",
",",
"task_pattern",
",",
"extensions",
")",
"result",
"=",
"extensions",
".",
"map",
"{",
"|",
"ext",
"|",
"case",
"ext",
"when",
"/",
"/",
"task_name",
".",
"pathmap",
"(",
"ext",
")",
"when",
"%r{",
"}",
"ext... | Make a list of sources from the list of file name extensions /
translation procs. | [
"Make",
"a",
"list",
"of",
"sources",
"from",
"the",
"list",
"of",
"file",
"name",
"extensions",
"/",
"translation",
"procs",
"."
] | 1c22b490ee6cb8bd614fa8d0d6145f671466206b | https://github.com/ruby/rake/blob/1c22b490ee6cb8bd614fa8d0d6145f671466206b/lib/rake/task_manager.rb#L286-L309 | train | Make sources for the given task_name and task_pattern | [
30522,
13366,
2191,
1035,
4216,
1006,
4708,
1035,
2171,
1010,
4708,
1035,
5418,
1010,
14305,
1007,
2765,
1027,
14305,
1012,
4949,
1063,
1064,
4654,
2102,
1064,
2553,
4654,
2102,
2043,
1013,
1003,
1013,
4708,
1035,
2171,
1012,
4130,
2863,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_container_registry/lib/2017-06-01-preview/generated/azure_mgmt_container_registry/registries.rb | Azure::ContainerRegistry::Mgmt::V2017_06_01_preview.Registries.update_async | def update_async(resource_group_name, registry_name, registry_update_parameters, custom_headers:nil)
# Send request
promise = begin_update_async(resource_group_name, registry_name, registry_update_parameters, custom_headers:custom_headers)
promise = promise.then do |response|
# Defining deser... | ruby | def update_async(resource_group_name, registry_name, registry_update_parameters, custom_headers:nil)
# Send request
promise = begin_update_async(resource_group_name, registry_name, registry_update_parameters, custom_headers:custom_headers)
promise = promise.then do |response|
# Defining deser... | [
"def",
"update_async",
"(",
"resource_group_name",
",",
"registry_name",
",",
"registry_update_parameters",
",",
"custom_headers",
":",
"nil",
")",
"# Send request",
"promise",
"=",
"begin_update_async",
"(",
"resource_group_name",
",",
"registry_name",
",",
"registry_upd... | @param resource_group_name [String] The name of the resource group to which
the container registry belongs.
@param registry_name [String] The name of the container registry.
@param registry_update_parameters [RegistryUpdateParameters] The parameters
for updating a container registry.
@param custom_headers [Hash{St... | [
"@param",
"resource_group_name",
"[",
"String",
"]",
"The",
"name",
"of",
"the",
"resource",
"group",
"to",
"which",
"the",
"container",
"registry",
"belongs",
".",
"@param",
"registry_name",
"[",
"String",
"]",
"The",
"name",
"of",
"the",
"container",
"regist... | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_container_registry/lib/2017-06-01-preview/generated/azure_mgmt_container_registry/registries.rb#L342-L358 | train | Updates an existing container registry. | [
30522,
13366,
10651,
1035,
2004,
6038,
2278,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
15584,
1035,
2171,
1010,
15584,
1035,
10651,
1035,
11709,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
1001,
4604,
5227,
4872,
1027,
4088,
1035... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
github-changelog-generator/github-changelog-generator | lib/github_changelog_generator/generator/generator_fetcher.rb | GitHubChangelogGenerator.Generator.add_first_occurring_tag_to_prs | def add_first_occurring_tag_to_prs(tags, prs)
total = prs.count
prs_left = associate_tagged_prs(tags, prs, total)
prs_left = associate_release_branch_prs(prs_left, total)
prs_left = associate_rebase_comment_prs(tags, prs_left, total) if prs_left.any?
# PRs in prs_left will be untagged, no... | ruby | def add_first_occurring_tag_to_prs(tags, prs)
total = prs.count
prs_left = associate_tagged_prs(tags, prs, total)
prs_left = associate_release_branch_prs(prs_left, total)
prs_left = associate_rebase_comment_prs(tags, prs_left, total) if prs_left.any?
# PRs in prs_left will be untagged, no... | [
"def",
"add_first_occurring_tag_to_prs",
"(",
"tags",
",",
"prs",
")",
"total",
"=",
"prs",
".",
"count",
"prs_left",
"=",
"associate_tagged_prs",
"(",
"tags",
",",
"prs",
",",
"total",
")",
"prs_left",
"=",
"associate_release_branch_prs",
"(",
"prs_left",
",",
... | Adds a key "first_occurring_tag" to each PR with a value of the oldest
tag that a PR's merge commit occurs in in the git history. This should
indicate the release of each PR by git's history regardless of dates and
divergent branches.
@param [Array] tags The tags sorted by time, newest to oldest.
@param [Array] p... | [
"Adds",
"a",
"key",
"first_occurring_tag",
"to",
"each",
"PR",
"with",
"a",
"value",
"of",
"the",
"oldest",
"tag",
"that",
"a",
"PR",
"s",
"merge",
"commit",
"occurs",
"in",
"in",
"the",
"git",
"history",
".",
"This",
"should",
"indicate",
"the",
"releas... | f18c64b5cc0d7473b059275b88385ac11ca8b564 | https://github.com/github-changelog-generator/github-changelog-generator/blob/f18c64b5cc0d7473b059275b88385ac11ca8b564/lib/github_changelog_generator/generator/generator_fetcher.rb#L47-L58 | train | Adds the first tag to the list of PRs that are tagged or rebased | [
30522,
13366,
5587,
1035,
2034,
1035,
10066,
1035,
6415,
1035,
2000,
1035,
10975,
2015,
1006,
22073,
1010,
10975,
2015,
1007,
2561,
1027,
10975,
2015,
1012,
4175,
10975,
2015,
1035,
2187,
1027,
5482,
1035,
26610,
1035,
10975,
2015,
1006,
22... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
DataDog/dogstatsd-ruby | lib/datadog/statsd.rb | Datadog.Statsd.increment | def increment(stat, opts=EMPTY_OPTIONS)
opts = {:sample_rate => opts} if opts.is_a? Numeric
incr_value = opts.fetch(:by, 1)
count stat, incr_value, opts
end | ruby | def increment(stat, opts=EMPTY_OPTIONS)
opts = {:sample_rate => opts} if opts.is_a? Numeric
incr_value = opts.fetch(:by, 1)
count stat, incr_value, opts
end | [
"def",
"increment",
"(",
"stat",
",",
"opts",
"=",
"EMPTY_OPTIONS",
")",
"opts",
"=",
"{",
":sample_rate",
"=>",
"opts",
"}",
"if",
"opts",
".",
"is_a?",
"Numeric",
"incr_value",
"=",
"opts",
".",
"fetch",
"(",
":by",
",",
"1",
")",
"count",
"stat",
... | Sends an increment (count = 1) for the given stat to the statsd server.
@param [String] stat stat name
@param [Hash] opts the options to create the metric with
@option opts [Numeric] :sample_rate sample rate, 1 for always
@option opts [Array<String>] :tags An array of tags
@option opts [Numeric] :by increment val... | [
"Sends",
"an",
"increment",
"(",
"count",
"=",
"1",
")",
"for",
"the",
"given",
"stat",
"to",
"the",
"statsd",
"server",
"."
] | 0ea2a4d011958ad0d092654cae950e64b6475077 | https://github.com/DataDog/dogstatsd-ruby/blob/0ea2a4d011958ad0d092654cae950e64b6475077/lib/datadog/statsd.rb#L249-L253 | train | Increment the stat by the number of times | [
30522,
13366,
4297,
28578,
4765,
1006,
28093,
1010,
23569,
2015,
1027,
4064,
1035,
7047,
1007,
23569,
2015,
1027,
1063,
1024,
7099,
1035,
3446,
1027,
1028,
23569,
2015,
1065,
2065,
23569,
2015,
1012,
2003,
1035,
1037,
1029,
16371,
25531,
42... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | data/azure_key_vault/lib/2016-10-01/generated/azure_key_vault/key_vault_client.rb | Azure::KeyVault::V2016_10_01.KeyVaultClient.get_certificate_versions_as_lazy | def get_certificate_versions_as_lazy(vault_base_url, certificate_name, maxresults:nil, custom_headers:nil)
first_page = get_certificate_versions_as_lazy_as_lazy(vault_base_url, certificate_name, maxresults:maxresults, custom_headers:custom_headers)
first_page.get_all_items
end | ruby | def get_certificate_versions_as_lazy(vault_base_url, certificate_name, maxresults:nil, custom_headers:nil)
first_page = get_certificate_versions_as_lazy_as_lazy(vault_base_url, certificate_name, maxresults:maxresults, custom_headers:custom_headers)
first_page.get_all_items
end | [
"def",
"get_certificate_versions_as_lazy",
"(",
"vault_base_url",
",",
"certificate_name",
",",
"maxresults",
":",
"nil",
",",
"custom_headers",
":",
"nil",
")",
"first_page",
"=",
"get_certificate_versions_as_lazy_as_lazy",
"(",
"vault_base_url",
",",
"certificate_name",
... | List the versions of a certificate.
The GetCertificateVersions operation returns the versions of a certificate in
the specified key vault. This operation requires the certificates/list
permission.
@param vault_base_url [String] The vault name, for example
https://myvault.vault.azure.net.
@param certificate_name... | [
"List",
"the",
"versions",
"of",
"a",
"certificate",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_key_vault/lib/2016-10-01/generated/azure_key_vault/key_vault_client.rb#L10333-L10336 | train | Gets the certificate versions of the specified certificate. | [
30522,
13366,
2131,
1035,
8196,
1035,
4617,
1035,
2004,
1035,
13971,
1006,
11632,
1035,
2918,
1035,
24471,
2140,
1010,
8196,
1035,
2171,
1010,
4098,
6072,
11314,
2015,
1024,
9152,
2140,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_service_bus/lib/2017-04-01/generated/azure_mgmt_service_bus/subscriptions.rb | Azure::ServiceBus::Mgmt::V2017_04_01.Subscriptions.list_by_topic | def list_by_topic(resource_group_name, namespace_name, topic_name, skip:nil, top:nil, custom_headers:nil)
first_page = list_by_topic_as_lazy(resource_group_name, namespace_name, topic_name, skip:skip, top:top, custom_headers:custom_headers)
first_page.get_all_items
end | ruby | def list_by_topic(resource_group_name, namespace_name, topic_name, skip:nil, top:nil, custom_headers:nil)
first_page = list_by_topic_as_lazy(resource_group_name, namespace_name, topic_name, skip:skip, top:top, custom_headers:custom_headers)
first_page.get_all_items
end | [
"def",
"list_by_topic",
"(",
"resource_group_name",
",",
"namespace_name",
",",
"topic_name",
",",
"skip",
":",
"nil",
",",
"top",
":",
"nil",
",",
"custom_headers",
":",
"nil",
")",
"first_page",
"=",
"list_by_topic_as_lazy",
"(",
"resource_group_name",
",",
"n... | List all the subscriptions under a specified topic.
@param resource_group_name [String] Name of the Resource group within the
Azure subscription.
@param namespace_name [String] The namespace name
@param topic_name [String] The topic name.
@param skip [Integer] Skip is only used if a previous operation returned a
... | [
"List",
"all",
"the",
"subscriptions",
"under",
"a",
"specified",
"topic",
"."
] | 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/subscriptions.rb#L42-L45 | train | Gets all the items in a namespace that have the specified topic. | [
30522,
13366,
2862,
1035,
2011,
1035,
8476,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
3415,
15327,
1035,
2171,
1010,
8476,
1035,
2171,
1010,
13558,
1024,
9152,
2140,
1010,
2327,
1024,
9152,
2140,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
jnunemaker/flipper | lib/flipper/feature.rb | Flipper.Feature.state | def state
values = gate_values
boolean = gate(:boolean)
non_boolean_gates = gates - [boolean]
if values.boolean || values.percentage_of_actors == 100 || values.percentage_of_time == 100
:on
elsif non_boolean_gates.detect { |gate| gate.enabled?(values[gate.key]) }
:conditio... | ruby | def state
values = gate_values
boolean = gate(:boolean)
non_boolean_gates = gates - [boolean]
if values.boolean || values.percentage_of_actors == 100 || values.percentage_of_time == 100
:on
elsif non_boolean_gates.detect { |gate| gate.enabled?(values[gate.key]) }
:conditio... | [
"def",
"state",
"values",
"=",
"gate_values",
"boolean",
"=",
"gate",
"(",
":boolean",
")",
"non_boolean_gates",
"=",
"gates",
"-",
"[",
"boolean",
"]",
"if",
"values",
".",
"boolean",
"||",
"values",
".",
"percentage_of_actors",
"==",
"100",
"||",
"values",... | Public: Returns state for feature (:on, :off, or :conditional). | [
"Public",
":",
"Returns",
"state",
"for",
"feature",
"(",
":",
"on",
":",
"off",
"or",
":",
"conditional",
")",
"."
] | df0352b663ad3ed45d68710f10a8170249ff9d78 | https://github.com/jnunemaker/flipper/blob/df0352b663ad3ed45d68710f10a8170249ff9d78/lib/flipper/feature.rb#L204-L216 | train | Returns the state of the gate. | [
30522,
13366,
2110,
5300,
1027,
4796,
1035,
5300,
22017,
20898,
1027,
4796,
1006,
1024,
22017,
20898,
1007,
2512,
1035,
22017,
20898,
1035,
6733,
1027,
6733,
1011,
1031,
22017,
20898,
1033,
2065,
5300,
1012,
22017,
20898,
1064,
1064,
5300,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/replication_links.rb | Azure::SQL::Mgmt::V2014_04_01.ReplicationLinks.failover | def failover(resource_group_name, server_name, database_name, link_id, custom_headers:nil)
response = failover_async(resource_group_name, server_name, database_name, link_id, custom_headers:custom_headers).value!
nil
end | ruby | def failover(resource_group_name, server_name, database_name, link_id, custom_headers:nil)
response = failover_async(resource_group_name, server_name, database_name, link_id, custom_headers:custom_headers).value!
nil
end | [
"def",
"failover",
"(",
"resource_group_name",
",",
"server_name",
",",
"database_name",
",",
"link_id",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"failover_async",
"(",
"resource_group_name",
",",
"server_name",
",",
"database_name",
",",
"link_id",
... | Sets which replica database is primary by failing over from the current
primary replica database.
@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 ... | [
"Sets",
"which",
"replica",
"database",
"is",
"primary",
"by",
"failing",
"over",
"from",
"the",
"current",
"primary",
"replica",
"database",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/replication_links.rb#L245-L248 | train | Gets the index of the specified database link. | [
30522,
13366,
8246,
7840,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
8241,
1035,
2171,
1010,
7809,
1035,
2171,
1010,
4957,
1035,
8909,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
8246,
7840,
1035,
2004,
6038,
2278,
1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/job_agents.rb | Azure::SQL::Mgmt::V2017_03_01_preview.JobAgents.begin_delete_with_http_info | def begin_delete_with_http_info(resource_group_name, server_name, job_agent_name, custom_headers:nil)
begin_delete_async(resource_group_name, server_name, job_agent_name, custom_headers:custom_headers).value!
end | ruby | def begin_delete_with_http_info(resource_group_name, server_name, job_agent_name, custom_headers:nil)
begin_delete_async(resource_group_name, server_name, job_agent_name, custom_headers:custom_headers).value!
end | [
"def",
"begin_delete_with_http_info",
"(",
"resource_group_name",
",",
"server_name",
",",
"job_agent_name",
",",
"custom_headers",
":",
"nil",
")",
"begin_delete_async",
"(",
"resource_group_name",
",",
"server_name",
",",
"job_agent_name",
",",
"custom_headers",
":custo... | Deletes a job agent.
@param resource_group_name [String] The name of the resource group that
contains the resource. You can obtain this value from the Azure Resource
Manager API or the portal.
@param server_name [String] The name of the server.
@param job_agent_name [String] The name of the job agent to be delete... | [
"Deletes",
"a",
"job",
"agent",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/job_agents.rb#L529-L531 | train | Deletes a job agent. | [
30522,
13366,
4088,
1035,
3972,
12870,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
8241,
1035,
2171,
1010,
3105,
1035,
4005,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
4088,
1035,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_logic/lib/2016-06-01/generated/azure_mgmt_logic/workflow_triggers.rb | Azure::Logic::Mgmt::V2016_06_01.WorkflowTriggers.get_schema_json_with_http_info | def get_schema_json_with_http_info(resource_group_name, workflow_name, trigger_name, custom_headers:nil)
get_schema_json_async(resource_group_name, workflow_name, trigger_name, custom_headers:custom_headers).value!
end | ruby | def get_schema_json_with_http_info(resource_group_name, workflow_name, trigger_name, custom_headers:nil)
get_schema_json_async(resource_group_name, workflow_name, trigger_name, custom_headers:custom_headers).value!
end | [
"def",
"get_schema_json_with_http_info",
"(",
"resource_group_name",
",",
"workflow_name",
",",
"trigger_name",
",",
"custom_headers",
":",
"nil",
")",
"get_schema_json_async",
"(",
"resource_group_name",
",",
"workflow_name",
",",
"trigger_name",
",",
"custom_headers",
"... | Get the trigger schema as JSON.
@param resource_group_name [String] The resource group name.
@param workflow_name [String] The workflow name.
@param trigger_name [String] The workflow trigger name.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request.
@r... | [
"Get",
"the",
"trigger",
"schema",
"as",
"JSON",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_logic/lib/2016-06-01/generated/azure_mgmt_logic/workflow_triggers.rb#L416-L418 | train | Gets the schema of the trigger. | [
30522,
13366,
2131,
1035,
8040,
28433,
1035,
1046,
3385,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2147,
12314,
1035,
2171,
1010,
9495,
1035,
30524,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2147,
12314,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/2017-03-01/generated/azure_mgmt_api_management/tenant_configuration.rb | Azure::ApiManagement::Mgmt::V2017_03_01.TenantConfiguration.begin_validate | def begin_validate(resource_group_name, service_name, parameters, custom_headers:nil)
response = begin_validate_async(resource_group_name, service_name, parameters, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def begin_validate(resource_group_name, service_name, parameters, custom_headers:nil)
response = begin_validate_async(resource_group_name, service_name, parameters, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"begin_validate",
"(",
"resource_group_name",
",",
"service_name",
",",
"parameters",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"begin_validate_async",
"(",
"resource_group_name",
",",
"service_name",
",",
"parameters",
",",
"custom_headers",
":c... | This operation validates the changes in the specified Git branch. This is a
long running operation and could take several minutes to complete.
@param resource_group_name [String] The name of the resource group.
@param service_name [String] The name of the API Management service.
@param parameters [DeployConfigurat... | [
"This",
"operation",
"validates",
"the",
"changes",
"in",
"the",
"specified",
"Git",
"branch",
".",
"This",
"is",
"a",
"long",
"running",
"operation",
"and",
"could",
"take",
"several",
"minutes",
"to",
"complete",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_api_management/lib/2017-03-01/generated/azure_mgmt_api_management/tenant_configuration.rb#L506-L509 | train | Validates the specified service. | [
30522,
13366,
4088,
1035,
9398,
3686,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2326,
1035,
2171,
1010,
11709,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
4088,
1035,
9398,
3686,
1035,
2004,
6038,
2278,
1006,
7692,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | data/azure_service_fabric/lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb | Azure::ServiceFabric::V6_2_0_9.ServiceFabricClientAPIs.get_partition_backup_progress | def get_partition_backup_progress(partition_id, timeout:60, custom_headers:nil)
response = get_partition_backup_progress_async(partition_id, timeout:timeout, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def get_partition_backup_progress(partition_id, timeout:60, custom_headers:nil)
response = get_partition_backup_progress_async(partition_id, timeout:timeout, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"get_partition_backup_progress",
"(",
"partition_id",
",",
"timeout",
":",
"60",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"get_partition_backup_progress_async",
"(",
"partition_id",
",",
"timeout",
":",
"timeout",
",",
"custom_headers",
":custom... | Gets details for the latest backup triggered for this partition.
Returns information about the state of the latest backup along with details
or failure reason in case of completion.
@param partition_id The identity of the partition.
@param timeout [Integer] The server timeout for performing the operation in
seco... | [
"Gets",
"details",
"for",
"the",
"latest",
"backup",
"triggered",
"for",
"this",
"partition",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_service_fabric/lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb#L25574-L25577 | train | Gets backup progress of the specified partition. | [
30522,
13366,
2131,
1035,
13571,
1035,
10200,
1035,
5082,
1006,
13571,
1035,
8909,
1010,
2051,
5833,
1024,
3438,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
2131,
1035,
13571,
1035,
10200,
1035,
5082,
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 | data/azure_cognitiveservices_luisruntime/lib/3.0-preview/generated/azure_cognitiveservices_luisruntime/prediction_operations.rb | Azure::CognitiveServices::LuisRuntime::V3_0_preview.PredictionOperations.get_version_prediction | def get_version_prediction(app_id, version_id, prediction_request, verbose:nil, show_all_intents:nil, log:nil, custom_headers:nil)
response = get_version_prediction_async(app_id, version_id, prediction_request, verbose:verbose, show_all_intents:show_all_intents, log:log, custom_headers:custom_headers).value!
... | ruby | def get_version_prediction(app_id, version_id, prediction_request, verbose:nil, show_all_intents:nil, log:nil, custom_headers:nil)
response = get_version_prediction_async(app_id, version_id, prediction_request, verbose:verbose, show_all_intents:show_all_intents, log:log, custom_headers:custom_headers).value!
... | [
"def",
"get_version_prediction",
"(",
"app_id",
",",
"version_id",
",",
"prediction_request",
",",
"verbose",
":",
"nil",
",",
"show_all_intents",
":",
"nil",
",",
"log",
":",
"nil",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"get_version_predictio... | Gets the predictions for an application version.
@param app_id The application ID.
@param version_id [String] The application version ID.
@param prediction_request [PredictionRequest] The prediction request
parameters.
@param verbose [Boolean] Indicates whether to get extra metadata for the
entities predictions ... | [
"Gets",
"the",
"predictions",
"for",
"an",
"application",
"version",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_cognitiveservices_luisruntime/lib/3.0-preview/generated/azure_cognitiveservices_luisruntime/prediction_operations.rb#L41-L44 | train | Gets the prediction for a version of the application. | [
30522,
13366,
2131,
1035,
2544,
1035,
17547,
1006,
10439,
1035,
8909,
1010,
2544,
1035,
8909,
1010,
17547,
1035,
5227,
1010,
12034,
9232,
1024,
9152,
2140,
1010,
2265,
1035,
2035,
1035,
7848,
2015,
1024,
9152,
2140,
1010,
8833,
1024,
9152,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
typhoeus/typhoeus | lib/typhoeus/expectation.rb | Typhoeus.Expectation.options_match? | def options_match?(request)
(options ? options.all?{ |k,v| request.original_options[k] == v || request.options[k] == v } : true)
end | ruby | def options_match?(request)
(options ? options.all?{ |k,v| request.original_options[k] == v || request.options[k] == v } : true)
end | [
"def",
"options_match?",
"(",
"request",
")",
"(",
"options",
"?",
"options",
".",
"all?",
"{",
"|",
"k",
",",
"v",
"|",
"request",
".",
"original_options",
"[",
"k",
"]",
"==",
"v",
"||",
"request",
".",
"options",
"[",
"k",
"]",
"==",
"v",
"}",
... | Check whether the options matches the request options.
I checks options and original options. | [
"Check",
"whether",
"the",
"options",
"matches",
"the",
"request",
"options",
".",
"I",
"checks",
"options",
"and",
"original",
"options",
"."
] | d072aaf6edcf46d54d6a6bce45286629bf4e5af6 | https://github.com/typhoeus/typhoeus/blob/d072aaf6edcf46d54d6a6bce45286629bf4e5af6/lib/typhoeus/expectation.rb#L194-L196 | train | Returns true if the options match the original options | [
30522,
13366,
7047,
1035,
2674,
1029,
1006,
5227,
1007,
1006,
7047,
1029,
7047,
1012,
2035,
1029,
1063,
1064,
1047,
1010,
1058,
1064,
5227,
1012,
2434,
1035,
7047,
1031,
1047,
1033,
1027,
1027,
1058,
1064,
1064,
5227,
1012,
7047,
1031,
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... |
puppetlabs/puppet | lib/puppet/util/rdoc/generators/puppet_generator.rb | Generators.PuppetGenerator.gen_top_index | def gen_top_index(collection, title, template, filename)
template = TemplatePage.new(RDoc::Page::FR_INDEX_BODY, template)
res = []
collection.sort.each do |f|
if f.document_self
res << { "classlist" => CGI.escapeHTML("#{MODULE_DIR}/fr_#{f.index_name}.html"), "module" => CGI.escapeHTM... | ruby | def gen_top_index(collection, title, template, filename)
template = TemplatePage.new(RDoc::Page::FR_INDEX_BODY, template)
res = []
collection.sort.each do |f|
if f.document_self
res << { "classlist" => CGI.escapeHTML("#{MODULE_DIR}/fr_#{f.index_name}.html"), "module" => CGI.escapeHTM... | [
"def",
"gen_top_index",
"(",
"collection",
",",
"title",
",",
"template",
",",
"filename",
")",
"template",
"=",
"TemplatePage",
".",
"new",
"(",
"RDoc",
"::",
"Page",
"::",
"FR_INDEX_BODY",
",",
"template",
")",
"res",
"=",
"[",
"]",
"collection",
".",
... | generate a top index | [
"generate",
"a",
"top",
"index"
] | 4baeed97cbb7571ddc6635f0a24debe2e8b22cd3 | https://github.com/puppetlabs/puppet/blob/4baeed97cbb7571ddc6635f0a24debe2e8b22cd3/lib/puppet/util/rdoc/generators/puppet_generator.rb#L211-L231 | train | Generate the top index | [
30522,
13366,
8991,
1035,
2327,
1035,
5950,
1006,
3074,
1010,
2516,
1010,
23561,
1010,
5371,
18442,
1007,
23561,
1027,
23561,
13704,
1012,
2047,
1006,
16428,
10085,
1024,
1024,
3931,
1024,
1024,
10424,
1035,
5950,
1035,
2303,
1010,
23561,
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... |
decidim/decidim | decidim-core/lib/decidim/form_builder.rb | Decidim.FormBuilder.selected_scopes | def selected_scopes(attribute)
selected = object.send(attribute) || []
selected = selected.values if selected.is_a?(Hash)
selected = [selected] unless selected.is_a?(Array)
selected = Decidim::Scope.where(id: selected.map(&:to_i)) unless selected.first.is_a?(Decidim::Scope)
selected
en... | ruby | def selected_scopes(attribute)
selected = object.send(attribute) || []
selected = selected.values if selected.is_a?(Hash)
selected = [selected] unless selected.is_a?(Array)
selected = Decidim::Scope.where(id: selected.map(&:to_i)) unless selected.first.is_a?(Decidim::Scope)
selected
en... | [
"def",
"selected_scopes",
"(",
"attribute",
")",
"selected",
"=",
"object",
".",
"send",
"(",
"attribute",
")",
"||",
"[",
"]",
"selected",
"=",
"selected",
".",
"values",
"if",
"selected",
".",
"is_a?",
"(",
"Hash",
")",
"selected",
"=",
"[",
"selected"... | Private: Returns an array of scopes related to object attribute | [
"Private",
":",
"Returns",
"an",
"array",
"of",
"scopes",
"related",
"to",
"object",
"attribute"
] | 6e2b14e559a63088669904e3c5c49a5180700cf7 | https://github.com/decidim/decidim/blob/6e2b14e559a63088669904e3c5c49a5180700cf7/decidim-core/lib/decidim/form_builder.rb#L654-L660 | train | Returns the selected scopes for the given attribute. | [
30522,
13366,
3479,
1035,
9531,
2015,
1006,
17961,
1007,
3479,
1027,
4874,
1012,
4604,
1006,
17961,
1007,
1064,
1064,
1031,
1033,
3479,
1027,
3479,
1012,
5300,
2065,
3479,
1012,
2003,
1035,
1037,
1029,
1006,
23325,
1007,
3479,
1027,
1031,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/ui/github_issue_inspector_reporter.rb | Fastlane.InspectorReporter.inspector_successfully_received_report | def inspector_successfully_received_report(report, inspector)
report.issues[0..(NUMBER_OF_ISSUES_INLINE - 1)].each { |issue| print_issue_full(issue) }
if report.issues.count > NUMBER_OF_ISSUES_INLINE
report.url.sub!('\'', '%27')
puts("and #{report.total_results - NUMBER_OF_ISSUES_INLINE} mo... | ruby | def inspector_successfully_received_report(report, inspector)
report.issues[0..(NUMBER_OF_ISSUES_INLINE - 1)].each { |issue| print_issue_full(issue) }
if report.issues.count > NUMBER_OF_ISSUES_INLINE
report.url.sub!('\'', '%27')
puts("and #{report.total_results - NUMBER_OF_ISSUES_INLINE} mo... | [
"def",
"inspector_successfully_received_report",
"(",
"report",
",",
"inspector",
")",
"report",
".",
"issues",
"[",
"0",
"..",
"(",
"NUMBER_OF_ISSUES_INLINE",
"-",
"1",
")",
"]",
".",
"each",
"{",
"|",
"issue",
"|",
"print_issue_full",
"(",
"issue",
")",
"}... | Called once the inspector has received a report with more than one issue. | [
"Called",
"once",
"the",
"inspector",
"has",
"received",
"a",
"report",
"with",
"more",
"than",
"one",
"issue",
"."
] | 457c5d647c77f0e078dafa5129da616914e002c5 | https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/fastlane_core/lib/fastlane_core/ui/github_issue_inspector_reporter.rb#L19-L29 | train | This function is called when a report has been received | [
30522,
13366,
7742,
1035,
5147,
1035,
2363,
1035,
3189,
1006,
3189,
1010,
7742,
1007,
3189,
1012,
3314,
1031,
1014,
1012,
1012,
1006,
2193,
1035,
1997,
1035,
3314,
1035,
23881,
1011,
1015,
1007,
1033,
1012,
2169,
1063,
1064,
3277,
1064,
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... |
fastlane/fastlane | deliver/lib/deliver/html_generator.rb | Deliver.HtmlGenerator.render | def render(options, screenshots, export_path = nil)
@screenshots = screenshots || []
@options = options
@export_path = export_path
@app_name = (options[:name]['en-US'] || options[:name].values.first) if options[:name]
@app_name ||= options[:app].name
@languages = options[:descripti... | ruby | def render(options, screenshots, export_path = nil)
@screenshots = screenshots || []
@options = options
@export_path = export_path
@app_name = (options[:name]['en-US'] || options[:name].values.first) if options[:name]
@app_name ||= options[:app].name
@languages = options[:descripti... | [
"def",
"render",
"(",
"options",
",",
"screenshots",
",",
"export_path",
"=",
"nil",
")",
"@screenshots",
"=",
"screenshots",
"||",
"[",
"]",
"@options",
"=",
"options",
"@export_path",
"=",
"export_path",
"@app_name",
"=",
"(",
"options",
"[",
":name",
"]",... | Renders all data available to quickly see if everything was correctly generated.
@param export_path (String) The path to a folder where the resulting HTML file should be stored. | [
"Renders",
"all",
"data",
"available",
"to",
"quickly",
"see",
"if",
"everything",
"was",
"correctly",
"generated",
"."
] | 457c5d647c77f0e078dafa5129da616914e002c5 | https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/deliver/lib/deliver/html_generator.rb#L45-L63 | train | Render the screenshots | [
30522,
13366,
17552,
1006,
7047,
1010,
12117,
12326,
2015,
1010,
9167,
1035,
4130,
1027,
9152,
2140,
1007,
1030,
12117,
12326,
2015,
1027,
12117,
12326,
2015,
1064,
1064,
1031,
1033,
1030,
7047,
1027,
7047,
1030,
9167,
1035,
4130,
1027,
916... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
piotrmurach/github | lib/github_api/client/repos.rb | Github.Client::Repos.create | def create(*args)
arguments(args) do
assert_required %w[ name ]
end
params = arguments.params
# Requires authenticated user
if (org = params.delete('org') || org)
post_request("/orgs/#{org}/repos", params)
else
post_request("/user/repos", params)
end
... | ruby | def create(*args)
arguments(args) do
assert_required %w[ name ]
end
params = arguments.params
# Requires authenticated user
if (org = params.delete('org') || org)
post_request("/orgs/#{org}/repos", params)
else
post_request("/user/repos", params)
end
... | [
"def",
"create",
"(",
"*",
"args",
")",
"arguments",
"(",
"args",
")",
"do",
"assert_required",
"%w[",
"name",
"]",
"end",
"params",
"=",
"arguments",
".",
"params",
"# Requires authenticated user",
"if",
"(",
"org",
"=",
"params",
".",
"delete",
"(",
"'or... | Create a new repository for the authenticated user.
@param [Hash] params
@option params [String] :name
Required string
@option params [String] :description
Optional string
@option params [String] :homepage
Optional string
@option params [Boolean] :private
Optional boolean - true to create a private r... | [
"Create",
"a",
"new",
"repository",
"for",
"the",
"authenticated",
"user",
"."
] | 8702452c66bea33c9388550aed9e9974f76aaef1 | https://github.com/piotrmurach/github/blob/8702452c66bea33c9388550aed9e9974f76aaef1/lib/github_api/client/repos.rb#L240-L252 | train | Create a new repository | [
30522,
13366,
3443,
1006,
1008,
12098,
5620,
1007,
9918,
1006,
12098,
5620,
1007,
2079,
20865,
1035,
3223,
1003,
1059,
1031,
2171,
1033,
2203,
11498,
5244,
1027,
9918,
1012,
11498,
5244,
1001,
5942,
14469,
4383,
5310,
2065,
1006,
8917,
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... |
CanCanCommunity/cancancan | lib/cancan/ability.rb | CanCan.Ability.merge | def merge(ability)
ability.rules.each do |rule|
add_rule(rule.dup)
end
@aliased_actions = aliased_actions.merge(ability.aliased_actions)
self
end | ruby | def merge(ability)
ability.rules.each do |rule|
add_rule(rule.dup)
end
@aliased_actions = aliased_actions.merge(ability.aliased_actions)
self
end | [
"def",
"merge",
"(",
"ability",
")",
"ability",
".",
"rules",
".",
"each",
"do",
"|",
"rule",
"|",
"add_rule",
"(",
"rule",
".",
"dup",
")",
"end",
"@aliased_actions",
"=",
"aliased_actions",
".",
"merge",
"(",
"ability",
".",
"aliased_actions",
")",
"se... | Copies all rules and aliased actions of the given +CanCan::Ability+ and adds them to +self+.
class ReadAbility
include CanCan::Ability
def initialize
can :read, User
alias_action :show, :index, to: :see
end
end
class WritingAbility
include CanCan::Ability
def initializ... | [
"Copies",
"all",
"rules",
"and",
"aliased",
"actions",
"of",
"the",
"given",
"+",
"CanCan",
"::",
"Ability",
"+",
"and",
"adds",
"them",
"to",
"+",
"self",
"+",
".",
"class",
"ReadAbility",
"include",
"CanCan",
"::",
"Ability"
] | b2e5660c6b9b683fc45b8f425b90c4d06e2f24bf | https://github.com/CanCanCommunity/cancancan/blob/b2e5660c6b9b683fc45b8f425b90c4d06e2f24bf/lib/cancan/ability.rb#L248-L254 | train | Merge the rules of this rule with the ability. | [
30522,
13366,
13590,
1006,
3754,
1007,
3754,
1012,
3513,
1012,
2169,
2079,
1064,
3627,
1064,
5587,
1035,
3627,
1006,
3627,
1012,
4241,
2361,
1007,
2203,
1030,
14593,
2098,
1035,
4506,
1027,
14593,
2098,
1035,
4506,
1012,
13590,
1006,
3754,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
aws/aws-sdk-ruby | gems/aws-sdk-s3/lib/aws-sdk-s3/object_acl.rb | Aws::S3.ObjectAcl.put | def put(options = {})
options = options.merge(
bucket: @bucket_name,
key: @object_key
)
resp = @client.put_object_acl(options)
resp.data
end | ruby | def put(options = {})
options = options.merge(
bucket: @bucket_name,
key: @object_key
)
resp = @client.put_object_acl(options)
resp.data
end | [
"def",
"put",
"(",
"options",
"=",
"{",
"}",
")",
"options",
"=",
"options",
".",
"merge",
"(",
"bucket",
":",
"@bucket_name",
",",
"key",
":",
"@object_key",
")",
"resp",
"=",
"@client",
".",
"put_object_acl",
"(",
"options",
")",
"resp",
".",
"data",... | @!group Actions
@example Request syntax with placeholder values
object_acl.put({
acl: "private", # accepts private, public-read, public-read-write, authenticated-read, aws-exec-read, bucket-owner-read, bucket-owner-full-control
access_control_policy: {
grants: [
{
grantee: {
... | [
"@!group",
"Actions",
"@example",
"Request",
"syntax",
"with",
"placeholder",
"values"
] | e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d | https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-s3/lib/aws-sdk-s3/object_acl.rb#L252-L259 | train | Put the object acl | [
30522,
13366,
2404,
1006,
7047,
1027,
1063,
1065,
1007,
7047,
1027,
7047,
1012,
13590,
1006,
13610,
1024,
1030,
13610,
1035,
2171,
1010,
3145,
1024,
1030,
4874,
1035,
3145,
1007,
24501,
2361,
1027,
1030,
7396,
1012,
2404,
1035,
4874,
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_logic/lib/2016-06-01/generated/azure_mgmt_logic/workflows.rb | Azure::Logic::Mgmt::V2016_06_01.Workflows.regenerate_access_key_with_http_info | def regenerate_access_key_with_http_info(resource_group_name, workflow_name, key_type, custom_headers:nil)
regenerate_access_key_async(resource_group_name, workflow_name, key_type, custom_headers:custom_headers).value!
end | ruby | def regenerate_access_key_with_http_info(resource_group_name, workflow_name, key_type, custom_headers:nil)
regenerate_access_key_async(resource_group_name, workflow_name, key_type, custom_headers:custom_headers).value!
end | [
"def",
"regenerate_access_key_with_http_info",
"(",
"resource_group_name",
",",
"workflow_name",
",",
"key_type",
",",
"custom_headers",
":",
"nil",
")",
"regenerate_access_key_async",
"(",
"resource_group_name",
",",
"workflow_name",
",",
"key_type",
",",
"custom_headers",... | Regenerates the callback URL access key for request triggers.
@param resource_group_name [String] The resource group name.
@param workflow_name [String] The workflow name.
@param key_type [RegenerateActionParameter] The access key type.
@param custom_headers [Hash{String => String}] A hash of custom headers that
... | [
"Regenerates",
"the",
"callback",
"URL",
"access",
"key",
"for",
"request",
"triggers",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_logic/lib/2016-06-01/generated/azure_mgmt_logic/workflows.rb#L1167-L1169 | train | Regenerate access key for a workflow. | [
30522,
13366,
19723,
24454,
3686,
1035,
3229,
1035,
3145,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2147,
12314,
1035,
2171,
1010,
3145,
1035,
2828,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
meew0/discordrb | lib/discordrb/data/channel.rb | Discordrb.Channel.webhooks | def webhooks
raise 'Tried to request webhooks from a non-server channel' unless server
webhooks = JSON.parse(API::Channel.webhooks(@bot.token, @id))
webhooks.map { |webhook_data| Webhook.new(webhook_data, @bot) }
end | ruby | def webhooks
raise 'Tried to request webhooks from a non-server channel' unless server
webhooks = JSON.parse(API::Channel.webhooks(@bot.token, @id))
webhooks.map { |webhook_data| Webhook.new(webhook_data, @bot) }
end | [
"def",
"webhooks",
"raise",
"'Tried to request webhooks from a non-server channel'",
"unless",
"server",
"webhooks",
"=",
"JSON",
".",
"parse",
"(",
"API",
"::",
"Channel",
".",
"webhooks",
"(",
"@bot",
".",
"token",
",",
"@id",
")",
")",
"webhooks",
".",
"map",... | Requests a list of Webhooks on the channel.
@return [Array<Webhook>] webhooks on the channel. | [
"Requests",
"a",
"list",
"of",
"Webhooks",
"on",
"the",
"channel",
"."
] | 764298a1ff0be69a1853b510d736f21c2b91a2fe | https://github.com/meew0/discordrb/blob/764298a1ff0be69a1853b510d736f21c2b91a2fe/lib/discordrb/data/channel.rb#L702-L707 | train | Returns an array of Webhook objects for this channel. | [
30522,
13366,
4773,
6806,
6559,
2015,
5333,
1005,
2699,
2000,
5227,
4773,
6806,
6559,
2015,
2013,
1037,
2512,
1011,
8241,
3149,
1005,
4983,
8241,
4773,
6806,
6559,
2015,
1027,
1046,
3385,
1012,
11968,
3366,
1006,
17928,
1024,
1024,
3149,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/clusters.rb | Azure::EventHub::Mgmt::V2018_01_01_preview.Clusters.begin_patch_with_http_info | def begin_patch_with_http_info(resource_group_name, cluster_name, parameters, custom_headers:nil)
begin_patch_async(resource_group_name, cluster_name, parameters, custom_headers:custom_headers).value!
end | ruby | def begin_patch_with_http_info(resource_group_name, cluster_name, parameters, custom_headers:nil)
begin_patch_async(resource_group_name, cluster_name, parameters, custom_headers:custom_headers).value!
end | [
"def",
"begin_patch_with_http_info",
"(",
"resource_group_name",
",",
"cluster_name",
",",
"parameters",
",",
"custom_headers",
":",
"nil",
")",
"begin_patch_async",
"(",
"resource_group_name",
",",
"cluster_name",
",",
"parameters",
",",
"custom_headers",
":custom_header... | Modifies mutable properties on the Event Hubs Cluster. This operation is
idempotent.
@param resource_group_name [String] Name of the resource group within the
Azure subscription.
@param cluster_name [String] The name of the Event Hubs Cluster.
@param parameters [Cluster] The properties of the Event Hubs Cluster w... | [
"Modifies",
"mutable",
"properties",
"on",
"the",
"Event",
"Hubs",
"Cluster",
".",
"This",
"operation",
"is",
"idempotent",
"."
] | 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/clusters.rb#L678-L680 | train | Patch a cluster s existing content. | [
30522,
13366,
4088,
1035,
8983,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
9324,
1035,
2171,
1010,
11709,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
4088,
1035,
8983,
1035,
2004,
6038,
2278,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/tag.rb | Azure::ApiManagement::Mgmt::V2018_01_01.Tag.list_by_operation_next | def list_by_operation_next(next_page_link, custom_headers:nil)
response = list_by_operation_next_async(next_page_link, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def list_by_operation_next(next_page_link, custom_headers:nil)
response = list_by_operation_next_async(next_page_link, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"list_by_operation_next",
"(",
"next_page_link",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"list_by_operation_next_async",
"(",
"next_page_link",
",",
"custom_headers",
":custom_headers",
")",
".",
"value!",
"response",
".",
"body",
"unless",
"re... | Lists all Tags associated with the Operation.
@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 [TagCollection] operation results. | [
"Lists",
"all",
"Tags",
"associated",
"with",
"the",
"Operation",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/tag.rb#L2778-L2781 | train | Gets the list of all the available advisors. | [
30522,
13366,
2862,
1035,
2011,
1035,
3169,
1035,
2279,
1006,
2279,
1035,
3931,
1035,
4957,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
2862,
1035,
2011,
1035,
3169,
1035,
2279,
1035,
2004,
6038,
2278,
1006,
2279,
1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
aws/aws-sdk-ruby | gems/aws-sdk-ec2/lib/aws-sdk-ec2/resource.rb | Aws::EC2.Resource.create_route_table | def create_route_table(options = {})
resp = @client.create_route_table(options)
RouteTable.new(
id: resp.data.route_table.route_table_id,
data: resp.data.route_table,
client: @client
)
end | ruby | def create_route_table(options = {})
resp = @client.create_route_table(options)
RouteTable.new(
id: resp.data.route_table.route_table_id,
data: resp.data.route_table,
client: @client
)
end | [
"def",
"create_route_table",
"(",
"options",
"=",
"{",
"}",
")",
"resp",
"=",
"@client",
".",
"create_route_table",
"(",
"options",
")",
"RouteTable",
".",
"new",
"(",
"id",
":",
"resp",
".",
"data",
".",
"route_table",
".",
"route_table_id",
",",
"data",
... | @example Request syntax with placeholder values
routetable = ec2.create_route_table({
dry_run: false,
vpc_id: "String", # required
})
@param [Hash] options ({})
@option options [Boolean] :dry_run
Checks whether you have the required permissions for the action,
without actually making the reques... | [
"@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#L671-L678 | train | Create a route table | [
30522,
13366,
3443,
1035,
2799,
1035,
2795,
1006,
7047,
1027,
1063,
1065,
1007,
24501,
2361,
1027,
1030,
7396,
1012,
3443,
1035,
2799,
1035,
2795,
1006,
7047,
1007,
2799,
10880,
1012,
2047,
1006,
8909,
1024,
24501,
2361,
1012,
2951,
1012,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_network/lib/2015-05-01-preview/generated/azure_mgmt_network/network_interfaces.rb | Azure::Network::Mgmt::V2015_05_01_preview.NetworkInterfaces.list_virtual_machine_scale_set_vmnetwork_interfaces_next | def list_virtual_machine_scale_set_vmnetwork_interfaces_next(next_page_link, custom_headers:nil)
response = list_virtual_machine_scale_set_vmnetwork_interfaces_next_async(next_page_link, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def list_virtual_machine_scale_set_vmnetwork_interfaces_next(next_page_link, custom_headers:nil)
response = list_virtual_machine_scale_set_vmnetwork_interfaces_next_async(next_page_link, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"list_virtual_machine_scale_set_vmnetwork_interfaces_next",
"(",
"next_page_link",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"list_virtual_machine_scale_set_vmnetwork_interfaces_next_async",
"(",
"next_page_link",
",",
"custom_headers",
":custom_headers",
")",... | The list network interface operation retrieves information about all network
interfaces in a virtual machine from a virtual machine scale set.
@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 tha... | [
"The",
"list",
"network",
"interface",
"operation",
"retrieves",
"information",
"about",
"all",
"network",
"interfaces",
"in",
"a",
"virtual",
"machine",
"from",
"a",
"virtual",
"machine",
"scale",
"set",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_network/lib/2015-05-01-preview/generated/azure_mgmt_network/network_interfaces.rb#L895-L898 | train | Gets the virtual machine scale set virtual network interfaces. | [
30522,
13366,
2862,
1035,
7484,
1035,
3698,
1035,
4094,
1035,
2275,
1035,
1058,
2213,
7159,
6198,
1035,
19706,
1035,
2279,
1006,
2279,
1035,
3931,
1035,
4957,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
2862,
1035,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_web/lib/2018-02-01/generated/azure_mgmt_web/app_service_environments.rb | Azure::Web::Mgmt::V2018_02_01.AppServiceEnvironments.update_worker_pool | def update_worker_pool(resource_group_name, name, worker_pool_name, worker_pool_envelope, custom_headers:nil)
response = update_worker_pool_async(resource_group_name, name, worker_pool_name, worker_pool_envelope, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def update_worker_pool(resource_group_name, name, worker_pool_name, worker_pool_envelope, custom_headers:nil)
response = update_worker_pool_async(resource_group_name, name, worker_pool_name, worker_pool_envelope, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"update_worker_pool",
"(",
"resource_group_name",
",",
"name",
",",
"worker_pool_name",
",",
"worker_pool_envelope",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"update_worker_pool_async",
"(",
"resource_group_name",
",",
"name",
",",
"worker_pool_na... | Create or update a worker pool.
Create or update a worker pool.
@param resource_group_name [String] Name of the resource group to which the
resource belongs.
@param name [String] Name of the App Service Environment.
@param worker_pool_name [String] Name of the worker pool.
@param worker_pool_envelope [WorkerPoo... | [
"Create",
"or",
"update",
"a",
"worker",
"pool",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_web/lib/2018-02-01/generated/azure_mgmt_web/app_service_environments.rb#L3311-L3314 | train | Updates a worker pool. | [
30522,
13366,
10651,
1035,
7309,
1035,
4770,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2171,
1010,
7309,
1035,
4770,
1035,
2171,
1010,
7309,
1035,
4770,
1035,
11255,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
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... |
Azure/azure-sdk-for-ruby | data/azure_cognitiveservices_computervision/lib/2.0/generated/azure_cognitiveservices_computervision/computer_vision_client.rb | Azure::CognitiveServices::ComputerVision::V2_0.ComputerVisionClient.tag_image_with_http_info | def tag_image_with_http_info(url, language:nil, custom_headers:nil)
tag_image_async(url, language:language, custom_headers:custom_headers).value!
end | ruby | def tag_image_with_http_info(url, language:nil, custom_headers:nil)
tag_image_async(url, language:language, custom_headers:custom_headers).value!
end | [
"def",
"tag_image_with_http_info",
"(",
"url",
",",
"language",
":",
"nil",
",",
"custom_headers",
":",
"nil",
")",
"tag_image_async",
"(",
"url",
",",
"language",
":",
"language",
",",
"custom_headers",
":custom_headers",
")",
".",
"value!",
"end"
] | This operation generates a list of words, or tags, that are relevant to the
content of the supplied image. The Computer Vision API can return tags based
on objects, living beings, scenery or actions found in images. Unlike
categories, tags are not organized according to a hierarchical classification
system, but cor... | [
"This",
"operation",
"generates",
"a",
"list",
"of",
"words",
"or",
"tags",
"that",
"are",
"relevant",
"to",
"the",
"content",
"of",
"the",
"supplied",
"image",
".",
"The",
"Computer",
"Vision",
"API",
"can",
"return",
"tags",
"based",
"on",
"objects",
"li... | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_cognitiveservices_computervision/lib/2.0/generated/azure_cognitiveservices_computervision/computer_vision_client.rb#L1008-L1010 | train | Tags an image. | [
30522,
13366,
6415,
1035,
3746,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
24471,
2140,
1010,
2653,
30524,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/orders.rb | Azure::EdgeGateway::Mgmt::V2019_03_01.Orders.create_or_update | def create_or_update(device_name, order, resource_group_name, custom_headers:nil)
response = create_or_update_async(device_name, order, resource_group_name, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def create_or_update(device_name, order, resource_group_name, custom_headers:nil)
response = create_or_update_async(device_name, order, resource_group_name, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"create_or_update",
"(",
"device_name",
",",
"order",
",",
"resource_group_name",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"create_or_update_async",
"(",
"device_name",
",",
"order",
",",
"resource_group_name",
",",
"custom_headers",
":custom_he... | Creates or updates an order.
@param device_name [String] The device name.
@param order [Order] The order to be created or updated.
@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.
@return ... | [
"Creates",
"or",
"updates",
"an",
"order",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_edgegateway/lib/2019-03-01/generated/azure_mgmt_edgegateway/orders.rb#L219-L222 | train | Creates or updates an order. | [
30522,
13366,
3443,
1035,
2030,
1035,
10651,
1006,
5080,
1035,
2171,
1010,
2344,
1010,
7692,
1035,
2177,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
3443,
1035,
2030,
1035,
10651,
1035,
2004,
6038,
2278,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | data/azure_cognitiveservices_computervision/lib/1.0/generated/azure_cognitiveservices_computervision/computer_vision_client.rb | Azure::CognitiveServices::ComputerVision::V1_0.ComputerVisionClient.generate_thumbnail_async | def generate_thumbnail_async(width, height, url, smart_cropping:false, custom_headers:nil)
fail ArgumentError, 'azure_region is nil' if azure_region.nil?
fail ArgumentError, 'width is nil' if width.nil?
fail ArgumentError, "'width' should satisfy the constraint - 'InclusiveMaximum': '1023'" if !width.... | ruby | def generate_thumbnail_async(width, height, url, smart_cropping:false, custom_headers:nil)
fail ArgumentError, 'azure_region is nil' if azure_region.nil?
fail ArgumentError, 'width is nil' if width.nil?
fail ArgumentError, "'width' should satisfy the constraint - 'InclusiveMaximum': '1023'" if !width.... | [
"def",
"generate_thumbnail_async",
"(",
"width",
",",
"height",
",",
"url",
",",
"smart_cropping",
":",
"false",
",",
"custom_headers",
":",
"nil",
")",
"fail",
"ArgumentError",
",",
"'azure_region is nil'",
"if",
"azure_region",
".",
"nil?",
"fail",
"ArgumentErro... | This operation generates a thumbnail image with the user-specified width and
height. By default, the service analyzes the image, identifies the region of
interest (ROI), and generates smart cropping coordinates based on the ROI.
Smart cropping helps when you specify an aspect ratio that differs from that
of the inp... | [
"This",
"operation",
"generates",
"a",
"thumbnail",
"image",
"with",
"the",
"user",
"-",
"specified",
"width",
"and",
"height",
".",
"By",
"default",
"the",
"service",
"analyzes",
"the",
"image",
"identifies",
"the",
"region",
"of",
"interest",
"(",
"ROI",
"... | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_cognitiveservices_computervision/lib/1.0/generated/azure_cognitiveservices_computervision/computer_vision_client.rb#L448-L521 | train | Generates a thumbnail for the specified image. | [
30522,
13366,
9699,
1035,
7639,
25464,
1035,
2004,
6038,
2278,
1006,
9381,
1010,
4578,
1010,
24471,
2140,
1010,
6047,
1035,
10416,
4691,
1024,
6270,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
8246,
6685,
2121,
29165,
1010,
1005,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_compute/lib/2018-04-01/generated/azure_mgmt_compute/snapshots.rb | Azure::Compute::Mgmt::V2018_04_01.Snapshots.begin_update_with_http_info | def begin_update_with_http_info(resource_group_name, snapshot_name, snapshot, custom_headers:nil)
begin_update_async(resource_group_name, snapshot_name, snapshot, custom_headers:custom_headers).value!
end | ruby | def begin_update_with_http_info(resource_group_name, snapshot_name, snapshot, custom_headers:nil)
begin_update_async(resource_group_name, snapshot_name, snapshot, custom_headers:custom_headers).value!
end | [
"def",
"begin_update_with_http_info",
"(",
"resource_group_name",
",",
"snapshot_name",
",",
"snapshot",
",",
"custom_headers",
":",
"nil",
")",
"begin_update_async",
"(",
"resource_group_name",
",",
"snapshot_name",
",",
"snapshot",
",",
"custom_headers",
":custom_header... | Updates (patches) a snapshot.
@param resource_group_name [String] The name of the resource group.
@param snapshot_name [String] The name of the snapshot that is being created.
The name can't be changed after the snapshot is created. Supported characters
for the name are a-z, A-Z, 0-9 and _. The max name length is ... | [
"Updates",
"(",
"patches",
")",
"a",
"snapshot",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_compute/lib/2018-04-01/generated/azure_mgmt_compute/snapshots.rb#L683-L685 | train | Updates a snapshot. | [
30522,
13366,
4088,
1035,
10651,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
20057,
12326,
1035,
2171,
1010,
20057,
12326,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
4088,
1035,
10651,
1035,
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... |
braintree/braintree_ruby | lib/braintree/webhook_notification_gateway.rb | Braintree.WebhookNotificationGateway.parse | def parse(signature_string, payload)
raise InvalidSignature, 'signature cannot be nil' if signature_string.nil?
raise InvalidSignature, 'payload cannot be nil' if payload.nil?
if payload =~ /[^A-Za-z0-9+=\/\n]/
raise InvalidSignature, "payload contains illegal characters"
end
_veri... | ruby | def parse(signature_string, payload)
raise InvalidSignature, 'signature cannot be nil' if signature_string.nil?
raise InvalidSignature, 'payload cannot be nil' if payload.nil?
if payload =~ /[^A-Za-z0-9+=\/\n]/
raise InvalidSignature, "payload contains illegal characters"
end
_veri... | [
"def",
"parse",
"(",
"signature_string",
",",
"payload",
")",
"raise",
"InvalidSignature",
",",
"'signature cannot be nil'",
"if",
"signature_string",
".",
"nil?",
"raise",
"InvalidSignature",
",",
"'payload cannot be nil'",
"if",
"payload",
".",
"nil?",
"if",
"payloa... | :nodoc: | [
":",
"nodoc",
":"
] | 6e56c7099ea55bcdc4073cbea60b2688cef69663 | https://github.com/braintree/braintree_ruby/blob/6e56c7099ea55bcdc4073cbea60b2688cef69663/lib/braintree/webhook_notification_gateway.rb#L9-L18 | train | Parse the payload | [
30522,
13366,
11968,
3366,
1006,
8085,
1035,
5164,
1010,
18093,
1007,
5333,
19528,
5332,
16989,
11244,
1010,
1005,
8085,
3685,
2022,
9152,
2140,
1005,
2065,
8085,
1035,
5164,
1012,
9152,
2140,
1029,
5333,
19528,
5332,
16989,
11244,
1010,
10... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
rails/rails | activesupport/lib/active_support/time_with_zone.rb | ActiveSupport.TimeWithZone.method_missing | def method_missing(sym, *args, &block)
wrap_with_time_zone time.__send__(sym, *args, &block)
rescue NoMethodError => e
raise e, e.message.sub(time.inspect, inspect), e.backtrace
end | ruby | def method_missing(sym, *args, &block)
wrap_with_time_zone time.__send__(sym, *args, &block)
rescue NoMethodError => e
raise e, e.message.sub(time.inspect, inspect), e.backtrace
end | [
"def",
"method_missing",
"(",
"sym",
",",
"*",
"args",
",",
"&",
"block",
")",
"wrap_with_time_zone",
"time",
".",
"__send__",
"(",
"sym",
",",
"args",
",",
"block",
")",
"rescue",
"NoMethodError",
"=>",
"e",
"raise",
"e",
",",
"e",
".",
"message",
"."... | Send the missing method to +time+ instance, and wrap result in a new
TimeWithZone with the existing +time_zone+. | [
"Send",
"the",
"missing",
"method",
"to",
"+",
"time",
"+",
"instance",
"and",
"wrap",
"result",
"in",
"a",
"new",
"TimeWithZone",
"with",
"the",
"existing",
"+",
"time_zone",
"+",
"."
] | 85a8bc644be69908f05740a5886ec19cd3679df5 | https://github.com/rails/rails/blob/85a8bc644be69908f05740a5886ec19cd3679df5/activesupport/lib/active_support/time_with_zone.rb#L520-L524 | train | This method is called by the Time class. | [
30522,
13366,
4118,
1035,
4394,
1006,
25353,
2213,
1010,
1008,
12098,
5620,
1010,
1004,
3796,
1007,
10236,
1035,
2007,
1035,
2051,
1035,
4224,
2051,
1012,
1035,
1035,
4604,
1035,
1035,
1006,
25353,
2213,
1010,
1008,
12098,
5620,
1010,
1004,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/blob_services.rb | Azure::Storage::Mgmt::V2018_07_01.BlobServices.set_service_properties_with_http_info | def set_service_properties_with_http_info(resource_group_name, account_name, parameters, custom_headers:nil)
set_service_properties_async(resource_group_name, account_name, parameters, custom_headers:custom_headers).value!
end | ruby | def set_service_properties_with_http_info(resource_group_name, account_name, parameters, custom_headers:nil)
set_service_properties_async(resource_group_name, account_name, parameters, custom_headers:custom_headers).value!
end | [
"def",
"set_service_properties_with_http_info",
"(",
"resource_group_name",
",",
"account_name",
",",
"parameters",
",",
"custom_headers",
":",
"nil",
")",
"set_service_properties_async",
"(",
"resource_group_name",
",",
"account_name",
",",
"parameters",
",",
"custom_heade... | Sets the properties of a storage account’s Blob service, including properties
for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules.
@param resource_group_name [String] The name of the resource group within the
user's subscription. The name is case insensitive.
@param account_name [String] The name ... | [
"Sets",
"the",
"properties",
"of",
"a",
"storage",
"account’s",
"Blob",
"service",
"including",
"properties",
"for",
"Storage",
"Analytics",
"and",
"CORS",
"(",
"Cross",
"-",
"Origin",
"Resource",
"Sharing",
")",
"rules",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/blob_services.rb#L63-L65 | train | Set the service properties of the specified HDInsight account. | [
30522,
13366,
2275,
1035,
2326,
1035,
5144,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
4070,
1035,
2171,
1010,
11709,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
2275,
1035,
2326,
1035,
5144,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/logical.rb | Vault.Logical.read | def read(path, options = {})
headers = extract_headers!(options)
json = client.get("/v1/#{encode_path(path)}", {}, headers)
return Secret.decode(json)
rescue HTTPError => e
return nil if e.code == 404
raise
end | ruby | def read(path, options = {})
headers = extract_headers!(options)
json = client.get("/v1/#{encode_path(path)}", {}, headers)
return Secret.decode(json)
rescue HTTPError => e
return nil if e.code == 404
raise
end | [
"def",
"read",
"(",
"path",
",",
"options",
"=",
"{",
"}",
")",
"headers",
"=",
"extract_headers!",
"(",
"options",
")",
"json",
"=",
"client",
".",
"get",
"(",
"\"/v1/#{encode_path(path)}\"",
",",
"{",
"}",
",",
"headers",
")",
"return",
"Secret",
".",
... | Read the secret at the given path. If the secret does not exist, +nil+
will be returned.
@example
Vault.logical.read("secret/password") #=> #<Vault::Secret lease_id="">
@param [String] path
the path to read
@return [Secret, nil] | [
"Read",
"the",
"secret",
"at",
"the",
"given",
"path",
".",
"If",
"the",
"secret",
"does",
"not",
"exist",
"+",
"nil",
"+",
"will",
"be",
"returned",
"."
] | 02f0532a802ba1a2a0d8703a4585dab76eb9d864 | https://github.com/hashicorp/vault-ruby/blob/02f0532a802ba1a2a0d8703a4585dab76eb9d864/lib/vault/api/logical.rb#L45-L52 | train | Read a file from the server | [
30522,
13366,
3191,
1006,
4130,
1010,
7047,
1027,
1063,
1065,
1007,
20346,
2015,
1027,
14817,
1035,
20346,
2015,
999,
1006,
7047,
1007,
1046,
3385,
1027,
7396,
1012,
2131,
1006,
1000,
1013,
1058,
2487,
1013,
1001,
1063,
4372,
16044,
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_resources/lib/2016-02-01/generated/azure_mgmt_resources/resources.rb | Azure::Resources::Mgmt::V2016_02_01.Resources.update_async | def update_async(resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, api_version, parameters, custom_headers:nil)
# Send request
promise = begin_update_async(resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name... | ruby | def update_async(resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, api_version, parameters, custom_headers:nil)
# Send request
promise = begin_update_async(resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name... | [
"def",
"update_async",
"(",
"resource_group_name",
",",
"resource_provider_namespace",
",",
"parent_resource_path",
",",
"resource_type",
",",
"resource_name",
",",
"api_version",
",",
"parameters",
",",
"custom_headers",
":",
"nil",
")",
"# Send request",
"promise",
"=... | @param resource_group_name [String] The name of the resource group for the
resource. The name is case insensitive.
@param resource_provider_namespace [String] The namespace of the resource
provider.
@param parent_resource_path [String] The parent resource identity.
@param resource_type [String] The resource type o... | [
"@param",
"resource_group_name",
"[",
"String",
"]",
"The",
"name",
"of",
"the",
"resource",
"group",
"for",
"the",
"resource",
".",
"The",
"name",
"is",
"case",
"insensitive",
".",
"@param",
"resource_provider_namespace",
"[",
"String",
"]",
"The",
"namespace",... | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_resources/lib/2016-02-01/generated/azure_mgmt_resources/resources.rb#L540-L556 | train | Update a resource. | [
30522,
13366,
10651,
1035,
2004,
6038,
2278,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
7692,
1035,
10802,
1035,
3415,
15327,
1010,
6687,
1035,
7692,
1035,
4130,
1010,
7692,
1035,
2828,
1010,
7692,
1035,
2171,
1010,
17928,
1035,
2544,
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... |
rails/rails | activemodel/lib/active_model/attribute_methods.rb | ActiveModel.AttributeMethods.attribute_missing | def attribute_missing(match, *args, &block)
__send__(match.target, match.attr_name, *args, &block)
end | ruby | def attribute_missing(match, *args, &block)
__send__(match.target, match.attr_name, *args, &block)
end | [
"def",
"attribute_missing",
"(",
"match",
",",
"*",
"args",
",",
"&",
"block",
")",
"__send__",
"(",
"match",
".",
"target",
",",
"match",
".",
"attr_name",
",",
"args",
",",
"block",
")",
"end"
] | +attribute_missing+ is like +method_missing+, but for attributes. When
+method_missing+ is called we check to see if there is a matching
attribute method. If so, we tell +attribute_missing+ to dispatch the
attribute. This method can be overloaded to customize the behavior. | [
"+",
"attribute_missing",
"+",
"is",
"like",
"+",
"method_missing",
"+",
"but",
"for",
"attributes",
".",
"When",
"+",
"method_missing",
"+",
"is",
"called",
"we",
"check",
"to",
"see",
"if",
"there",
"is",
"a",
"matching",
"attribute",
"method",
".",
"If"... | 85a8bc644be69908f05740a5886ec19cd3679df5 | https://github.com/rails/rails/blob/85a8bc644be69908f05740a5886ec19cd3679df5/activemodel/lib/active_model/attribute_methods.rb#L439-L441 | train | This method is used to avoid the need to call the attribute_missing method on the object. | [
30522,
13366,
17961,
1035,
4394,
1006,
2674,
1010,
1008,
12098,
5620,
1010,
1004,
3796,
1007,
1035,
1035,
4604,
1035,
1035,
1006,
2674,
1012,
4539,
1010,
2674,
1012,
2012,
16344,
1035,
2171,
1010,
1008,
12098,
5620,
1010,
1004,
3796,
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_stor_simple8000_series/lib/2017-06-01/generated/azure_mgmt_stor_simple8000_series/devices.rb | Azure::StorSimple8000Series::Mgmt::V2017_06_01.Devices.get_with_http_info | def get_with_http_info(device_name, resource_group_name, manager_name, expand:nil, custom_headers:nil)
get_async(device_name, resource_group_name, manager_name, expand:expand, custom_headers:custom_headers).value!
end | ruby | def get_with_http_info(device_name, resource_group_name, manager_name, expand:nil, custom_headers:nil)
get_async(device_name, resource_group_name, manager_name, expand:expand, custom_headers:custom_headers).value!
end | [
"def",
"get_with_http_info",
"(",
"device_name",
",",
"resource_group_name",
",",
"manager_name",
",",
"expand",
":",
"nil",
",",
"custom_headers",
":",
"nil",
")",
"get_async",
"(",
"device_name",
",",
"resource_group_name",
",",
"manager_name",
",",
"expand",
":... | Returns the properties of the specified device.
@param device_name [String] The device name
@param resource_group_name [String] The resource group name
@param manager_name [String] The manager name
@param expand [String] Specify $expand=details to populate additional fields
related to the device or $expand=rollov... | [
"Returns",
"the",
"properties",
"of",
"the",
"specified",
"device",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_stor_simple8000_series/lib/2017-06-01/generated/azure_mgmt_stor_simple8000_series/devices.rb#L203-L205 | train | Gets the specified HDInsight device s index and its associated product. | [
30522,
13366,
2131,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
5080,
1035,
2171,
1010,
7692,
1035,
2177,
1035,
2171,
1010,
3208,
1035,
2171,
1010,
7818,
1024,
9152,
2140,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
2131,
1035,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
aws/aws-sdk-ruby | gems/aws-sdk-rds/lib/aws-sdk-rds/db_cluster.rb | Aws::RDS.DBCluster.restore | def restore(options = {})
options = options.merge(source_db_cluster_identifier: @id)
resp = @client.restore_db_cluster_to_point_in_time(options)
DBCluster.new(
id: resp.data.db_cluster.db_cluster_identifier,
data: resp.data.db_cluster,
client: @client
)
end | ruby | def restore(options = {})
options = options.merge(source_db_cluster_identifier: @id)
resp = @client.restore_db_cluster_to_point_in_time(options)
DBCluster.new(
id: resp.data.db_cluster.db_cluster_identifier,
data: resp.data.db_cluster,
client: @client
)
end | [
"def",
"restore",
"(",
"options",
"=",
"{",
"}",
")",
"options",
"=",
"options",
".",
"merge",
"(",
"source_db_cluster_identifier",
":",
"@id",
")",
"resp",
"=",
"@client",
".",
"restore_db_cluster_to_point_in_time",
"(",
"options",
")",
"DBCluster",
".",
"new... | @example Request syntax with placeholder values
dbcluster = db_cluster.restore({
db_cluster_identifier: "String", # required
restore_type: "String",
restore_to_time: Time.now,
use_latest_restorable_time: false,
port: 1,
db_subnet_group_name: "String",
option_group_name: "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/db_cluster.rb#L1330-L1338 | train | Restore the current DB cluster to a point in time | [
30522,
13366,
9239,
1006,
7047,
1027,
30524,
24501,
2361,
1027,
1030,
7396,
1012,
9239,
1035,
16962,
1035,
9324,
1035,
2000,
1035,
2391,
1035,
1999,
1035,
2051,
1006,
7047,
1007,
16962,
20464,
19966,
2121,
1012,
2047,
1006,
8909,
1024,
2450... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
rails/rails | activesupport/lib/active_support/xml_mini/rexml.rb | ActiveSupport.XmlMini_REXML.get_attributes | def get_attributes(element)
attributes = {}
element.attributes.each { |n, v| attributes[n] = v }
attributes
end | ruby | def get_attributes(element)
attributes = {}
element.attributes.each { |n, v| attributes[n] = v }
attributes
end | [
"def",
"get_attributes",
"(",
"element",
")",
"attributes",
"=",
"{",
"}",
"element",
".",
"attributes",
".",
"each",
"{",
"|",
"n",
",",
"v",
"|",
"attributes",
"[",
"n",
"]",
"=",
"v",
"}",
"attributes",
"end"
] | Converts the attributes array of an XML element into a hash.
Returns an empty Hash if node has no attributes.
element::
XML element to extract attributes from. | [
"Converts",
"the",
"attributes",
"array",
"of",
"an",
"XML",
"element",
"into",
"a",
"hash",
".",
"Returns",
"an",
"empty",
"Hash",
"if",
"node",
"has",
"no",
"attributes",
"."
] | 85a8bc644be69908f05740a5886ec19cd3679df5 | https://github.com/rails/rails/blob/85a8bc644be69908f05740a5886ec19cd3679df5/activesupport/lib/active_support/xml_mini/rexml.rb#L116-L120 | train | Get the attributes of the given element | [
30522,
13366,
2131,
1035,
12332,
1006,
5783,
1007,
12332,
1027,
1063,
1065,
5783,
1012,
12332,
1012,
2169,
1063,
1064,
1050,
1010,
1058,
1064,
12332,
1031,
1050,
1033,
1027,
1058,
1065,
12332,
2203,
102,
0,
0,
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... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/pdk | lib/pdk/util.rb | PDK.Util.targets_relative_to_pwd | def targets_relative_to_pwd(targets)
targets.map do |t|
if Pathname.new(t).absolute?
Pathname.new(t).relative_path_from(Pathname.pwd)
else
t
end
end
end | ruby | def targets_relative_to_pwd(targets)
targets.map do |t|
if Pathname.new(t).absolute?
Pathname.new(t).relative_path_from(Pathname.pwd)
else
t
end
end
end | [
"def",
"targets_relative_to_pwd",
"(",
"targets",
")",
"targets",
".",
"map",
"do",
"|",
"t",
"|",
"if",
"Pathname",
".",
"new",
"(",
"t",
")",
".",
"absolute?",
"Pathname",
".",
"new",
"(",
"t",
")",
".",
"relative_path_from",
"(",
"Pathname",
".",
"p... | Returns the targets' paths relative to the working directory
@return [Array<String>] The absolute or path to the target | [
"Returns",
"the",
"targets",
"paths",
"relative",
"to",
"the",
"working",
"directory"
] | 0d864aff62ffef04b5104addf399d0476afd71e7 | https://github.com/puppetlabs/pdk/blob/0d864aff62ffef04b5104addf399d0476afd71e7/lib/pdk/util.rb#L190-L198 | train | Returns a list of targets relative to the current working directory | [
30522,
13366,
7889,
1035,
5816,
1035,
2000,
1035,
1052,
21724,
1006,
7889,
1007,
7889,
1012,
4949,
2079,
1064,
1056,
1064,
2065,
4130,
18442,
1012,
2047,
1006,
1056,
1007,
1012,
7619,
1029,
4130,
18442,
1012,
2047,
1006,
1056,
1007,
1012,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
fastlane/fastlane | fastlane/lib/fastlane/setup/setup.rb | Fastlane.Setup.add_or_update_gemfile | def add_or_update_gemfile(update_gemfile_if_needed: false)
if gemfile_exists?
ensure_gemfile_valid!(update_gemfile_if_needed: update_gemfile_if_needed)
else
if update_gemfile_if_needed || UI.confirm("It is recommended to run fastlane with a Gemfile set up, do you want fastlane to create one ... | ruby | def add_or_update_gemfile(update_gemfile_if_needed: false)
if gemfile_exists?
ensure_gemfile_valid!(update_gemfile_if_needed: update_gemfile_if_needed)
else
if update_gemfile_if_needed || UI.confirm("It is recommended to run fastlane with a Gemfile set up, do you want fastlane to create one ... | [
"def",
"add_or_update_gemfile",
"(",
"update_gemfile_if_needed",
":",
"false",
")",
"if",
"gemfile_exists?",
"ensure_gemfile_valid!",
"(",
"update_gemfile_if_needed",
":",
"update_gemfile_if_needed",
")",
"else",
"if",
"update_gemfile_if_needed",
"||",
"UI",
".",
"confirm",... | This method is responsible for ensuring there is a working
Gemfile, and that `fastlane` is defined as a dependency
while also having `rubygems` as a gem source | [
"This",
"method",
"is",
"responsible",
"for",
"ensuring",
"there",
"is",
"a",
"working",
"Gemfile",
"and",
"that",
"fastlane",
"is",
"defined",
"as",
"a",
"dependency",
"while",
"also",
"having",
"rubygems",
"as",
"a",
"gem",
"source"
] | 457c5d647c77f0e078dafa5129da616914e002c5 | https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/fastlane/lib/fastlane/setup/setup.rb#L250-L259 | train | Adds or updates the Gemfile if it doesn t exist | [
30522,
13366,
5587,
1035,
2030,
1035,
10651,
1035,
17070,
8873,
2571,
1006,
10651,
1035,
17070,
8873,
2571,
1035,
2065,
1035,
2734,
1024,
6270,
1007,
2065,
17070,
8873,
2571,
1035,
6526,
1029,
5676,
1035,
17070,
8873,
2571,
1035,
9398,
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 | 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.begin_switch_protection | def begin_switch_protection(fabric_name, protection_container_name, switch_input, custom_headers:nil)
response = begin_switch_protection_async(fabric_name, protection_container_name, switch_input, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def begin_switch_protection(fabric_name, protection_container_name, switch_input, custom_headers:nil)
response = begin_switch_protection_async(fabric_name, protection_container_name, switch_input, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"begin_switch_protection",
"(",
"fabric_name",
",",
"protection_container_name",
",",
"switch_input",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"begin_switch_protection_async",
"(",
"fabric_name",
",",
"protection_container_name",
",",
"switch_input",
... | 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#L842-L845 | train | Switch protection of a fabric. | [
30522,
13366,
4088,
1035,
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,
4088,
1035,
6942,
1035,
3860,
1035,
2004,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | data/azure_key_vault/lib/2016-10-01/generated/azure_key_vault/key_vault_client.rb | Azure::KeyVault::V2016_10_01.KeyVaultClient.create_certificate_with_http_info | def create_certificate_with_http_info(vault_base_url, certificate_name, certificate_policy:nil, certificate_attributes:nil, tags:nil, custom_headers:nil)
create_certificate_async(vault_base_url, certificate_name, certificate_policy:certificate_policy, certificate_attributes:certificate_attributes, tags:tags, cust... | ruby | def create_certificate_with_http_info(vault_base_url, certificate_name, certificate_policy:nil, certificate_attributes:nil, tags:nil, custom_headers:nil)
create_certificate_async(vault_base_url, certificate_name, certificate_policy:certificate_policy, certificate_attributes:certificate_attributes, tags:tags, cust... | [
"def",
"create_certificate_with_http_info",
"(",
"vault_base_url",
",",
"certificate_name",
",",
"certificate_policy",
":",
"nil",
",",
"certificate_attributes",
":",
"nil",
",",
"tags",
":",
"nil",
",",
"custom_headers",
":",
"nil",
")",
"create_certificate_async",
"... | Creates a new certificate.
If this is the first version, the certificate resource is created. This
operation requires the certificates/create permission.
@param vault_base_url [String] The vault name, for example
https://myvault.vault.azure.net.
@param certificate_name [String] The name of the certificate.
@par... | [
"Creates",
"a",
"new",
"certificate",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_key_vault/lib/2016-10-01/generated/azure_key_vault/key_vault_client.rb#L5185-L5187 | train | Creates a certificate in the specified vault. | [
30522,
13366,
3443,
1035,
8196,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
11632,
1035,
2918,
1035,
24471,
2140,
1010,
8196,
1035,
2171,
1010,
8196,
1035,
3343,
1024,
9152,
2140,
1010,
8196,
1035,
12332,
1024,
9152,
2140,
1010,
22073,
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_service_fabric/lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb | Azure::ServiceFabric::V6_2_0_9.ServiceFabricClientAPIs.resume_application_upgrade_with_http_info | def resume_application_upgrade_with_http_info(application_id, resume_application_upgrade_description, timeout:60, custom_headers:nil)
resume_application_upgrade_async(application_id, resume_application_upgrade_description, timeout:timeout, custom_headers:custom_headers).value!
end | ruby | def resume_application_upgrade_with_http_info(application_id, resume_application_upgrade_description, timeout:60, custom_headers:nil)
resume_application_upgrade_async(application_id, resume_application_upgrade_description, timeout:timeout, custom_headers:custom_headers).value!
end | [
"def",
"resume_application_upgrade_with_http_info",
"(",
"application_id",
",",
"resume_application_upgrade_description",
",",
"timeout",
":",
"60",
",",
"custom_headers",
":",
"nil",
")",
"resume_application_upgrade_async",
"(",
"application_id",
",",
"resume_application_upgra... | Resumes upgrading an application in the Service Fabric cluster.
Resumes an unmonitored manual Service Fabric application upgrade. Service
Fabric upgrades one upgrade domain at a time. For unmonitored manual
upgrades, after Service Fabric finishes an upgrade domain, it waits for you
to call this API before proceedi... | [
"Resumes",
"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#L8154-L8156 | train | Resumes the upgrade of the specified application. | [
30522,
13366,
13746,
1035,
4646,
1035,
12200,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
4646,
1035,
8909,
1010,
13746,
1035,
4646,
1035,
12200,
1035,
6412,
1010,
2051,
5833,
1024,
3438,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_logic/lib/2016-06-01/generated/azure_mgmt_logic/workflows.rb | Azure::Logic::Mgmt::V2016_06_01.Workflows.move | def move(resource_group_name, workflow_name, move, custom_headers:nil)
response = move_async(resource_group_name, workflow_name, move, custom_headers:custom_headers).value!
nil
end | ruby | def move(resource_group_name, workflow_name, move, custom_headers:nil)
response = move_async(resource_group_name, workflow_name, move, custom_headers:custom_headers).value!
nil
end | [
"def",
"move",
"(",
"resource_group_name",
",",
"workflow_name",
",",
"move",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"move_async",
"(",
"resource_group_name",
",",
"workflow_name",
",",
"move",
",",
"custom_headers",
":custom_headers",
")",
".",
... | Moves an existing workflow.
@param resource_group_name [String] The resource group name.
@param workflow_name [String] The workflow name.
@param move [Workflow] The workflow to move.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request. | [
"Moves",
"an",
"existing",
"workflow",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_logic/lib/2016-06-01/generated/azure_mgmt_logic/workflows.rb#L1059-L1062 | train | Moves a workflow to an existing sequence. | [
30522,
13366,
2693,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2147,
12314,
1035,
2171,
1010,
2693,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
2693,
1035,
2004,
6038,
2278,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_web/lib/2015-08-01/generated/azure_mgmt_web/app_service_certificate_orders.rb | Azure::Web::Mgmt::V2015_08_01.AppServiceCertificateOrders.delete_certificate | def delete_certificate(resource_group_name, certificate_order_name, name, custom_headers:nil)
response = delete_certificate_async(resource_group_name, certificate_order_name, name, custom_headers:custom_headers).value!
nil
end | ruby | def delete_certificate(resource_group_name, certificate_order_name, name, custom_headers:nil)
response = delete_certificate_async(resource_group_name, certificate_order_name, name, custom_headers:custom_headers).value!
nil
end | [
"def",
"delete_certificate",
"(",
"resource_group_name",
",",
"certificate_order_name",
",",
"name",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"delete_certificate_async",
"(",
"resource_group_name",
",",
"certificate_order_name",
",",
"name",
",",
"custom... | Delete the certificate associated with a certificate order.
Delete the certificate associated with a certificate order.
@param resource_group_name [String] Name of the resource group to which the
resource belongs.
@param certificate_order_name [String] Name of the certificate order.
@param name [String] Name of ... | [
"Delete",
"the",
"certificate",
"associated",
"with",
"a",
"certificate",
"order",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_web/lib/2015-08-01/generated/azure_mgmt_web/app_service_certificate_orders.rb#L962-L965 | train | Deletes a certificate from the specified certificate order. | [
30522,
13366,
3972,
12870,
30524,
2171,
1010,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
3972,
12870,
1035,
8196,
1035,
2004,
6038,
2278,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
8196,
1035,
2344,
1035,
2171,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
comfy/comfortable-mexican-sofa | lib/comfortable_mexican_sofa/seeds/page/exporter.rb | ComfortableMexicanSofa::Seeds::Page.Exporter.fragments_data | def fragments_data(record, page_path)
record.fragments.collect do |frag|
header = "#{frag.tag} #{frag.identifier}"
content =
case frag.tag
when "datetime", "date"
frag.datetime
when "checkbox"
frag.boolean
when "file", "files"
... | ruby | def fragments_data(record, page_path)
record.fragments.collect do |frag|
header = "#{frag.tag} #{frag.identifier}"
content =
case frag.tag
when "datetime", "date"
frag.datetime
when "checkbox"
frag.boolean
when "file", "files"
... | [
"def",
"fragments_data",
"(",
"record",
",",
"page_path",
")",
"record",
".",
"fragments",
".",
"collect",
"do",
"|",
"frag",
"|",
"header",
"=",
"\"#{frag.tag} #{frag.identifier}\"",
"content",
"=",
"case",
"frag",
".",
"tag",
"when",
"\"datetime\"",
",",
"\"... | Collecting fragment data and writing attachment files to disk | [
"Collecting",
"fragment",
"data",
"and",
"writing",
"attachment",
"files",
"to",
"disk"
] | 38a31428f6e2c07d5bda64f0371eebfb29a3abc4 | https://github.com/comfy/comfortable-mexican-sofa/blob/38a31428f6e2c07d5bda64f0371eebfb29a3abc4/lib/comfortable_mexican_sofa/seeds/page/exporter.rb#L67-L89 | train | Returns a hash of the data for the fragments in the record. | [
30522,
13366,
10341,
1035,
2951,
1006,
2501,
1010,
3931,
1035,
4130,
1007,
2501,
1012,
10341,
1012,
8145,
2079,
1064,
25312,
2290,
1064,
20346,
1027,
1000,
1001,
1063,
25312,
2290,
1012,
6415,
1065,
1001,
1063,
25312,
2290,
1012,
8909,
4765... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
plataformatec/responders | lib/action_controller/responder.rb | ActionController.Responder.api_behavior | def api_behavior
raise MissingRenderer.new(format) unless has_renderer?
if get?
display resource
elsif post?
display resource, :status => :created, :location => api_location
else
head :no_content
end
end | ruby | def api_behavior
raise MissingRenderer.new(format) unless has_renderer?
if get?
display resource
elsif post?
display resource, :status => :created, :location => api_location
else
head :no_content
end
end | [
"def",
"api_behavior",
"raise",
"MissingRenderer",
".",
"new",
"(",
"format",
")",
"unless",
"has_renderer?",
"if",
"get?",
"display",
"resource",
"elsif",
"post?",
"display",
"resource",
",",
":status",
"=>",
":created",
",",
":location",
"=>",
"api_location",
... | This is the common behavior for formats associated with APIs, such as :xml and :json. | [
"This",
"is",
"the",
"common",
"behavior",
"for",
"formats",
"associated",
"with",
"APIs",
"such",
"as",
":",
"xml",
"and",
":",
"json",
"."
] | a1a2706091d4ffcbbe387407ddfc5671a59ad842 | https://github.com/plataformatec/responders/blob/a1a2706091d4ffcbbe387407ddfc5671a59ad842/lib/action_controller/responder.rb#L210-L220 | train | display the API behavior | [
30522,
13366,
17928,
1035,
5248,
5333,
4394,
7389,
4063,
2121,
1012,
2047,
1006,
4289,
1007,
4983,
2038,
1035,
17552,
2121,
1029,
2065,
2131,
1029,
4653,
7692,
3449,
5332,
2546,
2695,
1029,
4653,
7692,
1010,
1024,
3570,
1027,
1028,
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... |
randym/axlsx | lib/axlsx/workbook/worksheet/comments.rb | Axlsx.Comments.add_comment | def add_comment(options={})
raise ArgumentError, "Comment require an author" unless options[:author]
raise ArgumentError, "Comment requires text" unless options[:text]
raise ArgumentError, "Comment requires ref" unless options[:ref]
self << Comment.new(self, options)
yield last if block_gi... | ruby | def add_comment(options={})
raise ArgumentError, "Comment require an author" unless options[:author]
raise ArgumentError, "Comment requires text" unless options[:text]
raise ArgumentError, "Comment requires ref" unless options[:ref]
self << Comment.new(self, options)
yield last if block_gi... | [
"def",
"add_comment",
"(",
"options",
"=",
"{",
"}",
")",
"raise",
"ArgumentError",
",",
"\"Comment require an author\"",
"unless",
"options",
"[",
":author",
"]",
"raise",
"ArgumentError",
",",
"\"Comment requires text\"",
"unless",
"options",
"[",
":text",
"]",
... | Creates a new Comments object
@param [Worksheet] worksheet The sheet that these comments belong to.
Adds a new comment to the worksheet that owns these comments.
@note the author, text and ref options are required
@option options [String] author The name of the author for this comment
@option options [String] text... | [
"Creates",
"a",
"new",
"Comments",
"object"
] | c593a08b2a929dac7aa8dc418b55e26b4c49dc34 | https://github.com/randym/axlsx/blob/c593a08b2a929dac7aa8dc418b55e26b4c49dc34/lib/axlsx/workbook/worksheet/comments.rb#L41-L48 | train | Add a comment to the comment list. | [
30522,
13366,
5587,
1035,
7615,
1006,
7047,
1027,
1063,
1065,
1007,
5333,
6685,
2121,
29165,
1010,
1000,
7615,
5478,
2019,
3166,
1000,
4983,
7047,
1031,
1024,
3166,
1033,
5333,
6685,
2121,
29165,
1010,
1000,
7615,
5942,
3793,
1000,
4983,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_web/lib/2018-02-01/generated/azure_mgmt_web/app_service_environments.rb | Azure::Web::Mgmt::V2018_02_01.AppServiceEnvironments.list_web_worker_metric_definitions_with_http_info | def list_web_worker_metric_definitions_with_http_info(resource_group_name, name, worker_pool_name, custom_headers:nil)
list_web_worker_metric_definitions_async(resource_group_name, name, worker_pool_name, custom_headers:custom_headers).value!
end | ruby | def list_web_worker_metric_definitions_with_http_info(resource_group_name, name, worker_pool_name, custom_headers:nil)
list_web_worker_metric_definitions_async(resource_group_name, name, worker_pool_name, custom_headers:custom_headers).value!
end | [
"def",
"list_web_worker_metric_definitions_with_http_info",
"(",
"resource_group_name",
",",
"name",
",",
"worker_pool_name",
",",
"custom_headers",
":",
"nil",
")",
"list_web_worker_metric_definitions_async",
"(",
"resource_group_name",
",",
"name",
",",
"worker_pool_name",
... | Get metric definitions for a worker pool of an App Service Environment.
Get metric definitions for a worker pool of an App Service Environment.
@param resource_group_name [String] Name of the resource group to which the
resource belongs.
@param name [String] Name of the App Service Environment.
@param worker_poo... | [
"Get",
"metric",
"definitions",
"for",
"a",
"worker",
"pool",
"of",
"an",
"App",
"Service",
"Environment",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_web/lib/2018-02-01/generated/azure_mgmt_web/app_service_environments.rb#L3715-L3717 | train | Gets the metric definitions for the specified worker pool. | [
30522,
13366,
2862,
1035,
4773,
1035,
7309,
1035,
12046,
1035,
15182,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2171,
1010,
7309,
1035,
4770,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | 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_sub_name_info_list_with_http_info | def get_sub_name_info_list_with_http_info(name_id, recursive:false, continuation_token:nil, timeout:60, custom_headers:nil)
get_sub_name_info_list_async(name_id, recursive:recursive, continuation_token:continuation_token, timeout:timeout, custom_headers:custom_headers).value!
end | ruby | def get_sub_name_info_list_with_http_info(name_id, recursive:false, continuation_token:nil, timeout:60, custom_headers:nil)
get_sub_name_info_list_async(name_id, recursive:recursive, continuation_token:continuation_token, timeout:timeout, custom_headers:custom_headers).value!
end | [
"def",
"get_sub_name_info_list_with_http_info",
"(",
"name_id",
",",
"recursive",
":",
"false",
",",
"continuation_token",
":",
"nil",
",",
"timeout",
":",
"60",
",",
"custom_headers",
":",
"nil",
")",
"get_sub_name_info_list_async",
"(",
"name_id",
",",
"recursive"... | Enumerates all the Service Fabric names under a given name.
Enumerates all the Service Fabric names under a given name. If the subnames
do not fit in a page, one page of results is returned as well as a
continuation token which can be used to get the next page. Querying a name
that doesn't exist will fail.
@para... | [
"Enumerates",
"all",
"the",
"Service",
"Fabric",
"names",
"under",
"a",
"given",
"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#L26475-L26477 | train | Gets the name info list of a given name. | [
30522,
13366,
2131,
1035,
4942,
1035,
2171,
1035,
18558,
1035,
2862,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
2171,
1035,
8909,
1010,
28667,
9236,
3512,
1024,
6270,
1010,
13633,
1035,
19204,
1024,
9152,
2140,
1010,
2051,
5833,
1024,
3438,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/product_policy.rb | Azure::ApiManagement::Mgmt::V2018_01_01.ProductPolicy.list_by_product_with_http_info | def list_by_product_with_http_info(resource_group_name, service_name, product_id, custom_headers:nil)
list_by_product_async(resource_group_name, service_name, product_id, custom_headers:custom_headers).value!
end | ruby | def list_by_product_with_http_info(resource_group_name, service_name, product_id, custom_headers:nil)
list_by_product_async(resource_group_name, service_name, product_id, custom_headers:custom_headers).value!
end | [
"def",
"list_by_product_with_http_info",
"(",
"resource_group_name",
",",
"service_name",
",",
"product_id",
",",
"custom_headers",
":",
"nil",
")",
"list_by_product_async",
"(",
"resource_group_name",
",",
"service_name",
",",
"product_id",
",",
"custom_headers",
":custo... | Get the policy configuration at the Product level.
@param resource_group_name [String] The name of the resource group.
@param service_name [String] The name of the API Management service.
@param product_id [String] Product identifier. Must be unique in the current
API Management service instance.
@param custom_he... | [
"Get",
"the",
"policy",
"configuration",
"at",
"the",
"Product",
"level",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/product_policy.rb#L53-L55 | train | Gets the list of all the product s variants. | [
30522,
13366,
2862,
1035,
2011,
1035,
4031,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2326,
1035,
2171,
1010,
4031,
1035,
8909,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
2862,
1035,
2011,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
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_compose_deployment_upgrade_progress_with_http_info | def get_compose_deployment_upgrade_progress_with_http_info(deployment_name, timeout:60, custom_headers:nil)
get_compose_deployment_upgrade_progress_async(deployment_name, timeout:timeout, custom_headers:custom_headers).value!
end | ruby | def get_compose_deployment_upgrade_progress_with_http_info(deployment_name, timeout:60, custom_headers:nil)
get_compose_deployment_upgrade_progress_async(deployment_name, timeout:timeout, custom_headers:custom_headers).value!
end | [
"def",
"get_compose_deployment_upgrade_progress_with_http_info",
"(",
"deployment_name",
",",
"timeout",
":",
"60",
",",
"custom_headers",
":",
"nil",
")",
"get_compose_deployment_upgrade_progress_async",
"(",
"deployment_name",
",",
"timeout",
":",
"timeout",
",",
"custom_... | Gets details for the latest upgrade performed on this Service Fabric compose
deployment.
Returns the information about the state of the compose deployment upgrade
along with details to aid debugging application health issues.
@param deployment_name [String] The identity of the deployment.
@param timeout [Integer... | [
"Gets",
"details",
"for",
"the",
"latest",
"upgrade",
"performed",
"on",
"this",
"Service",
"Fabric",
"compose",
"deployment",
"."
] | 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#L18122-L18124 | train | Gets the current compose deployment upgrade progress. | [
30522,
13366,
2131,
1035,
17202,
1035,
10813,
1035,
12200,
1035,
5082,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
10813,
1035,
2171,
1010,
2051,
5833,
1024,
3438,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
2131,
1035,
17202,
103... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | 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_node_transition_progress_with_http_info | def get_node_transition_progress_with_http_info(node_name, operation_id, timeout:60, custom_headers:nil)
get_node_transition_progress_async(node_name, operation_id, timeout:timeout, custom_headers:custom_headers).value!
end | ruby | def get_node_transition_progress_with_http_info(node_name, operation_id, timeout:60, custom_headers:nil)
get_node_transition_progress_async(node_name, operation_id, timeout:timeout, custom_headers:custom_headers).value!
end | [
"def",
"get_node_transition_progress_with_http_info",
"(",
"node_name",
",",
"operation_id",
",",
"timeout",
":",
"60",
",",
"custom_headers",
":",
"nil",
")",
"get_node_transition_progress_async",
"(",
"node_name",
",",
"operation_id",
",",
"timeout",
":",
"timeout",
... | Gets the progress of an operation started using StartNodeTransition.
Gets the progress of an operation started with StartNodeTransition using the
provided OperationId.
@param node_name [String] The name of the node.
@param operation_id A GUID that identifies a call of this API. This is
passed into the correspon... | [
"Gets",
"the",
"progress",
"of",
"an",
"operation",
"started",
"using",
"StartNodeTransition",
"."
] | 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#L21779-L21781 | train | Gets the progress of the node transition. | [
30522,
13366,
2131,
1035,
13045,
1035,
6653,
1035,
5082,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
13045,
1035,
2171,
1010,
3169,
1035,
8909,
1010,
2051,
5833,
1024,
3438,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
2131,
1035,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
decidim/decidim | decidim-core/lib/decidim/filter_form_builder.rb | Decidim.FilterFormBuilder.collection_check_boxes | def collection_check_boxes(method, collection, value_method, label_method, options = {}, html_options = {})
fieldset_wrapper options[:legend_title] do
super(method, collection, value_method, label_method, options, html_options) do |builder|
if block_given?
yield builder
els... | ruby | def collection_check_boxes(method, collection, value_method, label_method, options = {}, html_options = {})
fieldset_wrapper options[:legend_title] do
super(method, collection, value_method, label_method, options, html_options) do |builder|
if block_given?
yield builder
els... | [
"def",
"collection_check_boxes",
"(",
"method",
",",
"collection",
",",
"value_method",
",",
"label_method",
",",
"options",
"=",
"{",
"}",
",",
"html_options",
"=",
"{",
"}",
")",
"fieldset_wrapper",
"options",
"[",
":legend_title",
"]",
"do",
"super",
"(",
... | Wrap the check_boxes collection in a custom fieldset.
It also renders the inputs inside its labels. | [
"Wrap",
"the",
"check_boxes",
"collection",
"in",
"a",
"custom",
"fieldset",
".",
"It",
"also",
"renders",
"the",
"inputs",
"inside",
"its",
"labels",
"."
] | 6e2b14e559a63088669904e3c5c49a5180700cf7 | https://github.com/decidim/decidim/blob/6e2b14e559a63088669904e3c5c49a5180700cf7/decidim-core/lib/decidim/filter_form_builder.rb#L24-L34 | train | Creates a check box for a collection | [
30522,
13366,
3074,
1035,
4638,
1035,
8378,
1006,
4118,
1010,
3074,
1010,
3643,
1035,
4118,
1010,
3830,
1035,
4118,
1010,
7047,
1027,
1063,
1065,
1010,
16129,
1035,
7047,
1027,
1063,
1065,
1007,
4249,
3388,
1035,
10236,
4842,
7047,
1031,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
rmagick/rmagick | lib/rmagick_internal.rb | Magick.Draw.ellipse | def ellipse(origin_x, origin_y, width, height, arc_start, arc_end)
primitive 'ellipse ' + format('%g,%g %g,%g %g,%g',
origin_x, origin_y, width, height, arc_start, arc_end)
end | ruby | def ellipse(origin_x, origin_y, width, height, arc_start, arc_end)
primitive 'ellipse ' + format('%g,%g %g,%g %g,%g',
origin_x, origin_y, width, height, arc_start, arc_end)
end | [
"def",
"ellipse",
"(",
"origin_x",
",",
"origin_y",
",",
"width",
",",
"height",
",",
"arc_start",
",",
"arc_end",
")",
"primitive",
"'ellipse '",
"+",
"format",
"(",
"'%g,%g %g,%g %g,%g'",
",",
"origin_x",
",",
"origin_y",
",",
"width",
",",
"height",
",",
... | Draw an ellipse | [
"Draw",
"an",
"ellipse"
] | ef6688ed9d76bf123c2ea1a483eff8635051adb7 | https://github.com/rmagick/rmagick/blob/ef6688ed9d76bf123c2ea1a483eff8635051adb7/lib/rmagick_internal.rb#L304-L307 | train | Creates an ellipse object. | [
30522,
13366,
3449,
15000,
3366,
1006,
4761,
1035,
1060,
1010,
4761,
1035,
1061,
1010,
9381,
1010,
4578,
1010,
8115,
1035,
2707,
1010,
8115,
1035,
2203,
1007,
10968,
1005,
3449,
15000,
3366,
1005,
1009,
4289,
1006,
1005,
1003,
1043,
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... |
castwide/solargraph | lib/solargraph/library.rb | Solargraph.Library.signatures_at | def signatures_at filename, line, column
position = Position.new(line, column)
cursor = Source::Cursor.new(checkout(filename), position)
api_map.clip(cursor).signify
end | ruby | def signatures_at filename, line, column
position = Position.new(line, column)
cursor = Source::Cursor.new(checkout(filename), position)
api_map.clip(cursor).signify
end | [
"def",
"signatures_at",
"filename",
",",
"line",
",",
"column",
"position",
"=",
"Position",
".",
"new",
"(",
"line",
",",
"column",
")",
"cursor",
"=",
"Source",
"::",
"Cursor",
".",
"new",
"(",
"checkout",
"(",
"filename",
")",
",",
"position",
")",
... | Get signature suggestions for the method at the specified file and
location.
@param filename [String] The file to analyze
@param line [Integer] The zero-based line number
@param column [Integer] The zero-based column number
@return [Array<Solargraph::Pin::Base>]
@todo Take filename/position instead of filename/l... | [
"Get",
"signature",
"suggestions",
"for",
"the",
"method",
"at",
"the",
"specified",
"file",
"and",
"location",
"."
] | 47badb5d151aca775ccbe6c470236089eae7839d | https://github.com/castwide/solargraph/blob/47badb5d151aca775ccbe6c470236089eae7839d/lib/solargraph/library.rb#L188-L192 | train | Return the signatures at the given position | [
30522,
13366,
16442,
1035,
2012,
5371,
18442,
1010,
2240,
1010,
5930,
2597,
1027,
2597,
1012,
2047,
1006,
2240,
1010,
5930,
1007,
12731,
25301,
30524,
1010,
2597,
1007,
17928,
1035,
4949,
1012,
12528,
1006,
12731,
25301,
2099,
1007,
1012,
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... |
castwide/solargraph | lib/solargraph/workspace.rb | Solargraph.Workspace.remove | def remove filename
return false unless source_hash.key?(filename)
source_hash.delete filename
true
end | ruby | def remove filename
return false unless source_hash.key?(filename)
source_hash.delete filename
true
end | [
"def",
"remove",
"filename",
"return",
"false",
"unless",
"source_hash",
".",
"key?",
"(",
"filename",
")",
"source_hash",
".",
"delete",
"filename",
"true",
"end"
] | Remove a source from the workspace. The source will not be removed if
its file exists and the workspace is configured to include it.
@param filename [String]
@return [Boolean] True if the source was removed from the workspace | [
"Remove",
"a",
"source",
"from",
"the",
"workspace",
".",
"The",
"source",
"will",
"not",
"be",
"removed",
"if",
"its",
"file",
"exists",
"and",
"the",
"workspace",
"is",
"configured",
"to",
"include",
"it",
"."
] | 47badb5d151aca775ccbe6c470236089eae7839d | https://github.com/castwide/solargraph/blob/47badb5d151aca775ccbe6c470236089eae7839d/lib/solargraph/workspace.rb#L56-L60 | train | Remove the file from the source hash | [
30522,
13366,
6366,
5371,
18442,
2709,
6270,
4983,
3120,
1035,
23325,
1012,
3145,
1029,
1006,
5371,
18442,
1007,
3120,
1035,
23325,
1012,
3972,
12870,
5371,
18442,
2995,
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... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/email_template.rb | Azure::ApiManagement::Mgmt::V2018_01_01.EmailTemplate.get_with_http_info | def get_with_http_info(resource_group_name, service_name, template_name, custom_headers:nil)
get_async(resource_group_name, service_name, template_name, custom_headers:custom_headers).value!
end | ruby | def get_with_http_info(resource_group_name, service_name, template_name, custom_headers:nil)
get_async(resource_group_name, service_name, template_name, custom_headers:custom_headers).value!
end | [
"def",
"get_with_http_info",
"(",
"resource_group_name",
",",
"service_name",
",",
"template_name",
",",
"custom_headers",
":",
"nil",
")",
"get_async",
"(",
"resource_group_name",
",",
"service_name",
",",
"template_name",
",",
"custom_headers",
":custom_headers",
")",... | Gets the details of the email template specified by its identifier.
@param resource_group_name [String] The name of the resource group.
@param service_name [String] The name of the API Management service.
@param template_name [TemplateName] Email Template Name Identifier. Possible
values include: 'applicationAppro... | [
"Gets",
"the",
"details",
"of",
"the",
"email",
"template",
"specified",
"by",
"its",
"identifier",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/email_template.rb#L290-L292 | train | Gets the specified resource group and the specified template. | [
30522,
13366,
2131,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2326,
1035,
2171,
1010,
23561,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
2131,
1035,
2004,
6038,
2278,
1006,
7692,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | data/azure_cognitiveservices_luisauthoring/lib/2.0/generated/azure_cognitiveservices_luisauthoring/model.rb | Azure::CognitiveServices::LuisAuthoring::V2_0.Model.delete_closed_list_with_http_info | def delete_closed_list_with_http_info(app_id, version_id, cl_entity_id, custom_headers:nil)
delete_closed_list_async(app_id, version_id, cl_entity_id, custom_headers:custom_headers).value!
end | ruby | def delete_closed_list_with_http_info(app_id, version_id, cl_entity_id, custom_headers:nil)
delete_closed_list_async(app_id, version_id, cl_entity_id, custom_headers:custom_headers).value!
end | [
"def",
"delete_closed_list_with_http_info",
"(",
"app_id",
",",
"version_id",
",",
"cl_entity_id",
",",
"custom_headers",
":",
"nil",
")",
"delete_closed_list_async",
"(",
"app_id",
",",
"version_id",
",",
"cl_entity_id",
",",
"custom_headers",
":custom_headers",
")",
... | Deletes a list entity model from a version of the application.
@param app_id The application ID.
@param version_id [String] The version ID.
@param cl_entity_id The list entity model ID.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request.
@return [MsRes... | [
"Deletes",
"a",
"list",
"entity",
"model",
"from",
"a",
"version",
"of",
"the",
"application",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_cognitiveservices_luisauthoring/lib/2.0/generated/azure_cognitiveservices_luisauthoring/model.rb#L3364-L3366 | train | Deletes a list of entities in a version of the application. | [
30522,
13366,
3972,
12870,
1035,
2701,
1035,
2862,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
10439,
1035,
8909,
1010,
2544,
1035,
8909,
1010,
18856,
1035,
9178,
1035,
8909,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
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... |
alexreisner/geocoder | lib/geocoder/query.rb | Geocoder.Query.blank? | def blank?
!params_given? and (
(text.is_a?(Array) and text.compact.size < 2) or
text.to_s.match(/\A\s*\z/)
)
end | ruby | def blank?
!params_given? and (
(text.is_a?(Array) and text.compact.size < 2) or
text.to_s.match(/\A\s*\z/)
)
end | [
"def",
"blank?",
"!",
"params_given?",
"and",
"(",
"(",
"text",
".",
"is_a?",
"(",
"Array",
")",
"and",
"text",
".",
"compact",
".",
"size",
"<",
"2",
")",
"or",
"text",
".",
"to_s",
".",
"match",
"(",
"/",
"\\A",
"\\s",
"\\z",
"/",
")",
")",
"... | Is the Query blank? (ie, should we not bother searching?)
A query is considered blank if its text is nil or empty string AND
no URL parameters are specified. | [
"Is",
"the",
"Query",
"blank?",
"(",
"ie",
"should",
"we",
"not",
"bother",
"searching?",
")",
"A",
"query",
"is",
"considered",
"blank",
"if",
"its",
"text",
"is",
"nil",
"or",
"empty",
"string",
"AND",
"no",
"URL",
"parameters",
"are",
"specified",
"."... | e087dc2759264ee6f307b926bb2de4ec2406859e | https://github.com/alexreisner/geocoder/blob/e087dc2759264ee6f307b926bb2de4ec2406859e/lib/geocoder/query.rb#L52-L57 | train | Returns true if the text is blank | [
30522,
13366,
8744,
1029,
999,
11498,
5244,
1035,
2445,
1029,
1998,
1006,
1006,
3793,
1012,
2003,
1035,
1037,
1029,
1006,
9140,
1007,
1998,
3793,
30524,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | data/azure_cognitiveservices_face/lib/1.0/generated/azure_cognitiveservices_face/face.rb | Azure::CognitiveServices::Face::V1_0.Face.identify | def identify(face_ids, person_group_id:nil, large_person_group_id:nil, max_num_of_candidates_returned:1, confidence_threshold:nil, custom_headers:nil)
response = identify_async(face_ids, person_group_id:person_group_id, large_person_group_id:large_person_group_id, max_num_of_candidates_returned:max_num_of_candida... | ruby | def identify(face_ids, person_group_id:nil, large_person_group_id:nil, max_num_of_candidates_returned:1, confidence_threshold:nil, custom_headers:nil)
response = identify_async(face_ids, person_group_id:person_group_id, large_person_group_id:large_person_group_id, max_num_of_candidates_returned:max_num_of_candida... | [
"def",
"identify",
"(",
"face_ids",
",",
"person_group_id",
":",
"nil",
",",
"large_person_group_id",
":",
"nil",
",",
"max_num_of_candidates_returned",
":",
"1",
",",
"confidence_threshold",
":",
"nil",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"... | 1-to-many identification to find the closest matches of the specific query
person face from a person group or large person group.
<br/> For each face in the faceIds array, Face Identify will compute
similarities between the query face and all the faces in the person group
(given by personGroupId) or large person gr... | [
"1",
"-",
"to",
"-",
"many",
"identification",
"to",
"find",
"the",
"closest",
"matches",
"of",
"the",
"specific",
"query",
"person",
"face",
"from",
"a",
"person",
"group",
"or",
"large",
"person",
"group",
".",
"<br",
"/",
">",
"For",
"each",
"face",
... | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_cognitiveservices_face/lib/1.0/generated/azure_cognitiveservices_face/face.rb#L480-L483 | train | Identify a set of faces. | [
30522,
13366,
6709,
1006,
2227,
1035,
8909,
2015,
1010,
2711,
1035,
2177,
1035,
8909,
1024,
9152,
2140,
1010,
2312,
1035,
2711,
1035,
2177,
1035,
8909,
1024,
9152,
2140,
1010,
4098,
1035,
16371,
2213,
1035,
1997,
1035,
5347,
1035,
30524,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
brunofacca/active-record-query-trace | lib/active_record_query_trace.rb | ActiveRecordQueryTrace.CustomLogSubscriber.display_backtrace_for_query_type? | def display_backtrace_for_query_type?(payload)
case ActiveRecordQueryTrace.query_type
when :all then true
when :read then db_read_query?(payload)
when :write then !db_read_query?(payload)
else
raise 'Invalid ActiveRecordQueryTrace.query_type value ' \
"#{ActiveRecordQuery... | ruby | def display_backtrace_for_query_type?(payload)
case ActiveRecordQueryTrace.query_type
when :all then true
when :read then db_read_query?(payload)
when :write then !db_read_query?(payload)
else
raise 'Invalid ActiveRecordQueryTrace.query_type value ' \
"#{ActiveRecordQuery... | [
"def",
"display_backtrace_for_query_type?",
"(",
"payload",
")",
"case",
"ActiveRecordQueryTrace",
".",
"query_type",
"when",
":all",
"then",
"true",
"when",
":read",
"then",
"db_read_query?",
"(",
"payload",
")",
"when",
":write",
"then",
"!",
"db_read_query?",
"("... | rubocop:enable Metrics/CyclomaticComplexity
rubocop:enable Metrics/PerceivedComplexity | [
"rubocop",
":",
"enable",
"Metrics",
"/",
"CyclomaticComplexity",
"rubocop",
":",
"enable",
"Metrics",
"/",
"PerceivedComplexity"
] | 9584d5d49cfc2170271f75bbf2773b46145e1be4 | https://github.com/brunofacca/active-record-query-trace/blob/9584d5d49cfc2170271f75bbf2773b46145e1be4/lib/active_record_query_trace.rb#L78-L87 | train | Returns true if the backtrace should be displayed for the given query type. | [
30522,
13366,
4653,
1035,
2067,
6494,
3401,
1035,
2005,
1035,
23032,
1035,
2828,
1029,
1006,
18093,
1007,
2553,
3161,
2890,
27108,
2094,
4226,
2854,
6494,
3401,
1012,
23032,
1035,
2828,
2043,
1024,
2035,
2059,
2995,
2043,
1024,
3191,
2059,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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_slot | def get_site_detector_slot(resource_group_name, site_name, diagnostic_category, detector_name, slot, custom_headers:nil)
first_page = get_site_detector_slot_as_lazy(resource_group_name, site_name, diagnostic_category, detector_name, slot, custom_headers:custom_headers)
first_page.get_all_items
end | ruby | def get_site_detector_slot(resource_group_name, site_name, diagnostic_category, detector_name, slot, custom_headers:nil)
first_page = get_site_detector_slot_as_lazy(resource_group_name, site_name, diagnostic_category, detector_name, slot, custom_headers:custom_headers)
first_page.get_all_items
end | [
"def",
"get_site_detector_slot",
"(",
"resource_group_name",
",",
"site_name",
",",
"diagnostic_category",
",",
"detector_name",
",",
"slot",
",",
"custom_headers",
":",
"nil",
")",
"first_page",
"=",
"get_site_detector_slot_as_lazy",
"(",
"resource_group_name",
",",
"s... | Get Detector
Get Detector
@param resource_group_name [String] Name of the resource group to which the
resource belongs.
@param site_name [String] Site Name
@param diagnostic_category [String] Diagnostic Category
@param detector_name [String] Detector Name
@param slot [String] Slot Name
@param custom_headers [... | [
"Get",
"Detector"
] | 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#L2296-L2299 | train | Gets the information about the detector. | [
30522,
13366,
2131,
1035,
2609,
1035,
19034,
1035,
10453,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2609,
1035,
2171,
1010,
16474,
1035,
4696,
1010,
19034,
1035,
2171,
1010,
10453,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
2034... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/clusters.rb | Azure::EventHub::Mgmt::V2018_01_01_preview.Clusters.begin_put | def begin_put(resource_group_name, cluster_name, custom_headers:nil)
response = begin_put_async(resource_group_name, cluster_name, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def begin_put(resource_group_name, cluster_name, custom_headers:nil)
response = begin_put_async(resource_group_name, cluster_name, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"begin_put",
"(",
"resource_group_name",
",",
"cluster_name",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"begin_put_async",
"(",
"resource_group_name",
",",
"cluster_name",
",",
"custom_headers",
":custom_headers",
")",
".",
"value!",
"response",
... | Creates or updates an instance of an Event Hubs Cluster.
@param resource_group_name [String] Name of the resource group within the
Azure subscription.
@param cluster_name [String] The name of the Event Hubs Cluster.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the ... | [
"Creates",
"or",
"updates",
"an",
"instance",
"of",
"an",
"Event",
"Hubs",
"Cluster",
"."
] | 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/clusters.rb#L547-L550 | train | Creates a cluster in the specified resource group. | [
30522,
13366,
4088,
1035,
2404,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
9324,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
4088,
1035,
2404,
1035,
2004,
6038,
2278,
1006,
7692,
1035,
2177,
1035,
2171,
1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
zendesk/ruby-kafka | lib/kafka/cluster.rb | Kafka.Cluster.add_target_topics | def add_target_topics(topics)
topics = Set.new(topics)
unless topics.subset?(@target_topics)
new_topics = topics - @target_topics
unless new_topics.empty?
@logger.info "New topics added to target list: #{new_topics.to_a.join(', ')}"
@target_topics.merge(new_topics)
... | ruby | def add_target_topics(topics)
topics = Set.new(topics)
unless topics.subset?(@target_topics)
new_topics = topics - @target_topics
unless new_topics.empty?
@logger.info "New topics added to target list: #{new_topics.to_a.join(', ')}"
@target_topics.merge(new_topics)
... | [
"def",
"add_target_topics",
"(",
"topics",
")",
"topics",
"=",
"Set",
".",
"new",
"(",
"topics",
")",
"unless",
"topics",
".",
"subset?",
"(",
"@target_topics",
")",
"new_topics",
"=",
"topics",
"-",
"@target_topics",
"unless",
"new_topics",
".",
"empty?",
"... | Initializes a Cluster with a set of seed brokers.
The cluster will try to fetch cluster metadata from one of the brokers.
@param seed_brokers [Array<URI>]
@param broker_pool [Kafka::BrokerPool]
@param logger [Logger]
Adds a list of topics to the target list. Only the topics on this list will
be queried for meta... | [
"Initializes",
"a",
"Cluster",
"with",
"a",
"set",
"of",
"seed",
"brokers",
"."
] | 2a73471b6a607a52dc85c79301ba522acb4566b5 | https://github.com/zendesk/ruby-kafka/blob/2a73471b6a607a52dc85c79301ba522acb4566b5/lib/kafka/cluster.rb#L42-L55 | train | Add topics to the target list | [
30522,
13366,
5587,
1035,
4539,
1035,
7832,
1006,
7832,
1007,
7832,
1027,
2275,
1012,
2047,
1006,
7832,
1007,
4983,
7832,
1012,
16745,
1029,
1006,
1030,
4539,
1035,
7832,
1007,
2047,
1035,
7832,
1027,
7832,
1011,
1030,
4539,
1035,
7832,
4... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_stor_simple8000_series/lib/2017-06-01/generated/azure_mgmt_stor_simple8000_series/devices.rb | Azure::StorSimple8000Series::Mgmt::V2017_06_01.Devices.list_failover_sets_with_http_info | def list_failover_sets_with_http_info(device_name, resource_group_name, manager_name, custom_headers:nil)
list_failover_sets_async(device_name, resource_group_name, manager_name, custom_headers:custom_headers).value!
end | ruby | def list_failover_sets_with_http_info(device_name, resource_group_name, manager_name, custom_headers:nil)
list_failover_sets_async(device_name, resource_group_name, manager_name, custom_headers:custom_headers).value!
end | [
"def",
"list_failover_sets_with_http_info",
"(",
"device_name",
",",
"resource_group_name",
",",
"manager_name",
",",
"custom_headers",
":",
"nil",
")",
"list_failover_sets_async",
"(",
"device_name",
",",
"resource_group_name",
",",
"manager_name",
",",
"custom_headers",
... | Returns all failover sets for a given device and their eligibility for
participating in a failover. A failover set refers to a set of volume
containers that need to be failed-over as a single unit to maintain data
integrity.
@param device_name [String] The device name
@param resource_group_name [String] The resou... | [
"Returns",
"all",
"failover",
"sets",
"for",
"a",
"given",
"device",
"and",
"their",
"eligibility",
"for",
"participating",
"in",
"a",
"failover",
".",
"A",
"failover",
"set",
"refers",
"to",
"a",
"set",
"of",
"volume",
"containers",
"that",
"need",
"to",
... | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_stor_simple8000_series/lib/2017-06-01/generated/azure_mgmt_stor_simple8000_series/devices.rb#L627-L629 | train | Gets the list of failover sets for the device. | [
30522,
13366,
30524,
2004,
6038,
2278,
1006,
5080,
1035,
2171,
1010,
7692,
1035,
2177,
1035,
2171,
1010,
3208,
1035,
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... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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.