repo stringclasses 237
values | path stringlengths 11 168 | func_name stringlengths 10 147 | original_string stringlengths 79 124k | language stringclasses 1
value | code stringlengths 79 124k | code_tokens listlengths 16 45.3k | docstring stringlengths 4 23.5k | docstring_tokens listlengths 1 452 | sha stringclasses 237
values | url stringlengths 95 268 | partition stringclasses 1
value | summary stringlengths 8 229 | input_ids listlengths 502 502 | token_type_ids listlengths 502 502 | attention_mask listlengths 502 502 | labels listlengths 502 502 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Azure/azure-sdk-for-ruby | management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/sync_agents.rb | Azure::SQL::Mgmt::V2015_05_01_preview.SyncAgents.generate_key | def generate_key(resource_group_name, server_name, sync_agent_name, custom_headers:nil)
response = generate_key_async(resource_group_name, server_name, sync_agent_name, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def generate_key(resource_group_name, server_name, sync_agent_name, custom_headers:nil)
response = generate_key_async(resource_group_name, server_name, sync_agent_name, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"generate_key",
"(",
"resource_group_name",
",",
"server_name",
",",
"sync_agent_name",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"generate_key_async",
"(",
"resource_group_name",
",",
"server_name",
",",
"sync_agent_name",
",",
"custom_headers",
... | Generates a sync agent key.
@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 on which the sync agent is
hosted.
@param sync_agent_name [Str... | [
"Generates",
"a",
"sync",
"agent",
"key",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/sync_agents.rb#L345-L348 | train | Generate a key for a given sync agent. | [
30522,
13366,
9699,
1035,
3145,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
8241,
1035,
2171,
1010,
26351,
1035,
4005,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
9699,
1035,
3145,
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... |
appium/ruby_lib | lib/appium_lib/ios/common/helper.rb | Appium.Ios._all_pred | def _all_pred(opts)
predicate = opts[:predicate]
raise 'predicate must be provided' unless predicate
visible = opts.fetch :visible, true
%($.mainApp().getAllWithPredicate("#{predicate}", #{visible});)
end | ruby | def _all_pred(opts)
predicate = opts[:predicate]
raise 'predicate must be provided' unless predicate
visible = opts.fetch :visible, true
%($.mainApp().getAllWithPredicate("#{predicate}", #{visible});)
end | [
"def",
"_all_pred",
"(",
"opts",
")",
"predicate",
"=",
"opts",
"[",
":predicate",
"]",
"raise",
"'predicate must be provided'",
"unless",
"predicate",
"visible",
"=",
"opts",
".",
"fetch",
":visible",
",",
"true",
"%($.mainApp().getAllWithPredicate(\"#{predicate}\", #{... | predicate - the predicate to evaluate on the main app
visible - if true, only visible elements are returned. default true | [
"predicate",
"-",
"the",
"predicate",
"to",
"evaluate",
"on",
"the",
"main",
"app"
] | 1f5898400dd1928bfe42ddd5f842d1f8738f2f76 | https://github.com/appium/ruby_lib/blob/1f5898400dd1928bfe42ddd5f842d1f8738f2f76/lib/appium_lib/ios/common/helper.rb#L376-L382 | train | Returns all the terms that match the predicate | [
30522,
13366,
1035,
2035,
1035,
3653,
2094,
1006,
23569,
2015,
1007,
3653,
16467,
1027,
23569,
2015,
1031,
1024,
3653,
16467,
1033,
5333,
1005,
3653,
16467,
2442,
2022,
3024,
1005,
4983,
3653,
16467,
5710,
1027,
23569,
2015,
1012,
18584,
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_policy_insights/lib/2018-07-01-preview/generated/azure_mgmt_policy_insights/remediations.rb | Azure::PolicyInsights::Mgmt::V2018_07_01_preview.Remediations.list_deployments_at_resource_group_next | def list_deployments_at_resource_group_next(next_page_link, custom_headers:nil)
response = list_deployments_at_resource_group_next_async(next_page_link, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def list_deployments_at_resource_group_next(next_page_link, custom_headers:nil)
response = list_deployments_at_resource_group_next_async(next_page_link, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"list_deployments_at_resource_group_next",
"(",
"next_page_link",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"list_deployments_at_resource_group_next_async",
"(",
"next_page_link",
",",
"custom_headers",
":custom_headers",
")",
".",
"value!",
"response",
... | Gets all deployments for a remediation at resource group scope.
@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 [RemediationDeploymentsListResul... | [
"Gets",
"all",
"deployments",
"for",
"a",
"remediation",
"at",
"resource",
"group",
"scope",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_policy_insights/lib/2018-07-01-preview/generated/azure_mgmt_policy_insights/remediations.rb#L2709-L2712 | train | Gets the list of deployments at resource group scope. | [
30522,
13366,
2862,
1035,
10813,
2015,
1035,
2012,
1035,
7692,
1035,
2177,
1035,
2279,
1006,
2279,
1035,
3931,
1035,
4957,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
2862,
1035,
10813,
2015,
1035,
2012,
1035,
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... |
randym/axlsx | lib/axlsx/workbook/workbook.rb | Axlsx.Workbook.sheet_by_name | def sheet_by_name(name)
index = @worksheets.index { |sheet| sheet.name == name }
@worksheets[index] if index
end | ruby | def sheet_by_name(name)
index = @worksheets.index { |sheet| sheet.name == name }
@worksheets[index] if index
end | [
"def",
"sheet_by_name",
"(",
"name",
")",
"index",
"=",
"@worksheets",
".",
"index",
"{",
"|",
"sheet",
"|",
"sheet",
".",
"name",
"==",
"name",
"}",
"@worksheets",
"[",
"index",
"]",
"if",
"index",
"end"
] | A quick helper to retrive a worksheet by name
@param [String] name The name of the sheet you are looking for
@return [Worksheet] The sheet found, or nil | [
"A",
"quick",
"helper",
"to",
"retrive",
"a",
"worksheet",
"by",
"name"
] | c593a08b2a929dac7aa8dc418b55e26b4c49dc34 | https://github.com/randym/axlsx/blob/c593a08b2a929dac7aa8dc418b55e26b4c49dc34/lib/axlsx/workbook/workbook.rb#L195-L198 | train | Returns the sheet with the given name. | [
30522,
13366,
7123,
1035,
2011,
1035,
2171,
1006,
2171,
1007,
5950,
1027,
1030,
2573,
21030,
3215,
1012,
5950,
1063,
1064,
7123,
1064,
7123,
1012,
2171,
1027,
1027,
2171,
1065,
1030,
2573,
21030,
3215,
1031,
5950,
1033,
2065,
5950,
2203,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
randym/axlsx | lib/axlsx/stylesheet/styles.rb | Axlsx.Styles.add_style | def add_style(options={})
# Default to :xf
options[:type] ||= :xf
raise ArgumentError, "Type must be one of [:xf, :dxf]" unless [:xf, :dxf].include?(options[:type] )
fill = parse_fill_options options
font = parse_font_options options
numFmt = parse_num_fmt_options options
bord... | ruby | def add_style(options={})
# Default to :xf
options[:type] ||= :xf
raise ArgumentError, "Type must be one of [:xf, :dxf]" unless [:xf, :dxf].include?(options[:type] )
fill = parse_fill_options options
font = parse_font_options options
numFmt = parse_num_fmt_options options
bord... | [
"def",
"add_style",
"(",
"options",
"=",
"{",
"}",
")",
"# Default to :xf",
"options",
"[",
":type",
"]",
"||=",
":xf",
"raise",
"ArgumentError",
",",
"\"Type must be one of [:xf, :dxf]\"",
"unless",
"[",
":xf",
",",
":dxf",
"]",
".",
"include?",
"(",
"options... | Creates a new Styles object and prepopulates it with the requires objects to generate a valid package style part.
Drastically simplifies style creation and management.
@return [Integer]
@option options [String] fg_color The text color
@option options [Integer] sz The text size
@option options [Boolean] b Indicates... | [
"Creates",
"a",
"new",
"Styles",
"object",
"and",
"prepopulates",
"it",
"with",
"the",
"requires",
"objects",
"to",
"generate",
"a",
"valid",
"package",
"style",
"part",
".",
"Drastically",
"simplifies",
"style",
"creation",
"and",
"management",
".",
"@return",
... | c593a08b2a929dac7aa8dc418b55e26b4c49dc34 | https://github.com/randym/axlsx/blob/c593a08b2a929dac7aa8dc418b55e26b4c49dc34/lib/axlsx/stylesheet/styles.rb#L222-L242 | train | Adds a style to the cell. | [
30522,
13366,
5587,
1035,
2806,
1006,
7047,
1027,
1063,
1065,
1007,
1001,
12398,
2000,
1024,
1060,
2546,
7047,
1031,
1024,
2828,
1033,
1064,
1064,
1027,
1024,
1060,
2546,
5333,
6685,
2121,
29165,
1010,
1000,
2828,
2442,
2022,
2028,
1997,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
rails/rails | activesupport/lib/active_support/message_verifier.rb | ActiveSupport.MessageVerifier.verified | def verified(signed_message, purpose: nil, **)
if valid_message?(signed_message)
begin
data = signed_message.split("--")[0]
message = Messages::Metadata.verify(decode(data), purpose)
@serializer.load(message) if message
rescue ArgumentError => argument_error
... | ruby | def verified(signed_message, purpose: nil, **)
if valid_message?(signed_message)
begin
data = signed_message.split("--")[0]
message = Messages::Metadata.verify(decode(data), purpose)
@serializer.load(message) if message
rescue ArgumentError => argument_error
... | [
"def",
"verified",
"(",
"signed_message",
",",
"purpose",
":",
"nil",
",",
"**",
")",
"if",
"valid_message?",
"(",
"signed_message",
")",
"begin",
"data",
"=",
"signed_message",
".",
"split",
"(",
"\"--\"",
")",
"[",
"0",
"]",
"message",
"=",
"Messages",
... | Decodes the signed message using the +MessageVerifier+'s secret.
verifier = ActiveSupport::MessageVerifier.new 's3Krit'
signed_message = verifier.generate 'a private message'
verifier.verified(signed_message) # => 'a private message'
Returns +nil+ if the message was not signed with the same secret.
oth... | [
"Decodes",
"the",
"signed",
"message",
"using",
"the",
"+",
"MessageVerifier",
"+",
"s",
"secret",
"."
] | 85a8bc644be69908f05740a5886ec19cd3679df5 | https://github.com/rails/rails/blob/85a8bc644be69908f05740a5886ec19cd3679df5/activesupport/lib/active_support/message_verifier.rb#L150-L161 | train | verify the message | [
30522,
13366,
20119,
1006,
2772,
1035,
4471,
1010,
3800,
1024,
9152,
2140,
1010,
1008,
1008,
1007,
2065,
9398,
1035,
4471,
1029,
1006,
2772,
1035,
4471,
1007,
4088,
2951,
1027,
2772,
1035,
4471,
1012,
3975,
1006,
1000,
1011,
1011,
1000,
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... |
devise-security/devise-security | lib/devise-security/routes.rb | ActionDispatch::Routing.Mapper.devise_verification_code | def devise_verification_code(mapping, controllers)
resource :paranoid_verification_code, only: [:show, :update], path: mapping.path_names[:verification_code], controller: controllers[:paranoid_verification_code]
end | ruby | def devise_verification_code(mapping, controllers)
resource :paranoid_verification_code, only: [:show, :update], path: mapping.path_names[:verification_code], controller: controllers[:paranoid_verification_code]
end | [
"def",
"devise_verification_code",
"(",
"mapping",
",",
"controllers",
")",
"resource",
":paranoid_verification_code",
",",
"only",
":",
"[",
":show",
",",
":update",
"]",
",",
"path",
":",
"mapping",
".",
"path_names",
"[",
":verification_code",
"]",
",",
"cont... | route for handle paranoid verification | [
"route",
"for",
"handle",
"paranoid",
"verification"
] | d0b44a7bb249f6763641f45d34dd52e7fda3fca2 | https://github.com/devise-security/devise-security/blob/d0b44a7bb249f6763641f45d34dd52e7fda3fca2/lib/devise-security/routes.rb#L14-L16 | train | This method is used to devise the verification code of a page | [
30522,
13366,
14386,
3366,
1035,
22616,
1035,
3642,
1006,
12375,
1010,
21257,
1007,
7692,
1024,
19810,
1035,
22616,
1035,
3642,
1010,
2069,
1024,
1031,
1024,
2265,
1010,
1024,
10651,
1033,
1010,
4130,
1024,
12375,
1012,
4130,
1035,
3415,
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_sql/lib/2014-04-01/generated/azure_mgmt_sql/server_azure_adadministrators.rb | Azure::SQL::Mgmt::V2014_04_01.ServerAzureADAdministrators.create_or_update_async | def create_or_update_async(resource_group_name, server_name, properties, custom_headers:nil)
# Send request
promise = begin_create_or_update_async(resource_group_name, server_name, properties, custom_headers:custom_headers)
promise = promise.then do |response|
# Defining deserialization metho... | ruby | def create_or_update_async(resource_group_name, server_name, properties, custom_headers:nil)
# Send request
promise = begin_create_or_update_async(resource_group_name, server_name, properties, custom_headers:custom_headers)
promise = promise.then do |response|
# Defining deserialization metho... | [
"def",
"create_or_update_async",
"(",
"resource_group_name",
",",
"server_name",
",",
"properties",
",",
"custom_headers",
":",
"nil",
")",
"# Send request",
"promise",
"=",
"begin_create_or_update_async",
"(",
"resource_group_name",
",",
"server_name",
",",
"properties",... | @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 properties [ServerAzureADAdministrator] The required parameters for
creating or upda... | [
"@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",
"por... | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/server_azure_adadministrators.rb#L60-L76 | train | Creates or updates a server in the specified subscription. | [
30522,
13366,
3443,
1035,
2030,
1035,
10651,
1035,
2004,
6038,
2278,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
8241,
1035,
2171,
1010,
5144,
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... |
mislav/will_paginate | lib/will_paginate/collection.rb | WillPaginate.Collection.replace | def replace(array)
result = super
# The collection is shorter then page limit? Rejoice, because
# then we know that we are on the last page!
if total_entries.nil? and length < per_page and (current_page == 1 or length > 0)
self.total_entries = offset + length
end
resu... | ruby | def replace(array)
result = super
# The collection is shorter then page limit? Rejoice, because
# then we know that we are on the last page!
if total_entries.nil? and length < per_page and (current_page == 1 or length > 0)
self.total_entries = offset + length
end
resu... | [
"def",
"replace",
"(",
"array",
")",
"result",
"=",
"super",
"# The collection is shorter then page limit? Rejoice, because",
"# then we know that we are on the last page!",
"if",
"total_entries",
".",
"nil?",
"and",
"length",
"<",
"per_page",
"and",
"(",
"current_page",
"=... | This is a magic wrapper for the original Array#replace method. It serves
for populating the paginated collection after initialization.
Why magic? Because it tries to guess the total number of entries judging
by the size of given array. If it is shorter than +per_page+ limit, then we
know we're on the last page. Th... | [
"This",
"is",
"a",
"magic",
"wrapper",
"for",
"the",
"original",
"Array#replace",
"method",
".",
"It",
"serves",
"for",
"populating",
"the",
"paginated",
"collection",
"after",
"initialization",
"."
] | 63e84fb7e7508231ca83d94c524bfab5fbe9a578 | https://github.com/mislav/will_paginate/blob/63e84fb7e7508231ca83d94c524bfab5fbe9a578/lib/will_paginate/collection.rb#L124-L134 | train | Replace the array with the current array. | [
30522,
13366,
5672,
1006,
9140,
1007,
2765,
1027,
3565,
1001,
1996,
3074,
2003,
7820,
2059,
3931,
5787,
1029,
2128,
5558,
6610,
1010,
2138,
1001,
2059,
2057,
2113,
2008,
2057,
2024,
2006,
1996,
2197,
3931,
999,
2065,
2561,
1035,
10445,
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_signalr/lib/2018-03-01-preview/generated/azure_mgmt_signalr/signal_r.rb | Azure::Signalr::Mgmt::V2018_03_01_preview.SignalR.create_or_update_async | def create_or_update_async(resource_group_name, resource_name, parameters:nil, custom_headers:nil)
# Send request
promise = begin_create_or_update_async(resource_group_name, resource_name, parameters:parameters, custom_headers:custom_headers)
promise = promise.then do |response|
# Defining de... | ruby | def create_or_update_async(resource_group_name, resource_name, parameters:nil, custom_headers:nil)
# Send request
promise = begin_create_or_update_async(resource_group_name, resource_name, parameters:parameters, custom_headers:custom_headers)
promise = promise.then do |response|
# Defining de... | [
"def",
"create_or_update_async",
"(",
"resource_group_name",
",",
"resource_name",
",",
"parameters",
":",
"nil",
",",
"custom_headers",
":",
"nil",
")",
"# Send request",
"promise",
"=",
"begin_create_or_update_async",
"(",
"resource_group_name",
",",
"resource_name",
... | @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 resource_name [String] The name of the SignalR resource.
@param parameters [SignalRCreateParameters] Parameters for the create or
update... | [
"@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",
"por... | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_signalr/lib/2018-03-01-preview/generated/azure_mgmt_signalr/signal_r.rb#L582-L598 | train | Creates or updates a signalr resource. | [
30522,
13366,
3443,
1035,
2030,
1035,
10651,
1035,
2004,
6038,
2278,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
7692,
1035,
2171,
1010,
11709,
1024,
9152,
2140,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
1001,
4604,
5227,
4872,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_network/lib/2018-07-01/generated/azure_mgmt_network/virtual_network_gateways.rb | Azure::Network::Mgmt::V2018_07_01.VirtualNetworkGateways.vpn_device_configuration_script_with_http_info | def vpn_device_configuration_script_with_http_info(resource_group_name, virtual_network_gateway_connection_name, parameters, custom_headers:nil)
vpn_device_configuration_script_async(resource_group_name, virtual_network_gateway_connection_name, parameters, custom_headers:custom_headers).value!
end | ruby | def vpn_device_configuration_script_with_http_info(resource_group_name, virtual_network_gateway_connection_name, parameters, custom_headers:nil)
vpn_device_configuration_script_async(resource_group_name, virtual_network_gateway_connection_name, parameters, custom_headers:custom_headers).value!
end | [
"def",
"vpn_device_configuration_script_with_http_info",
"(",
"resource_group_name",
",",
"virtual_network_gateway_connection_name",
",",
"parameters",
",",
"custom_headers",
":",
"nil",
")",
"vpn_device_configuration_script_async",
"(",
"resource_group_name",
",",
"virtual_network... | Gets a xml format representation for vpn device configuration script.
@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 for which the configuration script is
generated.
@param parameters [V... | [
"Gets",
"a",
"xml",
"format",
"representation",
"for",
"vpn",
"device",
"configuration",
"script",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_network/lib/2018-07-01/generated/azure_mgmt_network/virtual_network_gateways.rb#L1086-L1088 | train | Gets the vpn device configuration script for the specified virtual network gateway connection. | [
30522,
13366,
21210,
2078,
1035,
5080,
1035,
9563,
1035,
5896,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
7484,
1035,
2897,
1035,
11909,
1035,
4434,
1035,
2171,
1010,
11709,
1010,
7661,
1035,
20346,
2015,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_network/lib/2018-01-01/generated/azure_mgmt_network/application_gateways.rb | Azure::Network::Mgmt::V2018_01_01.ApplicationGateways.stop_async | def stop_async(resource_group_name, application_gateway_name, custom_headers:nil)
# Send request
promise = begin_stop_async(resource_group_name, application_gateway_name, custom_headers:custom_headers)
promise = promise.then do |response|
# Defining deserialization method.
deserialize... | ruby | def stop_async(resource_group_name, application_gateway_name, custom_headers:nil)
# Send request
promise = begin_stop_async(resource_group_name, application_gateway_name, custom_headers:custom_headers)
promise = promise.then do |response|
# Defining deserialization method.
deserialize... | [
"def",
"stop_async",
"(",
"resource_group_name",
",",
"application_gateway_name",
",",
"custom_headers",
":",
"nil",
")",
"# Send request",
"promise",
"=",
"begin_stop_async",
"(",
"resource_group_name",
",",
"application_gateway_name",
",",
"custom_headers",
":custom_heade... | @param resource_group_name [String] The name of the resource group.
@param application_gateway_name [String] The name of the application gateway.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request.
@return [Concurrent::Promise] promise which provides asyn... | [
"@param",
"resource_group_name",
"[",
"String",
"]",
"The",
"name",
"of",
"the",
"resource",
"group",
".",
"@param",
"application_gateway_name",
"[",
"String",
"]",
"The",
"name",
"of",
"the",
"application",
"gateway",
".",
"@param",
"custom_headers",
"[",
"Hash... | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_network/lib/2018-01-01/generated/azure_mgmt_network/application_gateways.rb#L478-L492 | train | Stops an application gateway in an application group. | [
30522,
13366,
2644,
1035,
2004,
6038,
2278,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
4646,
1035,
11909,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
1001,
4604,
5227,
4872,
1027,
4088,
1035,
2644,
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... |
chloerei/alipay | lib/alipay/client.rb | Alipay.Client.sign | def sign(params)
string = params_to_string(params)
case @sign_type
when 'RSA'
::Alipay::Sign::RSA.sign(@app_private_key, string)
when 'RSA2'
::Alipay::Sign::RSA2.sign(@app_private_key, string)
else
raise "Unsupported sign_type: #{@sign_type}"
end
end | ruby | def sign(params)
string = params_to_string(params)
case @sign_type
when 'RSA'
::Alipay::Sign::RSA.sign(@app_private_key, string)
when 'RSA2'
::Alipay::Sign::RSA2.sign(@app_private_key, string)
else
raise "Unsupported sign_type: #{@sign_type}"
end
end | [
"def",
"sign",
"(",
"params",
")",
"string",
"=",
"params_to_string",
"(",
"params",
")",
"case",
"@sign_type",
"when",
"'RSA'",
"::",
"Alipay",
"::",
"Sign",
"::",
"RSA",
".",
"sign",
"(",
"@app_private_key",
",",
"string",
")",
"when",
"'RSA2'",
"::",
... | Generate sign for params. | [
"Generate",
"sign",
"for",
"params",
"."
] | a525989b659da970e08bc8fcd1b004453bfed89f | https://github.com/chloerei/alipay/blob/a525989b659da970e08bc8fcd1b004453bfed89f/lib/alipay/client.rb#L133-L144 | train | Sign the params | [
30522,
13366,
3696,
1006,
11498,
5244,
1007,
5164,
1027,
11498,
5244,
1035,
2000,
1035,
5164,
1006,
11498,
5244,
1007,
2553,
1030,
3696,
1035,
2828,
2043,
1005,
12667,
2050,
1005,
1024,
1024,
4862,
4502,
2100,
1024,
1024,
3696,
1024,
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... |
jekyll/jekyll | lib/jekyll/cleaner.rb | Jekyll.Cleaner.obsolete_files | def obsolete_files
out = (existing_files - new_files - new_dirs + replaced_files).to_a
Jekyll::Hooks.trigger :clean, :on_obsolete, out
out
end | ruby | def obsolete_files
out = (existing_files - new_files - new_dirs + replaced_files).to_a
Jekyll::Hooks.trigger :clean, :on_obsolete, out
out
end | [
"def",
"obsolete_files",
"out",
"=",
"(",
"existing_files",
"-",
"new_files",
"-",
"new_dirs",
"+",
"replaced_files",
")",
".",
"to_a",
"Jekyll",
"::",
"Hooks",
".",
"trigger",
":clean",
",",
":on_obsolete",
",",
"out",
"out",
"end"
] | Private: The list of files and directories to be deleted during cleanup process
Returns an Array of the file and directory paths | [
"Private",
":",
"The",
"list",
"of",
"files",
"and",
"directories",
"to",
"be",
"deleted",
"during",
"cleanup",
"process"
] | fd74fe3e93a1fb506fa6621a2e271d7b9c5c3e3b | https://github.com/jekyll/jekyll/blob/fd74fe3e93a1fb506fa6621a2e271d7b9c5c3e3b/lib/jekyll/cleaner.rb#L24-L28 | train | Returns the array of the obsolete files. | [
30522,
13366,
15832,
1035,
6764,
2041,
1027,
1006,
4493,
1035,
6764,
1011,
2047,
1035,
6764,
1011,
2047,
1035,
16101,
2015,
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... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
jekyll/jekyll | lib/jekyll/readers/data_reader.rb | Jekyll.DataReader.read_data_file | def read_data_file(path)
case File.extname(path).downcase
when ".csv"
CSV.read(path,
:headers => true,
:encoding => site.config["encoding"]).map(&:to_hash)
when ".tsv"
CSV.read(path,
:col_sep => "\t",
:headers => tr... | ruby | def read_data_file(path)
case File.extname(path).downcase
when ".csv"
CSV.read(path,
:headers => true,
:encoding => site.config["encoding"]).map(&:to_hash)
when ".tsv"
CSV.read(path,
:col_sep => "\t",
:headers => tr... | [
"def",
"read_data_file",
"(",
"path",
")",
"case",
"File",
".",
"extname",
"(",
"path",
")",
".",
"downcase",
"when",
"\".csv\"",
"CSV",
".",
"read",
"(",
"path",
",",
":headers",
"=>",
"true",
",",
":encoding",
"=>",
"site",
".",
"config",
"[",
"\"enc... | Determines how to read a data file.
Returns the contents of the data file. | [
"Determines",
"how",
"to",
"read",
"a",
"data",
"file",
"."
] | fd74fe3e93a1fb506fa6621a2e271d7b9c5c3e3b | https://github.com/jekyll/jekyll/blob/fd74fe3e93a1fb506fa6621a2e271d7b9c5c3e3b/lib/jekyll/readers/data_reader.rb#L54-L68 | train | Reads a data file from a file | [
30522,
13366,
3191,
1035,
2951,
1035,
5371,
1006,
4130,
1007,
2553,
5371,
1012,
4654,
2102,
18442,
1006,
4130,
1007,
1012,
2091,
18382,
2043,
1000,
1012,
20116,
2615,
1000,
20116,
2615,
1012,
3191,
1006,
4130,
1010,
1024,
20346,
2015,
1027,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_event_grid/lib/2019-02-01-preview/generated/azure_mgmt_event_grid/topics.rb | Azure::EventGrid::Mgmt::V2019_02_01_preview.Topics.begin_update | def begin_update(resource_group_name, topic_name, topic_update_parameters, custom_headers:nil)
response = begin_update_async(resource_group_name, topic_name, topic_update_parameters, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def begin_update(resource_group_name, topic_name, topic_update_parameters, custom_headers:nil)
response = begin_update_async(resource_group_name, topic_name, topic_update_parameters, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"begin_update",
"(",
"resource_group_name",
",",
"topic_name",
",",
"topic_update_parameters",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"begin_update_async",
"(",
"resource_group_name",
",",
"topic_name",
",",
"topic_update_parameters",
",",
"cust... | Update a topic
Asynchronously updates a topic with the specified parameters.
@param resource_group_name [String] The name of the resource group within the
user's subscription.
@param topic_name [String] Name of the topic
@param topic_update_parameters [TopicUpdateParameters] Topic update
information
@param cus... | [
"Update",
"a",
"topic"
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_event_grid/lib/2019-02-01-preview/generated/azure_mgmt_event_grid/topics.rb#L1006-L1009 | train | Updates a topic. | [
30522,
13366,
4088,
1035,
10651,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
8476,
1035,
2171,
1010,
8476,
1035,
10651,
1035,
11709,
1010,
7661,
1035,
20346,
30524,
6038,
2278,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
8476,
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_container_registry/lib/2018-09-01/generated/azure_mgmt_container_registry/runs.rb | Azure::ContainerRegistry::Mgmt::V2018_09_01.Runs.cancel | def cancel(resource_group_name, registry_name, run_id, custom_headers:nil)
response = cancel_async(resource_group_name, registry_name, run_id, custom_headers:custom_headers).value!
nil
end | ruby | def cancel(resource_group_name, registry_name, run_id, custom_headers:nil)
response = cancel_async(resource_group_name, registry_name, run_id, custom_headers:custom_headers).value!
nil
end | [
"def",
"cancel",
"(",
"resource_group_name",
",",
"registry_name",
",",
"run_id",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"cancel_async",
"(",
"resource_group_name",
",",
"registry_name",
",",
"run_id",
",",
"custom_headers",
":custom_headers",
")",... | Cancel an existing run.
@param resource_group_name [String] The name of the resource group to which
the container registry belongs.
@param registry_name [String] The name of the container registry.
@param run_id [String] The run ID.
@param custom_headers [Hash{String => String}] A hash of custom headers that
wil... | [
"Cancel",
"an",
"existing",
"run",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_container_registry/lib/2018-09-01/generated/azure_mgmt_container_registry/runs.rb#L402-L405 | train | Cancels a run. | [
30522,
13366,
17542,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
15584,
1035,
2171,
1010,
2448,
1035,
8909,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
17542,
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... |
aws/aws-sdk-ruby | gems/aws-sdk-ec2/lib/aws-sdk-ec2/vpc.rb | Aws::EC2.Vpc.detach_internet_gateway | def detach_internet_gateway(options = {})
options = options.merge(vpc_id: @id)
resp = @client.detach_internet_gateway(options)
resp.data
end | ruby | def detach_internet_gateway(options = {})
options = options.merge(vpc_id: @id)
resp = @client.detach_internet_gateway(options)
resp.data
end | [
"def",
"detach_internet_gateway",
"(",
"options",
"=",
"{",
"}",
")",
"options",
"=",
"options",
".",
"merge",
"(",
"vpc_id",
":",
"@id",
")",
"resp",
"=",
"@client",
".",
"detach_internet_gateway",
"(",
"options",
")",
"resp",
".",
"data",
"end"
] | @example Request syntax with placeholder values
vpc.detach_internet_gateway({
dry_run: false,
internet_gateway_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 r... | [
"@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#L575-L579 | train | Detaches the internet gateway from this VPC | [
30522,
13366,
20010,
6776,
1035,
4274,
1035,
11909,
1006,
7047,
1027,
1063,
1065,
1007,
7047,
1027,
7047,
1012,
13590,
1006,
21210,
2278,
1035,
8909,
1024,
1030,
8909,
1007,
24501,
2361,
1027,
1030,
7396,
1012,
20010,
6776,
1035,
4274,
1035... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | data/azure_key_vault/lib/2016-10-01/generated/azure_key_vault/key_vault_client.rb | Azure::KeyVault::V2016_10_01.KeyVaultClient.get_storage_accounts_as_lazy | def get_storage_accounts_as_lazy(vault_base_url, maxresults:nil, custom_headers:nil)
first_page = get_storage_accounts_as_lazy_as_lazy(vault_base_url, maxresults:maxresults, custom_headers:custom_headers)
first_page.get_all_items
end | ruby | def get_storage_accounts_as_lazy(vault_base_url, maxresults:nil, custom_headers:nil)
first_page = get_storage_accounts_as_lazy_as_lazy(vault_base_url, maxresults:maxresults, custom_headers:custom_headers)
first_page.get_all_items
end | [
"def",
"get_storage_accounts_as_lazy",
"(",
"vault_base_url",
",",
"maxresults",
":",
"nil",
",",
"custom_headers",
":",
"nil",
")",
"first_page",
"=",
"get_storage_accounts_as_lazy_as_lazy",
"(",
"vault_base_url",
",",
"maxresults",
":",
"maxresults",
",",
"custom_head... | List storage accounts managed by the specified key vault. This operation
requires the storage/list permission.
@param vault_base_url [String] The vault name, for example
https://myvault.vault.azure.net.
@param maxresults [Integer] Maximum number of results to return in a page. If
not specified the service will re... | [
"List",
"storage",
"accounts",
"managed",
"by",
"the",
"specified",
"key",
"vault",
".",
"This",
"operation",
"requires",
"the",
"storage",
"/",
"list",
"permission",
"."
] | 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#L10553-L10556 | train | Gets all the Azure Storage accounts in a specified vault. | [
30522,
13366,
2131,
1035,
5527,
1035,
6115,
1035,
2004,
1035,
13971,
1006,
11632,
1035,
2918,
1035,
24471,
2140,
1010,
4098,
6072,
11314,
2015,
1024,
9152,
2140,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
2034,
30524,
2015,
1024... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
comfy/comfortable-mexican-sofa | lib/comfortable_mexican_sofa/seeds/page/importer.rb | ComfortableMexicanSofa::Seeds::Page.Importer.construct_fragments_attributes | def construct_fragments_attributes(hash, record, path)
frag_identifiers = []
frag_attributes = hash.collect do |frag_header, frag_content|
tag, identifier = frag_header.split
frag_hash = {
identifier: identifier,
tag: tag
}
# tracking fragments tha... | ruby | def construct_fragments_attributes(hash, record, path)
frag_identifiers = []
frag_attributes = hash.collect do |frag_header, frag_content|
tag, identifier = frag_header.split
frag_hash = {
identifier: identifier,
tag: tag
}
# tracking fragments tha... | [
"def",
"construct_fragments_attributes",
"(",
"hash",
",",
"record",
",",
"path",
")",
"frag_identifiers",
"=",
"[",
"]",
"frag_attributes",
"=",
"hash",
".",
"collect",
"do",
"|",
"frag_header",
",",
"frag_content",
"|",
"tag",
",",
"identifier",
"=",
"frag_h... | Constructing frag attributes hash that can be assigned to page or translation
also returning list of frag identifiers so we can destroy old ones | [
"Constructing",
"frag",
"attributes",
"hash",
"that",
"can",
"be",
"assigned",
"to",
"page",
"or",
"translation",
"also",
"returning",
"list",
"of",
"frag",
"identifiers",
"so",
"we",
"can",
"destroy",
"old",
"ones"
] | 38a31428f6e2c07d5bda64f0371eebfb29a3abc4 | https://github.com/comfy/comfortable-mexican-sofa/blob/38a31428f6e2c07d5bda64f0371eebfb29a3abc4/lib/comfortable_mexican_sofa/seeds/page/importer.rb#L154-L184 | train | constructs the attributes for a fragment | [
30522,
13366,
9570,
1035,
10341,
1035,
12332,
1006,
23325,
1010,
2501,
1010,
4130,
1007,
25312,
2290,
1035,
8909,
4765,
28295,
1027,
1031,
1033,
25312,
2290,
1035,
12332,
1027,
23325,
1012,
8145,
2079,
1064,
25312,
2290,
1035,
20346,
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_policy_insights/lib/2018-07-01-preview/generated/azure_mgmt_policy_insights/policy_tracked_resources.rb | Azure::PolicyInsights::Mgmt::V2018_07_01_preview.PolicyTrackedResources.list_query_results_for_subscription_next | def list_query_results_for_subscription_next(next_page_link, custom_headers:nil)
response = list_query_results_for_subscription_next_async(next_page_link, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def list_query_results_for_subscription_next(next_page_link, custom_headers:nil)
response = list_query_results_for_subscription_next_async(next_page_link, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"list_query_results_for_subscription_next",
"(",
"next_page_link",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"list_query_results_for_subscription_next_async",
"(",
"next_page_link",
",",
"custom_headers",
":custom_headers",
")",
".",
"value!",
"response"... | Queries policy tracked resources under the subscription.
@param next_page_link [String] The NextLink from the previous successful call
to List operation.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request.
@return [PolicyTrackedResourcesQueryResults] op... | [
"Queries",
"policy",
"tracked",
"resources",
"under",
"the",
"subscription",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_policy_insights/lib/2018-07-01-preview/generated/azure_mgmt_policy_insights/policy_tracked_resources.rb#L518-L521 | train | Gets the list of query results for the subscription. | [
30522,
13366,
2862,
1035,
23032,
1035,
3463,
1035,
30524,
1035,
3931,
1035,
4957,
1010,
7661,
1035,
20346,
2015,
1024,
7661,
1035,
20346,
2015,
1007,
1012,
3643,
999,
3433,
1012,
2303,
4983,
3433,
1012,
9152,
2140,
1029,
2203,
102,
0,
0,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/databases.rb | Azure::SQL::Mgmt::V2014_04_01.Databases.get_by_elastic_pool_with_http_info | def get_by_elastic_pool_with_http_info(resource_group_name, server_name, elastic_pool_name, database_name, custom_headers:nil)
get_by_elastic_pool_async(resource_group_name, server_name, elastic_pool_name, database_name, custom_headers:custom_headers).value!
end | ruby | def get_by_elastic_pool_with_http_info(resource_group_name, server_name, elastic_pool_name, database_name, custom_headers:nil)
get_by_elastic_pool_async(resource_group_name, server_name, elastic_pool_name, database_name, custom_headers:custom_headers).value!
end | [
"def",
"get_by_elastic_pool_with_http_info",
"(",
"resource_group_name",
",",
"server_name",
",",
"elastic_pool_name",
",",
"database_name",
",",
"custom_headers",
":",
"nil",
")",
"get_by_elastic_pool_async",
"(",
"resource_group_name",
",",
"server_name",
",",
"elastic_po... | Gets a database inside of an elastic pool.
@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 elastic_pool_name [String] The name of t... | [
"Gets",
"a",
"database",
"inside",
"of",
"an",
"elastic",
"pool",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/databases.rb#L571-L573 | train | Gets the elastic pool information. | [
30522,
13366,
2131,
1035,
2011,
1035,
21274,
1035,
4770,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
8241,
1035,
2171,
1010,
21274,
1035,
4770,
1035,
2171,
1010,
7809,
1035,
2171,
1010,
7661,
1035,
20346,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
aws/aws-sdk-ruby | gems/aws-sdk-kinesisvideoarchivedmedia/lib/aws-sdk-kinesisvideoarchivedmedia/client.rb | Aws::KinesisVideoArchivedMedia.Client.get_media_for_fragment_list | def get_media_for_fragment_list(params = {}, options = {}, &block)
req = build_request(:get_media_for_fragment_list, params)
req.send_request(options, &block)
end | ruby | def get_media_for_fragment_list(params = {}, options = {}, &block)
req = build_request(:get_media_for_fragment_list, params)
req.send_request(options, &block)
end | [
"def",
"get_media_for_fragment_list",
"(",
"params",
"=",
"{",
"}",
",",
"options",
"=",
"{",
"}",
",",
"&",
"block",
")",
"req",
"=",
"build_request",
"(",
":get_media_for_fragment_list",
",",
"params",
")",
"req",
".",
"send_request",
"(",
"options",
",",
... | Gets media for a list of fragments (specified by fragment number) from
the archived data in an Amazon Kinesis video stream.
<note markdown="1"> You must first call the `GetDataEndpoint` API to get an endpoint. Then
send the `GetMediaForFragmentList` requests to this endpoint using the
[--endpoint-url parameter][1]... | [
"Gets",
"media",
"for",
"a",
"list",
"of",
"fragments",
"(",
"specified",
"by",
"fragment",
"number",
")",
"from",
"the",
"archived",
"data",
"in",
"an",
"Amazon",
"Kinesis",
"video",
"stream",
"."
] | e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d | https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-kinesisvideoarchivedmedia/lib/aws-sdk-kinesisvideoarchivedmedia/client.rb#L655-L658 | train | Get media for fragment list | [
30522,
13366,
2131,
1035,
2865,
1035,
2005,
1035,
15778,
1035,
2862,
1006,
11498,
5244,
1027,
1063,
1065,
1010,
7047,
1027,
1063,
1065,
1010,
1004,
3796,
1007,
2128,
4160,
1027,
3857,
1035,
5227,
1006,
1024,
2131,
1035,
2865,
1035,
2005,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
ruby2d/ruby2d | lib/ruby2d/sprite.rb | Ruby2D.Sprite.play | def play(opts = {}, &done_proc)
animation = opts[:animation]
loop = opts[:loop]
flip = opts[:flip]
if !@playing || (animation != @playing_animation && animation != nil) || flip != @flip
@playing = true
@playing_animation = animation || :default
frames = @animations[@pl... | ruby | def play(opts = {}, &done_proc)
animation = opts[:animation]
loop = opts[:loop]
flip = opts[:flip]
if !@playing || (animation != @playing_animation && animation != nil) || flip != @flip
@playing = true
@playing_animation = animation || :default
frames = @animations[@pl... | [
"def",
"play",
"(",
"opts",
"=",
"{",
"}",
",",
"&",
"done_proc",
")",
"animation",
"=",
"opts",
"[",
":animation",
"]",
"loop",
"=",
"opts",
"[",
":loop",
"]",
"flip",
"=",
"opts",
"[",
":flip",
"]",
"if",
"!",
"@playing",
"||",
"(",
"animation",
... | Play an animation | [
"Play",
"an",
"animation"
] | 43ce9805a7ae8b82b7ab8c50bf6d4c845d395dc4 | https://github.com/ruby2d/ruby2d/blob/43ce9805a7ae8b82b7ab8c50bf6d4c845d395dc4/lib/ruby2d/sprite.rb#L111-L144 | train | Play the current frame of the current frame of the current frame. | [
30522,
13366,
2377,
1006,
23569,
2015,
1027,
1063,
1065,
1010,
1004,
2589,
1035,
4013,
2278,
1007,
7284,
1027,
23569,
2015,
1031,
1024,
7284,
1033,
7077,
1027,
23569,
2015,
1031,
1024,
7077,
1033,
11238,
1027,
23569,
2015,
1031,
1024,
11238... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_network/lib/2018-10-01/generated/azure_mgmt_network/connection_monitors.rb | Azure::Network::Mgmt::V2018_10_01.ConnectionMonitors.get_with_http_info | def get_with_http_info(resource_group_name, network_watcher_name, connection_monitor_name, custom_headers:nil)
get_async(resource_group_name, network_watcher_name, connection_monitor_name, custom_headers:custom_headers).value!
end | ruby | def get_with_http_info(resource_group_name, network_watcher_name, connection_monitor_name, custom_headers:nil)
get_async(resource_group_name, network_watcher_name, connection_monitor_name, custom_headers:custom_headers).value!
end | [
"def",
"get_with_http_info",
"(",
"resource_group_name",
",",
"network_watcher_name",
",",
"connection_monitor_name",
",",
"custom_headers",
":",
"nil",
")",
"get_async",
"(",
"resource_group_name",
",",
"network_watcher_name",
",",
"connection_monitor_name",
",",
"custom_h... | Gets a connection monitor by name.
@param resource_group_name [String] The name of the resource group containing
Network Watcher.
@param network_watcher_name [String] The name of the Network Watcher
resource.
@param connection_monitor_name [String] The name of the connection monitor.
@param custom_headers [Hash{... | [
"Gets",
"a",
"connection",
"monitor",
"by",
"name",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_network/lib/2018-10-01/generated/azure_mgmt_network/connection_monitors.rb#L107-L109 | train | Gets the specified network connection monitor. | [
30522,
13366,
2131,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2897,
1035,
3422,
2121,
1035,
2171,
1010,
4434,
1035,
8080,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
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-sqs/lib/aws-sdk-sqs/queue.rb | Aws::SQS.Queue.add_permission | def add_permission(options = {})
options = options.merge(queue_url: @url)
resp = @client.add_permission(options)
resp.data
end | ruby | def add_permission(options = {})
options = options.merge(queue_url: @url)
resp = @client.add_permission(options)
resp.data
end | [
"def",
"add_permission",
"(",
"options",
"=",
"{",
"}",
")",
"options",
"=",
"options",
".",
"merge",
"(",
"queue_url",
":",
"@url",
")",
"resp",
"=",
"@client",
".",
"add_permission",
"(",
"options",
")",
"resp",
".",
"data",
"end"
] | @!group Actions
@example Request syntax with placeholder values
queue.add_permission({
label: "String", # required
aws_account_ids: ["String"], # required
actions: ["String"], # required
})
@param [Hash] options ({})
@option options [required, String] :label
The unique identification of the ... | [
"@!group",
"Actions",
"@example",
"Request",
"syntax",
"with",
"placeholder",
"values"
] | e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d | https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-sqs/lib/aws-sdk-sqs/queue.rb#L121-L125 | train | Add a permission to the queue | [
30522,
13366,
5587,
1035,
6656,
1006,
7047,
1027,
1063,
1065,
1007,
7047,
1027,
7047,
1012,
13590,
1006,
24240,
1035,
24471,
2140,
1024,
1030,
24471,
2140,
1007,
24501,
2361,
1027,
1030,
7396,
1012,
5587,
1035,
6656,
1006,
7047,
1007,
24501... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
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_info_list_with_http_info | def get_node_info_list_with_http_info(continuation_token:nil, node_status_filter:nil, timeout:60, custom_headers:nil)
get_node_info_list_async(continuation_token:continuation_token, node_status_filter:node_status_filter, timeout:timeout, custom_headers:custom_headers).value!
end | ruby | def get_node_info_list_with_http_info(continuation_token:nil, node_status_filter:nil, timeout:60, custom_headers:nil)
get_node_info_list_async(continuation_token:continuation_token, node_status_filter:node_status_filter, timeout:timeout, custom_headers:custom_headers).value!
end | [
"def",
"get_node_info_list_with_http_info",
"(",
"continuation_token",
":",
"nil",
",",
"node_status_filter",
":",
"nil",
",",
"timeout",
":",
"60",
",",
"custom_headers",
":",
"nil",
")",
"get_node_info_list_async",
"(",
"continuation_token",
":continuation_token",
","... | Gets the list of nodes in the Service Fabric cluster.
Gets the list of nodes in the Service Fabric cluster. The response includes
the name, status, id, health, uptime, and other details about the node.
@param continuation_token [String] The continuation token parameter is used
to obtain next set of results. A con... | [
"Gets",
"the",
"list",
"of",
"nodes",
"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#L3263-L3265 | train | Gets the node info list. | [
30522,
13366,
2131,
1035,
13045,
1035,
18558,
1035,
2862,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
13633,
1035,
19204,
1024,
9152,
2140,
1010,
13045,
1035,
3570,
1035,
11307,
1024,
9152,
2140,
1010,
2051,
5833,
1024,
3438,
1010,
7661,
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... |
square/connect-ruby-sdk | lib/square_connect/models/v1_page_cell.rb | SquareConnect.V1PageCell.object_type= | def object_type=(object_type)
validator = EnumAttributeValidator.new('String', ["ITEM", "DISCOUNT", "CATEGORY", "PLACEHOLDER"])
unless validator.valid?(object_type)
fail ArgumentError, "invalid value for 'object_type', must be one of #{validator.allowable_values}."
end
@object_type = obj... | ruby | def object_type=(object_type)
validator = EnumAttributeValidator.new('String', ["ITEM", "DISCOUNT", "CATEGORY", "PLACEHOLDER"])
unless validator.valid?(object_type)
fail ArgumentError, "invalid value for 'object_type', must be one of #{validator.allowable_values}."
end
@object_type = obj... | [
"def",
"object_type",
"=",
"(",
"object_type",
")",
"validator",
"=",
"EnumAttributeValidator",
".",
"new",
"(",
"'String'",
",",
"[",
"\"ITEM\"",
",",
"\"DISCOUNT\"",
",",
"\"CATEGORY\"",
",",
"\"PLACEHOLDER\"",
"]",
")",
"unless",
"validator",
".",
"valid?",
... | Custom attribute writer method checking allowed values (enum).
@param [Object] object_type Object to be assigned | [
"Custom",
"attribute",
"writer",
"method",
"checking",
"allowed",
"values",
"(",
"enum",
")",
"."
] | 798eb9ded716f23b9f1518386f1c311a34bca8bf | https://github.com/square/connect-ruby-sdk/blob/798eb9ded716f23b9f1518386f1c311a34bca8bf/lib/square_connect/models/v1_page_cell.rb#L132-L138 | train | Set the object_type of the object. | [
30522,
13366,
4874,
1035,
2828,
1027,
1006,
4874,
1035,
2828,
1007,
9398,
8844,
1027,
4372,
12248,
4779,
3089,
8569,
2618,
10175,
8524,
4263,
1012,
2047,
1006,
1005,
5164,
1005,
1010,
1031,
1000,
8875,
1000,
1010,
1000,
19575,
1000,
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_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/subscription.rb | Azure::ApiManagement::Mgmt::V2018_01_01.Subscription.list_with_http_info | def list_with_http_info(resource_group_name, service_name, filter:nil, top:nil, skip:nil, custom_headers:nil)
list_async(resource_group_name, service_name, filter:filter, top:top, skip:skip, custom_headers:custom_headers).value!
end | ruby | def list_with_http_info(resource_group_name, service_name, filter:nil, top:nil, skip:nil, custom_headers:nil)
list_async(resource_group_name, service_name, filter:filter, top:top, skip:skip, custom_headers:custom_headers).value!
end | [
"def",
"list_with_http_info",
"(",
"resource_group_name",
",",
"service_name",
",",
"filter",
":",
"nil",
",",
"top",
":",
"nil",
",",
"skip",
":",
"nil",
",",
"custom_headers",
":",
"nil",
")",
"list_async",
"(",
"resource_group_name",
",",
"service_name",
",... | Lists all subscriptions of the API Management service instance.
@param resource_group_name [String] The name of the resource group.
@param service_name [String] The name of the API Management service.
@param filter [String] | Field | Supported operators | Supported
functions |
|-... | [
"Lists",
"all",
"subscriptions",
"of",
"the",
"API",
"Management",
"service",
"instance",
"."
] | 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/subscription.rb#L83-L85 | train | Gets the list of the available advisor s advisors. | [
30522,
13366,
2862,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2326,
1035,
2171,
1010,
11307,
1024,
9152,
2140,
1010,
2327,
1024,
9152,
2140,
1010,
13558,
1024,
9152,
2140,
1010,
7661,
1035,
20346,
2015,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
jeremytregunna/ruby-trello | lib/trello/label_name.rb | Trello.LabelName.update_fields | def update_fields(fields)
attributes[:yellow] = fields['yellow'] || attributes[:yellow]
attributes[:red] = fields['red'] || attributes[:red]
attributes[:orange] = fields['orange'] || attributes[:orange]
attributes[:green] = fields['green'] || attributes[:green]
attributes[:purple] = field... | ruby | def update_fields(fields)
attributes[:yellow] = fields['yellow'] || attributes[:yellow]
attributes[:red] = fields['red'] || attributes[:red]
attributes[:orange] = fields['orange'] || attributes[:orange]
attributes[:green] = fields['green'] || attributes[:green]
attributes[:purple] = field... | [
"def",
"update_fields",
"(",
"fields",
")",
"attributes",
"[",
":yellow",
"]",
"=",
"fields",
"[",
"'yellow'",
"]",
"||",
"attributes",
"[",
":yellow",
"]",
"attributes",
"[",
":red",
"]",
"=",
"fields",
"[",
"'red'",
"]",
"||",
"attributes",
"[",
":red"... | Update the fields of a label.
Supply a hash of stringkeyed data retrieved from the Trello API representing
a label. | [
"Update",
"the",
"fields",
"of",
"a",
"label",
"."
] | ad79c9d8152ad5395b3b61c43170908f1912bfb2 | https://github.com/jeremytregunna/ruby-trello/blob/ad79c9d8152ad5395b3b61c43170908f1912bfb2/lib/trello/label_name.rb#L11-L24 | train | Update the attributes of the object. | [
30522,
13366,
10651,
1035,
4249,
1006,
4249,
1007,
12332,
1031,
1024,
3756,
1033,
1027,
4249,
1031,
1005,
3756,
1005,
1033,
1064,
1064,
12332,
1031,
1024,
3756,
1033,
12332,
1031,
1024,
2417,
1033,
1027,
4249,
1031,
1005,
2417,
1005,
1033,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
rmosolgo/graphql-ruby | lib/graphql/schema.rb | GraphQL.Schema.to_definition | def to_definition(only: nil, except: nil, context: {})
GraphQL::Schema::Printer.print_schema(self, only: only, except: except, context: context)
end | ruby | def to_definition(only: nil, except: nil, context: {})
GraphQL::Schema::Printer.print_schema(self, only: only, except: except, context: context)
end | [
"def",
"to_definition",
"(",
"only",
":",
"nil",
",",
"except",
":",
"nil",
",",
"context",
":",
"{",
"}",
")",
"GraphQL",
"::",
"Schema",
"::",
"Printer",
".",
"print_schema",
"(",
"self",
",",
"only",
":",
"only",
",",
"except",
":",
"except",
",",... | Return the GraphQL IDL for the schema
@param context [Hash]
@param only [<#call(member, ctx)>]
@param except [<#call(member, ctx)>]
@return [String] | [
"Return",
"the",
"GraphQL",
"IDL",
"for",
"the",
"schema"
] | d5be13a816f220b9efbabeaa69a3e56fedf311f5 | https://github.com/rmosolgo/graphql-ruby/blob/d5be13a816f220b9efbabeaa69a3e56fedf311f5/lib/graphql/schema.rb#L658-L660 | train | Returns the definition of the schema. | [
30522,
13366,
2000,
1035,
6210,
1006,
2069,
1024,
9152,
2140,
1010,
3272,
1024,
9152,
2140,
1010,
6123,
1024,
1063,
1065,
1007,
10629,
4160,
2140,
1024,
1024,
8040,
28433,
1024,
1024,
15041,
1012,
6140,
1035,
8040,
28433,
1006,
2969,
1010,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
aws/aws-sdk-ruby | gems/aws-sdk-core/lib/aws-sdk-core/shared_config.rb | Aws.SharedConfig.fresh | def fresh(options = {})
@profile_name = nil
@credentials_path = nil
@config_path = nil
@parsed_credentials = {}
@parsed_config = nil
@config_enabled = options[:config_enabled] ? true : false
@profile_name = determine_profile(options)
@credentials_path = options[:credentia... | ruby | def fresh(options = {})
@profile_name = nil
@credentials_path = nil
@config_path = nil
@parsed_credentials = {}
@parsed_config = nil
@config_enabled = options[:config_enabled] ? true : false
@profile_name = determine_profile(options)
@credentials_path = options[:credentia... | [
"def",
"fresh",
"(",
"options",
"=",
"{",
"}",
")",
"@profile_name",
"=",
"nil",
"@credentials_path",
"=",
"nil",
"@config_path",
"=",
"nil",
"@parsed_credentials",
"=",
"{",
"}",
"@parsed_config",
"=",
"nil",
"@config_enabled",
"=",
"options",
"[",
":config_e... | Constructs a new SharedConfig provider object. This will load the shared
credentials file, and optionally the shared configuration file, as ini
files which support profiles.
By default, the shared credential file (the default path for which is
`~/.aws/credentials`) and the shared config file (the default path for
... | [
"Constructs",
"a",
"new",
"SharedConfig",
"provider",
"object",
".",
"This",
"will",
"load",
"the",
"shared",
"credentials",
"file",
"and",
"optionally",
"the",
"shared",
"configuration",
"file",
"as",
"ini",
"files",
"which",
"support",
"profiles",
"."
] | e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d | https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-core/lib/aws-sdk-core/shared_config.rb#L61-L76 | train | Freshly load the credentials and config files | [
30522,
13366,
4840,
1006,
7047,
1027,
1063,
1065,
1007,
1030,
6337,
1035,
2171,
1027,
9152,
2140,
1030,
22496,
1035,
4130,
1027,
9152,
2140,
1030,
9530,
8873,
2290,
1035,
4130,
1027,
9152,
2140,
1030,
11968,
6924,
1035,
22496,
1027,
1063,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
rails/sprockets | lib/sprockets/directive_processor.rb | Sprockets.DirectiveProcessor.process_link_directory_directive | def process_link_directory_directive(path = ".", accept = nil)
path = expand_relative_dirname(:link_directory, path)
accept = expand_accept_shorthand(accept)
link_paths(*@environment.stat_directory_with_dependencies(path), accept)
end | ruby | def process_link_directory_directive(path = ".", accept = nil)
path = expand_relative_dirname(:link_directory, path)
accept = expand_accept_shorthand(accept)
link_paths(*@environment.stat_directory_with_dependencies(path), accept)
end | [
"def",
"process_link_directory_directive",
"(",
"path",
"=",
"\".\"",
",",
"accept",
"=",
"nil",
")",
"path",
"=",
"expand_relative_dirname",
"(",
":link_directory",
",",
"path",
")",
"accept",
"=",
"expand_accept_shorthand",
"(",
"accept",
")",
"link_paths",
"(",... | `link_directory` links all the files inside a single
directory. It's similar to `path/*` since it does not follow
nested directories.
//= link_directory "./fonts"
Use caution when linking against JS or CSS assets. Include an explicit
extension or content type in these cases.
//= link_directory "./scrip... | [
"link_directory",
"links",
"all",
"the",
"files",
"inside",
"a",
"single",
"directory",
".",
"It",
"s",
"similar",
"to",
"path",
"/",
"*",
"since",
"it",
"does",
"not",
"follow",
"nested",
"directories",
"."
] | 9e3f0d8e98c44f57e67bc138db87bb8469bf5ddd | https://github.com/rails/sprockets/blob/9e3f0d8e98c44f57e67bc138db87bb8469bf5ddd/lib/sprockets/directive_processor.rb#L324-L328 | train | Process the link directory directive | [
30522,
13366,
2832,
1035,
4957,
1035,
14176,
1035,
16449,
1006,
4130,
1027,
1000,
1012,
1000,
1010,
5138,
1027,
9152,
2140,
1007,
4130,
1027,
7818,
1035,
5816,
1035,
16101,
18442,
1006,
1024,
4957,
1035,
14176,
1010,
4130,
1007,
5138,
1027,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/long_term_retention_backups.rb | Azure::SQL::Mgmt::V2017_03_01_preview.LongTermRetentionBackups.list_by_location_with_http_info | def list_by_location_with_http_info(location_name, only_latest_per_database:nil, database_state:nil, custom_headers:nil)
list_by_location_async(location_name, only_latest_per_database:only_latest_per_database, database_state:database_state, custom_headers:custom_headers).value!
end | ruby | def list_by_location_with_http_info(location_name, only_latest_per_database:nil, database_state:nil, custom_headers:nil)
list_by_location_async(location_name, only_latest_per_database:only_latest_per_database, database_state:database_state, custom_headers:custom_headers).value!
end | [
"def",
"list_by_location_with_http_info",
"(",
"location_name",
",",
"only_latest_per_database",
":",
"nil",
",",
"database_state",
":",
"nil",
",",
"custom_headers",
":",
"nil",
")",
"list_by_location_async",
"(",
"location_name",
",",
"only_latest_per_database",
":only_... | Lists the long term retention backups for a given location.
@param location_name [String] The location of the database
@param only_latest_per_database [Boolean] Whether or not to only get the
latest backup for each database.
@param database_state [LongTermRetentionDatabaseState] Whether to query
against just live... | [
"Lists",
"the",
"long",
"term",
"retention",
"backups",
"for",
"a",
"given",
"location",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_sql/lib/2017-03-01-preview/generated/azure_mgmt_sql/long_term_retention_backups.rb#L313-L315 | train | Gets the list of documents in a location. | [
30522,
13366,
2862,
1035,
2011,
1035,
3295,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
3295,
1035,
2171,
1010,
2069,
1035,
6745,
1035,
2566,
1035,
7809,
1024,
9152,
2140,
1010,
7809,
1035,
2110,
1024,
9152,
2140,
1010,
7661,
1035,
20346,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_resources/lib/2016-02-01/generated/azure_mgmt_resources/resources.rb | Azure::Resources::Mgmt::V2016_02_01.Resources.get_with_http_info | def get_with_http_info(resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, api_version, custom_headers:nil)
get_async(resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, api_version, custom_headers:custom_headers).... | ruby | def get_with_http_info(resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, api_version, custom_headers:nil)
get_async(resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, api_version, custom_headers:custom_headers).... | [
"def",
"get_with_http_info",
"(",
"resource_group_name",
",",
"resource_provider_namespace",
",",
"parent_resource_path",
",",
"resource_type",
",",
"resource_name",
",",
"api_version",
",",
"custom_headers",
":",
"nil",
")",
"get_async",
"(",
"resource_group_name",
",",
... | Returns a resource belonging to a resource group.
@param resource_group_name [String] The name of the resource group. The name
is case insensitive.
@param resource_provider_namespace [String] Resource identity.
@param parent_resource_path [String] Resource identity.
@param resource_type [String] Resource identity... | [
"Returns",
"a",
"resource",
"belonging",
"to",
"a",
"resource",
"group",
"."
] | 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#L593-L595 | train | Gets the specified resource. | [
30522,
13366,
2131,
1035,
2007,
1035,
8299,
1035,
18558,
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,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
gjtorikian/html-proofer | lib/html-proofer/url_validator.rb | HTMLProofer.UrlValidator.new_url_query_values? | def new_url_query_values?(uri, paths_with_queries)
queries = uri.query_values.keys.join('-')
domain_path = extract_domain_path(uri)
if paths_with_queries[domain_path].nil?
paths_with_queries[domain_path] = [queries]
true
elsif !paths_with_queries[domain_path].include?(queries)
... | ruby | def new_url_query_values?(uri, paths_with_queries)
queries = uri.query_values.keys.join('-')
domain_path = extract_domain_path(uri)
if paths_with_queries[domain_path].nil?
paths_with_queries[domain_path] = [queries]
true
elsif !paths_with_queries[domain_path].include?(queries)
... | [
"def",
"new_url_query_values?",
"(",
"uri",
",",
"paths_with_queries",
")",
"queries",
"=",
"uri",
".",
"query_values",
".",
"keys",
".",
"join",
"(",
"'-'",
")",
"domain_path",
"=",
"extract_domain_path",
"(",
"uri",
")",
"if",
"paths_with_queries",
"[",
"dom... | remember queries we've seen, ignore future ones | [
"remember",
"queries",
"we",
"ve",
"seen",
"ignore",
"future",
"ones"
] | d00955d3b125b9a1649d056bb347ec30e935d847 | https://github.com/gjtorikian/html-proofer/blob/d00955d3b125b9a1649d056bb347ec30e935d847/lib/html-proofer/url_validator.rb#L53-L65 | train | Returns true if the URI has a new query values | [
30522,
13366,
2047,
1035,
24471,
2140,
1035,
23032,
1035,
5300,
1029,
1006,
24471,
2072,
1010,
10425,
1035,
2007,
1035,
10861,
5134,
1007,
10861,
5134,
1027,
24471,
2072,
1012,
23032,
1035,
5300,
1012,
6309,
1012,
3693,
1006,
1005,
1011,
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... |
projectcypress/health-data-standards | lib/hqmf-model/document.rb | HQMF.Document.specific_occurrence_source_data_criteria | def specific_occurrence_source_data_criteria(force_sources=nil)
return [] if @source_data_criteria.nil?
matching = @source_data_criteria.select {|dc| !dc.specific_occurrence.nil?}
if force_sources
existing = matching.map(&:id)
matching.concat @source_data_criteria.select {|dc| !existi... | ruby | def specific_occurrence_source_data_criteria(force_sources=nil)
return [] if @source_data_criteria.nil?
matching = @source_data_criteria.select {|dc| !dc.specific_occurrence.nil?}
if force_sources
existing = matching.map(&:id)
matching.concat @source_data_criteria.select {|dc| !existi... | [
"def",
"specific_occurrence_source_data_criteria",
"(",
"force_sources",
"=",
"nil",
")",
"return",
"[",
"]",
"if",
"@source_data_criteria",
".",
"nil?",
"matching",
"=",
"@source_data_criteria",
".",
"select",
"{",
"|",
"dc",
"|",
"!",
"dc",
".",
"specific_occurr... | Get the source data criteria that are specific occurrences
@return [Array] an array of HQMF::DataCriteria describing the data elements used by the measure that are specific occurrences | [
"Get",
"the",
"source",
"data",
"criteria",
"that",
"are",
"specific",
"occurrences"
] | 252d4f0927c513eacde6b9ea41b76faa1423c34b | https://github.com/projectcypress/health-data-standards/blob/252d4f0927c513eacde6b9ea41b76faa1423c34b/lib/hqmf-model/document.rb#L146-L156 | train | Returns the specific_occurrence_source_data_criteria for this data criteria | [
30522,
13366,
3563,
1035,
14404,
1035,
3120,
1035,
2951,
1035,
9181,
1006,
2486,
1035,
4216,
1027,
9152,
2140,
1007,
2709,
1031,
1033,
2065,
1030,
3120,
1035,
2951,
1035,
9181,
1012,
9152,
2140,
1029,
9844,
1027,
1030,
3120,
1035,
2951,
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... |
roo-rb/roo | lib/roo/open_office.rb | Roo.OpenOffice.font | def font(row, col, sheet = nil)
sheet ||= default_sheet
read_cells(sheet)
row, col = normalize(row, col)
style_name = @style[sheet][[row, col]] || @style_defaults[sheet][col - 1] || 'Default'
@font_style_definitions[style_name]
end | ruby | def font(row, col, sheet = nil)
sheet ||= default_sheet
read_cells(sheet)
row, col = normalize(row, col)
style_name = @style[sheet][[row, col]] || @style_defaults[sheet][col - 1] || 'Default'
@font_style_definitions[style_name]
end | [
"def",
"font",
"(",
"row",
",",
"col",
",",
"sheet",
"=",
"nil",
")",
"sheet",
"||=",
"default_sheet",
"read_cells",
"(",
"sheet",
")",
"row",
",",
"col",
"=",
"normalize",
"(",
"row",
",",
"col",
")",
"style_name",
"=",
"@style",
"[",
"sheet",
"]",
... | Given a cell, return the cell's style | [
"Given",
"a",
"cell",
"return",
"the",
"cell",
"s",
"style"
] | 4ec1104f0c3c2a29711c0c907371cd2be12bcc3c | https://github.com/roo-rb/roo/blob/4ec1104f0c3c2a29711c0c907371cd2be12bcc3c/lib/roo/open_office.rb#L134-L140 | train | Returns the font definition for a given cell | [
30522,
13366,
15489,
1006,
5216,
1010,
8902,
1010,
7123,
1027,
9152,
2140,
1007,
7123,
1064,
1064,
1027,
12398,
1035,
7123,
3191,
1035,
4442,
1006,
7123,
1007,
5216,
1010,
8902,
1027,
3671,
4697,
1006,
5216,
1010,
8902,
1007,
2806,
1035,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | data/azure_cognitiveservices_videosearch/lib/1.0/generated/azure_cognitiveservices_videosearch/videos_operations.rb | Azure::CognitiveServices::VideoSearch::V1_0.VideosOperations.trending_with_http_info | def trending_with_http_info(accept_language:nil, user_agent:nil, client_id:nil, client_ip:nil, location:nil, country_code:nil, market:nil, safe_search:nil, set_lang:nil, text_decorations:nil, text_format:nil, custom_headers:nil)
trending_async(accept_language:accept_language, user_agent:user_agent, client_id:clie... | ruby | def trending_with_http_info(accept_language:nil, user_agent:nil, client_id:nil, client_ip:nil, location:nil, country_code:nil, market:nil, safe_search:nil, set_lang:nil, text_decorations:nil, text_format:nil, custom_headers:nil)
trending_async(accept_language:accept_language, user_agent:user_agent, client_id:clie... | [
"def",
"trending_with_http_info",
"(",
"accept_language",
":",
"nil",
",",
"user_agent",
":",
"nil",
",",
"client_id",
":",
"nil",
",",
"client_ip",
":",
"nil",
",",
"location",
":",
"nil",
",",
"country_code",
":",
"nil",
",",
"market",
":",
"nil",
",",
... | The Video Trending Search API lets you search on Bing and get back a list of
videos that are trending based on search requests made by others. The videos
are broken out into different categories. For example, Top Music Videos. For
a list of markets that support trending videos, see [Trending
Videos](https://docs.mi... | [
"The",
"Video",
"Trending",
"Search",
"API",
"lets",
"you",
"search",
"on",
"Bing",
"and",
"get",
"back",
"a",
"list",
"of",
"videos",
"that",
"are",
"trending",
"based",
"on",
"search",
"requests",
"made",
"by",
"others",
".",
"The",
"videos",
"are",
"b... | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_cognitiveservices_videosearch/lib/1.0/generated/azure_cognitiveservices_videosearch/videos_operations.rb#L2000-L2002 | train | Returns the list of documents trending for a given language. | [
30522,
13366,
9874,
2075,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
5138,
1035,
2653,
1024,
9152,
2140,
1010,
5310,
1035,
4005,
1024,
9152,
2140,
1010,
7396,
1035,
8909,
1024,
9152,
2140,
1010,
7396,
1035,
12997,
1024,
9152,
2140,
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_network/lib/2018-08-01/generated/azure_mgmt_network/network_watchers.rb | Azure::Network::Mgmt::V2018_08_01.NetworkWatchers.verify_ipflow_async | def verify_ipflow_async(resource_group_name, network_watcher_name, parameters, custom_headers:nil)
# Send request
promise = begin_verify_ipflow_async(resource_group_name, network_watcher_name, parameters, custom_headers:custom_headers)
promise = promise.then do |response|
# Defining deseriali... | ruby | def verify_ipflow_async(resource_group_name, network_watcher_name, parameters, custom_headers:nil)
# Send request
promise = begin_verify_ipflow_async(resource_group_name, network_watcher_name, parameters, custom_headers:custom_headers)
promise = promise.then do |response|
# Defining deseriali... | [
"def",
"verify_ipflow_async",
"(",
"resource_group_name",
",",
"network_watcher_name",
",",
"parameters",
",",
"custom_headers",
":",
"nil",
")",
"# Send request",
"promise",
"=",
"begin_verify_ipflow_async",
"(",
"resource_group_name",
",",
"network_watcher_name",
",",
"... | @param resource_group_name [String] The name of the resource group.
@param network_watcher_name [String] The name of the network watcher.
@param parameters [VerificationIPFlowParameters] Parameters that define the
IP flow to be verified.
@param custom_headers [Hash{String => String}] A hash of custom headers that
... | [
"@param",
"resource_group_name",
"[",
"String",
"]",
"The",
"name",
"of",
"the",
"resource",
"group",
".",
"@param",
"network_watcher_name",
"[",
"String",
"]",
"The",
"name",
"of",
"the",
"network",
"watcher",
".",
"@param",
"parameters",
"[",
"VerificationIPFl... | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_network/lib/2018-08-01/generated/azure_mgmt_network/network_watchers.rb#L683-L699 | train | Verify IP flow. | [
30522,
13366,
20410,
1035,
12997,
12314,
1035,
2004,
6038,
2278,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2897,
1035,
3422,
2121,
1035,
2171,
1010,
11709,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
1001,
4604,
5227,
4872,
1027,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
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 | def update(resource_group_name, automation_account_name, connection_name, parameters, custom_headers:nil)
response = update_async(resource_group_name, automation_account_name, connection_name, parameters, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def update(resource_group_name, automation_account_name, connection_name, parameters, custom_headers:nil)
response = update_async(resource_group_name, automation_account_name, connection_name, parameters, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"update",
"(",
"resource_group_name",
",",
"automation_account_name",
",",
"connection_name",
",",
"parameters",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"update_async",
"(",
"resource_group_name",
",",
"automation_account_name",
",",
"connection_... | 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#L362-L365 | train | Updates a connection. | [
30522,
13366,
10651,
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,
3433,
1027,
10651,
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_service_health_with_http_info | def get_service_health_with_http_info(service_id, events_health_state_filter:0, partitions_health_state_filter:0, exclude_health_statistics:false, timeout:60, custom_headers:nil)
get_service_health_async(service_id, events_health_state_filter:events_health_state_filter, partitions_health_state_filter:partitions_h... | ruby | def get_service_health_with_http_info(service_id, events_health_state_filter:0, partitions_health_state_filter:0, exclude_health_statistics:false, timeout:60, custom_headers:nil)
get_service_health_async(service_id, events_health_state_filter:events_health_state_filter, partitions_health_state_filter:partitions_h... | [
"def",
"get_service_health_with_http_info",
"(",
"service_id",
",",
"events_health_state_filter",
":",
"0",
",",
"partitions_health_state_filter",
":",
"0",
",",
"exclude_health_statistics",
":",
"false",
",",
"timeout",
":",
"60",
",",
"custom_headers",
":",
"nil",
"... | Gets the health of the specified Service Fabric service.
Gets the health information of the specified service.
Use EventsHealthStateFilter to filter the collection of health events
reported on the service based on the health state.
Use PartitionsHealthStateFilter to filter the collection of partitions
returned.
... | [
"Gets",
"the",
"health",
"of",
"the",
"specified",
"Service",
"Fabric",
"service",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_service_fabric/lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb#L10953-L10955 | train | Gets the health of the service. | [
30522,
13366,
2131,
1035,
2326,
1035,
2740,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
2326,
1035,
8909,
1010,
2824,
1035,
2740,
1035,
2110,
1035,
11307,
1024,
1014,
1010,
13571,
2015,
1035,
2740,
1035,
2110,
1035,
11307,
1024,
1014,
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... |
aws/aws-sdk-ruby | gems/aws-sdk-sns/lib/aws-sdk-sns/resource.rb | Aws::SNS.Resource.platform_applications | def platform_applications(options = {})
batches = Enumerator.new do |y|
resp = @client.list_platform_applications(options)
resp.each_page do |page|
batch = []
page.data.platform_applications.each do |p|
batch << PlatformApplication.new(
arn: p.platform... | ruby | def platform_applications(options = {})
batches = Enumerator.new do |y|
resp = @client.list_platform_applications(options)
resp.each_page do |page|
batch = []
page.data.platform_applications.each do |p|
batch << PlatformApplication.new(
arn: p.platform... | [
"def",
"platform_applications",
"(",
"options",
"=",
"{",
"}",
")",
"batches",
"=",
"Enumerator",
".",
"new",
"do",
"|",
"y",
"|",
"resp",
"=",
"@client",
".",
"list_platform_applications",
"(",
"options",
")",
"resp",
".",
"each_page",
"do",
"|",
"page",
... | @example Request syntax with placeholder values
sns.platform_applications()
@param [Hash] options ({})
@return [PlatformApplication::Collection] | [
"@example",
"Request",
"syntax",
"with",
"placeholder",
"values"
] | e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d | https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-sns/lib/aws-sdk-sns/resource.rb#L134-L149 | train | Returns an array of all platform applications | [
30522,
13366,
4132,
1035,
5097,
1006,
7047,
1027,
1063,
1065,
1007,
14108,
2229,
1027,
4372,
17897,
16259,
1012,
2047,
2079,
1064,
1061,
1064,
24501,
2361,
1027,
1030,
7396,
1012,
2862,
1035,
4132,
1035,
5097,
1006,
7047,
1007,
24501,
2361,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
fastlane/fastlane | credentials_manager/lib/credentials_manager/account_manager.rb | CredentialsManager.AccountManager.invalid_credentials | def invalid_credentials(force: false)
puts("The login credentials for '#{user}' seem to be wrong".red)
if fetch_password_from_env
puts("The password was taken from the environment variable")
puts("Please make sure it is correct")
return false
end
if force || agree("Do y... | ruby | def invalid_credentials(force: false)
puts("The login credentials for '#{user}' seem to be wrong".red)
if fetch_password_from_env
puts("The password was taken from the environment variable")
puts("Please make sure it is correct")
return false
end
if force || agree("Do y... | [
"def",
"invalid_credentials",
"(",
"force",
":",
"false",
")",
"puts",
"(",
"\"The login credentials for '#{user}' seem to be wrong\"",
".",
"red",
")",
"if",
"fetch_password_from_env",
"puts",
"(",
"\"The password was taken from the environment variable\"",
")",
"puts",
"(",... | Call this method to ask the user to re-enter the credentials
@param force: if false, the user is asked before it gets deleted
@return: Did the user decide to remove the old entry and enter a new password? | [
"Call",
"this",
"method",
"to",
"ask",
"the",
"user",
"to",
"re",
"-",
"enter",
"the",
"credentials"
] | 457c5d647c77f0e078dafa5129da616914e002c5 | https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/credentials_manager/lib/credentials_manager/account_manager.rb#L63-L79 | train | Checks if the login credentials are wrong | [
30522,
13366,
19528,
1035,
22496,
1006,
2486,
1024,
6270,
1007,
8509,
1006,
1000,
1996,
8833,
2378,
22496,
2005,
1005,
1001,
1063,
5310,
1065,
1005,
4025,
2000,
2022,
3308,
1000,
1012,
2417,
1007,
2065,
18584,
30524,
1007,
8509,
1006,
1000,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_authorization/lib/2015-07-01/generated/azure_mgmt_authorization/permissions.rb | Azure::Authorization::Mgmt::V2015_07_01.Permissions.list_for_resource_with_http_info | def list_for_resource_with_http_info(resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, custom_headers:nil)
list_for_resource_async(resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, custom_headers:custom_headers... | ruby | def list_for_resource_with_http_info(resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, custom_headers:nil)
list_for_resource_async(resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, custom_headers:custom_headers... | [
"def",
"list_for_resource_with_http_info",
"(",
"resource_group_name",
",",
"resource_provider_namespace",
",",
"parent_resource_path",
",",
"resource_type",
",",
"resource_name",
",",
"custom_headers",
":",
"nil",
")",
"list_for_resource_async",
"(",
"resource_group_name",
"... | Gets all permissions the caller has for a resource.
@param resource_group_name [String] The name of the resource group containing
the resource. The name is case insensitive.
@param resource_provider_namespace [String] The namespace of the resource
provider.
@param parent_resource_path [String] The parent resource... | [
"Gets",
"all",
"permissions",
"the",
"caller",
"has",
"for",
"a",
"resource",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_authorization/lib/2015-07-01/generated/azure_mgmt_authorization/permissions.rb#L156-L158 | train | Gets the list of resources under the resource provider. | [
30522,
13366,
2862,
1035,
2005,
1035,
7692,
1035,
2007,
1035,
8299,
1035,
18558,
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,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | data/azure_service_fabric/lib/6.4.0.36/generated/azure_service_fabric/service_fabric_client_apis.rb | Azure::ServiceFabric::V6_4_0_36.ServiceFabricClientAPIs.disable_service_backup | def disable_service_backup(service_id, disable_backup_description:nil, timeout:60, custom_headers:nil)
response = disable_service_backup_async(service_id, disable_backup_description:disable_backup_description, timeout:timeout, custom_headers:custom_headers).value!
nil
end | ruby | def disable_service_backup(service_id, disable_backup_description:nil, timeout:60, custom_headers:nil)
response = disable_service_backup_async(service_id, disable_backup_description:disable_backup_description, timeout:timeout, custom_headers:custom_headers).value!
nil
end | [
"def",
"disable_service_backup",
"(",
"service_id",
",",
"disable_backup_description",
":",
"nil",
",",
"timeout",
":",
"60",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"disable_service_backup_async",
"(",
"service_id",
",",
"disable_backup_description",
... | Disables periodic backup of Service Fabric service which was previously
enabled.
Disables periodic backup of Service Fabric service which was previously
enabled. Backup must be explicitly enabled before it can be disabled.
In case the backup is enabled for the Service Fabric application, which this
service is par... | [
"Disables",
"periodic",
"backup",
"of",
"Service",
"Fabric",
"service",
"which",
"was",
"previously",
"enabled",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_service_fabric/lib/6.4.0.36/generated/azure_service_fabric/service_fabric_client_apis.rb#L24292-L24295 | train | Disables backup of a service. | [
30522,
13366,
4487,
19150,
1035,
2326,
1035,
10200,
1006,
2326,
1035,
8909,
1010,
4487,
19150,
1035,
10200,
1035,
6412,
1024,
9152,
2140,
1010,
2051,
5833,
1024,
3438,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
4487,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
puppetlabs/puppet | lib/puppet/module_tool/metadata.rb | Puppet::ModuleTool.Metadata.validate_data_provider | def validate_data_provider(value)
if value.is_a?(String)
unless value =~ /^[a-zA-Z][a-zA-Z0-9_]*$/
if value =~ /^[a-zA-Z]/
raise ArgumentError, _("field 'data_provider' contains non-alphanumeric characters")
else
raise ArgumentError, _("field 'data_provider' mus... | ruby | def validate_data_provider(value)
if value.is_a?(String)
unless value =~ /^[a-zA-Z][a-zA-Z0-9_]*$/
if value =~ /^[a-zA-Z]/
raise ArgumentError, _("field 'data_provider' contains non-alphanumeric characters")
else
raise ArgumentError, _("field 'data_provider' mus... | [
"def",
"validate_data_provider",
"(",
"value",
")",
"if",
"value",
".",
"is_a?",
"(",
"String",
")",
"unless",
"value",
"=~",
"/",
"/",
"if",
"value",
"=~",
"/",
"/",
"raise",
"ArgumentError",
",",
"_",
"(",
"\"field 'data_provider' contains non-alphanumeric cha... | Validates that the given _value_ is a symbolic name that starts with a letter
and then contains only letters, digits, or underscore. Will raise an ArgumentError
if that's not the case.
@param value [Object] The value to be tested | [
"Validates",
"that",
"the",
"given",
"_value_",
"is",
"a",
"symbolic",
"name",
"that",
"starts",
"with",
"a",
"letter",
"and",
"then",
"contains",
"only",
"letters",
"digits",
"or",
"underscore",
".",
"Will",
"raise",
"an",
"ArgumentError",
"if",
"that",
"s"... | 4baeed97cbb7571ddc6635f0a24debe2e8b22cd3 | https://github.com/puppetlabs/puppet/blob/4baeed97cbb7571ddc6635f0a24debe2e8b22cd3/lib/puppet/module_tool/metadata.rb#L201-L213 | train | Validate the data_provider | [
30522,
13366,
9398,
3686,
1035,
2951,
1035,
10802,
1006,
3643,
1007,
2065,
3643,
1012,
2003,
1035,
1037,
1029,
1006,
5164,
1007,
4983,
3643,
1027,
1066,
1013,
1034,
1031,
1037,
1011,
23564,
1011,
1062,
1033,
1031,
1037,
1011,
23564,
1011,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
rails/rails | activerecord/lib/active_record/transactions.rb | ActiveRecord.Transactions.remember_transaction_record_state | def remember_transaction_record_state
@_start_transaction_state ||= {
id: id,
new_record: @new_record,
destroyed: @destroyed,
attributes: @attributes,
frozen?: frozen?,
level: 0
}
@_start_transaction_state[:level] += 1
remember_... | ruby | def remember_transaction_record_state
@_start_transaction_state ||= {
id: id,
new_record: @new_record,
destroyed: @destroyed,
attributes: @attributes,
frozen?: frozen?,
level: 0
}
@_start_transaction_state[:level] += 1
remember_... | [
"def",
"remember_transaction_record_state",
"@_start_transaction_state",
"||=",
"{",
"id",
":",
"id",
",",
"new_record",
":",
"@new_record",
",",
"destroyed",
":",
"@destroyed",
",",
"attributes",
":",
"@attributes",
",",
"frozen?",
":",
"frozen?",
",",
"level",
"... | Save the new record state and id of a record so it can be restored later if a transaction fails. | [
"Save",
"the",
"new",
"record",
"state",
"and",
"id",
"of",
"a",
"record",
"so",
"it",
"can",
"be",
"restored",
"later",
"if",
"a",
"transaction",
"fails",
"."
] | 85a8bc644be69908f05740a5886ec19cd3679df5 | https://github.com/rails/rails/blob/85a8bc644be69908f05740a5886ec19cd3679df5/activerecord/lib/active_record/transactions.rb#L385-L396 | train | Remember the record state of the transaction | [
30522,
13366,
3342,
1035,
12598,
1035,
2501,
1035,
2110,
1030,
1035,
2707,
1035,
12598,
1035,
2110,
1064,
1064,
1027,
1063,
8909,
1024,
8909,
1010,
2047,
1035,
2501,
1024,
1030,
2047,
1035,
2501,
1010,
3908,
1024,
1030,
3908,
1010,
12332,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
danger/danger | lib/danger/danger_core/plugins/dangerfile_danger_plugin.rb | Danger.DangerfileDangerPlugin.import_dangerfile | def import_dangerfile(opts)
if opts.kind_of?(String)
warn "Use `import_dangerfile(github: '#{opts}')` instead of `import_dangerfile '#{opts}'`."
import_dangerfile_from_github(opts)
elsif opts.kind_of?(Hash)
if opts.key?(:github) || opts.key?(:gitlab)
import_dangerfile_from_... | ruby | def import_dangerfile(opts)
if opts.kind_of?(String)
warn "Use `import_dangerfile(github: '#{opts}')` instead of `import_dangerfile '#{opts}'`."
import_dangerfile_from_github(opts)
elsif opts.kind_of?(Hash)
if opts.key?(:github) || opts.key?(:gitlab)
import_dangerfile_from_... | [
"def",
"import_dangerfile",
"(",
"opts",
")",
"if",
"opts",
".",
"kind_of?",
"(",
"String",
")",
"warn",
"\"Use `import_dangerfile(github: '#{opts}')` instead of `import_dangerfile '#{opts}'`.\"",
"import_dangerfile_from_github",
"(",
"opts",
")",
"elsif",
"opts",
".",
"kin... | @!group Danger
Import a Dangerfile.
@param [Hash] opts
@option opts [String] :github GitHub repo
@option opts [String] :gitlab GitLab repo
@option opts [String] :gem Gem name
@option opts [String] :path Path to Dangerfile
@return [void] | [
"@!group",
"Danger",
"Import",
"a",
"Dangerfile",
"."
] | 0d6d09f2d949c287fe75202d947374042b0679f4 | https://github.com/danger/danger/blob/0d6d09f2d949c287fe75202d947374042b0679f4/lib/danger/danger_core/plugins/dangerfile_danger_plugin.rb#L74-L91 | train | Import the dangerfile from a gitlab or gitlab repo | [
30522,
13366,
12324,
1035,
5473,
8873,
2571,
1006,
23569,
2015,
1007,
2065,
23569,
2015,
1012,
2785,
1035,
1997,
1029,
1006,
5164,
1007,
11582,
1000,
2224,
1036,
12324,
1035,
5473,
8873,
2571,
1006,
21025,
2705,
12083,
1024,
1005,
1001,
106... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
GeorgeKaraszi/ActiveRecordExtended | lib/active_record_extended/utilities.rb | ActiveRecordExtended.Utilities.wrap_with_agg_array | def wrap_with_agg_array(arel_or_rel_query, alias_name, casting_option = :agg, distinct = false)
query = group_when_needed(arel_or_rel_query)
query = Arel::Nodes::ArrayAgg.new(to_sql_array(query))
query.distinct = distinct || [:agg_distinct, :array_agg_distinct].include?(casting_optio... | ruby | def wrap_with_agg_array(arel_or_rel_query, alias_name, casting_option = :agg, distinct = false)
query = group_when_needed(arel_or_rel_query)
query = Arel::Nodes::ArrayAgg.new(to_sql_array(query))
query.distinct = distinct || [:agg_distinct, :array_agg_distinct].include?(casting_optio... | [
"def",
"wrap_with_agg_array",
"(",
"arel_or_rel_query",
",",
"alias_name",
",",
"casting_option",
"=",
":agg",
",",
"distinct",
"=",
"false",
")",
"query",
"=",
"group_when_needed",
"(",
"arel_or_rel_query",
")",
"query",
"=",
"Arel",
"::",
"Nodes",
"::",
"Array... | Wraps query into an aggregated array
EX: `(ARRAY_AGG((SELECT * FROM users)) AS "members"`
`(ARRAY_AGG(DISTINCT (SELECT * FROM users)) AS "members"`
`SELECT ARRAY_AGG((id)) AS "ids" FROM users`
`SELECT ARRAY_AGG(DISTINCT (id)) AS "ids" FROM users` | [
"Wraps",
"query",
"into",
"an",
"aggregated",
"array",
"EX",
":",
"(",
"ARRAY_AGG",
"((",
"SELECT",
"*",
"FROM",
"users",
"))",
"AS",
"members",
"(",
"ARRAY_AGG",
"(",
"DISTINCT",
"(",
"SELECT",
"*",
"FROM",
"users",
"))",
"AS",
"members",
"SELECT",
"ARR... | aca74eebb64b9957a2c8765bef6e43c7d5736fd8 | https://github.com/GeorgeKaraszi/ActiveRecordExtended/blob/aca74eebb64b9957a2c8765bef6e43c7d5736fd8/lib/active_record_extended/utilities.rb#L48-L53 | train | Wrap the query with an array aggregation | [
30522,
13366,
10236,
1035,
2007,
1035,
12943,
2290,
1035,
9140,
1006,
2024,
2140,
1035,
2030,
1035,
2128,
2140,
1035,
23032,
1010,
14593,
1035,
2171,
1010,
9179,
1035,
5724,
1027,
1024,
12943,
2290,
1010,
5664,
1027,
6270,
1007,
23032,
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... |
projectcypress/health-data-standards | lib/hqmf-parser/1.0/data_criteria.rb | HQMF1.DataCriteria.const_name | def const_name
components = title.gsub(/\W/,' ').split.collect {|word| word.strip.upcase }
if @derived_from
components << HQMF::Counter.instance.next
end
components.join '_'
end | ruby | def const_name
components = title.gsub(/\W/,' ').split.collect {|word| word.strip.upcase }
if @derived_from
components << HQMF::Counter.instance.next
end
components.join '_'
end | [
"def",
"const_name",
"components",
"=",
"title",
".",
"gsub",
"(",
"/",
"\\W",
"/",
",",
"' '",
")",
".",
"split",
".",
"collect",
"{",
"|",
"word",
"|",
"word",
".",
"strip",
".",
"upcase",
"}",
"if",
"@derived_from",
"components",
"<<",
"HQMF",
"::... | Get a JS friendly constant name for this measure attribute | [
"Get",
"a",
"JS",
"friendly",
"constant",
"name",
"for",
"this",
"measure",
"attribute"
] | 252d4f0927c513eacde6b9ea41b76faa1423c34b | https://github.com/projectcypress/health-data-standards/blob/252d4f0927c513eacde6b9ea41b76faa1423c34b/lib/hqmf-parser/1.0/data_criteria.rb#L74-L80 | train | Returns the name of the current page. | [
30522,
13366,
9530,
3367,
1035,
2171,
6177,
1027,
2516,
1012,
28177,
12083,
1006,
1013,
1032,
1059,
1013,
1010,
1005,
1005,
1007,
1012,
3975,
1012,
8145,
1063,
1064,
2773,
1064,
2773,
1012,
6167,
1012,
2039,
18382,
1065,
2065,
1030,
5173,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
hashicorp/vagrant | lib/vagrant/guest.rb | Vagrant.Guest.capability | def capability(*args)
super
rescue Errors::CapabilityNotFound => e
raise Errors::GuestCapabilityNotFound,
cap: e.extra_data[:cap],
guest: name
rescue Errors::CapabilityInvalid => e
raise Errors::GuestCapabilityInvalid,
cap: e.extra_data[:cap],
guest: name
en... | ruby | def capability(*args)
super
rescue Errors::CapabilityNotFound => e
raise Errors::GuestCapabilityNotFound,
cap: e.extra_data[:cap],
guest: name
rescue Errors::CapabilityInvalid => e
raise Errors::GuestCapabilityInvalid,
cap: e.extra_data[:cap],
guest: name
en... | [
"def",
"capability",
"(",
"*",
"args",
")",
"super",
"rescue",
"Errors",
"::",
"CapabilityNotFound",
"=>",
"e",
"raise",
"Errors",
"::",
"GuestCapabilityNotFound",
",",
"cap",
":",
"e",
".",
"extra_data",
"[",
":cap",
"]",
",",
"guest",
":",
"name",
"rescu... | See {CapabilityHost#capability} | [
"See",
"{",
"CapabilityHost#capability",
"}"
] | c22a145c59790c098f95d50141d9afb48e1ef55f | https://github.com/hashicorp/vagrant/blob/c22a145c59790c098f95d50141d9afb48e1ef55f/lib/vagrant/guest.rb#L42-L52 | train | Returns the capability of the current user. | [
30522,
13366,
10673,
1006,
1008,
12098,
5620,
1007,
3565,
5343,
10697,
1024,
1024,
10673,
17048,
14876,
8630,
1027,
1028,
1041,
5333,
10697,
1024,
1024,
4113,
17695,
8010,
17048,
14876,
8630,
1010,
6178,
1024,
1041,
1012,
4469,
1035,
2951,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/server.rb | Discordrb.Server.member | def member(id, request = true)
id = id.resolve_id
return @members[id] if member_cached?(id)
return nil unless request
member = @bot.member(self, id)
@members[id] = member unless member.nil?
rescue StandardError
nil
end | ruby | def member(id, request = true)
id = id.resolve_id
return @members[id] if member_cached?(id)
return nil unless request
member = @bot.member(self, id)
@members[id] = member unless member.nil?
rescue StandardError
nil
end | [
"def",
"member",
"(",
"id",
",",
"request",
"=",
"true",
")",
"id",
"=",
"id",
".",
"resolve_id",
"return",
"@members",
"[",
"id",
"]",
"if",
"member_cached?",
"(",
"id",
")",
"return",
"nil",
"unless",
"request",
"member",
"=",
"@bot",
".",
"member",
... | Gets a member on this server based on user ID
@param id [Integer] The user ID to look for
@param request [true, false] Whether the member should be requested from Discord if it's not cached | [
"Gets",
"a",
"member",
"on",
"this",
"server",
"based",
"on",
"user",
"ID"
] | 764298a1ff0be69a1853b510d736f21c2b91a2fe | https://github.com/meew0/discordrb/blob/764298a1ff0be69a1853b510d736f21c2b91a2fe/lib/discordrb/data/server.rb#L122-L131 | train | Get a member of this group. | [
30522,
13366,
2266,
1006,
8909,
1010,
5227,
1027,
2995,
1007,
8909,
1027,
8909,
1012,
10663,
1035,
8909,
2709,
1030,
2372,
1031,
8909,
1033,
2065,
2266,
1035,
17053,
2094,
1029,
1006,
8909,
1007,
2709,
9152,
2140,
4983,
5227,
2266,
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... |
deivid-rodriguez/byebug | lib/byebug/interface.rb | Byebug.Interface.split_commands | def split_commands(cmd_line)
return [""] if cmd_line.empty?
cmd_line.split(/;/).each_with_object([]) do |v, m|
if m.empty? || m.last[-1] != '\\'
m << v.strip
next
end
m.last[-1, 1] = ""
m.last << ";" << v
end
end | ruby | def split_commands(cmd_line)
return [""] if cmd_line.empty?
cmd_line.split(/;/).each_with_object([]) do |v, m|
if m.empty? || m.last[-1] != '\\'
m << v.strip
next
end
m.last[-1, 1] = ""
m.last << ";" << v
end
end | [
"def",
"split_commands",
"(",
"cmd_line",
")",
"return",
"[",
"\"\"",
"]",
"if",
"cmd_line",
".",
"empty?",
"cmd_line",
".",
"split",
"(",
"/",
"/",
")",
".",
"each_with_object",
"(",
"[",
"]",
")",
"do",
"|",
"v",
",",
"m",
"|",
"if",
"m",
".",
... | Splits a command line of the form "cmd1 ; cmd2 ; ... ; cmdN" into an
array of commands: [cmd1, cmd2, ..., cmdN] | [
"Splits",
"a",
"command",
"line",
"of",
"the",
"form",
"cmd1",
";",
"cmd2",
";",
"...",
";",
"cmdN",
"into",
"an",
"array",
"of",
"commands",
":",
"[",
"cmd1",
"cmd2",
"...",
"cmdN",
"]"
] | bf41a63858a648baa7fb621600d6451786d1572a | https://github.com/deivid-rodriguez/byebug/blob/bf41a63858a648baa7fb621600d6451786d1572a/lib/byebug/interface.rb#L128-L140 | train | Split the command line into a list of words | [
30522,
13366,
3975,
1035,
10954,
1006,
4642,
2094,
1035,
2240,
1007,
2709,
1031,
1000,
1000,
1033,
2065,
4642,
2094,
1035,
2240,
1012,
4064,
1029,
4642,
2094,
1035,
2240,
1012,
30524,
2079,
1064,
1058,
1010,
1049,
1064,
2065,
1049,
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... |
seejohnrun/ice_cube | lib/ice_cube/schedule.rb | IceCube.Schedule.conflicts_with? | def conflicts_with?(other_schedule, closing_time = nil)
closing_time = TimeUtil.ensure_time(closing_time)
unless terminating? || other_schedule.terminating? || closing_time
raise ArgumentError, "One or both schedules must be terminating to use #conflicts_with?"
end
# Pick the terminating... | ruby | def conflicts_with?(other_schedule, closing_time = nil)
closing_time = TimeUtil.ensure_time(closing_time)
unless terminating? || other_schedule.terminating? || closing_time
raise ArgumentError, "One or both schedules must be terminating to use #conflicts_with?"
end
# Pick the terminating... | [
"def",
"conflicts_with?",
"(",
"other_schedule",
",",
"closing_time",
"=",
"nil",
")",
"closing_time",
"=",
"TimeUtil",
".",
"ensure_time",
"(",
"closing_time",
")",
"unless",
"terminating?",
"||",
"other_schedule",
".",
"terminating?",
"||",
"closing_time",
"raise"... | Determine if this schedule conflicts with another schedule
@param [IceCube::Schedule] other_schedule - The schedule to compare to
@param [Time] closing_time - the last time to consider
@return [Boolean] whether or not the schedules conflict at all | [
"Determine",
"if",
"this",
"schedule",
"conflicts",
"with",
"another",
"schedule"
] | fb6c657bdc4f87dfda2bf83f15c5f487b78ccabd | https://github.com/seejohnrun/ice_cube/blob/fb6c657bdc4f87dfda2bf83f15c5f487b78ccabd/lib/ice_cube/schedule.rb#L257-L291 | train | Returns true if this schedule conflicts with another schedule | [
30522,
13366,
9755,
1035,
2007,
1029,
1006,
2060,
1035,
6134,
1010,
5494,
1035,
2051,
1027,
9152,
2140,
1007,
5494,
1035,
2051,
1027,
2051,
21823,
2140,
1012,
5676,
1035,
2051,
1006,
5494,
1035,
2051,
1007,
4983,
23552,
1029,
1064,
1064,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
googleapis/google-cloud-ruby | google-cloud-bigquery/lib/google-cloud-bigquery.rb | Google.Cloud.bigquery | def bigquery scope: nil, retries: nil, timeout: nil
Google::Cloud.bigquery @project, @keyfile, scope: scope,
retries: (retries || @retries),
timeout: (timeout || @timeout)
end | ruby | def bigquery scope: nil, retries: nil, timeout: nil
Google::Cloud.bigquery @project, @keyfile, scope: scope,
retries: (retries || @retries),
timeout: (timeout || @timeout)
end | [
"def",
"bigquery",
"scope",
":",
"nil",
",",
"retries",
":",
"nil",
",",
"timeout",
":",
"nil",
"Google",
"::",
"Cloud",
".",
"bigquery",
"@project",
",",
"@keyfile",
",",
"scope",
":",
"scope",
",",
"retries",
":",
"(",
"retries",
"||",
"@retries",
")... | Creates a new object for connecting to the BigQuery service.
Each call creates a new connection.
For more information on connecting to Google Cloud see the
{file:AUTHENTICATION.md Authentication Guide}.
@param [String, Array<String>] scope The OAuth 2.0 scopes controlling the
set of resources and operations th... | [
"Creates",
"a",
"new",
"object",
"for",
"connecting",
"to",
"the",
"BigQuery",
"service",
".",
"Each",
"call",
"creates",
"a",
"new",
"connection",
"."
] | 846c1a57250ac860ef4de1b54853a480ab2ff702 | https://github.com/googleapis/google-cloud-ruby/blob/846c1a57250ac860ef4de1b54853a480ab2ff702/google-cloud-bigquery/lib/google-cloud-bigquery.rb#L67-L71 | train | Create a new instance of the BigQuery object. | [
30522,
13366,
2502,
4226,
2854,
9531,
1024,
9152,
2140,
1010,
2128,
21011,
1024,
9152,
2140,
1010,
2051,
5833,
1024,
30524,
1030,
2051,
5833,
1007,
2203,
102,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
sunspot/sunspot | sunspot/lib/sunspot/schema.rb | Sunspot.Schema.dynamic_fields | def dynamic_fields
fields = []
variant_combinations.each do |field_variants|
FIELD_TYPES.each do |type|
fields << DynamicField.new(type, field_variants)
end
end
fields
end | ruby | def dynamic_fields
fields = []
variant_combinations.each do |field_variants|
FIELD_TYPES.each do |type|
fields << DynamicField.new(type, field_variants)
end
end
fields
end | [
"def",
"dynamic_fields",
"fields",
"=",
"[",
"]",
"variant_combinations",
".",
"each",
"do",
"|",
"field_variants",
"|",
"FIELD_TYPES",
".",
"each",
"do",
"|",
"type",
"|",
"fields",
"<<",
"DynamicField",
".",
"new",
"(",
"type",
",",
"field_variants",
")",
... | DynamicField instances representing all the available types and variants | [
"DynamicField",
"instances",
"representing",
"all",
"the",
"available",
"types",
"and",
"variants"
] | 31dd76cd7a14a4ef7bd541de97483d8cd72ff685 | https://github.com/sunspot/sunspot/blob/31dd76cd7a14a4ef7bd541de97483d8cd72ff685/sunspot/lib/sunspot/schema.rb#L53-L61 | train | Returns a list of dynamic fields | [
30522,
13366,
8790,
1035,
4249,
4249,
1027,
1031,
1033,
8349,
1035,
14930,
1012,
2169,
2079,
1064,
2492,
1035,
10176,
1064,
2492,
1035,
4127,
1012,
2169,
2079,
1064,
2828,
1064,
4249,
1026,
1026,
8790,
3790,
1012,
2047,
1006,
2828,
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_sql/lib/2014-04-01/generated/azure_mgmt_sql/disaster_recovery_configurations.rb | Azure::SQL::Mgmt::V2014_04_01.DisasterRecoveryConfigurations.begin_failover_allow_data_loss | def begin_failover_allow_data_loss(resource_group_name, server_name, disaster_recovery_configuration_name, custom_headers:nil)
response = begin_failover_allow_data_loss_async(resource_group_name, server_name, disaster_recovery_configuration_name, custom_headers:custom_headers).value!
nil
end | ruby | def begin_failover_allow_data_loss(resource_group_name, server_name, disaster_recovery_configuration_name, custom_headers:nil)
response = begin_failover_allow_data_loss_async(resource_group_name, server_name, disaster_recovery_configuration_name, custom_headers:custom_headers).value!
nil
end | [
"def",
"begin_failover_allow_data_loss",
"(",
"resource_group_name",
",",
"server_name",
",",
"disaster_recovery_configuration_name",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"begin_failover_allow_data_loss_async",
"(",
"resource_group_name",
",",
"server_name",... | Fails over from the current primary server to this server. This operation
might result in data loss.
@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 t... | [
"Fails",
"over",
"from",
"the",
"current",
"primary",
"server",
"to",
"this",
"server",
".",
"This",
"operation",
"might",
"result",
"in",
"data",
"loss",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/disaster_recovery_configurations.rb#L746-L749 | train | Allow data loss of a server to be lost. | [
30522,
13366,
4088,
1035,
8246,
7840,
1035,
3499,
1035,
2951,
1035,
3279,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
8241,
1035,
2171,
1010,
7071,
1035,
7233,
1035,
9563,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
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... |
square/connect-ruby-sdk | lib/square_connect/api/v1_items_api.rb | SquareConnect.V1ItemsApi.update_fee | def update_fee(location_id, fee_id, body, opts = {})
data, _status_code, _headers = update_fee_with_http_info(location_id, fee_id, body, opts)
return data
end | ruby | def update_fee(location_id, fee_id, body, opts = {})
data, _status_code, _headers = update_fee_with_http_info(location_id, fee_id, body, opts)
return data
end | [
"def",
"update_fee",
"(",
"location_id",
",",
"fee_id",
",",
"body",
",",
"opts",
"=",
"{",
"}",
")",
"data",
",",
"_status_code",
",",
"_headers",
"=",
"update_fee_with_http_info",
"(",
"location_id",
",",
"fee_id",
",",
"body",
",",
"opts",
")",
"return"... | UpdateFee
Modifies the details of an existing fee (tax).
@param location_id The ID of the fee's associated location.
@param fee_id The ID of the fee to edit.
@param body An object containing the fields to POST for the request. See the corresponding object definition for field details.
@param [Hash] opts the o... | [
"UpdateFee",
"Modifies",
"the",
"details",
"of",
"an",
"existing",
"fee",
"(",
"tax",
")",
"."
] | 798eb9ded716f23b9f1518386f1c311a34bca8bf | https://github.com/square/connect-ruby-sdk/blob/798eb9ded716f23b9f1518386f1c311a34bca8bf/lib/square_connect/api/v1_items_api.rb#L2005-L2008 | train | Updates a fee | [
30522,
13366,
10651,
1035,
7408,
1006,
3295,
1035,
8909,
1010,
7408,
1035,
8909,
1010,
2303,
1010,
23569,
2015,
1027,
1063,
1065,
1007,
2951,
1010,
1035,
3570,
1035,
3642,
1010,
1035,
20346,
2015,
1027,
10651,
1035,
7408,
1035,
2007,
1035,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Shopify/liquid | lib/liquid/standardfilters.rb | Liquid.StandardFilters.sort | def sort(input, property = nil)
ary = InputIterator.new(input)
return [] if ary.empty?
if property.nil?
ary.sort do |a, b|
nil_safe_compare(a, b)
end
elsif ary.all? { |el| el.respond_to?(:[]) }
begin
ary.sort { |a, b| nil_safe_compare(a[property], b[... | ruby | def sort(input, property = nil)
ary = InputIterator.new(input)
return [] if ary.empty?
if property.nil?
ary.sort do |a, b|
nil_safe_compare(a, b)
end
elsif ary.all? { |el| el.respond_to?(:[]) }
begin
ary.sort { |a, b| nil_safe_compare(a[property], b[... | [
"def",
"sort",
"(",
"input",
",",
"property",
"=",
"nil",
")",
"ary",
"=",
"InputIterator",
".",
"new",
"(",
"input",
")",
"return",
"[",
"]",
"if",
"ary",
".",
"empty?",
"if",
"property",
".",
"nil?",
"ary",
".",
"sort",
"do",
"|",
"a",
",",
"b"... | Sort elements of the array
provide optional property with which to sort an array of hashes or drops | [
"Sort",
"elements",
"of",
"the",
"array",
"provide",
"optional",
"property",
"with",
"which",
"to",
"sort",
"an",
"array",
"of",
"hashes",
"or",
"drops"
] | b3b63a683f6daaea7e70f1602ee829abdf970ef3 | https://github.com/Shopify/liquid/blob/b3b63a683f6daaea7e70f1602ee829abdf970ef3/lib/liquid/standardfilters.rb#L134-L150 | train | Sort an array of objects by the given property. | [
30522,
13366,
4066,
1006,
7953,
1010,
3200,
1027,
9152,
2140,
1007,
12098,
2100,
1027,
7953,
21646,
8844,
1012,
2047,
1006,
7953,
1007,
2709,
1031,
1033,
2065,
12098,
2100,
1012,
4064,
1029,
2065,
3200,
1012,
9152,
2140,
1029,
12098,
2100,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
randym/axlsx | lib/axlsx/workbook/workbook.rb | Axlsx.Workbook.insert_worksheet | def insert_worksheet(index=0, options={})
worksheet = Worksheet.new(self, options)
@worksheets.delete_at(@worksheets.size - 1)
@worksheets.insert(index, worksheet)
yield worksheet if block_given?
worksheet
end | ruby | def insert_worksheet(index=0, options={})
worksheet = Worksheet.new(self, options)
@worksheets.delete_at(@worksheets.size - 1)
@worksheets.insert(index, worksheet)
yield worksheet if block_given?
worksheet
end | [
"def",
"insert_worksheet",
"(",
"index",
"=",
"0",
",",
"options",
"=",
"{",
"}",
")",
"worksheet",
"=",
"Worksheet",
".",
"new",
"(",
"self",
",",
"options",
")",
"@worksheets",
".",
"delete_at",
"(",
"@worksheets",
".",
"size",
"-",
"1",
")",
"@works... | inserts a worksheet into this workbook at the position specified.
It the index specified is out of range, the worksheet will be added to the end of the
worksheets collection
@return [Worksheet]
@param index The zero based position to insert the newly created worksheet
@param [Hash] options Options to pass into the... | [
"inserts",
"a",
"worksheet",
"into",
"this",
"workbook",
"at",
"the",
"position",
"specified",
".",
"It",
"the",
"index",
"specified",
"is",
"out",
"of",
"range",
"the",
"worksheet",
"will",
"be",
"added",
"to",
"the",
"end",
"of",
"the",
"worksheets",
"co... | c593a08b2a929dac7aa8dc418b55e26b4c49dc34 | https://github.com/randym/axlsx/blob/c593a08b2a929dac7aa8dc418b55e26b4c49dc34/lib/axlsx/workbook/workbook.rb#L263-L269 | train | Insert a worksheet at the given index. | [
30522,
13366,
19274,
1035,
2573,
21030,
2102,
1006,
5950,
1027,
1014,
1010,
7047,
1027,
1063,
1065,
1007,
2573,
21030,
2102,
1027,
2573,
21030,
30524,
1035,
2012,
1006,
1030,
2573,
21030,
3215,
1012,
2946,
1011,
1015,
1007,
1030,
2573,
2103... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
roo-rb/roo | lib/roo/excelx.rb | Roo.Excelx.set | def set(row, col, value, sheet = nil) #:nodoc:
key = normalize(row, col)
cell_type = cell_type_by_value(value)
sheet_for(sheet).cells[key] = Cell.new(value, cell_type, nil, cell_type, value, nil, nil, nil, Coordinate.new(row, col))
end | ruby | def set(row, col, value, sheet = nil) #:nodoc:
key = normalize(row, col)
cell_type = cell_type_by_value(value)
sheet_for(sheet).cells[key] = Cell.new(value, cell_type, nil, cell_type, value, nil, nil, nil, Coordinate.new(row, col))
end | [
"def",
"set",
"(",
"row",
",",
"col",
",",
"value",
",",
"sheet",
"=",
"nil",
")",
"#:nodoc:",
"key",
"=",
"normalize",
"(",
"row",
",",
"col",
")",
"cell_type",
"=",
"cell_type_by_value",
"(",
"value",
")",
"sheet_for",
"(",
"sheet",
")",
".",
"cell... | set a cell to a certain value
(this will not be saved back to the spreadsheet file!) | [
"set",
"a",
"cell",
"to",
"a",
"certain",
"value",
"(",
"this",
"will",
"not",
"be",
"saved",
"back",
"to",
"the",
"spreadsheet",
"file!",
")"
] | 4ec1104f0c3c2a29711c0c907371cd2be12bcc3c | https://github.com/roo-rb/roo/blob/4ec1104f0c3c2a29711c0c907371cd2be12bcc3c/lib/roo/excelx.rb#L153-L157 | train | Set a cell at a given row and column | [
30522,
13366,
2275,
1006,
5216,
1010,
8902,
1010,
3643,
1010,
7123,
1027,
9152,
2140,
1007,
1001,
1024,
7293,
10085,
1024,
3145,
1027,
3671,
4697,
1006,
5216,
1010,
8902,
1007,
3526,
1035,
2828,
1027,
3526,
1035,
2828,
1035,
2011,
1035,
3... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | data/azure_cognitiveservices_contentmoderator/lib/1.0/generated/azure_cognitiveservices_contentmoderator/reviews.rb | Azure::CognitiveServices::ContentModerator::V1_0.Reviews.add_video_transcript_moderation_result_async | def add_video_transcript_moderation_result_async(content_type, team_name, review_id, transcript_moderation_body, custom_headers:nil)
fail ArgumentError, '@client.endpoint is nil' if @client.endpoint.nil?
fail ArgumentError, 'content_type is nil' if content_type.nil?
fail ArgumentError, 'team_name is n... | ruby | def add_video_transcript_moderation_result_async(content_type, team_name, review_id, transcript_moderation_body, custom_headers:nil)
fail ArgumentError, '@client.endpoint is nil' if @client.endpoint.nil?
fail ArgumentError, 'content_type is nil' if content_type.nil?
fail ArgumentError, 'team_name is n... | [
"def",
"add_video_transcript_moderation_result_async",
"(",
"content_type",
",",
"team_name",
",",
"review_id",
",",
"transcript_moderation_body",
",",
"custom_headers",
":",
"nil",
")",
"fail",
"ArgumentError",
",",
"'@client.endpoint is nil'",
"if",
"@client",
".",
"end... | This API adds a transcript screen text result file for a video review.
Transcript screen text result file is a result of Screen Text API . In order
to generate transcript screen text result file , a transcript file has to be
screened for profanity using Screen Text API.
@param content_type [String] The content typ... | [
"This",
"API",
"adds",
"a",
"transcript",
"screen",
"text",
"result",
"file",
"for",
"a",
"video",
"review",
".",
"Transcript",
"screen",
"text",
"result",
"file",
"is",
"a",
"result",
"of",
"Screen",
"Text",
"API",
".",
"In",
"order",
"to",
"generate",
... | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_cognitiveservices_contentmoderator/lib/1.0/generated/azure_cognitiveservices_contentmoderator/reviews.rb#L1184-L1250 | train | Add a transcript moderation result to a video review. | [
30522,
13366,
5587,
1035,
2678,
1035,
24051,
30524,
8400,
2003,
9152,
2140,
1005,
2065,
1030,
7396,
1012,
2203,
8400,
1012,
9152,
2140,
1029,
8246,
6685,
2121,
29165,
1010,
1005,
4180,
1035,
2828,
2003,
9152,
2140,
1005,
2065,
4180,
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... |
guard/guard | lib/guard/commander.rb | Guard.Commander.run_all | def run_all(scopes = {})
UI.clear(force: true)
UI.action_with_scopes("Run", scopes)
Runner.new.run(:run_all, scopes)
end | ruby | def run_all(scopes = {})
UI.clear(force: true)
UI.action_with_scopes("Run", scopes)
Runner.new.run(:run_all, scopes)
end | [
"def",
"run_all",
"(",
"scopes",
"=",
"{",
"}",
")",
"UI",
".",
"clear",
"(",
"force",
":",
"true",
")",
"UI",
".",
"action_with_scopes",
"(",
"\"Run\"",
",",
"scopes",
")",
"Runner",
".",
"new",
".",
"run",
"(",
":run_all",
",",
"scopes",
")",
"en... | Trigger `run_all` on all Guard plugins currently enabled.
@param [Hash] scopes hash with a Guard plugin or a group scope | [
"Trigger",
"run_all",
"on",
"all",
"Guard",
"plugins",
"currently",
"enabled",
"."
] | e2508cd83badf0d537dbaba35d307adc35d92e4f | https://github.com/guard/guard/blob/e2508cd83badf0d537dbaba35d307adc35d92e4f/lib/guard/commander.rb#L80-L84 | train | Run all the tasks | [
30522,
13366,
2448,
1035,
2035,
1006,
9531,
2015,
1027,
1063,
1065,
1007,
21318,
1012,
3154,
1006,
2486,
1024,
2995,
1007,
21318,
1012,
2895,
1035,
2007,
1035,
9531,
2015,
1006,
1000,
2448,
1000,
1010,
9531,
2015,
1007,
5479,
1012,
2047,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_web/lib/2018-02-01/generated/azure_mgmt_web/app_service_environments.rb | Azure::Web::Mgmt::V2018_02_01.AppServiceEnvironments.list_multi_role_pool_instance_metrics_next | def list_multi_role_pool_instance_metrics_next(next_page_link, custom_headers:nil)
response = list_multi_role_pool_instance_metrics_next_async(next_page_link, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def list_multi_role_pool_instance_metrics_next(next_page_link, custom_headers:nil)
response = list_multi_role_pool_instance_metrics_next_async(next_page_link, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"list_multi_role_pool_instance_metrics_next",
"(",
"next_page_link",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"list_multi_role_pool_instance_metrics_next_async",
"(",
"next_page_link",
",",
"custom_headers",
":custom_headers",
")",
".",
"value!",
"respo... | Get metrics for a specific instance of a multi-role pool of an App Service
Environment.
Get metrics for a specific instance of a multi-role pool of an App Service
Environment.
@param next_page_link [String] The NextLink from the previous successful call
to List operation.
@param custom_headers [Hash{String => S... | [
"Get",
"metrics",
"for",
"a",
"specific",
"instance",
"of",
"a",
"multi",
"-",
"role",
"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#L5616-L5619 | train | Gets metrics for a multi - role pool instance. | [
30522,
13366,
2862,
1035,
4800,
1035,
2535,
1035,
4770,
1035,
6013,
1035,
12046,
2015,
1035,
2279,
1006,
2279,
1035,
3931,
1035,
4957,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
2862,
1035,
4800,
1035,
2535,
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... |
activeadmin/activeadmin | lib/active_admin/router.rb | ActiveAdmin.Router.define_resources_routes | def define_resources_routes
resources = namespaces.flat_map { |n| n.resources.values }
resources.each do |config|
define_resource_routes(config)
end
end | ruby | def define_resources_routes
resources = namespaces.flat_map { |n| n.resources.values }
resources.each do |config|
define_resource_routes(config)
end
end | [
"def",
"define_resources_routes",
"resources",
"=",
"namespaces",
".",
"flat_map",
"{",
"|",
"n",
"|",
"n",
".",
"resources",
".",
"values",
"}",
"resources",
".",
"each",
"do",
"|",
"config",
"|",
"define_resource_routes",
"(",
"config",
")",
"end",
"end"
] | Defines the routes for each resource | [
"Defines",
"the",
"routes",
"for",
"each",
"resource"
] | 0759c8dcf97865748c9344459162ac3c7e65a6cd | https://github.com/activeadmin/activeadmin/blob/0759c8dcf97865748c9344459162ac3c7e65a6cd/lib/active_admin/router.rb#L30-L35 | train | define resources routes | [
30522,
13366,
9375,
1035,
4219,
1035,
5847,
4219,
1027,
3415,
15327,
2015,
1012,
4257,
1035,
4949,
1063,
1064,
1050,
1064,
1050,
1012,
4219,
1012,
5300,
1065,
4219,
1012,
2169,
2079,
1064,
9530,
8873,
2290,
1064,
9375,
1035,
7692,
1035,
5... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
rmosolgo/graphql-ruby | lib/graphql/subscriptions.rb | GraphQL.Subscriptions.normalize_arguments | def normalize_arguments(event_name, arg_owner, args)
case arg_owner
when GraphQL::Field, GraphQL::InputObjectType
normalized_args = {}
missing_arg_names = []
args.each do |k, v|
arg_name = k.to_s
arg_defn = arg_owner.arguments[arg_name]
if arg_defn
... | ruby | def normalize_arguments(event_name, arg_owner, args)
case arg_owner
when GraphQL::Field, GraphQL::InputObjectType
normalized_args = {}
missing_arg_names = []
args.each do |k, v|
arg_name = k.to_s
arg_defn = arg_owner.arguments[arg_name]
if arg_defn
... | [
"def",
"normalize_arguments",
"(",
"event_name",
",",
"arg_owner",
",",
"args",
")",
"case",
"arg_owner",
"when",
"GraphQL",
"::",
"Field",
",",
"GraphQL",
"::",
"InputObjectType",
"normalized_args",
"=",
"{",
"}",
"missing_arg_names",
"=",
"[",
"]",
"args",
"... | Recursively normalize `args` as belonging to `arg_owner`:
- convert symbols to strings,
- if needed, camelize the string (using {#normalize_name})
@param arg_owner [GraphQL::Field, GraphQL::BaseType]
@param args [Hash, Array, Any] some GraphQL input value to coerce as `arg_owner`
@return [Any] normalized arguments... | [
"Recursively",
"normalize",
"args",
"as",
"belonging",
"to",
"arg_owner",
":",
"-",
"convert",
"symbols",
"to",
"strings",
"-",
"if",
"needed",
"camelize",
"the",
"string",
"(",
"using",
"{",
"#normalize_name",
"}",
")"
] | d5be13a816f220b9efbabeaa69a3e56fedf311f5 | https://github.com/rmosolgo/graphql-ruby/blob/d5be13a816f220b9efbabeaa69a3e56fedf311f5/lib/graphql/subscriptions.rb#L189-L229 | train | Normalize arguments of a subscription | [
30522,
13366,
3671,
4697,
1035,
9918,
1006,
2724,
1035,
2171,
1010,
12098,
2290,
1035,
3954,
1010,
12098,
5620,
1007,
2553,
12098,
2290,
1035,
3954,
2043,
10629,
4160,
2140,
1024,
1024,
2492,
1010,
10629,
4160,
2140,
1024,
1024,
7953,
16429... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
samvera/hyrax | lib/hyrax/redis_event_store.rb | Hyrax.RedisEventStore.push | def push(value)
RedisEventStore.instance.lpush(@key, value)
rescue Redis::CommandError, Redis::CannotConnectError
RedisEventStore.logger.error("unable to push event: #{@key}")
nil
end | ruby | def push(value)
RedisEventStore.instance.lpush(@key, value)
rescue Redis::CommandError, Redis::CannotConnectError
RedisEventStore.logger.error("unable to push event: #{@key}")
nil
end | [
"def",
"push",
"(",
"value",
")",
"RedisEventStore",
".",
"instance",
".",
"lpush",
"(",
"@key",
",",
"value",
")",
"rescue",
"Redis",
"::",
"CommandError",
",",
"Redis",
"::",
"CannotConnectError",
"RedisEventStore",
".",
"logger",
".",
"error",
"(",
"\"una... | Adds a value to the end of a list identified by key | [
"Adds",
"a",
"value",
"to",
"the",
"end",
"of",
"a",
"list",
"identified",
"by",
"key"
] | e2b4f56e829a53b1f11296324736e9d5b8c9ee5f | https://github.com/samvera/hyrax/blob/e2b4f56e829a53b1f11296324736e9d5b8c9ee5f/lib/hyrax/redis_event_store.rb#L51-L56 | train | Pushes the given value to the list of events. | [
30522,
13366,
5245,
1006,
3643,
1007,
2417,
5562,
15338,
23809,
2063,
1012,
6013,
1012,
6948,
20668,
1006,
1030,
3145,
1010,
3643,
1007,
5343,
2417,
2483,
1024,
1024,
3474,
29165,
1010,
2417,
2483,
1024,
1024,
3685,
8663,
2638,
21162,
29165... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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_configuration_info_with_http_info | def get_partition_backup_configuration_info_with_http_info(partition_id, timeout:60, custom_headers:nil)
get_partition_backup_configuration_info_async(partition_id, timeout:timeout, custom_headers:custom_headers).value!
end | ruby | def get_partition_backup_configuration_info_with_http_info(partition_id, timeout:60, custom_headers:nil)
get_partition_backup_configuration_info_async(partition_id, timeout:timeout, custom_headers:custom_headers).value!
end | [
"def",
"get_partition_backup_configuration_info_with_http_info",
"(",
"partition_id",
",",
"timeout",
":",
"60",
",",
"custom_headers",
":",
"nil",
")",
"get_partition_backup_configuration_info_async",
"(",
"partition_id",
",",
"timeout",
":",
"timeout",
",",
"custom_header... | Gets the partition backup configuration information
Gets the Service Fabric Backup configuration information for the specified
partition.
@param partition_id The identity of the partition.
@param timeout [Integer] The server timeout for performing the operation in
seconds. This timeout specifies the time duratio... | [
"Gets",
"the",
"partition",
"backup",
"configuration",
"information"
] | 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#L24984-L24986 | train | Gets backup configuration information for the specified partition. | [
30522,
13366,
2131,
1035,
13571,
1035,
10200,
1035,
9563,
1035,
18558,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
13571,
1035,
8909,
1010,
2051,
5833,
1024,
3438,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
2131,
1035,
13571,
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_container_registry/lib/2018-02-01-preview/generated/azure_mgmt_container_registry/builds.rb | Azure::ContainerRegistry::Mgmt::V2018_02_01_preview.Builds.get_log_link | def get_log_link(resource_group_name, registry_name, build_id, custom_headers:nil)
response = get_log_link_async(resource_group_name, registry_name, build_id, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def get_log_link(resource_group_name, registry_name, build_id, custom_headers:nil)
response = get_log_link_async(resource_group_name, registry_name, build_id, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"get_log_link",
"(",
"resource_group_name",
",",
"registry_name",
",",
"build_id",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"get_log_link_async",
"(",
"resource_group_name",
",",
"registry_name",
",",
"build_id",
",",
"custom_headers",
":custom_... | Gets a link to download the build logs.
@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 build_id [String] The build ID.
@param custom_headers [Hash{String => String}] A hash of cust... | [
"Gets",
"a",
"link",
"to",
"download",
"the",
"build",
"logs",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_container_registry/lib/2018-02-01-preview/generated/azure_mgmt_container_registry/builds.rb#L301-L304 | train | Gets the log link to the specified build. | [
30522,
13366,
2131,
1035,
8833,
1035,
4957,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
15584,
1035,
2171,
1010,
3857,
1035,
8909,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
2131,
1035,
8833,
1035,
4957,
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... |
CocoaPods/Xcodeproj | lib/xcodeproj/project.rb | Xcodeproj.Project.new_target | def new_target(type, name, platform, deployment_target = nil, product_group = nil, language = nil)
product_group ||= products_group
ProjectHelper.new_target(self, type, name, platform, deployment_target, product_group, language)
end | ruby | def new_target(type, name, platform, deployment_target = nil, product_group = nil, language = nil)
product_group ||= products_group
ProjectHelper.new_target(self, type, name, platform, deployment_target, product_group, language)
end | [
"def",
"new_target",
"(",
"type",
",",
"name",
",",
"platform",
",",
"deployment_target",
"=",
"nil",
",",
"product_group",
"=",
"nil",
",",
"language",
"=",
"nil",
")",
"product_group",
"||=",
"products_group",
"ProjectHelper",
".",
"new_target",
"(",
"self",... | Creates a new target and adds it to the project.
The target is configured for the given platform and its file reference it
is added to the {products_group}.
The target is pre-populated with common build settings, and the
appropriate Framework according to the platform is added to to its
Frameworks phase.
@para... | [
"Creates",
"a",
"new",
"target",
"and",
"adds",
"it",
"to",
"the",
"project",
"."
] | 3be1684437a6f8e69c7836ad4c85a2b78663272f | https://github.com/CocoaPods/Xcodeproj/blob/3be1684437a6f8e69c7836ad4c85a2b78663272f/lib/xcodeproj/project.rb#L714-L717 | train | Creates a new target | [
30522,
13366,
2047,
1035,
4539,
1006,
2828,
1010,
2171,
1010,
4132,
1010,
10813,
1035,
4539,
1027,
9152,
2140,
1010,
4031,
1035,
2177,
1027,
9152,
2140,
1010,
2653,
1027,
9152,
2140,
1007,
4031,
1035,
2177,
1064,
1064,
1027,
3688,
1035,
2... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
jnunemaker/flipper | lib/flipper/feature.rb | Flipper.Feature.disable | def disable(thing = false)
instrument(:disable) do |payload|
adapter.add self
gate = gate_for(thing)
wrapped_thing = gate.wrap(thing)
payload[:gate_name] = gate.name
payload[:thing] = wrapped_thing
adapter.disable self, gate, wrapped_thing
end
end | ruby | def disable(thing = false)
instrument(:disable) do |payload|
adapter.add self
gate = gate_for(thing)
wrapped_thing = gate.wrap(thing)
payload[:gate_name] = gate.name
payload[:thing] = wrapped_thing
adapter.disable self, gate, wrapped_thing
end
end | [
"def",
"disable",
"(",
"thing",
"=",
"false",
")",
"instrument",
"(",
":disable",
")",
"do",
"|",
"payload",
"|",
"adapter",
".",
"add",
"self",
"gate",
"=",
"gate_for",
"(",
"thing",
")",
"wrapped_thing",
"=",
"gate",
".",
"wrap",
"(",
"thing",
")",
... | Public: Disable this feature for something.
Returns the result of Adapter#disable. | [
"Public",
":",
"Disable",
"this",
"feature",
"for",
"something",
"."
] | df0352b663ad3ed45d68710f10a8170249ff9d78 | https://github.com/jnunemaker/flipper/blob/df0352b663ad3ed45d68710f10a8170249ff9d78/lib/flipper/feature.rb#L59-L70 | train | Disable the given thing | [
30522,
13366,
4487,
19150,
1006,
2518,
1027,
6270,
1007,
6602,
1006,
1024,
4487,
19150,
1007,
2079,
1064,
18093,
1064,
15581,
2121,
1012,
5587,
2969,
4796,
1027,
4796,
1035,
2005,
1006,
2518,
1007,
5058,
1035,
2518,
1027,
4796,
1012,
10236,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
capistrano/capistrano | lib/capistrano/dsl.rb | Capistrano.DSL.execute | def execute(*)
file, line, = caller.first.split(":")
colors = SSHKit::Color.new($stderr)
$stderr.puts colors.colorize("Warning: `execute' should be wrapped in an `on' scope in #{file}:#{line}.", :red)
$stderr.puts
$stderr.puts " task :example do"
$stderr.puts colors.colorize(" on... | ruby | def execute(*)
file, line, = caller.first.split(":")
colors = SSHKit::Color.new($stderr)
$stderr.puts colors.colorize("Warning: `execute' should be wrapped in an `on' scope in #{file}:#{line}.", :red)
$stderr.puts
$stderr.puts " task :example do"
$stderr.puts colors.colorize(" on... | [
"def",
"execute",
"(",
"*",
")",
"file",
",",
"line",
",",
"=",
"caller",
".",
"first",
".",
"split",
"(",
"\":\"",
")",
"colors",
"=",
"SSHKit",
"::",
"Color",
".",
"new",
"(",
"$stderr",
")",
"$stderr",
".",
"puts",
"colors",
".",
"colorize",
"("... | Catch common beginner mistake and give a helpful error message on stderr | [
"Catch",
"common",
"beginner",
"mistake",
"and",
"give",
"a",
"helpful",
"error",
"message",
"on",
"stderr"
] | 7a14ddb47d64187c8a7ee14c7d78e874f30f08ef | https://github.com/capistrano/capistrano/blob/7a14ddb47d64187c8a7ee14c7d78e874f30f08ef/lib/capistrano/dsl.rb#L80-L92 | train | Execute the given command. | [
30522,
13366,
15389,
1006,
1008,
1007,
5371,
1010,
2240,
1010,
1027,
20587,
1012,
2034,
1012,
3975,
1006,
1000,
1024,
1000,
1007,
6087,
1027,
7020,
2232,
23615,
1024,
1024,
3609,
1012,
2047,
1006,
1002,
2358,
4063,
2099,
1007,
1002,
2358,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
mhenrixon/sidekiq-unique-jobs | lib/sidekiq_unique_jobs/digests.rb | SidekiqUniqueJobs.Digests.delete_by_pattern | def delete_by_pattern(pattern, count: DEFAULT_COUNT)
result, elapsed = timed do
digests = all(pattern: pattern, count: count)
batch_delete(digests)
digests.size
end
log_info("#{__method__}(#{pattern}, count: #{count}) completed in #{elapsed}ms")
result
end | ruby | def delete_by_pattern(pattern, count: DEFAULT_COUNT)
result, elapsed = timed do
digests = all(pattern: pattern, count: count)
batch_delete(digests)
digests.size
end
log_info("#{__method__}(#{pattern}, count: #{count}) completed in #{elapsed}ms")
result
end | [
"def",
"delete_by_pattern",
"(",
"pattern",
",",
"count",
":",
"DEFAULT_COUNT",
")",
"result",
",",
"elapsed",
"=",
"timed",
"do",
"digests",
"=",
"all",
"(",
"pattern",
":",
"pattern",
",",
"count",
":",
"count",
")",
"batch_delete",
"(",
"digests",
")",
... | Deletes unique digests by pattern
@param [String] pattern a key pattern to match with
@param [Integer] count the maximum number
@return [Array<String>] with unique digests | [
"Deletes",
"unique",
"digests",
"by",
"pattern"
] | 2944b97c720528f53962ccfd17d43ac939a77f46 | https://github.com/mhenrixon/sidekiq-unique-jobs/blob/2944b97c720528f53962ccfd17d43ac939a77f46/lib/sidekiq_unique_jobs/digests.rb#L71-L81 | train | Delete all digests matching a pattern | [
30522,
13366,
3972,
12870,
1035,
2011,
1035,
5418,
1006,
5418,
1010,
4175,
1024,
12398,
1035,
4175,
1007,
2765,
1010,
3449,
9331,
6924,
1027,
22313,
2079,
17886,
2015,
1027,
2035,
1006,
5418,
1024,
5418,
1010,
30524,
1035,
1035,
1065,
1006,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_logic/lib/2016-06-01/generated/azure_mgmt_logic/partners.rb | Azure::Logic::Mgmt::V2016_06_01.Partners.delete | def delete(resource_group_name, integration_account_name, partner_name, custom_headers:nil)
response = delete_async(resource_group_name, integration_account_name, partner_name, custom_headers:custom_headers).value!
nil
end | ruby | def delete(resource_group_name, integration_account_name, partner_name, custom_headers:nil)
response = delete_async(resource_group_name, integration_account_name, partner_name, custom_headers:custom_headers).value!
nil
end | [
"def",
"delete",
"(",
"resource_group_name",
",",
"integration_account_name",
",",
"partner_name",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"delete_async",
"(",
"resource_group_name",
",",
"integration_account_name",
",",
"partner_name",
",",
"custom_hea... | Deletes an integration account partner.
@param resource_group_name [String] The resource group name.
@param integration_account_name [String] The integration account name.
@param partner_name [String] The integration account partner name.
@param custom_headers [Hash{String => String}] A hash of custom headers that... | [
"Deletes",
"an",
"integration",
"account",
"partner",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_logic/lib/2016-06-01/generated/azure_mgmt_logic/partners.rb#L348-L351 | train | Deletes an integration account partner. | [
30522,
13366,
3972,
12870,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
8346,
1035,
4070,
1035,
2171,
1010,
4256,
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... |
ClosureTree/closure_tree | lib/closure_tree/model.rb | ClosureTree.Model.ancestry_path | def ancestry_path(to_s_column = _ct.name_column)
self_and_ancestors.map { |n| n.send to_s_column.to_sym }.reverse
end | ruby | def ancestry_path(to_s_column = _ct.name_column)
self_and_ancestors.map { |n| n.send to_s_column.to_sym }.reverse
end | [
"def",
"ancestry_path",
"(",
"to_s_column",
"=",
"_ct",
".",
"name_column",
")",
"self_and_ancestors",
".",
"map",
"{",
"|",
"n",
"|",
"n",
".",
"send",
"to_s_column",
".",
"to_sym",
"}",
".",
"reverse",
"end"
] | Returns an array, root first, of self_and_ancestors' values of the +to_s_column+, which defaults
to the +name_column+.
(so child.ancestry_path == +%w{grandparent parent child}+ | [
"Returns",
"an",
"array",
"root",
"first",
"of",
"self_and_ancestors",
"values",
"of",
"the",
"+",
"to_s_column",
"+",
"which",
"defaults",
"to",
"the",
"+",
"name_column",
"+",
".",
"(",
"so",
"child",
".",
"ancestry_path",
"==",
"+",
"%w",
"{",
"grandpar... | 9babda807861a1b76745cfb986b001db01017ef9 | https://github.com/ClosureTree/closure_tree/blob/9babda807861a1b76745cfb986b001db01017ef9/lib/closure_tree/model.rb#L105-L107 | train | Returns ancestry path for this object. | [
30522,
13366,
11377,
1035,
4130,
1006,
2000,
1035,
1055,
1035,
5930,
1027,
1035,
14931,
1012,
2171,
1035,
5930,
1007,
2969,
1035,
1998,
1035,
10748,
1012,
4949,
1063,
1064,
1050,
1064,
1050,
1012,
4604,
2000,
1035,
1055,
1035,
5930,
1012,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
ruby/racc | lib/racc/grammar.rb | Racc.Grammar.nullable_symbols | def nullable_symbols
raise 'Grammar not yet closed' unless @closed
@nullable_symbols ||= Sym.set_closure(
@symbols.select { |nt| nt.heads.any?(&:reduce?) }).freeze
end | ruby | def nullable_symbols
raise 'Grammar not yet closed' unless @closed
@nullable_symbols ||= Sym.set_closure(
@symbols.select { |nt| nt.heads.any?(&:reduce?) }).freeze
end | [
"def",
"nullable_symbols",
"raise",
"'Grammar not yet closed'",
"unless",
"@closed",
"@nullable_symbols",
"||=",
"Sym",
".",
"set_closure",
"(",
"@symbols",
".",
"select",
"{",
"|",
"nt",
"|",
"nt",
".",
"heads",
".",
"any?",
"(",
":reduce?",
")",
"}",
")",
... | Can an empty sequence of tokens reduce to this nonterminal?
(Can it be produced out of "nothing"?) | [
"Can",
"an",
"empty",
"sequence",
"of",
"tokens",
"reduce",
"to",
"this",
"nonterminal?",
"(",
"Can",
"it",
"be",
"produced",
"out",
"of",
"nothing",
"?",
")"
] | d3244edfa11dd6e86e43f570c6444d41c7e3552a | https://github.com/ruby/racc/blob/d3244edfa11dd6e86e43f570c6444d41c7e3552a/lib/racc/grammar.rb#L234-L238 | train | Returns the nullable symbols for this grammar. | [
30522,
13366,
19701,
3085,
1035,
9255,
5333,
1005,
8035,
2025,
2664,
30524,
1064,
23961,
1012,
4641,
1012,
2151,
1029,
1006,
1004,
1024,
5547,
1029,
1007,
1065,
1007,
1012,
13184,
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... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/commands/command_bot.rb | Discordrb::Commands.CommandBot.create_message | def create_message(data)
message = Discordrb::Message.new(data, self)
return message if message.from_bot? && !@should_parse_self
return message if message.webhook? && !@attributes[:webhook_commands]
unless message.author
Discordrb::LOGGER.warn("Received a message (#{message.inspect}) wi... | ruby | def create_message(data)
message = Discordrb::Message.new(data, self)
return message if message.from_bot? && !@should_parse_self
return message if message.webhook? && !@attributes[:webhook_commands]
unless message.author
Discordrb::LOGGER.warn("Received a message (#{message.inspect}) wi... | [
"def",
"create_message",
"(",
"data",
")",
"message",
"=",
"Discordrb",
"::",
"Message",
".",
"new",
"(",
"data",
",",
"self",
")",
"return",
"message",
"if",
"message",
".",
"from_bot?",
"&&",
"!",
"@should_parse_self",
"return",
"message",
"if",
"message",... | Internal handler for MESSAGE_CREATE that is overwritten to allow for command handling | [
"Internal",
"handler",
"for",
"MESSAGE_CREATE",
"that",
"is",
"overwritten",
"to",
"allow",
"for",
"command",
"handling"
] | 764298a1ff0be69a1853b510d736f21c2b91a2fe | https://github.com/meew0/discordrb/blob/764298a1ff0be69a1853b510d736f21c2b91a2fe/lib/discordrb/commands/command_bot.rb#L393-L423 | train | Create a message from the given data | [
30522,
13366,
3443,
1035,
4471,
1006,
2951,
1007,
4471,
1027,
12532,
4103,
15185,
1024,
1024,
4471,
1012,
2047,
1006,
2951,
1010,
2969,
1007,
2709,
4471,
2065,
4471,
1012,
2013,
1035,
28516,
1029,
1004,
1004,
999,
1030,
2323,
1035,
11968,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
watir/watir | lib/watir/after_hooks.rb | Watir.AfterHooks.add | def add(after_hook = nil, &block)
if block_given?
@after_hooks << block
elsif after_hook.respond_to? :call
@after_hooks << after_hook
else
raise ArgumentError, 'expected block or object responding to #call'
end
end | ruby | def add(after_hook = nil, &block)
if block_given?
@after_hooks << block
elsif after_hook.respond_to? :call
@after_hooks << after_hook
else
raise ArgumentError, 'expected block or object responding to #call'
end
end | [
"def",
"add",
"(",
"after_hook",
"=",
"nil",
",",
"&",
"block",
")",
"if",
"block_given?",
"@after_hooks",
"<<",
"block",
"elsif",
"after_hook",
".",
"respond_to?",
":call",
"@after_hooks",
"<<",
"after_hook",
"else",
"raise",
"ArgumentError",
",",
"'expected bl... | Adds new after hook.
@example
browser.after_hooks.add do |browser|
browser.text.include?("Server Error") and puts "Application exception or 500 error!"
end
browser.goto "watir.com/404"
"Application exception or 500 error!"
@param [#call] after_hook Object responding to call
@yield after_hook block... | [
"Adds",
"new",
"after",
"hook",
"."
] | 2d8db09811c6221ae401b85b2f61f5fa66e463a3 | https://github.com/watir/watir/blob/2d8db09811c6221ae401b85b2f61f5fa66e463a3/lib/watir/after_hooks.rb#L35-L43 | train | Add a hook to the after_hooks list | [
30522,
13366,
5587,
1006,
2044,
1035,
8103,
1027,
9152,
2140,
1010,
1004,
3796,
1007,
2065,
3796,
1035,
2445,
1029,
1030,
2044,
1035,
18008,
1026,
1026,
3796,
3449,
5332,
2546,
2044,
1035,
8103,
1012,
6869,
1035,
2000,
1029,
1024,
2655,
1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
kpumuk/meta-tags | lib/meta_tags/meta_tags_collection.rb | MetaTags.MetaTagsCollection.extract_noindex | def extract_noindex
noindex_name, noindex_value = extract_noindex_attribute(:noindex)
index_name, index_value = extract_noindex_attribute(:index)
nofollow_name, nofollow_value = extract_noindex_attribute(:nofollow)
follow_name, follow_value = extract_noindex_attribute(:follow)
noindex_at... | ruby | def extract_noindex
noindex_name, noindex_value = extract_noindex_attribute(:noindex)
index_name, index_value = extract_noindex_attribute(:index)
nofollow_name, nofollow_value = extract_noindex_attribute(:nofollow)
follow_name, follow_value = extract_noindex_attribute(:follow)
noindex_at... | [
"def",
"extract_noindex",
"noindex_name",
",",
"noindex_value",
"=",
"extract_noindex_attribute",
"(",
":noindex",
")",
"index_name",
",",
"index_value",
"=",
"extract_noindex_attribute",
"(",
":index",
")",
"nofollow_name",
",",
"nofollow_value",
"=",
"extract_noindex_at... | Extracts noindex settings as a Hash mapping noindex tag name to value.
@return [Hash<String,String>] noindex attributes. | [
"Extracts",
"noindex",
"settings",
"as",
"a",
"Hash",
"mapping",
"noindex",
"tag",
"name",
"to",
"value",
"."
] | 03585f95edf96cd17024c5c155ce46ec8bc47232 | https://github.com/kpumuk/meta-tags/blob/03585f95edf96cd17024c5c155ce46ec8bc47232/lib/meta_tags/meta_tags_collection.rb#L145-L167 | train | Extract noindex attributes from the archive | [
30522,
13366,
14817,
1035,
2053,
22254,
10288,
2053,
22254,
10288,
1035,
2171,
1010,
2053,
22254,
10288,
1035,
3643,
1027,
30524,
14817,
1035,
2053,
22254,
10288,
1035,
17961,
1006,
1024,
2053,
14876,
7174,
2860,
1007,
3582,
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... |
mongodb/mongo-ruby-driver | lib/mongo/cluster.rb | Mongo.Cluster.remove | def remove(host)
address = Address.new(host)
removed_servers = @servers.select { |s| s.address == address }
@update_lock.synchronize { @servers = @servers - removed_servers }
removed_servers.each do |server|
if server.connected?
server.disconnect!
publish_sdam_event(
... | ruby | def remove(host)
address = Address.new(host)
removed_servers = @servers.select { |s| s.address == address }
@update_lock.synchronize { @servers = @servers - removed_servers }
removed_servers.each do |server|
if server.connected?
server.disconnect!
publish_sdam_event(
... | [
"def",
"remove",
"(",
"host",
")",
"address",
"=",
"Address",
".",
"new",
"(",
"host",
")",
"removed_servers",
"=",
"@servers",
".",
"select",
"{",
"|",
"s",
"|",
"s",
".",
"address",
"==",
"address",
"}",
"@update_lock",
".",
"synchronize",
"{",
"@ser... | Remove the server from the cluster for the provided address, if it
exists.
@example Remove the server from the cluster.
server.remove('127.0.0.1:27017')
@param [ String ] host The host/port or socket address.
@return [ true|false ] Whether any servers were removed.
@since 2.0.0, return value added in 2.7.0 | [
"Remove",
"the",
"server",
"from",
"the",
"cluster",
"for",
"the",
"provided",
"address",
"if",
"it",
"exists",
"."
] | dca26d0870cb3386fad9ccc1d17228097c1fe1c8 | https://github.com/mongodb/mongo-ruby-driver/blob/dca26d0870cb3386fad9ccc1d17228097c1fe1c8/lib/mongo/cluster.rb#L610-L624 | train | Remove a server from the list of servers | [
30522,
13366,
6366,
1006,
3677,
1007,
4769,
1027,
4769,
1012,
2047,
1006,
3677,
1007,
3718,
1035,
14903,
1027,
1030,
14903,
1012,
7276,
1063,
1064,
1055,
1064,
1055,
1012,
4769,
1027,
1027,
4769,
1065,
1030,
10651,
1035,
5843,
1012,
26351,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
huginn/huginn | app/models/agents/website_agent.rb | Agents.WebsiteAgent.store_payload! | def store_payload!(old_events, result)
case interpolated['mode'].presence
when 'on_change'
result_json = result.to_json
if found = old_events.find { |event| event.payload.to_json == result_json }
found.update!(expires_at: new_event_expiration_date)
false
else
... | ruby | def store_payload!(old_events, result)
case interpolated['mode'].presence
when 'on_change'
result_json = result.to_json
if found = old_events.find { |event| event.payload.to_json == result_json }
found.update!(expires_at: new_event_expiration_date)
false
else
... | [
"def",
"store_payload!",
"(",
"old_events",
",",
"result",
")",
"case",
"interpolated",
"[",
"'mode'",
"]",
".",
"presence",
"when",
"'on_change'",
"result_json",
"=",
"result",
".",
"to_json",
"if",
"found",
"=",
"old_events",
".",
"find",
"{",
"|",
"event"... | This method returns true if the result should be stored as a new event.
If mode is set to 'on_change', this method may return false and update an existing
event to expire further in the future. | [
"This",
"method",
"returns",
"true",
"if",
"the",
"result",
"should",
"be",
"stored",
"as",
"a",
"new",
"event",
".",
"If",
"mode",
"is",
"set",
"to",
"on_change",
"this",
"method",
"may",
"return",
"false",
"and",
"update",
"an",
"existing",
"event",
"t... | 01e18fef7b6bd827a5d48a89391e460b5fb1bee3 | https://github.com/huginn/huginn/blob/01e18fef7b6bd827a5d48a89391e460b5fb1bee3/app/models/agents/website_agent.rb#L507-L522 | train | Store the payload of the event in the cache | [
30522,
13366,
3573,
1035,
18093,
999,
1006,
2214,
1035,
2824,
1010,
2765,
1007,
2553,
6970,
18155,
4383,
1031,
1005,
5549,
1005,
1033,
1012,
3739,
2043,
1005,
2006,
1035,
2689,
1005,
2765,
1035,
1046,
3385,
1027,
2765,
1012,
2000,
1035,
1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | data/azure_service_fabric/lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb | Azure::ServiceFabric::V6_2_0_9.ServiceFabricClientAPIs.get_application_type_info_list | def get_application_type_info_list(application_type_definition_kind_filter:0, exclude_application_parameters:false, continuation_token:nil, max_results:0, timeout:60, custom_headers:nil)
response = get_application_type_info_list_async(application_type_definition_kind_filter:application_type_definition_kind_filter... | ruby | def get_application_type_info_list(application_type_definition_kind_filter:0, exclude_application_parameters:false, continuation_token:nil, max_results:0, timeout:60, custom_headers:nil)
response = get_application_type_info_list_async(application_type_definition_kind_filter:application_type_definition_kind_filter... | [
"def",
"get_application_type_info_list",
"(",
"application_type_definition_kind_filter",
":",
"0",
",",
"exclude_application_parameters",
":",
"false",
",",
"continuation_token",
":",
"nil",
",",
"max_results",
":",
"0",
",",
"timeout",
":",
"60",
",",
"custom_headers",... | Gets the list of application types in the Service Fabric cluster.
Returns the information about the application types that are provisioned or
in the process of being provisioned in the Service Fabric cluster. Each
version of an application type is returned as one application type. The
response includes the name, v... | [
"Gets",
"the",
"list",
"of",
"application",
"types",
"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#L4680-L4683 | train | Gets the list of all the applications of the type. | [
30522,
13366,
2131,
1035,
4646,
1035,
2828,
1035,
18558,
1035,
2862,
1006,
4646,
1035,
2828,
1035,
6210,
1035,
2785,
1035,
11307,
1024,
1014,
1010,
23329,
1035,
4646,
1035,
11709,
1024,
6270,
1010,
13633,
1035,
19204,
1024,
9152,
2140,
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... |
zipmark/rspec_api_documentation | lib/rspec_api_documentation/dsl.rb | RspecApiDocumentation.DSL.resource | def resource(*args, &block)
options = args.last.is_a?(Hash) ? args.pop : {}
options[:api_doc_dsl] = :resource
options[:resource_name] = args.first.to_s
options[:document] = :all unless options.key?(:document)
args.push(options)
describe(*args, &block)
end | ruby | def resource(*args, &block)
options = args.last.is_a?(Hash) ? args.pop : {}
options[:api_doc_dsl] = :resource
options[:resource_name] = args.first.to_s
options[:document] = :all unless options.key?(:document)
args.push(options)
describe(*args, &block)
end | [
"def",
"resource",
"(",
"*",
"args",
",",
"&",
"block",
")",
"options",
"=",
"args",
".",
"last",
".",
"is_a?",
"(",
"Hash",
")",
"?",
"args",
".",
"pop",
":",
"{",
"}",
"options",
"[",
":api_doc_dsl",
"]",
"=",
":resource",
"options",
"[",
":resou... | Custom describe block that sets metadata to enable the rest of RAD
resource "Orders", :meta => :data do
# ...
end
Params:
+args+:: Glob of RSpec's `describe` arguments
+block+:: Block to pass into describe | [
"Custom",
"describe",
"block",
"that",
"sets",
"metadata",
"to",
"enable",
"the",
"rest",
"of",
"RAD"
] | 54fbfda3ec8ede5b3d871700ff69aabe89eafb2f | https://github.com/zipmark/rspec_api_documentation/blob/54fbfda3ec8ede5b3d871700ff69aabe89eafb2f/lib/rspec_api_documentation/dsl.rb#L20-L27 | train | Returns the resource object for the given resource name. | [
30522,
13366,
7692,
1006,
1008,
12098,
5620,
1010,
1004,
3796,
1007,
7047,
1027,
12098,
5620,
1012,
2197,
1012,
2003,
1035,
1037,
1029,
1006,
23325,
1007,
1029,
12098,
5620,
1012,
3769,
1024,
1063,
1065,
7047,
1031,
1024,
17928,
1035,
9986,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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_kusto/lib/2017-09-07-privatepreview/generated/azure_mgmt_kusto/databases.rb | Azure::Kusto::Mgmt::V2018_09_07_privatepreview.Databases.add_principals_with_http_info | def add_principals_with_http_info(resource_group_name, cluster_name, database_name, database_principals_to_add, custom_headers:nil)
add_principals_async(resource_group_name, cluster_name, database_name, database_principals_to_add, custom_headers:custom_headers).value!
end | ruby | def add_principals_with_http_info(resource_group_name, cluster_name, database_name, database_principals_to_add, custom_headers:nil)
add_principals_async(resource_group_name, cluster_name, database_name, database_principals_to_add, custom_headers:custom_headers).value!
end | [
"def",
"add_principals_with_http_info",
"(",
"resource_group_name",
",",
"cluster_name",
",",
"database_name",
",",
"database_principals_to_add",
",",
"custom_headers",
":",
"nil",
")",
"add_principals_async",
"(",
"resource_group_name",
",",
"cluster_name",
",",
"database_... | Add Database principals permissions.
@param resource_group_name [String] The name of the resource group containing
the Kusto cluster.
@param cluster_name [String] The name of the Kusto cluster.
@param database_name [String] The name of the database in the Kusto cluster.
@param database_principals_to_add [Database... | [
"Add",
"Database",
"principals",
"permissions",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_kusto/lib/2017-09-07-privatepreview/generated/azure_mgmt_kusto/databases.rb#L603-L605 | train | Adds a collection of principals to the database. | [
30522,
13366,
5587,
1035,
27928,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
9324,
1035,
2171,
1010,
7809,
1035,
2171,
1010,
7809,
1035,
27928,
1035,
2000,
1035,
5587,
1010,
7661,
1035,
20346,
2015,
1024,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/replication_links.rb | Azure::SQL::Mgmt::V2014_04_01.ReplicationLinks.failover_allow_data_loss | def failover_allow_data_loss(resource_group_name, server_name, database_name, link_id, custom_headers:nil)
response = failover_allow_data_loss_async(resource_group_name, server_name, database_name, link_id, custom_headers:custom_headers).value!
nil
end | ruby | def failover_allow_data_loss(resource_group_name, server_name, database_name, link_id, custom_headers:nil)
response = failover_allow_data_loss_async(resource_group_name, server_name, database_name, link_id, custom_headers:custom_headers).value!
nil
end | [
"def",
"failover_allow_data_loss",
"(",
"resource_group_name",
",",
"server_name",
",",
"database_name",
",",
"link_id",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"failover_allow_data_loss_async",
"(",
"resource_group_name",
",",
"server_name",
",",
"data... | Sets which replica database is primary by failing over from the current
primary replica database. This operation might result in data loss.
@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.
@p... | [
"Sets",
"which",
"replica",
"database",
"is",
"primary",
"by",
"failing",
"over",
"from",
"the",
"current",
"primary",
"replica",
"database",
".",
"This",
"operation",
"might",
"result",
"in",
"data",
"loss",
"."
] | 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#L294-L297 | train | Check whether the data loss of the specified database link is allowed to be lost. | [
30522,
13366,
8246,
7840,
1035,
3499,
1035,
2951,
1035,
3279,
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,
8... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_policy_insights/lib/2018-07-01-preview/generated/azure_mgmt_policy_insights/remediations.rb | Azure::PolicyInsights::Mgmt::V2018_07_01_preview.Remediations.list_deployments_at_subscription_as_lazy | def list_deployments_at_subscription_as_lazy(remediation_name, query_options:nil, custom_headers:nil)
response = list_deployments_at_subscription_async(remediation_name, query_options:query_options, custom_headers:custom_headers).value!
unless response.nil?
page = response.body
page.next_met... | ruby | def list_deployments_at_subscription_as_lazy(remediation_name, query_options:nil, custom_headers:nil)
response = list_deployments_at_subscription_async(remediation_name, query_options:query_options, custom_headers:custom_headers).value!
unless response.nil?
page = response.body
page.next_met... | [
"def",
"list_deployments_at_subscription_as_lazy",
"(",
"remediation_name",
",",
"query_options",
":",
"nil",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"list_deployments_at_subscription_async",
"(",
"remediation_name",
",",
"query_options",
":query_options",
... | Gets all deployments for a remediation at subscription scope.
@param remediation_name [String] The name of the remediation.
@param query_options [QueryOptions] Additional parameters for the operation
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request.
@... | [
"Gets",
"all",
"deployments",
"for",
"a",
"remediation",
"at",
"subscription",
"scope",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_policy_insights/lib/2018-07-01-preview/generated/azure_mgmt_policy_insights/remediations.rb#L3107-L3116 | train | Gets the list of deployments for a remediation at subscription scope. | [
30522,
13366,
2862,
1035,
10813,
2015,
1035,
2012,
1035,
15002,
1035,
2004,
1035,
13971,
1006,
2128,
16969,
3508,
1035,
2171,
1010,
23032,
1035,
7047,
1024,
9152,
2140,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
2862... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
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_delete | def begin_delete(fabric_name, protection_container_name, custom_headers:nil)
response = begin_delete_async(fabric_name, protection_container_name, custom_headers:custom_headers).value!
nil
end | ruby | def begin_delete(fabric_name, protection_container_name, custom_headers:nil)
response = begin_delete_async(fabric_name, protection_container_name, custom_headers:custom_headers).value!
nil
end | [
"def",
"begin_delete",
"(",
"fabric_name",
",",
"protection_container_name",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"begin_delete_async",
"(",
"fabric_name",
",",
"protection_container_name",
",",
"custom_headers",
":custom_headers",
")",
".",
"value!"... | Removes a protection container.
Operation to remove a protection container.
@param fabric_name [String] Unique fabric ARM name.
@param protection_container_name [String] Unique protection container ARM
name.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP r... | [
"Removes",
"a",
"protection",
"container",
"."
] | 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#L747-L750 | train | Deletes a protection container. | [
30522,
13366,
4088,
1035,
3972,
12870,
1006,
8313,
1035,
2171,
1010,
3860,
1035,
11661,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
4088,
1035,
3972,
12870,
1035,
2004,
6038,
2278,
1006,
8313,
1035,
2171,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | data/azure_cognitiveservices_luisauthoring/lib/2.0/generated/azure_cognitiveservices_luisauthoring/model.rb | Azure::CognitiveServices::LuisAuthoring::V2_0.Model.add_prebuilt_with_http_info | def add_prebuilt_with_http_info(app_id, version_id, prebuilt_extractor_names, custom_headers:nil)
add_prebuilt_async(app_id, version_id, prebuilt_extractor_names, custom_headers:custom_headers).value!
end | ruby | def add_prebuilt_with_http_info(app_id, version_id, prebuilt_extractor_names, custom_headers:nil)
add_prebuilt_async(app_id, version_id, prebuilt_extractor_names, custom_headers:custom_headers).value!
end | [
"def",
"add_prebuilt_with_http_info",
"(",
"app_id",
",",
"version_id",
",",
"prebuilt_extractor_names",
",",
"custom_headers",
":",
"nil",
")",
"add_prebuilt_async",
"(",
"app_id",
",",
"version_id",
",",
"prebuilt_extractor_names",
",",
"custom_headers",
":custom_header... | Adds a list of prebuilt entities to a version of the application.
@param app_id The application ID.
@param version_id [String] The version ID.
@param prebuilt_extractor_names [Array<String>] An array of prebuilt entity
extractor names.
@param custom_headers [Hash{String => String}] A hash of custom headers that
... | [
"Adds",
"a",
"list",
"of",
"prebuilt",
"entities",
"to",
"a",
"version",
"of",
"the",
"application",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_cognitiveservices_luisauthoring/lib/2.0/generated/azure_cognitiveservices_luisauthoring/model.rb#L1225-L1227 | train | Adds a prebuilt specification to the application version. | [
30522,
13366,
5587,
1035,
3653,
8569,
4014,
2102,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
10439,
1035,
8909,
1010,
2544,
1035,
8909,
1010,
3653,
8569,
4014,
2102,
1035,
14817,
2953,
1035,
3415,
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... |
puppetlabs/puppet | lib/puppet/network/authconfig.rb | Puppet.Network::DefaultAuthProvider.insert_default_acl | def insert_default_acl
self.class.default_acl.each do |acl|
unless rights[acl[:acl]]
Puppet.info _("Inserting default '%{acl}' (auth %{auth}) ACL") % { acl: acl[:acl], auth: acl[:authenticated] }
mk_acl(acl)
end
end
# queue an empty (ie deny all) right for every oth... | ruby | def insert_default_acl
self.class.default_acl.each do |acl|
unless rights[acl[:acl]]
Puppet.info _("Inserting default '%{acl}' (auth %{auth}) ACL") % { acl: acl[:acl], auth: acl[:authenticated] }
mk_acl(acl)
end
end
# queue an empty (ie deny all) right for every oth... | [
"def",
"insert_default_acl",
"self",
".",
"class",
".",
"default_acl",
".",
"each",
"do",
"|",
"acl",
"|",
"unless",
"rights",
"[",
"acl",
"[",
":acl",
"]",
"]",
"Puppet",
".",
"info",
"_",
"(",
"\"Inserting default '%{acl}' (auth %{auth}) ACL\"",
")",
"%",
... | force regular ACLs to be present | [
"force",
"regular",
"ACLs",
"to",
"be",
"present"
] | 4baeed97cbb7571ddc6635f0a24debe2e8b22cd3 | https://github.com/puppetlabs/puppet/blob/4baeed97cbb7571ddc6635f0a24debe2e8b22cd3/lib/puppet/network/authconfig.rb#L38-L51 | train | insert default ACLs into the current object | [
30522,
13366,
19274,
1035,
12398,
1035,
9353,
2140,
2969,
1012,
2465,
1012,
12398,
1035,
9353,
2140,
1012,
2169,
2079,
1064,
9353,
2140,
1064,
4983,
2916,
1031,
9353,
2140,
1031,
1024,
9353,
2140,
1033,
1033,
13997,
1012,
18558,
1035,
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... |
alexreisner/geocoder | lib/geocoder/sql.rb | Geocoder.Sql.approx_distance | def approx_distance(latitude, longitude, lat_attr, lon_attr, options = {})
units = options[:units] || Geocoder.config.units
dx = Geocoder::Calculations.longitude_degree_distance(30, units)
dy = Geocoder::Calculations.latitude_degree_distance(units)
# sin of 45 degrees = average x or y component... | ruby | def approx_distance(latitude, longitude, lat_attr, lon_attr, options = {})
units = options[:units] || Geocoder.config.units
dx = Geocoder::Calculations.longitude_degree_distance(30, units)
dy = Geocoder::Calculations.latitude_degree_distance(units)
# sin of 45 degrees = average x or y component... | [
"def",
"approx_distance",
"(",
"latitude",
",",
"longitude",
",",
"lat_attr",
",",
"lon_attr",
",",
"options",
"=",
"{",
"}",
")",
"units",
"=",
"options",
"[",
":units",
"]",
"||",
"Geocoder",
".",
"config",
".",
"units",
"dx",
"=",
"Geocoder",
"::",
... | Distance calculation for use with a database without trigonometric
functions, like SQLite. Approach is to find objects within a square
rather than a circle, so results are very approximate (will include
objects outside the given radius).
Distance and bearing calculations are *extremely inaccurate*. To be
clear: t... | [
"Distance",
"calculation",
"for",
"use",
"with",
"a",
"database",
"without",
"trigonometric",
"functions",
"like",
"SQLite",
".",
"Approach",
"is",
"to",
"find",
"objects",
"within",
"a",
"square",
"rather",
"than",
"a",
"circle",
"so",
"results",
"are",
"very... | e087dc2759264ee6f307b926bb2de4ec2406859e | https://github.com/alexreisner/geocoder/blob/e087dc2759264ee6f307b926bb2de4ec2406859e/lib/geocoder/sql.rb#L34-L44 | train | Returns the approximate distance between two points | [
30522,
13366,
22480,
1035,
3292,
1006,
15250,
1010,
20413,
1010,
2474,
2102,
1035,
2012,
16344,
1010,
8840,
2078,
1035,
2012,
16344,
1010,
7047,
1027,
1063,
1065,
1007,
3197,
1027,
7047,
1031,
1024,
3197,
1033,
1064,
1064,
20248,
16044,
209... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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.report_node_health_with_http_info | def report_node_health_with_http_info(node_name, health_information, immediate:false, timeout:60, custom_headers:nil)
report_node_health_async(node_name, health_information, immediate:immediate, timeout:timeout, custom_headers:custom_headers).value!
end | ruby | def report_node_health_with_http_info(node_name, health_information, immediate:false, timeout:60, custom_headers:nil)
report_node_health_async(node_name, health_information, immediate:immediate, timeout:timeout, custom_headers:custom_headers).value!
end | [
"def",
"report_node_health_with_http_info",
"(",
"node_name",
",",
"health_information",
",",
"immediate",
":",
"false",
",",
"timeout",
":",
"60",
",",
"custom_headers",
":",
"nil",
")",
"report_node_health_async",
"(",
"node_name",
",",
"health_information",
",",
... | Sends a health report on the Service Fabric node.
Reports health state of the specified Service Fabric node. The report must
contain the information about the source of the health report and property on
which it is reported.
The report is sent to a Service Fabric gateway node, which forwards to the
health store.
... | [
"Sends",
"a",
"health",
"report",
"on",
"the",
"Service",
"Fabric",
"node",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_service_fabric/lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb#L3938-L3940 | train | Report node health. | [
30522,
13366,
3189,
1035,
13045,
1035,
2740,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
13045,
1035,
2171,
1010,
2740,
1035,
2592,
1010,
6234,
1024,
6270,
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... |
rubocop-hq/rubocop | lib/rubocop/processed_source.rb | RuboCop.ProcessedSource.parser_class | def parser_class(ruby_version)
case ruby_version
when 2.2
require 'parser/ruby22'
Parser::Ruby22
when 2.3
require 'parser/ruby23'
Parser::Ruby23
when 2.4
require 'parser/ruby24'
Parser::Ruby24
when 2.5
require 'parser/ruby25'
... | ruby | def parser_class(ruby_version)
case ruby_version
when 2.2
require 'parser/ruby22'
Parser::Ruby22
when 2.3
require 'parser/ruby23'
Parser::Ruby23
when 2.4
require 'parser/ruby24'
Parser::Ruby24
when 2.5
require 'parser/ruby25'
... | [
"def",
"parser_class",
"(",
"ruby_version",
")",
"case",
"ruby_version",
"when",
"2.2",
"require",
"'parser/ruby22'",
"Parser",
"::",
"Ruby22",
"when",
"2.3",
"require",
"'parser/ruby23'",
"Parser",
"::",
"Ruby23",
"when",
"2.4",
"require",
"'parser/ruby24'",
"Parse... | rubocop:disable Metrics/MethodLength | [
"rubocop",
":",
"disable",
"Metrics",
"/",
"MethodLength"
] | 2a4f4f0fdac4e1bb25891fc312af2ea60c6aa2f0 | https://github.com/rubocop-hq/rubocop/blob/2a4f4f0fdac4e1bb25891fc312af2ea60c6aa2f0/lib/rubocop/processed_source.rb#L171-L191 | train | Returns the parser class for the given Ruby version. | [
30522,
13366,
11968,
8043,
1035,
2465,
1006,
10090,
1035,
2544,
1007,
2553,
10090,
1035,
2544,
2043,
1016,
1012,
1016,
5478,
1005,
11968,
8043,
1013,
10090,
19317,
1005,
11968,
8043,
1024,
1024,
10090,
19317,
2043,
1016,
1012,
1017,
5478,
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... |
chef/ohai | lib/ohai/system.rb | Ohai.System.freeze_strings! | def freeze_strings!
# Recursive visitor pattern helper.
visitor = lambda do |val|
case val
when Hash
val.each_value { |v| visitor.call(v) }
when Array
val.each { |v| visitor.call(v) }
when String
val.freeze
end
end
visitor.cal... | ruby | def freeze_strings!
# Recursive visitor pattern helper.
visitor = lambda do |val|
case val
when Hash
val.each_value { |v| visitor.call(v) }
when Array
val.each { |v| visitor.call(v) }
when String
val.freeze
end
end
visitor.cal... | [
"def",
"freeze_strings!",
"# Recursive visitor pattern helper.",
"visitor",
"=",
"lambda",
"do",
"|",
"val",
"|",
"case",
"val",
"when",
"Hash",
"val",
".",
"each_value",
"{",
"|",
"v",
"|",
"visitor",
".",
"call",
"(",
"v",
")",
"}",
"when",
"Array",
"val... | Freeze all string values in @data. This makes them immutable and saves
a bit of RAM.
@api private
@return [void] | [
"Freeze",
"all",
"string",
"values",
"in",
"@data",
".",
"This",
"makes",
"them",
"immutable",
"and",
"saves",
"a",
"bit",
"of",
"RAM",
"."
] | 8d66449940f04237586b2f928231c6b26e2cc19a | https://github.com/chef/ohai/blob/8d66449940f04237586b2f928231c6b26e2cc19a/lib/ohai/system.rb#L206-L219 | train | Freeze all strings in the array | [
30522,
13366,
13184,
1035,
7817,
999,
1001,
28667,
9236,
3512,
10367,
5418,
2393,
2121,
1012,
10367,
1027,
23375,
2079,
1064,
11748,
1064,
2553,
11748,
2043,
23325,
11748,
1012,
2169,
1035,
3643,
1063,
1064,
1058,
1064,
10367,
1012,
2655,
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... |
sinatra/sinatra | sinatra-contrib/lib/sinatra/config_file.rb | Sinatra.ConfigFile.config_for_env | def config_for_env(hash)
return from_environment_key(hash) if environment_keys?(hash)
hash.each_with_object(IndifferentHash[]) do |(k, v), acc|
if environment_keys?(v)
acc.merge!(k => v[environment.to_s]) if v.key?(environment.to_s)
else
acc.merge!(k => v)
end
... | ruby | def config_for_env(hash)
return from_environment_key(hash) if environment_keys?(hash)
hash.each_with_object(IndifferentHash[]) do |(k, v), acc|
if environment_keys?(v)
acc.merge!(k => v[environment.to_s]) if v.key?(environment.to_s)
else
acc.merge!(k => v)
end
... | [
"def",
"config_for_env",
"(",
"hash",
")",
"return",
"from_environment_key",
"(",
"hash",
")",
"if",
"environment_keys?",
"(",
"hash",
")",
"hash",
".",
"each_with_object",
"(",
"IndifferentHash",
"[",
"]",
")",
"do",
"|",
"(",
"k",
",",
"v",
")",
",",
"... | Given a +hash+ containing application configuration it returns
settings applicable to the current environment. Note: It gives
precedence to environment settings defined at the root-level. | [
"Given",
"a",
"+",
"hash",
"+",
"containing",
"application",
"configuration",
"it",
"returns",
"settings",
"applicable",
"to",
"the",
"current",
"environment",
".",
"Note",
":",
"It",
"gives",
"precedence",
"to",
"environment",
"settings",
"defined",
"at",
"the"... | 1aa64f9858edc3f93cc8d46e26f724c1ae103b1c | https://github.com/sinatra/sinatra/blob/1aa64f9858edc3f93cc8d46e26f724c1ae103b1c/sinatra-contrib/lib/sinatra/config_file.rb#L146-L156 | train | Returns the config for the given environment | [
30522,
13366,
9530,
8873,
2290,
1035,
2005,
1035,
4372,
2615,
1006,
23325,
1007,
2709,
2013,
1035,
4044,
1035,
3145,
1006,
23325,
1007,
2065,
4044,
1035,
6309,
1029,
1006,
23325,
1007,
23325,
1012,
2169,
1035,
2007,
1035,
4874,
1006,
24436,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/public_ipprefixes.rb | Azure::Network::Mgmt::V2018_07_01.PublicIPPrefixes.begin_delete | def begin_delete(resource_group_name, public_ip_prefix_name, custom_headers:nil)
response = begin_delete_async(resource_group_name, public_ip_prefix_name, custom_headers:custom_headers).value!
nil
end | ruby | def begin_delete(resource_group_name, public_ip_prefix_name, custom_headers:nil)
response = begin_delete_async(resource_group_name, public_ip_prefix_name, custom_headers:custom_headers).value!
nil
end | [
"def",
"begin_delete",
"(",
"resource_group_name",
",",
"public_ip_prefix_name",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"begin_delete_async",
"(",
"resource_group_name",
",",
"public_ip_prefix_name",
",",
"custom_headers",
":custom_headers",
")",
".",
... | Deletes the specified public IP prefix.
@param resource_group_name [String] The name of the resource group.
@param public_ip_prefix_name [String] The name of the PublicIpPrefix.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request. | [
"Deletes",
"the",
"specified",
"public",
"IP",
"prefix",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_network/lib/2018-07-01/generated/azure_mgmt_network/public_ipprefixes.rb#L430-L433 | train | Deletes an existing public IP prefix. | [
30522,
13366,
4088,
1035,
3972,
12870,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2270,
1035,
12997,
1035,
17576,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
4088,
1035,
3972,
12870,
1035,
2004,
6038,
2278,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
mongodb/mongoid | lib/mongoid/interceptable.rb | Mongoid.Interceptable.run_targeted_callbacks | def run_targeted_callbacks(place, kind)
name = "_run__#{place}__#{kind}__callbacks"
unless respond_to?(name)
chain = ActiveSupport::Callbacks::CallbackChain.new(name, {})
send("_#{kind}_callbacks").each do |callback|
chain.append(callback) if callback.kind == place
end
... | ruby | def run_targeted_callbacks(place, kind)
name = "_run__#{place}__#{kind}__callbacks"
unless respond_to?(name)
chain = ActiveSupport::Callbacks::CallbackChain.new(name, {})
send("_#{kind}_callbacks").each do |callback|
chain.append(callback) if callback.kind == place
end
... | [
"def",
"run_targeted_callbacks",
"(",
"place",
",",
"kind",
")",
"name",
"=",
"\"_run__#{place}__#{kind}__callbacks\"",
"unless",
"respond_to?",
"(",
"name",
")",
"chain",
"=",
"ActiveSupport",
"::",
"Callbacks",
"::",
"CallbackChain",
".",
"new",
"(",
"name",
","... | Run only the callbacks for the target location (before, after, around)
and kind (save, update, create).
@example Run the targeted callbacks.
model.run_targeted_callbacks(:before, :save)
@param [ Symbol ] place The time to run, :before, :after, :around.
@param [ Symbol ] kind The type of callback, :save, :creat... | [
"Run",
"only",
"the",
"callbacks",
"for",
"the",
"target",
"location",
"(",
"before",
"after",
"around",
")",
"and",
"kind",
"(",
"save",
"update",
"create",
")",
"."
] | 56976e32610f4c2450882b0bfe14da099f0703f4 | https://github.com/mongodb/mongoid/blob/56976e32610f4c2450882b0bfe14da099f0703f4/lib/mongoid/interceptable.rb#L250-L268 | train | Runs the callbacks defined in the class. | [
30522,
13366,
2448,
1035,
9416,
1035,
2655,
12221,
1006,
2173,
1010,
2785,
1007,
2171,
1027,
1000,
1035,
2448,
1035,
1035,
1001,
1063,
2173,
1065,
1035,
1035,
1001,
1063,
2785,
1065,
1035,
1035,
2655,
12221,
1000,
4983,
6869,
1035,
2000,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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.request_vpc_peering_connection | def request_vpc_peering_connection(options = {})
options = options.merge(vpc_id: @id)
resp = @client.create_vpc_peering_connection(options)
VpcPeeringConnection.new(
id: resp.data.vpc_peering_connection.vpc_peering_connection_id,
data: resp.data.vpc_peering_connection,
client: ... | ruby | def request_vpc_peering_connection(options = {})
options = options.merge(vpc_id: @id)
resp = @client.create_vpc_peering_connection(options)
VpcPeeringConnection.new(
id: resp.data.vpc_peering_connection.vpc_peering_connection_id,
data: resp.data.vpc_peering_connection,
client: ... | [
"def",
"request_vpc_peering_connection",
"(",
"options",
"=",
"{",
"}",
")",
"options",
"=",
"options",
".",
"merge",
"(",
"vpc_id",
":",
"@id",
")",
"resp",
"=",
"@client",
".",
"create_vpc_peering_connection",
"(",
"options",
")",
"VpcPeeringConnection",
".",
... | @example Request syntax with placeholder values
vpcpeeringconnection = vpc.request_vpc_peering_connection({
dry_run: false,
peer_owner_id: "String",
peer_vpc_id: "String",
peer_region: "String",
})
@param [Hash] options ({})
@option options [Boolean] :dry_run
Checks whether you have the ... | [
"@example",
"Request",
"syntax",
"with",
"placeholder",
"values"
] | e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d | https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-ec2/lib/aws-sdk-ec2/vpc.rb#L680-L688 | train | Request a vpc peering connection | [
30522,
13366,
5227,
1035,
21210,
2278,
1035,
16740,
1035,
4434,
1006,
7047,
1027,
1063,
1065,
1007,
7047,
1027,
7047,
1012,
13590,
1006,
21210,
2278,
1035,
8909,
1024,
1030,
8909,
1007,
24501,
2361,
1027,
1030,
7396,
30524,
7047,
1007,
2121... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_iot_hub/lib/2017-01-19/generated/azure_mgmt_iot_hub/iot_hub_resource.rb | Azure::IotHub::Mgmt::V2017_01_19.IotHubResource.list_jobs | def list_jobs(resource_group_name, resource_name, custom_headers:nil)
first_page = list_jobs_as_lazy(resource_group_name, resource_name, custom_headers:custom_headers)
first_page.get_all_items
end | ruby | def list_jobs(resource_group_name, resource_name, custom_headers:nil)
first_page = list_jobs_as_lazy(resource_group_name, resource_name, custom_headers:custom_headers)
first_page.get_all_items
end | [
"def",
"list_jobs",
"(",
"resource_group_name",
",",
"resource_name",
",",
"custom_headers",
":",
"nil",
")",
"first_page",
"=",
"list_jobs_as_lazy",
"(",
"resource_group_name",
",",
"resource_name",
",",
"custom_headers",
":custom_headers",
")",
"first_page",
".",
"g... | Get a list of all the jobs in an IoT hub. For more information, see:
https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry.
Get a list of all the jobs in an IoT hub. For more information, see:
https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry.
@param resource_group_... | [
"Get",
"a",
"list",
"of",
"all",
"the",
"jobs",
"in",
"an",
"IoT",
"hub",
".",
"For",
"more",
"information",
"see",
":",
"https",
":",
"//",
"docs",
".",
"microsoft",
".",
"com",
"/",
"azure",
"/",
"iot",
"-",
"hub",
"/",
"iot",
"-",
"hub",
"-",
... | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_iot_hub/lib/2017-01-19/generated/azure_mgmt_iot_hub/iot_hub_resource.rb#L1079-L1082 | train | Gets all the jobs in a resource group. | [
30522,
13366,
2862,
1035,
5841,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
7692,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
2034,
1035,
3931,
1027,
2862,
1035,
5841,
1035,
2004,
1035,
13971,
1006,
7692,
1035,
2177,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
grpc/grpc | src/ruby/lib/grpc/generic/active_call.rb | GRPC.ActiveCall.bidi_streamer | def bidi_streamer(requests, metadata: {}, &blk)
raise_error_if_already_executed
# Metadata might have already been sent if this is an operation view
begin
send_initial_metadata(metadata)
rescue GRPC::Core::CallError => e
batch_result = @call.run_batch(RECV_STATUS_ON_CLIENT => nil... | ruby | def bidi_streamer(requests, metadata: {}, &blk)
raise_error_if_already_executed
# Metadata might have already been sent if this is an operation view
begin
send_initial_metadata(metadata)
rescue GRPC::Core::CallError => e
batch_result = @call.run_batch(RECV_STATUS_ON_CLIENT => nil... | [
"def",
"bidi_streamer",
"(",
"requests",
",",
"metadata",
":",
"{",
"}",
",",
"&",
"blk",
")",
"raise_error_if_already_executed",
"# Metadata might have already been sent if this is an operation view",
"begin",
"send_initial_metadata",
"(",
"metadata",
")",
"rescue",
"GRPC"... | bidi_streamer sends a stream of requests to the GRPC server, and yields
a stream of responses.
This method takes an Enumerable of requests, and returns and enumerable
of responses.
== requests ==
requests provides an 'iterable' of Requests. I.e. it follows Ruby's
#each enumeration protocol. In the simplest cas... | [
"bidi_streamer",
"sends",
"a",
"stream",
"of",
"requests",
"to",
"the",
"GRPC",
"server",
"and",
"yields",
"a",
"stream",
"of",
"responses",
"."
] | f3937f0e55227a4ef3a23f895d3b204a947610f8 | https://github.com/grpc/grpc/blob/f3937f0e55227a4ef3a23f895d3b204a947610f8/src/ruby/lib/grpc/generic/active_call.rb#L494-L520 | train | Creates a new BidiStreamer. | [
30522,
13366,
7226,
2072,
1035,
5460,
2121,
1006,
11186,
1010,
27425,
1024,
1063,
1065,
1010,
1004,
1038,
13687,
1007,
5333,
1035,
7561,
1035,
2065,
1035,
2525,
1035,
6472,
1001,
27425,
2453,
2031,
2525,
2042,
2741,
2065,
2023,
2003,
2019,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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.