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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
chef/chef | chef-config/lib/chef-config/workstation_config_loader.rb | ChefConfig.WorkstationConfigLoader.find_default_key | def find_default_key(key_names)
key_names.each do |filename|
path = Pathname.new(filename)
# If we have a config location (like ./.chef/), look there first.
if config_location
local_path = path.expand_path(File.dirname(config_location))
return local_path.to_s if local_p... | ruby | def find_default_key(key_names)
key_names.each do |filename|
path = Pathname.new(filename)
# If we have a config location (like ./.chef/), look there first.
if config_location
local_path = path.expand_path(File.dirname(config_location))
return local_path.to_s if local_p... | [
"def",
"find_default_key",
"(",
"key_names",
")",
"key_names",
".",
"each",
"do",
"|",
"filename",
"|",
"path",
"=",
"Pathname",
".",
"new",
"(",
"filename",
")",
"# If we have a config location (like ./.chef/), look there first.",
"if",
"config_location",
"local_path",... | Look for a default key file.
This searches for any of a list of possible default keys, checking both
the local `.chef/` folder and the home directory `~/.chef/`. Returns `nil`
if no matching file is found.
@api private
@since 14.3
@param key_names [Array<String>] A list of possible filenames to check for.
Th... | [
"Look",
"for",
"a",
"default",
"key",
"file",
"."
] | 61f69e18e69e0dca6e8cffdcd7451181d874cdb3 | https://github.com/chef/chef/blob/61f69e18e69e0dca6e8cffdcd7451181d874cdb3/chef-config/lib/chef-config/workstation_config_loader.rb#L250-L263 | train | Find the default key for the given key_names. | [
30522,
13366,
2424,
1035,
12398,
1035,
3145,
1006,
3145,
1035,
3415,
1007,
3145,
1035,
3415,
1012,
2169,
2079,
1064,
5371,
18442,
1064,
4130,
1027,
4130,
18442,
1012,
2047,
1006,
5371,
18442,
1007,
1001,
2065,
2057,
2031,
1037,
9530,
8873,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/collection.rb | Jekyll.Collection.filtered_entries | def filtered_entries
return [] unless exists?
@filtered_entries ||=
Dir.chdir(directory) do
entry_filter.filter(entries).reject do |f|
path = collection_dir(f)
File.directory?(path) || entry_filter.symlink?(f)
end
end
end | ruby | def filtered_entries
return [] unless exists?
@filtered_entries ||=
Dir.chdir(directory) do
entry_filter.filter(entries).reject do |f|
path = collection_dir(f)
File.directory?(path) || entry_filter.symlink?(f)
end
end
end | [
"def",
"filtered_entries",
"return",
"[",
"]",
"unless",
"exists?",
"@filtered_entries",
"||=",
"Dir",
".",
"chdir",
"(",
"directory",
")",
"do",
"entry_filter",
".",
"filter",
"(",
"entries",
")",
".",
"reject",
"do",
"|",
"f",
"|",
"path",
"=",
"collecti... | Filtered version of the entries in this collection.
See `Jekyll::EntryFilter#filter` for more information.
Returns a list of filtered entry paths. | [
"Filtered",
"version",
"of",
"the",
"entries",
"in",
"this",
"collection",
".",
"See",
"Jekyll",
"::",
"EntryFilter#filter",
"for",
"more",
"information",
"."
] | fd74fe3e93a1fb506fa6621a2e271d7b9c5c3e3b | https://github.com/jekyll/jekyll/blob/fd74fe3e93a1fb506fa6621a2e271d7b9c5c3e3b/lib/jekyll/collection.rb#L89-L99 | train | Returns the filtered entries | [
30522,
13366,
21839,
1035,
10445,
2709,
1031,
1033,
4983,
6526,
1029,
1030,
21839,
1035,
10445,
1064,
1064,
1027,
16101,
1012,
10381,
4305,
2099,
1006,
14176,
1007,
2079,
4443,
1035,
11307,
1012,
11307,
1006,
10445,
1007,
1012,
15454,
2079,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
cucumber/cucumber-ruby | lib/cucumber/runtime.rb | Cucumber.Runtime.doc_string | def doc_string(string_without_triple_quotes, content_type = '', _line_offset = 0)
location = Core::Test::Location.of_caller
Core::Test::DocString.new(string_without_triple_quotes, content_type, location)
end | ruby | def doc_string(string_without_triple_quotes, content_type = '', _line_offset = 0)
location = Core::Test::Location.of_caller
Core::Test::DocString.new(string_without_triple_quotes, content_type, location)
end | [
"def",
"doc_string",
"(",
"string_without_triple_quotes",
",",
"content_type",
"=",
"''",
",",
"_line_offset",
"=",
"0",
")",
"location",
"=",
"Core",
"::",
"Test",
"::",
"Location",
".",
"of_caller",
"Core",
"::",
"Test",
"::",
"DocString",
".",
"new",
"(",... | Returns Ast::DocString for +string_without_triple_quotes+. | [
"Returns",
"Ast",
"::",
"DocString",
"for",
"+",
"string_without_triple_quotes",
"+",
"."
] | de3ba2fb9a35b8bcfd5109f610a0c16180d7abf2 | https://github.com/cucumber/cucumber-ruby/blob/de3ba2fb9a35b8bcfd5109f610a0c16180d7abf2/lib/cucumber/runtime.rb#L99-L102 | train | Returns a DocString object for the given string without triple quotes. | [
30522,
13366,
9986,
1035,
5164,
1006,
5164,
1035,
2302,
1035,
6420,
1035,
16614,
1010,
4180,
1035,
2828,
1027,
1005,
1005,
1010,
1035,
2240,
1035,
16396,
1027,
1014,
1007,
3295,
1027,
4563,
1024,
1024,
3231,
1024,
1024,
3295,
1012,
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... |
comfy/comfortable-mexican-sofa | app/helpers/comfy/cms_helper.rb | Comfy.CmsHelper.cms_fragment_content | def cms_fragment_content(identifier, page = @cms_page)
frag = page&.fragments&.detect { |f| f.identifier == identifier.to_s }
return "" unless frag
case frag.tag
when "date", "datetime"
frag.datetime
when "checkbox"
frag.boolean
when "file", "files"
frag.attac... | ruby | def cms_fragment_content(identifier, page = @cms_page)
frag = page&.fragments&.detect { |f| f.identifier == identifier.to_s }
return "" unless frag
case frag.tag
when "date", "datetime"
frag.datetime
when "checkbox"
frag.boolean
when "file", "files"
frag.attac... | [
"def",
"cms_fragment_content",
"(",
"identifier",
",",
"page",
"=",
"@cms_page",
")",
"frag",
"=",
"page",
"&.",
"fragments",
"&.",
"detect",
"{",
"|",
"f",
"|",
"f",
".",
"identifier",
"==",
"identifier",
".",
"to_s",
"}",
"return",
"\"\"",
"unless",
"f... | Raw content of a page fragment. This is how you get content from unrenderable
tags like {{cms:fragment meta, render: false}}
Example:
cms_fragment_content(:left_column, CmsPage.first)
cms_fragment_content(:left_column) # if @cms_page is present | [
"Raw",
"content",
"of",
"a",
"page",
"fragment",
".",
"This",
"is",
"how",
"you",
"get",
"content",
"from",
"unrenderable",
"tags",
"like",
"{{",
"cms",
":",
"fragment",
"meta",
"render",
":",
"false",
"}}",
"Example",
":",
"cms_fragment_content",
"(",
":"... | 38a31428f6e2c07d5bda64f0371eebfb29a3abc4 | https://github.com/comfy/comfortable-mexican-sofa/blob/38a31428f6e2c07d5bda64f0371eebfb29a3abc4/app/helpers/comfy/cms_helper.rb#L11-L24 | train | Returns the content of a given fragment. | [
30522,
13366,
4642,
2015,
1035,
15778,
1035,
4180,
1006,
8909,
4765,
18095,
1010,
3931,
1027,
1030,
4642,
2015,
1035,
3931,
1007,
25312,
2290,
1027,
3931,
1004,
1012,
10341,
1004,
1012,
11487,
1063,
1064,
1042,
1064,
1042,
1012,
8909,
4765,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/group_users.rb | Azure::ApiManagement::Mgmt::V2016_10_10.GroupUsers.list_by_groups | def list_by_groups(resource_group_name, service_name, group_id, filter:nil, top:nil, skip:nil, custom_headers:nil)
first_page = list_by_groups_as_lazy(resource_group_name, service_name, group_id, filter:filter, top:top, skip:skip, custom_headers:custom_headers)
first_page.get_all_items
end | ruby | def list_by_groups(resource_group_name, service_name, group_id, filter:nil, top:nil, skip:nil, custom_headers:nil)
first_page = list_by_groups_as_lazy(resource_group_name, service_name, group_id, filter:filter, top:top, skip:skip, custom_headers:custom_headers)
first_page.get_all_items
end | [
"def",
"list_by_groups",
"(",
"resource_group_name",
",",
"service_name",
",",
"group_id",
",",
"filter",
":",
"nil",
",",
"top",
":",
"nil",
",",
"skip",
":",
"nil",
",",
"custom_headers",
":",
"nil",
")",
"first_page",
"=",
"list_by_groups_as_lazy",
"(",
"... | Lists a collection of the members of the group, specified by its identifier.
@param resource_group_name [String] The name of the resource group.
@param service_name [String] The name of the API Management service.
@param group_id [String] Group identifier. Must be unique in the current API
Management service insta... | [
"Lists",
"a",
"collection",
"of",
"the",
"members",
"of",
"the",
"group",
"specified",
"by",
"its",
"identifier",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/group_users.rb#L55-L58 | train | Gets all the segmentation groups in a subscription. | [
30522,
13366,
2862,
1035,
2011,
1035,
2967,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2326,
1035,
2171,
1010,
2177,
1035,
8909,
1010,
11307,
1024,
9152,
2140,
1010,
2327,
1024,
9152,
2140,
1010,
13558,
1024,
9152,
2140,
1010,
7661,
1035,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
troessner/reek | lib/reek/context_builder.rb | Reek.ContextBuilder.inside_new_context | def inside_new_context(klass, *args)
new_context = append_new_context(klass, *args)
orig, self.current_context = current_context, new_context
yield
self.current_context = orig
end | ruby | def inside_new_context(klass, *args)
new_context = append_new_context(klass, *args)
orig, self.current_context = current_context, new_context
yield
self.current_context = orig
end | [
"def",
"inside_new_context",
"(",
"klass",
",",
"*",
"args",
")",
"new_context",
"=",
"append_new_context",
"(",
"klass",
",",
"args",
")",
"orig",
",",
"self",
".",
"current_context",
"=",
"current_context",
",",
"new_context",
"yield",
"self",
".",
"current_... | Stores a reference to the current context, creates a nested new one,
yields to the given block and then restores the previous context.
@param klass [Context::*Context] context class
@param args arguments for the class initializer
@yield block | [
"Stores",
"a",
"reference",
"to",
"the",
"current",
"context",
"creates",
"a",
"nested",
"new",
"one",
"yields",
"to",
"the",
"given",
"block",
"and",
"then",
"restores",
"the",
"previous",
"context",
"."
] | 8c6b5c0c6228a6981ab48543457889f9ea984054 | https://github.com/troessner/reek/blob/8c6b5c0c6228a6981ab48543457889f9ea984054/lib/reek/context_builder.rb#L489-L495 | train | This method is used to create a new context for the current context. | [
30522,
13366,
2503,
1035,
2047,
1035,
6123,
1006,
1047,
27102,
1010,
1008,
12098,
5620,
1007,
2047,
1035,
6123,
1027,
10439,
10497,
1035,
2047,
1035,
6123,
1006,
1047,
27102,
1010,
1008,
12098,
5620,
1007,
2030,
8004,
1010,
2969,
1012,
2783... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/criteria.rb | Mongoid.Criteria.only | def only(*args)
return clone if args.flatten.empty?
args = args.flatten
if (args & Fields::IDS).empty?
args.unshift(:_id)
end
if klass.hereditary?
super(*args.push(:_type))
else
super(*args)
end
end | ruby | def only(*args)
return clone if args.flatten.empty?
args = args.flatten
if (args & Fields::IDS).empty?
args.unshift(:_id)
end
if klass.hereditary?
super(*args.push(:_type))
else
super(*args)
end
end | [
"def",
"only",
"(",
"*",
"args",
")",
"return",
"clone",
"if",
"args",
".",
"flatten",
".",
"empty?",
"args",
"=",
"args",
".",
"flatten",
"if",
"(",
"args",
"&",
"Fields",
"::",
"IDS",
")",
".",
"empty?",
"args",
".",
"unshift",
"(",
":_id",
")",
... | Overriden to include _type in the fields.
@example Limit the fields returned from the database.
Band.only(:name)
@param [ Array<Symbol> ] args The names of the fields.
@return [ Criteria ] The cloned criteria.
@since 1.0.0 | [
"Overriden",
"to",
"include",
"_type",
"in",
"the",
"fields",
"."
] | 56976e32610f4c2450882b0bfe14da099f0703f4 | https://github.com/mongodb/mongoid/blob/56976e32610f4c2450882b0bfe14da099f0703f4/lib/mongoid/criteria.rb#L287-L298 | train | Returns a new object with the same fields as the original object. | [
30522,
13366,
2069,
1006,
1008,
12098,
5620,
1007,
2709,
17598,
2065,
12098,
5620,
1012,
4257,
6528,
1012,
4064,
1029,
12098,
5620,
1027,
12098,
5620,
1012,
4257,
6528,
2065,
1006,
12098,
5620,
1004,
4249,
1024,
1024,
8909,
2015,
1007,
1012... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
puppetlabs/bolt | lib/plan_executor/orch_client.rb | PlanExecutor.OrchClient.unwrap_sensitive_args | def unwrap_sensitive_args(arguments)
# Skip this if Puppet isn't loaded
return arguments unless defined?(Puppet::Pops::Types::PSensitiveType::Sensitive)
case arguments
when Array
# iterate over the array, unwrapping all elements
arguments.map { |x| unwrap_sensitive_args(x) }
... | ruby | def unwrap_sensitive_args(arguments)
# Skip this if Puppet isn't loaded
return arguments unless defined?(Puppet::Pops::Types::PSensitiveType::Sensitive)
case arguments
when Array
# iterate over the array, unwrapping all elements
arguments.map { |x| unwrap_sensitive_args(x) }
... | [
"def",
"unwrap_sensitive_args",
"(",
"arguments",
")",
"# Skip this if Puppet isn't loaded",
"return",
"arguments",
"unless",
"defined?",
"(",
"Puppet",
"::",
"Pops",
"::",
"Types",
"::",
"PSensitiveType",
"::",
"Sensitive",
")",
"case",
"arguments",
"when",
"Array",
... | Unwraps any Sensitive data in an arguments Hash, so the plain-text is passed
to the Task/Script.
This works on deeply nested data structures composed of Hashes, Arrays, and
and plain-old data types (int, string, etc). | [
"Unwraps",
"any",
"Sensitive",
"data",
"in",
"an",
"arguments",
"Hash",
"so",
"the",
"plain",
"-",
"text",
"is",
"passed",
"to",
"the",
"Task",
"/",
"Script",
"."
] | 50689a33699939d262ea7c822a4b24fd8c4f8d8a | https://github.com/puppetlabs/bolt/blob/50689a33699939d262ea7c822a4b24fd8c4f8d8a/lib/plan_executor/orch_client.rb#L202-L222 | train | Unwrap the arguments that are Sensitive | [
30522,
13366,
4895,
13088,
9331,
1035,
7591,
1035,
12098,
5620,
1006,
9918,
1007,
1001,
13558,
2023,
2065,
13997,
3475,
1005,
1056,
8209,
2709,
9918,
4983,
4225,
1029,
1006,
13997,
1024,
1024,
16949,
1024,
1024,
4127,
1024,
1024,
8827,
6132... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/security_rules.rb | Azure::Network::Mgmt::V2018_07_01.SecurityRules.begin_create_or_update | def begin_create_or_update(resource_group_name, network_security_group_name, security_rule_name, security_rule_parameters, custom_headers:nil)
response = begin_create_or_update_async(resource_group_name, network_security_group_name, security_rule_name, security_rule_parameters, custom_headers:custom_headers).valu... | ruby | def begin_create_or_update(resource_group_name, network_security_group_name, security_rule_name, security_rule_parameters, custom_headers:nil)
response = begin_create_or_update_async(resource_group_name, network_security_group_name, security_rule_name, security_rule_parameters, custom_headers:custom_headers).valu... | [
"def",
"begin_create_or_update",
"(",
"resource_group_name",
",",
"network_security_group_name",
",",
"security_rule_name",
",",
"security_rule_parameters",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"begin_create_or_update_async",
"(",
"resource_group_name",
",... | Creates or updates a security rule in the specified network security group.
@param resource_group_name [String] The name of the resource group.
@param network_security_group_name [String] The name of the network security
group.
@param security_rule_name [String] The name of the security rule.
@param security_rule... | [
"Creates",
"or",
"updates",
"a",
"security",
"rule",
"in",
"the",
"specified",
"network",
"security",
"group",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_network/lib/2018-07-01/generated/azure_mgmt_network/security_rules.rb#L412-L415 | train | Creates or updates a network security rule. | [
30522,
13366,
4088,
1035,
3443,
1035,
2030,
1035,
10651,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2897,
1035,
3036,
1035,
2177,
1035,
2171,
1010,
3036,
1035,
3627,
1035,
2171,
1010,
3036,
1035,
3627,
1035,
11709,
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_automation/lib/2015-10-31/generated/azure_mgmt_automation/job_operations.rb | Azure::Automation::Mgmt::V2015_10_31.JobOperations.get_output | def get_output(resource_group_name, automation_account_name, job_id, custom_headers:nil)
response = get_output_async(resource_group_name, automation_account_name, job_id, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def get_output(resource_group_name, automation_account_name, job_id, custom_headers:nil)
response = get_output_async(resource_group_name, automation_account_name, job_id, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"get_output",
"(",
"resource_group_name",
",",
"automation_account_name",
",",
"job_id",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"get_output_async",
"(",
"resource_group_name",
",",
"automation_account_name",
",",
"job_id",
",",
"custom_headers",... | Retrieve the job output identified by job id.
@param resource_group_name [String] Name of an Azure Resource group.
@param automation_account_name [String] The name of the automation account.
@param job_id [String] The job id.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be add... | [
"Retrieve",
"the",
"job",
"output",
"identified",
"by",
"job",
"id",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_automation/lib/2015-10-31/generated/azure_mgmt_automation/job_operations.rb#L35-L38 | train | Gets the output of a job. | [
30522,
13366,
2131,
1035,
6434,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
19309,
1035,
4070,
1035,
2171,
1010,
3105,
1035,
8909,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
2131,
1035,
6434,
1035,
2004,
6038,
2278,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_web/lib/2018-02-01/generated/azure_mgmt_web/recommendations.rb | Azure::Web::Mgmt::V2018_02_01.Recommendations.disable_recommendation_for_site | def disable_recommendation_for_site(resource_group_name, site_name, name, custom_headers:nil)
response = disable_recommendation_for_site_async(resource_group_name, site_name, name, custom_headers:custom_headers).value!
nil
end | ruby | def disable_recommendation_for_site(resource_group_name, site_name, name, custom_headers:nil)
response = disable_recommendation_for_site_async(resource_group_name, site_name, name, custom_headers:custom_headers).value!
nil
end | [
"def",
"disable_recommendation_for_site",
"(",
"resource_group_name",
",",
"site_name",
",",
"name",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"disable_recommendation_for_site_async",
"(",
"resource_group_name",
",",
"site_name",
",",
"name",
",",
"custom... | Disables the specific rule for a web site permanently.
Disables the specific rule for a web site permanently.
@param resource_group_name [String] Name of the resource group to which the
resource belongs.
@param site_name [String] Site name
@param name [String] Rule name
@param custom_headers [Hash{String => Str... | [
"Disables",
"the",
"specific",
"rule",
"for",
"a",
"web",
"site",
"permanently",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_web/lib/2018-02-01/generated/azure_mgmt_web/recommendations.rb#L872-L875 | train | Disables the recommendations for a site. | [
30522,
13366,
4487,
19150,
1035,
12832,
1035,
2005,
1035,
2609,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2609,
1035,
2171,
1010,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
4487,
19150,
1035,
12832,
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... |
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_container_mappings.rb | Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10.ReplicationProtectionContainerMappings.list_by_replication_protection_containers_next | def list_by_replication_protection_containers_next(next_page_link, custom_headers:nil)
response = list_by_replication_protection_containers_next_async(next_page_link, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def list_by_replication_protection_containers_next(next_page_link, custom_headers:nil)
response = list_by_replication_protection_containers_next_async(next_page_link, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"list_by_replication_protection_containers_next",
"(",
"next_page_link",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"list_by_replication_protection_containers_next_async",
"(",
"next_page_link",
",",
"custom_headers",
":custom_headers",
")",
".",
"value!",
... | Gets the list of protection container mappings for a protection container.
Lists the protection container mappings for a protection container.
@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 th... | [
"Gets",
"the",
"list",
"of",
"protection",
"container",
"mappings",
"for",
"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_container_mappings.rb#L951-L954 | train | Gets the list of all the elastic network protection containers. | [
30522,
13366,
2862,
1035,
2011,
1035,
21647,
1035,
3860,
1035,
16143,
1035,
2279,
1006,
2279,
1035,
3931,
1035,
4957,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
2862,
1035,
2011,
1035,
21647,
1035,
3860,
1035,
16143,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/encoding_utils.rb | Sprockets.EncodingUtils.detect_unicode_bom | def detect_unicode_bom(str)
bom_bytes = str.byteslice(0, 4).bytes.to_a
BOM.each do |encoding, bytes|
if bom_bytes[0, bytes.size] == bytes
str = str.dup
str.force_encoding(Encoding::BINARY)
str.slice!(0, bytes.size)
str.force_encoding(encoding)
retur... | ruby | def detect_unicode_bom(str)
bom_bytes = str.byteslice(0, 4).bytes.to_a
BOM.each do |encoding, bytes|
if bom_bytes[0, bytes.size] == bytes
str = str.dup
str.force_encoding(Encoding::BINARY)
str.slice!(0, bytes.size)
str.force_encoding(encoding)
retur... | [
"def",
"detect_unicode_bom",
"(",
"str",
")",
"bom_bytes",
"=",
"str",
".",
"byteslice",
"(",
"0",
",",
"4",
")",
".",
"bytes",
".",
"to_a",
"BOM",
".",
"each",
"do",
"|",
"encoding",
",",
"bytes",
"|",
"if",
"bom_bytes",
"[",
"0",
",",
"bytes",
".... | Public: Detect and strip BOM from possible unicode string.
str - ASCII-8BIT encoded String
Returns UTF 8/16/32 encoded String without BOM or the original String if
no BOM was present. | [
"Public",
":",
"Detect",
"and",
"strip",
"BOM",
"from",
"possible",
"unicode",
"string",
"."
] | 9e3f0d8e98c44f57e67bc138db87bb8469bf5ddd | https://github.com/rails/sprockets/blob/9e3f0d8e98c44f57e67bc138db87bb8469bf5ddd/lib/sprockets/encoding_utils.rb#L157-L171 | train | Detect unicode BOM | [
30522,
13366,
11487,
1035,
27260,
1035,
8945,
2213,
1006,
2358,
2099,
1007,
8945,
2213,
1035,
27507,
1027,
2358,
2099,
1012,
27507,
13231,
1006,
1014,
1010,
1018,
1007,
1012,
27507,
1012,
2000,
1035,
1037,
8945,
2213,
1012,
2169,
2079,
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... |
sensu/sensu | lib/sensu/daemon.rb | Sensu.Daemon.log_notices | def log_notices(notices=[], level=:warn)
notices.each do |concern|
message = concern.delete(:message)
@logger.send(level, message, redact_sensitive(concern))
end
end | ruby | def log_notices(notices=[], level=:warn)
notices.each do |concern|
message = concern.delete(:message)
@logger.send(level, message, redact_sensitive(concern))
end
end | [
"def",
"log_notices",
"(",
"notices",
"=",
"[",
"]",
",",
"level",
"=",
":warn",
")",
"notices",
".",
"each",
"do",
"|",
"concern",
"|",
"message",
"=",
"concern",
".",
"delete",
"(",
":message",
")",
"@logger",
".",
"send",
"(",
"level",
",",
"messa... | Log setting or extension loading notices, sensitive information
is redacted.
@param notices [Array] to be logged.
@param level [Symbol] to log the notices at. | [
"Log",
"setting",
"or",
"extension",
"loading",
"notices",
"sensitive",
"information",
"is",
"redacted",
"."
] | 51319e4b58c8d9986f101ad71ff729aa3e51e951 | https://github.com/sensu/sensu/blob/51319e4b58c8d9986f101ad71ff729aa3e51e951/lib/sensu/daemon.rb#L111-L116 | train | Log the notices | [
30522,
13366,
8833,
1035,
14444,
1006,
14444,
1027,
1031,
1033,
1010,
2504,
1027,
1024,
11582,
1007,
14444,
1012,
2169,
2079,
1064,
5142,
1064,
4471,
1027,
5142,
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... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
troessner/reek | lib/reek/tree_dresser.rb | Reek.TreeDresser.dress | def dress(sexp, comment_map)
return sexp unless sexp.is_a? ::Parser::AST::Node
type = sexp.type
children = sexp.children.map { |child| dress(child, comment_map) }
comments = comment_map[sexp]
klass_map.klass_for(type).new(type, children,
location: sexp.... | ruby | def dress(sexp, comment_map)
return sexp unless sexp.is_a? ::Parser::AST::Node
type = sexp.type
children = sexp.children.map { |child| dress(child, comment_map) }
comments = comment_map[sexp]
klass_map.klass_for(type).new(type, children,
location: sexp.... | [
"def",
"dress",
"(",
"sexp",
",",
"comment_map",
")",
"return",
"sexp",
"unless",
"sexp",
".",
"is_a?",
"::",
"Parser",
"::",
"AST",
"::",
"Node",
"type",
"=",
"sexp",
".",
"type",
"children",
"=",
"sexp",
".",
"children",
".",
"map",
"{",
"|",
"chil... | Recursively enhance an AST with type-dependent mixins, and comments.
See {file:docs/How-reek-works-internally.md} for the big picture of how this works.
Example:
This
class Klazz; def meth(argument); argument.call_me; end; end
corresponds to this sexp:
(class
(const nil :Klazz) nil
(def :meth
... | [
"Recursively",
"enhance",
"an",
"AST",
"with",
"type",
"-",
"dependent",
"mixins",
"and",
"comments",
"."
] | 8c6b5c0c6228a6981ab48543457889f9ea984054 | https://github.com/troessner/reek/blob/8c6b5c0c6228a6981ab48543457889f9ea984054/lib/reek/tree_dresser.rb#L42-L50 | train | Returns a new object for the given Sexp | [
30522,
13366,
4377,
1006,
3348,
2361,
1010,
7615,
1035,
4949,
1007,
2709,
3348,
2361,
4983,
3348,
2361,
1012,
2003,
1035,
1037,
1029,
1024,
1024,
11968,
8043,
1024,
1024,
2004,
2102,
1024,
1024,
13045,
2828,
1027,
3348,
2361,
1012,
2828,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
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_replica_health_with_http_info | def get_replica_health_with_http_info(partition_id, replica_id, events_health_state_filter:0, timeout:60, custom_headers:nil)
get_replica_health_async(partition_id, replica_id, events_health_state_filter:events_health_state_filter, timeout:timeout, custom_headers:custom_headers).value!
end | ruby | def get_replica_health_with_http_info(partition_id, replica_id, events_health_state_filter:0, timeout:60, custom_headers:nil)
get_replica_health_async(partition_id, replica_id, events_health_state_filter:events_health_state_filter, timeout:timeout, custom_headers:custom_headers).value!
end | [
"def",
"get_replica_health_with_http_info",
"(",
"partition_id",
",",
"replica_id",
",",
"events_health_state_filter",
":",
"0",
",",
"timeout",
":",
"60",
",",
"custom_headers",
":",
"nil",
")",
"get_replica_health_async",
"(",
"partition_id",
",",
"replica_id",
",",... | Gets the health of a Service Fabric stateful service replica or stateless
service instance.
Gets the health of a Service Fabric replica.
Use EventsHealthStateFilter to filter the collection of health events
reported on the replica based on the health state.
@param partition_id The identity of the partition.
@pa... | [
"Gets",
"the",
"health",
"of",
"a",
"Service",
"Fabric",
"stateful",
"service",
"replica",
"or",
"stateless",
"service",
"instance",
"."
] | 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#L14757-L14759 | train | Gets the health of the replica. | [
30522,
13366,
2131,
1035,
15059,
1035,
2740,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
13571,
1035,
8909,
1010,
15059,
1035,
8909,
1010,
2824,
1035,
2740,
1035,
2110,
1035,
11307,
1024,
1014,
1010,
2051,
5833,
1024,
3438,
1010,
7661,
1035,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_stor_simple8000_series/lib/2017-06-01/generated/azure_mgmt_stor_simple8000_series/device_settings.rb | Azure::StorSimple8000Series::Mgmt::V2017_06_01.DeviceSettings.get_alert_settings | def get_alert_settings(device_name, resource_group_name, manager_name, custom_headers:nil)
response = get_alert_settings_async(device_name, resource_group_name, manager_name, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def get_alert_settings(device_name, resource_group_name, manager_name, custom_headers:nil)
response = get_alert_settings_async(device_name, resource_group_name, manager_name, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"get_alert_settings",
"(",
"device_name",
",",
"resource_group_name",
",",
"manager_name",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"get_alert_settings_async",
"(",
"device_name",
",",
"resource_group_name",
",",
"manager_name",
",",
"custom_heade... | Gets the alert settings of the specified device.
@param device_name [String] The device name
@param resource_group_name [String] The resource group name
@param manager_name [String] The manager name
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request.
@... | [
"Gets",
"the",
"alert",
"settings",
"of",
"the",
"specified",
"device",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_stor_simple8000_series/lib/2017-06-01/generated/azure_mgmt_stor_simple8000_series/device_settings.rb#L35-L38 | train | Gets the alert settings for the specified device. | [
30522,
13366,
2131,
1035,
9499,
1035,
10906,
1006,
5080,
1035,
2171,
1010,
7692,
1035,
2177,
1035,
2171,
1010,
3208,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
2131,
1035,
9499,
1035,
10906,
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... |
aws/aws-sdk-ruby | gems/aws-sdk-core/lib/aws-sdk-core/endpoint_cache.rb | Aws.EndpointCache.update_polling_pool | def update_polling_pool(key, thread)
unless @pool.size < @max_threads
_, thread = @pool.shift
Thread.kill(thread)
end
@pool[key] = thread
end | ruby | def update_polling_pool(key, thread)
unless @pool.size < @max_threads
_, thread = @pool.shift
Thread.kill(thread)
end
@pool[key] = thread
end | [
"def",
"update_polling_pool",
"(",
"key",
",",
"thread",
")",
"unless",
"@pool",
".",
"size",
"<",
"@max_threads",
"_",
",",
"thread",
"=",
"@pool",
".",
"shift",
"Thread",
".",
"kill",
"(",
"thread",
")",
"end",
"@pool",
"[",
"key",
"]",
"=",
"thread"... | update polling threads pool
param [String] key
param [Thread] thread | [
"update",
"polling",
"threads",
"pool",
"param",
"[",
"String",
"]",
"key",
"param",
"[",
"Thread",
"]",
"thread"
] | e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d | https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-core/lib/aws-sdk-core/endpoint_cache.rb#L122-L128 | train | Update the polling pool | [
30522,
13366,
10651,
1035,
17888,
1035,
4770,
1006,
3145,
1010,
11689,
1007,
4983,
1030,
4770,
1012,
2946,
1026,
1030,
4098,
1035,
16457,
1035,
1010,
11689,
1027,
1030,
4770,
1012,
5670,
11689,
1012,
3102,
1006,
11689,
1007,
2203,
1030,
477... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_storagesync/lib/2018-07-01/generated/azure_mgmt_storagesync/cloud_endpoints.rb | Azure::StorageSync::Mgmt::V2018_07_01.CloudEndpoints.begin_post_restore | def begin_post_restore(resource_group_name, storage_sync_service_name, sync_group_name, cloud_endpoint_name, parameters, custom_headers:nil)
response = begin_post_restore_async(resource_group_name, storage_sync_service_name, sync_group_name, cloud_endpoint_name, parameters, custom_headers:custom_headers).value!
... | ruby | def begin_post_restore(resource_group_name, storage_sync_service_name, sync_group_name, cloud_endpoint_name, parameters, custom_headers:nil)
response = begin_post_restore_async(resource_group_name, storage_sync_service_name, sync_group_name, cloud_endpoint_name, parameters, custom_headers:custom_headers).value!
... | [
"def",
"begin_post_restore",
"(",
"resource_group_name",
",",
"storage_sync_service_name",
",",
"sync_group_name",
",",
"cloud_endpoint_name",
",",
"parameters",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"begin_post_restore_async",
"(",
"resource_group_name",... | Post Restore a given CloudEndpoint.
@param resource_group_name [String] The name of the resource group. The name
is case insensitive.
@param storage_sync_service_name [String] Name of Storage Sync Service
resource.
@param sync_group_name [String] Name of Sync Group resource.
@param cloud_endpoint_name [String] N... | [
"Post",
"Restore",
"a",
"given",
"CloudEndpoint",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_storagesync/lib/2018-07-01/generated/azure_mgmt_storagesync/cloud_endpoints.rb#L1221-L1224 | train | Restores a CloudEndpoint. | [
30522,
13366,
4088,
1035,
2695,
1035,
9239,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
5527,
1035,
26351,
1035,
2326,
1035,
2171,
1010,
26351,
1035,
2177,
1035,
2171,
1010,
6112,
1035,
2203,
8400,
1035,
2171,
1010,
11709,
1010,
7661,
1035,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
projectcypress/health-data-standards | lib/hqmf-parser/2.0/types.rb | HQMF2.SubsetOperator.to_model | def to_model
vm = value ? value.to_model : nil
HQMF::SubsetOperator.new(type, vm)
end | ruby | def to_model
vm = value ? value.to_model : nil
HQMF::SubsetOperator.new(type, vm)
end | [
"def",
"to_model",
"vm",
"=",
"value",
"?",
"value",
".",
"to_model",
":",
"nil",
"HQMF",
"::",
"SubsetOperator",
".",
"new",
"(",
"type",
",",
"vm",
")",
"end"
] | Generates this classes hqmf-model equivalent | [
"Generates",
"this",
"classes",
"hqmf",
"-",
"model",
"equivalent"
] | 252d4f0927c513eacde6b9ea41b76faa1423c34b | https://github.com/projectcypress/health-data-standards/blob/252d4f0927c513eacde6b9ea41b76faa1423c34b/lib/hqmf-parser/2.0/types.rb#L318-L321 | train | Convert the HQMF object to a HQMF object. | [
30522,
13366,
2000,
1035,
2944,
1058,
2213,
1027,
3643,
1029,
3643,
1012,
2000,
1035,
2944,
1024,
9152,
2140,
16260,
2213,
2546,
1024,
1024,
16745,
25918,
8844,
1012,
2047,
1006,
2828,
1010,
1058,
2213,
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... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
watir/watir | lib/watir/elements/table.rb | Watir.Table.hashes | def hashes
all_rows = rows.locate
header_row = all_rows.first || raise(Error, 'no rows in table')
all_rows.entries[1..-1].map do |row|
cell_size_check(header_row, row)
Hash[headers(header_row).map(&:text).zip(row.cells.map(&:text))]
end
end | ruby | def hashes
all_rows = rows.locate
header_row = all_rows.first || raise(Error, 'no rows in table')
all_rows.entries[1..-1].map do |row|
cell_size_check(header_row, row)
Hash[headers(header_row).map(&:text).zip(row.cells.map(&:text))]
end
end | [
"def",
"hashes",
"all_rows",
"=",
"rows",
".",
"locate",
"header_row",
"=",
"all_rows",
".",
"first",
"||",
"raise",
"(",
"Error",
",",
"'no rows in table'",
")",
"all_rows",
".",
"entries",
"[",
"1",
"..",
"-",
"1",
"]",
".",
"map",
"do",
"|",
"row",
... | Represents table rows as hashes
@return [Array<Hash>] | [
"Represents",
"table",
"rows",
"as",
"hashes"
] | 2d8db09811c6221ae401b85b2f61f5fa66e463a3 | https://github.com/watir/watir/blob/2d8db09811c6221ae401b85b2f61f5fa66e463a3/lib/watir/elements/table.rb#L28-L36 | train | Returns a hash of the header and cells of the table. | [
30522,
13366,
23325,
2229,
2035,
1035,
10281,
1027,
10281,
1012,
12453,
20346,
1035,
5216,
1027,
2035,
1035,
10281,
1012,
2034,
1064,
1064,
5333,
1006,
7561,
1010,
1005,
2053,
10281,
1999,
2795,
1005,
1007,
2035,
1035,
10281,
1012,
10445,
1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_compute/lib/2018-04-01/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb | Azure::Compute::Mgmt::V2018_04_01.VirtualMachineScaleSets.begin_redeploy | def begin_redeploy(resource_group_name, vm_scale_set_name, vm_instance_ids:nil, custom_headers:nil)
response = begin_redeploy_async(resource_group_name, vm_scale_set_name, vm_instance_ids:vm_instance_ids, custom_headers:custom_headers).value!
nil
end | ruby | def begin_redeploy(resource_group_name, vm_scale_set_name, vm_instance_ids:nil, custom_headers:nil)
response = begin_redeploy_async(resource_group_name, vm_scale_set_name, vm_instance_ids:vm_instance_ids, custom_headers:custom_headers).value!
nil
end | [
"def",
"begin_redeploy",
"(",
"resource_group_name",
",",
"vm_scale_set_name",
",",
"vm_instance_ids",
":",
"nil",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"begin_redeploy_async",
"(",
"resource_group_name",
",",
"vm_scale_set_name",
",",
"vm_instance_id... | Redeploy one or more virtual machines in a VM scale set.
@param resource_group_name [String] The name of the resource group.
@param vm_scale_set_name [String] The name of the VM scale set.
@param vm_instance_ids [VirtualMachineScaleSetVMInstanceIDs] A list of
virtual machine instance IDs from the VM scale set.
@p... | [
"Redeploy",
"one",
"or",
"more",
"virtual",
"machines",
"in",
"a",
"VM",
"scale",
"set",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_compute/lib/2018-04-01/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb#L2035-L2038 | train | Redeploy a virtual machine. | [
30522,
13366,
4088,
1035,
2417,
13699,
4135,
2100,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
1058,
2213,
1035,
4094,
1035,
2275,
1035,
2171,
1010,
1058,
2213,
1035,
6013,
1035,
8909,
2015,
1024,
9152,
2140,
1010,
7661,
1035,
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... |
projectcypress/health-data-standards | lib/hqmf-parser/2.0/document_helpers/doc_population_helper.rb | HQMF2.DocumentPopulationHelper.handle_stratifications | def handle_stratifications(population_def, number_of_populations, population, id_def, population_index)
# handle stratifications (EP137, EP155)
stratifier_criteria_xpath = "cda:component/cda:stratifierCriteria[not(cda:component/cda:measureAttribute/cda:code[@code = 'SDE'])]/.."
population_def.xpath(s... | ruby | def handle_stratifications(population_def, number_of_populations, population, id_def, population_index)
# handle stratifications (EP137, EP155)
stratifier_criteria_xpath = "cda:component/cda:stratifierCriteria[not(cda:component/cda:measureAttribute/cda:code[@code = 'SDE'])]/.."
population_def.xpath(s... | [
"def",
"handle_stratifications",
"(",
"population_def",
",",
"number_of_populations",
",",
"population",
",",
"id_def",
",",
"population_index",
")",
"# handle stratifications (EP137, EP155)",
"stratifier_criteria_xpath",
"=",
"\"cda:component/cda:stratifierCriteria[not(cda:component... | Generate the stratifications of populations, if any exist | [
"Generate",
"the",
"stratifications",
"of",
"populations",
"if",
"any",
"exist"
] | 252d4f0927c513eacde6b9ea41b76faa1423c34b | https://github.com/projectcypress/health-data-standards/blob/252d4f0927c513eacde6b9ea41b76faa1423c34b/lib/hqmf-parser/2.0/document_helpers/doc_population_helper.rb#L111-L133 | train | This method handles the stratifications for the given population definition. | [
30522,
13366,
5047,
1035,
2358,
8609,
9031,
2015,
1006,
2313,
1035,
13366,
1010,
2193,
1035,
1997,
1035,
7080,
1010,
2313,
1010,
8909,
1035,
13366,
1010,
2313,
1035,
5950,
1007,
1001,
5047,
2358,
8609,
9031,
2015,
1006,
4958,
17134,
2581,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/http/compression.rb | Puppet::Network::HTTP::Compression.Active.uncompress_body | def uncompress_body(response)
case response['content-encoding']
when 'gzip'
# ZLib::GzipReader has an associated encoding, by default Encoding.default_external
return Zlib::GzipReader.new(StringIO.new(response.body), :encoding => Encoding::BINARY).read
when 'deflate'
return Zli... | ruby | def uncompress_body(response)
case response['content-encoding']
when 'gzip'
# ZLib::GzipReader has an associated encoding, by default Encoding.default_external
return Zlib::GzipReader.new(StringIO.new(response.body), :encoding => Encoding::BINARY).read
when 'deflate'
return Zli... | [
"def",
"uncompress_body",
"(",
"response",
")",
"case",
"response",
"[",
"'content-encoding'",
"]",
"when",
"'gzip'",
"# ZLib::GzipReader has an associated encoding, by default Encoding.default_external",
"return",
"Zlib",
"::",
"GzipReader",
".",
"new",
"(",
"StringIO",
".... | return an uncompressed body if the response has been
compressed | [
"return",
"an",
"uncompressed",
"body",
"if",
"the",
"response",
"has",
"been",
"compressed"
] | 4baeed97cbb7571ddc6635f0a24debe2e8b22cd3 | https://github.com/puppetlabs/puppet/blob/4baeed97cbb7571ddc6635f0a24debe2e8b22cd3/lib/puppet/network/http/compression.rb#L20-L32 | train | Uncompress the body of the response | [
30522,
13366,
4895,
9006,
20110,
1035,
2303,
1006,
3433,
1007,
2553,
3433,
1031,
1005,
4180,
1011,
17181,
1005,
1033,
2043,
1005,
1043,
5831,
2361,
1005,
1001,
1062,
29521,
1024,
1024,
1043,
5831,
28139,
9648,
2099,
2038,
2019,
3378,
17181,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
puppetlabs/puppet | lib/puppet/util/fileparsing.rb | Puppet::Util::FileParsing.FileRecord.fields= | def fields=(fields)
@fields = fields.collect do |field|
r = field.intern
raise ArgumentError.new(_("Cannot have fields named %{name}") % { name: r }) if INVALID_FIELDS.include?(r)
r
end
end | ruby | def fields=(fields)
@fields = fields.collect do |field|
r = field.intern
raise ArgumentError.new(_("Cannot have fields named %{name}") % { name: r }) if INVALID_FIELDS.include?(r)
r
end
end | [
"def",
"fields",
"=",
"(",
"fields",
")",
"@fields",
"=",
"fields",
".",
"collect",
"do",
"|",
"field",
"|",
"r",
"=",
"field",
".",
"intern",
"raise",
"ArgumentError",
".",
"new",
"(",
"_",
"(",
"\"Cannot have fields named %{name}\"",
")",
"%",
"{",
"na... | Customize this so we can do a bit of validation. | [
"Customize",
"this",
"so",
"we",
"can",
"do",
"a",
"bit",
"of",
"validation",
"."
] | 4baeed97cbb7571ddc6635f0a24debe2e8b22cd3 | https://github.com/puppetlabs/puppet/blob/4baeed97cbb7571ddc6635f0a24debe2e8b22cd3/lib/puppet/util/fileparsing.rb#L40-L46 | train | Sets the fields to be used in the query. | [
30522,
13366,
4249,
1027,
1006,
4249,
1007,
1030,
4249,
1027,
4249,
1012,
8145,
2079,
1064,
2492,
1064,
1054,
1027,
2492,
1012,
25204,
5333,
6685,
2121,
29165,
1012,
2047,
1006,
1035,
1006,
1000,
3685,
2031,
4249,
2315,
1003,
1063,
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/subnet.rb | Aws::EC2.Subnet.instances | def instances(options = {})
batches = Enumerator.new do |y|
options = Aws::Util.deep_merge(options, filters: [{
name: "subnet-id",
values: [@id]
}])
resp = @client.describe_instances(options)
resp.each_page do |page|
batch = []
page.data.rese... | ruby | def instances(options = {})
batches = Enumerator.new do |y|
options = Aws::Util.deep_merge(options, filters: [{
name: "subnet-id",
values: [@id]
}])
resp = @client.describe_instances(options)
resp.each_page do |page|
batch = []
page.data.rese... | [
"def",
"instances",
"(",
"options",
"=",
"{",
"}",
")",
"batches",
"=",
"Enumerator",
".",
"new",
"do",
"|",
"y",
"|",
"options",
"=",
"Aws",
"::",
"Util",
".",
"deep_merge",
"(",
"options",
",",
"filters",
":",
"[",
"{",
"name",
":",
"\"subnet-id\""... | @!group Associations
@example Request syntax with placeholder values
instances = subnet.instances({
filters: [
{
name: "String",
values: ["String"],
},
],
instance_ids: ["String"],
dry_run: false,
})
@param [Hash] options ({})
@option options [Array<Types::F... | [
"@!group",
"Associations",
"@example",
"Request",
"syntax",
"with",
"placeholder",
"values"
] | e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d | https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-ec2/lib/aws-sdk-ec2/subnet.rb#L1083-L1105 | train | Returns a list of all instances in the subnet. | [
30522,
13366,
12107,
1006,
7047,
1027,
1063,
1065,
1007,
14108,
2229,
1027,
4372,
17897,
16259,
1012,
2047,
2079,
1064,
1061,
1064,
7047,
1027,
22091,
2015,
1024,
1024,
21183,
4014,
1012,
2784,
1035,
13590,
1006,
7047,
1010,
17736,
1024,
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 | def list_deployments_at_resource_group(resource_group_name, remediation_name, query_options:nil, custom_headers:nil)
first_page = list_deployments_at_resource_group_as_lazy(resource_group_name, remediation_name, query_options:query_options, custom_headers:custom_headers)
first_page.get_all_items
end | ruby | def list_deployments_at_resource_group(resource_group_name, remediation_name, query_options:nil, custom_headers:nil)
first_page = list_deployments_at_resource_group_as_lazy(resource_group_name, remediation_name, query_options:query_options, custom_headers:custom_headers)
first_page.get_all_items
end | [
"def",
"list_deployments_at_resource_group",
"(",
"resource_group_name",
",",
"remediation_name",
",",
"query_options",
":",
"nil",
",",
"custom_headers",
":",
"nil",
")",
"first_page",
"=",
"list_deployments_at_resource_group_as_lazy",
"(",
"resource_group_name",
",",
"rem... | Gets all deployments for a remediation at resource group scope.
@param resource_group_name [String] Resource group name.
@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... | [
"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#L1185-L1188 | train | Gets all deployments at resource group scope. | [
30522,
13366,
2862,
1035,
10813,
2015,
1035,
2012,
1035,
7692,
1035,
2177,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2128,
16969,
3508,
1035,
2171,
1010,
23032,
1035,
7047,
1024,
9152,
2140,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
danger/danger | lib/danger/plugin_support/plugin_linter.rb | Danger.PluginLinter.class_rules | def class_rules
[
Rule.new(:error, 4..6, "Description Markdown", "Above your class you need documentation that covers the scope, and the usage of your plugin.", proc do |json|
json[:body_md] && json[:body_md].empty?
end),
Rule.new(:warning, 30, "Tags", "This plugin does not inclu... | ruby | def class_rules
[
Rule.new(:error, 4..6, "Description Markdown", "Above your class you need documentation that covers the scope, and the usage of your plugin.", proc do |json|
json[:body_md] && json[:body_md].empty?
end),
Rule.new(:warning, 30, "Tags", "This plugin does not inclu... | [
"def",
"class_rules",
"[",
"Rule",
".",
"new",
"(",
":error",
",",
"4",
"..",
"6",
",",
"\"Description Markdown\"",
",",
"\"Above your class you need documentation that covers the scope, and the usage of your plugin.\"",
",",
"proc",
"do",
"|",
"json",
"|",
"json",
"[",... | Rules that apply to a class | [
"Rules",
"that",
"apply",
"to",
"a",
"class"
] | 0d6d09f2d949c287fe75202d947374042b0679f4 | https://github.com/danger/danger/blob/0d6d09f2d949c287fe75202d947374042b0679f4/lib/danger/plugin_support/plugin_linter.rb#L93-L108 | train | The rules that are used to generate the class. | [
30522,
13366,
2465,
1035,
3513,
1031,
3627,
1012,
2047,
1006,
1024,
7561,
1010,
1018,
1012,
1012,
1020,
1010,
1000,
6412,
2928,
7698,
1000,
1010,
1000,
2682,
2115,
2465,
2017,
2342,
12653,
2008,
4472,
1996,
9531,
1010,
1998,
1996,
8192,
1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_storagesync/lib/2018-07-01/generated/azure_mgmt_storagesync/cloud_endpoints.rb | Azure::StorageSync::Mgmt::V2018_07_01.CloudEndpoints.begin_delete | def begin_delete(resource_group_name, storage_sync_service_name, sync_group_name, cloud_endpoint_name, custom_headers:nil)
response = begin_delete_async(resource_group_name, storage_sync_service_name, sync_group_name, cloud_endpoint_name, custom_headers:custom_headers).value!
nil
end | ruby | def begin_delete(resource_group_name, storage_sync_service_name, sync_group_name, cloud_endpoint_name, custom_headers:nil)
response = begin_delete_async(resource_group_name, storage_sync_service_name, sync_group_name, cloud_endpoint_name, custom_headers:custom_headers).value!
nil
end | [
"def",
"begin_delete",
"(",
"resource_group_name",
",",
"storage_sync_service_name",
",",
"sync_group_name",
",",
"cloud_endpoint_name",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"begin_delete_async",
"(",
"resource_group_name",
",",
"storage_sync_service_nam... | Delete a given CloudEndpoint.
@param resource_group_name [String] The name of the resource group. The name
is case insensitive.
@param storage_sync_service_name [String] Name of Storage Sync Service
resource.
@param sync_group_name [String] Name of Sync Group resource.
@param cloud_endpoint_name [String] Name of... | [
"Delete",
"a",
"given",
"CloudEndpoint",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_storagesync/lib/2018-07-01/generated/azure_mgmt_storagesync/cloud_endpoints.rb#L776-L779 | train | Deletes a CloudEndpoint. | [
30522,
13366,
4088,
1035,
3972,
12870,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
5527,
1035,
26351,
1035,
2326,
1035,
2171,
1010,
26351,
1035,
2177,
1035,
2171,
1010,
6112,
1035,
2203,
8400,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/package.rb | Axlsx.Package.write_parts | def write_parts(zip)
p = parts
p.each do |part|
unless part[:doc].nil?
zip.put_next_entry(zip_entry_for_part(part))
part[:doc].to_xml_string(zip)
end
unless part[:path].nil?
zip.put_next_entry(zip_entry_for_part(part))
zip.write IO.read(part[:p... | ruby | def write_parts(zip)
p = parts
p.each do |part|
unless part[:doc].nil?
zip.put_next_entry(zip_entry_for_part(part))
part[:doc].to_xml_string(zip)
end
unless part[:path].nil?
zip.put_next_entry(zip_entry_for_part(part))
zip.write IO.read(part[:p... | [
"def",
"write_parts",
"(",
"zip",
")",
"p",
"=",
"parts",
"p",
".",
"each",
"do",
"|",
"part",
"|",
"unless",
"part",
"[",
":doc",
"]",
".",
"nil?",
"zip",
".",
"put_next_entry",
"(",
"zip_entry_for_part",
"(",
"part",
")",
")",
"part",
"[",
":doc",
... | Writes the package parts to a zip archive.
@param [Zip::OutputStream] zip
@return [Zip::OutputStream] | [
"Writes",
"the",
"package",
"parts",
"to",
"a",
"zip",
"archive",
"."
] | c593a08b2a929dac7aa8dc418b55e26b4c49dc34 | https://github.com/randym/axlsx/blob/c593a08b2a929dac7aa8dc418b55e26b4c49dc34/lib/axlsx/package.rb#L161-L174 | train | Write the parts of the document to the zip. | [
30522,
13366,
4339,
1035,
3033,
1006,
14101,
1007,
1052,
1027,
3033,
1052,
1012,
2169,
2079,
1064,
2112,
1064,
4983,
2112,
1031,
1024,
9986,
1033,
1012,
9152,
2140,
1029,
14101,
1012,
2404,
1035,
2279,
1035,
4443,
1006,
14101,
1035,
4443,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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 | railties/lib/rails/application.rb | Rails.Application.secrets | def secrets
@secrets ||= begin
secrets = ActiveSupport::OrderedOptions.new
files = config.paths["config/secrets"].existent
files = files.reject { |path| path.end_with?(".enc") } unless config.read_encrypted_secrets
secrets.merge! Rails::Secrets.parse(files, env: Rails.env)
... | ruby | def secrets
@secrets ||= begin
secrets = ActiveSupport::OrderedOptions.new
files = config.paths["config/secrets"].existent
files = files.reject { |path| path.end_with?(".enc") } unless config.read_encrypted_secrets
secrets.merge! Rails::Secrets.parse(files, env: Rails.env)
... | [
"def",
"secrets",
"@secrets",
"||=",
"begin",
"secrets",
"=",
"ActiveSupport",
"::",
"OrderedOptions",
".",
"new",
"files",
"=",
"config",
".",
"paths",
"[",
"\"config/secrets\"",
"]",
".",
"existent",
"files",
"=",
"files",
".",
"reject",
"{",
"|",
"path",
... | Returns secrets added to config/secrets.yml.
Example:
development:
secret_key_base: 836fa3665997a860728bcb9e9a1e704d427cfc920e79d847d79c8a9a907b9e965defa4154b2b86bdec6930adbe33f21364523a6f6ce363865724549fdfc08553
test:
secret_key_base: 5a37811464e7d378488b0f073e2193b093682e4e21f5d6f3ae0a4e178... | [
"Returns",
"secrets",
"added",
"to",
"config",
"/",
"secrets",
".",
"yml",
"."
] | 85a8bc644be69908f05740a5886ec19cd3679df5 | https://github.com/rails/rails/blob/85a8bc644be69908f05740a5886ec19cd3679df5/railties/lib/rails/application.rb#L393-L405 | train | Returns the secrets for this application. | [
30522,
13366,
7800,
1030,
7800,
1064,
1064,
1027,
4088,
7800,
1027,
3161,
6342,
9397,
11589,
1024,
1024,
3641,
7361,
9285,
1012,
2047,
6764,
1027,
9530,
8873,
2290,
1012,
10425,
1031,
1000,
9530,
8873,
2290,
1013,
7800,
1000,
1033,
1012,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_api_management/lib/2019-01-01/generated/azure_mgmt_api_management/logger.rb | Azure::ApiManagement::Mgmt::V2019_01_01.Logger.get_entity_tag_with_http_info | def get_entity_tag_with_http_info(resource_group_name, service_name, logger_id, custom_headers:nil)
get_entity_tag_async(resource_group_name, service_name, logger_id, custom_headers:custom_headers).value!
end | ruby | def get_entity_tag_with_http_info(resource_group_name, service_name, logger_id, custom_headers:nil)
get_entity_tag_async(resource_group_name, service_name, logger_id, custom_headers:custom_headers).value!
end | [
"def",
"get_entity_tag_with_http_info",
"(",
"resource_group_name",
",",
"service_name",
",",
"logger_id",
",",
"custom_headers",
":",
"nil",
")",
"get_entity_tag_async",
"(",
"resource_group_name",
",",
"service_name",
",",
"logger_id",
",",
"custom_headers",
":custom_he... | Gets the entity state (Etag) version of the logger specified by its
identifier.
@param resource_group_name [String] The name of the resource group.
@param service_name [String] The name of the API Management service.
@param logger_id [String] Logger identifier. Must be unique in the API
Management service instanc... | [
"Gets",
"the",
"entity",
"state",
"(",
"Etag",
")",
"version",
"of",
"the",
"logger",
"specified",
"by",
"its",
"identifier",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_api_management/lib/2019-01-01/generated/azure_mgmt_api_management/logger.rb#L181-L183 | train | Gets the entity tag for the specified logger. | [
30522,
13366,
2131,
1035,
9178,
1035,
6415,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2326,
1035,
2171,
1010,
8833,
4590,
1035,
8909,
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... |
ruby-git/ruby-git | lib/git/log.rb | Git.Log.run_log | def run_log
log = @base.lib.full_log_commits(:count => @count, :object => @object,
:path_limiter => @path, :since => @since,
:author => @author, :grep => @grep, :skip => @skip,
:until => @until, :... | ruby | def run_log
log = @base.lib.full_log_commits(:count => @count, :object => @object,
:path_limiter => @path, :since => @since,
:author => @author, :grep => @grep, :skip => @skip,
:until => @until, :... | [
"def",
"run_log",
"log",
"=",
"@base",
".",
"lib",
".",
"full_log_commits",
"(",
":count",
"=>",
"@count",
",",
":object",
"=>",
"@object",
",",
":path_limiter",
"=>",
"@path",
",",
":since",
"=>",
"@since",
",",
":author",
"=>",
"@author",
",",
":grep",
... | actually run the 'git log' command | [
"actually",
"run",
"the",
"git",
"log",
"command"
] | 9bd4407c56068e1604f14a1b6c0c5a84868e6378 | https://github.com/ruby-git/ruby-git/blob/9bd4407c56068e1604f14a1b6c0c5a84868e6378/lib/git/log.rb#L118-L124 | train | runs the full log of the object | [
30522,
13366,
2448,
1035,
8833,
8833,
1027,
1030,
2918,
1012,
5622,
2497,
1012,
2440,
1035,
8833,
1035,
27791,
1006,
1024,
4175,
1027,
1028,
1030,
4175,
1010,
1024,
4874,
1027,
1028,
1030,
4874,
1010,
1024,
4130,
1035,
5787,
2121,
1027,
1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
activerecord-hackery/ransack | polyamorous/lib/polyamorous/activerecord_5.2.0_ruby_2/join_dependency.rb | Polyamorous.JoinDependencyExtensions.build | def build(associations, base_klass)
associations.map do |name, right|
if name.is_a? Join
reflection = find_reflection base_klass, name.name
reflection.check_validity!
reflection.check_eager_loadable!
klass = if reflection.polymorphic?
name.klass || base... | ruby | def build(associations, base_klass)
associations.map do |name, right|
if name.is_a? Join
reflection = find_reflection base_klass, name.name
reflection.check_validity!
reflection.check_eager_loadable!
klass = if reflection.polymorphic?
name.klass || base... | [
"def",
"build",
"(",
"associations",
",",
"base_klass",
")",
"associations",
".",
"map",
"do",
"|",
"name",
",",
"right",
"|",
"if",
"name",
".",
"is_a?",
"Join",
"reflection",
"=",
"find_reflection",
"base_klass",
",",
"name",
".",
"name",
"reflection",
"... | Replaces ActiveRecord::Associations::JoinDependency#build | [
"Replaces",
"ActiveRecord",
"::",
"Associations",
"::",
"JoinDependency#build"
] | d44bfe6fe21ab374ceea9d060267d0d38b09ef28 | https://github.com/activerecord-hackery/ransack/blob/d44bfe6fe21ab374ceea9d060267d0d38b09ef28/polyamorous/lib/polyamorous/activerecord_5.2.0_ruby_2/join_dependency.rb#L7-L31 | train | Builds an association list from the given associations. | [
30522,
13366,
3857,
1006,
8924,
1010,
2918,
1035,
1047,
27102,
1007,
8924,
1012,
4949,
2079,
1064,
2171,
1010,
2157,
1064,
2065,
2171,
1012,
2003,
1035,
1037,
1029,
3693,
9185,
1027,
2424,
1035,
9185,
2918,
1035,
1047,
27102,
1010,
2171,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
randym/axlsx | lib/axlsx/package.rb | Axlsx.Package.validate | def validate
errors = []
parts.each do |part|
unless part[:schema].nil?
errors.concat validate_single_doc(part[:schema], part[:doc].to_xml_string)
end
end
errors
end | ruby | def validate
errors = []
parts.each do |part|
unless part[:schema].nil?
errors.concat validate_single_doc(part[:schema], part[:doc].to_xml_string)
end
end
errors
end | [
"def",
"validate",
"errors",
"=",
"[",
"]",
"parts",
".",
"each",
"do",
"|",
"part",
"|",
"unless",
"part",
"[",
":schema",
"]",
".",
"nil?",
"errors",
".",
"concat",
"validate_single_doc",
"(",
"part",
"[",
":schema",
"]",
",",
"part",
"[",
":doc",
... | Validate all parts of the package against xsd schema.
@return [Array] An array of all validation errors found.
@note This gem includes all schema from OfficeOpenXML-XMLSchema-Transitional.zip and OpenPackagingConventions-XMLSchema.zip
as per ECMA-376, Third edition. opc schema require an internet connection to imp... | [
"Validate",
"all",
"parts",
"of",
"the",
"package",
"against",
"xsd",
"schema",
".",
"@return",
"[",
"Array",
"]",
"An",
"array",
"of",
"all",
"validation",
"errors",
"found",
".",
"@note",
"This",
"gem",
"includes",
"all",
"schema",
"from",
"OfficeOpenXML",... | c593a08b2a929dac7aa8dc418b55e26b4c49dc34 | https://github.com/randym/axlsx/blob/c593a08b2a929dac7aa8dc418b55e26b4c49dc34/lib/axlsx/package.rb#L146-L154 | train | Validate the schema and doc | [
30522,
13366,
9398,
3686,
10697,
1027,
1031,
1033,
3033,
1012,
2169,
2079,
1064,
2112,
1064,
4983,
2112,
1031,
1024,
8040,
28433,
1033,
1012,
9152,
2140,
1029,
10697,
1012,
9530,
11266,
9398,
3686,
1035,
2309,
1035,
9986,
1006,
2112,
1031,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
aws/aws-sdk-ruby | gems/aws-sdk-kinesis/lib/aws-sdk-kinesis/async_client.rb | Aws::Kinesis.AsyncClient.subscribe_to_shard | def subscribe_to_shard(params = {}, options = {})
params = params.dup
output_event_stream_handler = _event_stream_handler(
:output,
params.delete(:output_event_stream_handler) || params.delete(:event_stream_handler),
EventStreams::SubscribeToShardEventStream
)
yield(outp... | ruby | def subscribe_to_shard(params = {}, options = {})
params = params.dup
output_event_stream_handler = _event_stream_handler(
:output,
params.delete(:output_event_stream_handler) || params.delete(:event_stream_handler),
EventStreams::SubscribeToShardEventStream
)
yield(outp... | [
"def",
"subscribe_to_shard",
"(",
"params",
"=",
"{",
"}",
",",
"options",
"=",
"{",
"}",
")",
"params",
"=",
"params",
".",
"dup",
"output_event_stream_handler",
"=",
"_event_stream_handler",
"(",
":output",
",",
"params",
".",
"delete",
"(",
":output_event_s... | @option options [required, Aws::CredentialProvider] :credentials
Your AWS credentials. This can be an instance of any one of the
following classes:
* `Aws::Credentials` - Used for configuring static, non-refreshing
credentials.
* `Aws::InstanceProfileCredentials` - Used for loading credenti... | [
"@option",
"options",
"[",
"required",
"Aws",
"::",
"CredentialProvider",
"]",
":",
"credentials",
"Your",
"AWS",
"credentials",
".",
"This",
"can",
"be",
"an",
"instance",
"of",
"any",
"one",
"of",
"the",
"following",
"classes",
":"
] | e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d | https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-kinesis/lib/aws-sdk-kinesis/async_client.rb#L444-L460 | train | Subscribe to a shard | [
30522,
13366,
4942,
29234,
1035,
2000,
1035,
21146,
4103,
1006,
11498,
5244,
1027,
1063,
1065,
1010,
7047,
1027,
1063,
1065,
1007,
11498,
5244,
1027,
11498,
5244,
1012,
4241,
2361,
6434,
1035,
2724,
1035,
5460,
1035,
28213,
1027,
1035,
2724... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
hashicorp/vagrant | lib/vagrant/environment.rb | Vagrant.Environment.batch | def batch(parallel=true)
parallel = false if ENV["VAGRANT_NO_PARALLEL"]
@batch_lock.synchronize do
BatchAction.new(parallel).tap do |b|
# Yield it so that the caller can setup actions
yield b
# And run it!
b.run
end
end
end | ruby | def batch(parallel=true)
parallel = false if ENV["VAGRANT_NO_PARALLEL"]
@batch_lock.synchronize do
BatchAction.new(parallel).tap do |b|
# Yield it so that the caller can setup actions
yield b
# And run it!
b.run
end
end
end | [
"def",
"batch",
"(",
"parallel",
"=",
"true",
")",
"parallel",
"=",
"false",
"if",
"ENV",
"[",
"\"VAGRANT_NO_PARALLEL\"",
"]",
"@batch_lock",
".",
"synchronize",
"do",
"BatchAction",
".",
"new",
"(",
"parallel",
")",
".",
"tap",
"do",
"|",
"b",
"|",
"# Y... | This creates a new batch action, yielding it, and then running it
once the block is called.
This handles the case where batch actions are disabled by the
VAGRANT_NO_PARALLEL environmental variable. | [
"This",
"creates",
"a",
"new",
"batch",
"action",
"yielding",
"it",
"and",
"then",
"running",
"it",
"once",
"the",
"block",
"is",
"called",
"."
] | c22a145c59790c098f95d50141d9afb48e1ef55f | https://github.com/hashicorp/vagrant/blob/c22a145c59790c098f95d50141d9afb48e1ef55f/lib/vagrant/environment.rb#L272-L284 | train | Yields the batch action | [
30522,
13366,
14108,
1006,
5903,
1027,
2995,
1007,
5903,
1027,
6270,
2065,
4372,
2615,
1031,
1000,
12436,
18980,
1035,
2053,
1035,
5903,
1000,
1033,
1030,
14108,
1035,
5843,
1012,
26351,
8093,
10698,
4371,
2079,
14108,
18908,
3258,
1012,
20... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_stor_simple8000_series/lib/2017-06-01/generated/azure_mgmt_stor_simple8000_series/device_settings.rb | Azure::StorSimple8000Series::Mgmt::V2017_06_01.DeviceSettings.sync_remotemanagement_certificate_async | def sync_remotemanagement_certificate_async(device_name, resource_group_name, manager_name, custom_headers:nil)
# Send request
promise = begin_sync_remotemanagement_certificate_async(device_name, resource_group_name, manager_name, custom_headers:custom_headers)
promise = promise.then do |response|
... | ruby | def sync_remotemanagement_certificate_async(device_name, resource_group_name, manager_name, custom_headers:nil)
# Send request
promise = begin_sync_remotemanagement_certificate_async(device_name, resource_group_name, manager_name, custom_headers:custom_headers)
promise = promise.then do |response|
... | [
"def",
"sync_remotemanagement_certificate_async",
"(",
"device_name",
",",
"resource_group_name",
",",
"manager_name",
",",
"custom_headers",
":",
"nil",
")",
"# Send request",
"promise",
"=",
"begin_sync_remotemanagement_certificate_async",
"(",
"device_name",
",",
"resource... | @param device_name [String] The device name
@param resource_group_name [String] The resource group name
@param manager_name [String] The manager name
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request.
@return [Concurrent::Promise] promise which provides... | [
"@param",
"device_name",
"[",
"String",
"]",
"The",
"device",
"name",
"@param",
"resource_group_name",
"[",
"String",
"]",
"The",
"resource",
"group",
"name",
"@param",
"manager_name",
"[",
"String",
"]",
"The",
"manager",
"name",
"@param",
"custom_headers",
"["... | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_stor_simple8000_series/lib/2017-06-01/generated/azure_mgmt_stor_simple8000_series/device_settings.rb#L482-L496 | train | Sync the certificate of a managed certificate. | [
30522,
13366,
26351,
1035,
6556,
24805,
20511,
1035,
8196,
1035,
2004,
6038,
2278,
1006,
5080,
1035,
2171,
1010,
7692,
1035,
2177,
1035,
2171,
1010,
3208,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
1001,
4604,
5227,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_sqlvirtualmachine/lib/2017-03-01-preview/generated/azure_mgmt_sqlvirtualmachine/sql_virtual_machines.rb | Azure::Sqlvirtualmachine::Mgmt::V2017_03_01_preview.SqlVirtualMachines.update_async | def update_async(resource_group_name, sql_virtual_machine_name, parameters, custom_headers:nil)
# Send request
promise = begin_update_async(resource_group_name, sql_virtual_machine_name, parameters, custom_headers:custom_headers)
promise = promise.then do |response|
# Defining deserialization... | ruby | def update_async(resource_group_name, sql_virtual_machine_name, parameters, custom_headers:nil)
# Send request
promise = begin_update_async(resource_group_name, sql_virtual_machine_name, parameters, custom_headers:custom_headers)
promise = promise.then do |response|
# Defining deserialization... | [
"def",
"update_async",
"(",
"resource_group_name",
",",
"sql_virtual_machine_name",
",",
"parameters",
",",
"custom_headers",
":",
"nil",
")",
"# Send request",
"promise",
"=",
"begin_update_async",
"(",
"resource_group_name",
",",
"sql_virtual_machine_name",
",",
"parame... | @param resource_group_name [String] Name of the resource group that contains
the resource. You can obtain this value from the Azure Resource Manager API
or the portal.
@param sql_virtual_machine_name [String] Name of the SQL virtual machine.
@param parameters [SqlVirtualMachineUpdate] The SQL virtual machine.
@par... | [
"@param",
"resource_group_name",
"[",
"String",
"]",
"Name",
"of",
"the",
"resource",
"group",
"that",
"contains",
"the",
"resource",
".",
"You",
"can",
"obtain",
"this",
"value",
"from",
"the",
"Azure",
"Resource",
"Manager",
"API",
"or",
"the",
"portal",
"... | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_sqlvirtualmachine/lib/2017-03-01-preview/generated/azure_mgmt_sqlvirtualmachine/sql_virtual_machines.rb#L249-L265 | train | Updates a SQL virtual machine. | [
30522,
13366,
10651,
1035,
2004,
6038,
2278,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
29296,
1035,
7484,
1035,
3698,
1035,
2171,
1010,
11709,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
1001,
4604,
5227,
4872,
1027,
4088,
1035,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_network/lib/2018-07-01/generated/azure_mgmt_network/route_filters.rb | Azure::Network::Mgmt::V2018_07_01.RouteFilters.update_async | def update_async(resource_group_name, route_filter_name, route_filter_parameters, custom_headers:nil)
# Send request
promise = begin_update_async(resource_group_name, route_filter_name, route_filter_parameters, custom_headers:custom_headers)
promise = promise.then do |response|
# Defining des... | ruby | def update_async(resource_group_name, route_filter_name, route_filter_parameters, custom_headers:nil)
# Send request
promise = begin_update_async(resource_group_name, route_filter_name, route_filter_parameters, custom_headers:custom_headers)
promise = promise.then do |response|
# Defining des... | [
"def",
"update_async",
"(",
"resource_group_name",
",",
"route_filter_name",
",",
"route_filter_parameters",
",",
"custom_headers",
":",
"nil",
")",
"# Send request",
"promise",
"=",
"begin_update_async",
"(",
"resource_group_name",
",",
"route_filter_name",
",",
"route_f... | @param resource_group_name [String] The name of the resource group.
@param route_filter_name [String] The name of the route filter.
@param route_filter_parameters [PatchRouteFilter] Parameters supplied to the
update route filter operation.
@param custom_headers [Hash{String => String}] A hash of custom headers that... | [
"@param",
"resource_group_name",
"[",
"String",
"]",
"The",
"name",
"of",
"the",
"resource",
"group",
".",
"@param",
"route_filter_name",
"[",
"String",
"]",
"The",
"name",
"of",
"the",
"route",
"filter",
".",
"@param",
"route_filter_parameters",
"[",
"PatchRout... | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_network/lib/2018-07-01/generated/azure_mgmt_network/route_filters.rb#L234-L250 | train | Updates a route filter. | [
30522,
13366,
10651,
1035,
2004,
6038,
2278,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2799,
1035,
11307,
1035,
2171,
1010,
2799,
1035,
11307,
1035,
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... |
aws/aws-sdk-ruby | gems/aws-sdk-ec2/lib/aws-sdk-ec2/volume.rb | Aws::EC2.Volume.snapshots | def snapshots(options = {})
batches = Enumerator.new do |y|
options = Aws::Util.deep_merge(options, filters: [{
name: "volume-id",
values: [@id]
}])
resp = @client.describe_snapshots(options)
resp.each_page do |page|
batch = []
page.data.snap... | ruby | def snapshots(options = {})
batches = Enumerator.new do |y|
options = Aws::Util.deep_merge(options, filters: [{
name: "volume-id",
values: [@id]
}])
resp = @client.describe_snapshots(options)
resp.each_page do |page|
batch = []
page.data.snap... | [
"def",
"snapshots",
"(",
"options",
"=",
"{",
"}",
")",
"batches",
"=",
"Enumerator",
".",
"new",
"do",
"|",
"y",
"|",
"options",
"=",
"Aws",
"::",
"Util",
".",
"deep_merge",
"(",
"options",
",",
"filters",
":",
"[",
"{",
"name",
":",
"\"volume-id\""... | @!group Associations
@example Request syntax with placeholder values
snapshots = volume.snapshots({
filters: [
{
name: "String",
values: ["String"],
},
],
owner_ids: ["String"],
restorable_by_user_ids: ["String"],
snapshot_ids: ["String"],
dry_run: fals... | [
"@!group",
"Associations",
"@example",
"Request",
"syntax",
"with",
"placeholder",
"values"
] | e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d | https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-ec2/lib/aws-sdk-ec2/volume.rb#L616-L636 | train | Returns a collection of all snapshots in this volume | [
30522,
13366,
20057,
12326,
2015,
1006,
7047,
1027,
1063,
1065,
1007,
14108,
2229,
1027,
4372,
17897,
16259,
1012,
2047,
2079,
1064,
1061,
1064,
7047,
1027,
22091,
2015,
1024,
1024,
21183,
4014,
1012,
2784,
1035,
13590,
1006,
7047,
1010,
17... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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_correlated_event_list | def get_correlated_event_list(event_instance_id, timeout:60, custom_headers:nil)
response = get_correlated_event_list_async(event_instance_id, timeout:timeout, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def get_correlated_event_list(event_instance_id, timeout:60, custom_headers:nil)
response = get_correlated_event_list_async(event_instance_id, timeout:timeout, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"get_correlated_event_list",
"(",
"event_instance_id",
",",
"timeout",
":",
"60",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"get_correlated_event_list_async",
"(",
"event_instance_id",
",",
"timeout",
":",
"timeout",
",",
"custom_headers",
":cust... | Gets all correlated events for a given event.
The response is list of FabricEvents.
@param event_instance_id [String] The EventInstanceId.
@param timeout [Integer] The server timeout for performing the operation in
seconds. This timeout specifies the time duration that the client is willing
to wait for the reque... | [
"Gets",
"all",
"correlated",
"events",
"for",
"a",
"given",
"event",
"."
] | 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#L29174-L29177 | train | Gets the list of correlated events. | [
30522,
13366,
2131,
1035,
23900,
1035,
2724,
1035,
2862,
1006,
2724,
1035,
6013,
1035,
8909,
1010,
2051,
5833,
1024,
3438,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
2131,
1035,
23900,
1035,
2724,
1035,
2862,
1035,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
ruby-i18n/i18n | lib/i18n.rb | I18n.Base.translate | def translate(key = nil, *, throw: false, raise: false, locale: nil, **options) # TODO deprecate :raise
locale ||= config.locale
raise Disabled.new('t') if locale == false
enforce_available_locales!(locale)
backend = config.backend
result = catch(:exception) do
if key.is_a?(Array... | ruby | def translate(key = nil, *, throw: false, raise: false, locale: nil, **options) # TODO deprecate :raise
locale ||= config.locale
raise Disabled.new('t') if locale == false
enforce_available_locales!(locale)
backend = config.backend
result = catch(:exception) do
if key.is_a?(Array... | [
"def",
"translate",
"(",
"key",
"=",
"nil",
",",
"*",
",",
"throw",
":",
"false",
",",
"raise",
":",
"false",
",",
"locale",
":",
"nil",
",",
"**",
"options",
")",
"# TODO deprecate :raise",
"locale",
"||=",
"config",
".",
"locale",
"raise",
"Disabled",
... | Translates, pluralizes and interpolates a given key using a given locale,
scope, and default, as well as interpolation values.
*LOOKUP*
Translation data is organized as a nested hash using the upper-level keys
as namespaces. <em>E.g.</em>, ActionView ships with the translation:
<tt>:date => {:formats => {:short ... | [
"Translates",
"pluralizes",
"and",
"interpolates",
"a",
"given",
"key",
"using",
"a",
"given",
"locale",
"scope",
"and",
"default",
"as",
"well",
"as",
"interpolation",
"values",
"."
] | 0c5dab494d9b043e00662d8e789229c33045c024 | https://github.com/ruby-i18n/i18n/blob/0c5dab494d9b043e00662d8e789229c33045c024/lib/i18n.rb#L179-L199 | train | Translate a key to a given locale. | [
30522,
13366,
17637,
1006,
3145,
1027,
9152,
2140,
1010,
1008,
1010,
5466,
1024,
6270,
1010,
5333,
1024,
6270,
1010,
2334,
2063,
1024,
9152,
2140,
1010,
1008,
1008,
7047,
1007,
1001,
28681,
2080,
2139,
28139,
16280,
1024,
5333,
2334,
2063,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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_mixedreality/lib/2019-02-28-preview/generated/azure_mgmt_mixedreality/spatial_anchors_accounts.rb | Azure::MixedReality::Mgmt::V2019_02_28_preview.SpatialAnchorsAccounts.update_with_http_info | def update_with_http_info(resource_group_name, spatial_anchors_account_name, spatial_anchors_account, custom_headers:nil)
update_async(resource_group_name, spatial_anchors_account_name, spatial_anchors_account, custom_headers:custom_headers).value!
end | ruby | def update_with_http_info(resource_group_name, spatial_anchors_account_name, spatial_anchors_account, custom_headers:nil)
update_async(resource_group_name, spatial_anchors_account_name, spatial_anchors_account, custom_headers:custom_headers).value!
end | [
"def",
"update_with_http_info",
"(",
"resource_group_name",
",",
"spatial_anchors_account_name",
",",
"spatial_anchors_account",
",",
"custom_headers",
":",
"nil",
")",
"update_async",
"(",
"resource_group_name",
",",
"spatial_anchors_account_name",
",",
"spatial_anchors_accoun... | Updating a Spatial Anchors Account
@param resource_group_name [String] Name of an Azure resource group.
@param spatial_anchors_account_name [String] Name of an Mixed Reality Spatial
Anchors Account.
@param spatial_anchors_account [SpatialAnchorsAccount] Spatial Anchors
Account parameter.
@param custom_headers [H... | [
"Updating",
"a",
"Spatial",
"Anchors",
"Account"
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_mixedreality/lib/2019-02-28-preview/generated/azure_mgmt_mixedreality/spatial_anchors_accounts.rb#L421-L423 | train | Updates a spatial anchors account. | [
30522,
13366,
10651,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
13589,
1035,
24674,
1035,
4070,
1035,
2171,
1010,
13589,
1035,
24674,
1035,
4070,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
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... |
mikel/mail | lib/mail/elements/address.rb | Mail.Address.format | def format(output_type = :decode)
parse unless @parsed
if @data.nil?
Constants::EMPTY
elsif name = display_name(output_type)
[Utilities.quote_phrase(name), "<#{address(output_type)}>", format_comments].compact.join(Constants::SPACE)
elsif a = address(output_type)
[a, form... | ruby | def format(output_type = :decode)
parse unless @parsed
if @data.nil?
Constants::EMPTY
elsif name = display_name(output_type)
[Utilities.quote_phrase(name), "<#{address(output_type)}>", format_comments].compact.join(Constants::SPACE)
elsif a = address(output_type)
[a, form... | [
"def",
"format",
"(",
"output_type",
"=",
":decode",
")",
"parse",
"unless",
"@parsed",
"if",
"@data",
".",
"nil?",
"Constants",
"::",
"EMPTY",
"elsif",
"name",
"=",
"display_name",
"(",
"output_type",
")",
"[",
"Utilities",
".",
"quote_phrase",
"(",
"name",... | Returns a correctly formatted address for the email going out. If given
an incorrectly formatted address as input, Mail::Address will do its best
to format it correctly. This includes quoting display names as needed and
putting the address in angle brackets etc.
a = Address.new('Mikel Lindsaar (My email address... | [
"Returns",
"a",
"correctly",
"formatted",
"address",
"for",
"the",
"email",
"going",
"out",
".",
"If",
"given",
"an",
"incorrectly",
"formatted",
"address",
"as",
"input",
"Mail",
"::",
"Address",
"will",
"do",
"its",
"best",
"to",
"format",
"it",
"correctly... | fb53fb369eb2bf0494ac70675970c90cdcc3f495 | https://github.com/mikel/mail/blob/fb53fb369eb2bf0494ac70675970c90cdcc3f495/lib/mail/elements/address.rb#L47-L58 | train | Returns the raw data as a string. | [
30522,
13366,
4289,
1006,
6434,
1035,
2828,
1027,
1024,
21933,
3207,
1007,
11968,
3366,
4983,
1030,
11968,
6924,
2065,
1030,
2951,
1012,
9152,
2140,
1029,
5377,
2015,
1024,
1024,
4064,
3449,
5332,
2546,
2171,
1027,
4653,
1035,
2171,
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... |
puppetlabs/puppet | lib/puppet/util/windows/service.rb | Puppet::Util::Windows.Service.service_state | def service_state(service_name)
state = nil
open_service(service_name, SC_MANAGER_CONNECT, SERVICE_QUERY_STATUS) do |service|
query_status(service) do |status|
state = SERVICE_STATES[status[:dwCurrentState]]
end
end
if state.nil?
raise Puppet::Error.new(_("Unkno... | ruby | def service_state(service_name)
state = nil
open_service(service_name, SC_MANAGER_CONNECT, SERVICE_QUERY_STATUS) do |service|
query_status(service) do |status|
state = SERVICE_STATES[status[:dwCurrentState]]
end
end
if state.nil?
raise Puppet::Error.new(_("Unkno... | [
"def",
"service_state",
"(",
"service_name",
")",
"state",
"=",
"nil",
"open_service",
"(",
"service_name",
",",
"SC_MANAGER_CONNECT",
",",
"SERVICE_QUERY_STATUS",
")",
"do",
"|",
"service",
"|",
"query_status",
"(",
"service",
")",
"do",
"|",
"status",
"|",
"... | Query the state of a service using QueryServiceStatusEx
@param [string] service_name name of the service to query
@return [string] the status of the service | [
"Query",
"the",
"state",
"of",
"a",
"service",
"using",
"QueryServiceStatusEx"
] | 4baeed97cbb7571ddc6635f0a24debe2e8b22cd3 | https://github.com/puppetlabs/puppet/blob/4baeed97cbb7571ddc6635f0a24debe2e8b22cd3/lib/puppet/util/windows/service.rb#L365-L376 | train | Get the current state of a service | [
30522,
13366,
2326,
1035,
2110,
1006,
2326,
1035,
2171,
1007,
2110,
1027,
9152,
2140,
2330,
1035,
2326,
1006,
2326,
1035,
2171,
1010,
8040,
1035,
3208,
1035,
7532,
1010,
2326,
1035,
23032,
1035,
3570,
1007,
2079,
1064,
2326,
1064,
23032,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | data/azure_cognitiveservices_customvisiontraining/lib/3.0/generated/azure_cognitiveservices_customvisiontraining/customvisiontraining_client.rb | Azure::CognitiveServices::Customvisiontraining::V3_0.CustomvisiontrainingClient.get_image_performance_count_with_http_info | def get_image_performance_count_with_http_info(project_id, iteration_id, tag_ids:nil, custom_headers:nil)
get_image_performance_count_async(project_id, iteration_id, tag_ids:tag_ids, custom_headers:custom_headers).value!
end | ruby | def get_image_performance_count_with_http_info(project_id, iteration_id, tag_ids:nil, custom_headers:nil)
get_image_performance_count_async(project_id, iteration_id, tag_ids:tag_ids, custom_headers:custom_headers).value!
end | [
"def",
"get_image_performance_count_with_http_info",
"(",
"project_id",
",",
"iteration_id",
",",
"tag_ids",
":",
"nil",
",",
"custom_headers",
":",
"nil",
")",
"get_image_performance_count_async",
"(",
"project_id",
",",
"iteration_id",
",",
"tag_ids",
":tag_ids",
",",... | Gets the number of images tagged with the provided {tagIds} that have
prediction results from
training for the provided iteration {iterationId}.
The filtering is on an and/or relationship. For example, if the provided tag
ids are for the "Dog" and
"Cat" tags, then only images tagged with Dog and/or Cat will be re... | [
"Gets",
"the",
"number",
"of",
"images",
"tagged",
"with",
"the",
"provided",
"{",
"tagIds",
"}",
"that",
"have",
"prediction",
"results",
"from",
"training",
"for",
"the",
"provided",
"iteration",
"{",
"iterationId",
"}",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_cognitiveservices_customvisiontraining/lib/3.0/generated/azure_cognitiveservices_customvisiontraining/customvisiontraining_client.rb#L2729-L2731 | train | Gets the number of images that are performance of an iteration. | [
30522,
13366,
2131,
1035,
3746,
1035,
2836,
1035,
4175,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
2622,
1035,
8909,
1010,
27758,
1035,
8909,
1010,
6415,
1035,
8909,
2015,
1024,
9152,
2140,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
floere/phony | lib/phony/country_codes.rb | Phony.CountryCodes.format | def format number, options = {}
country, _, national_number = partial_split number
country.format national_number, options
end | ruby | def format number, options = {}
country, _, national_number = partial_split number
country.format national_number, options
end | [
"def",
"format",
"number",
",",
"options",
"=",
"{",
"}",
"country",
",",
"_",
",",
"national_number",
"=",
"partial_split",
"number",
"country",
".",
"format",
"national_number",
",",
"options",
"end"
] | Format the number. | [
"Format",
"the",
"number",
"."
] | 9ca50743499cf478a25fdb927bcdacd29d2c90c7 | https://github.com/floere/phony/blob/9ca50743499cf478a25fdb927bcdacd29d2c90c7/lib/phony/country_codes.rb#L87-L90 | train | Format the number | [
30522,
13366,
4289,
2193,
1010,
7047,
1027,
1063,
1065,
2406,
1010,
1035,
1010,
2120,
1035,
2193,
1027,
7704,
1035,
3975,
2193,
2406,
1012,
4289,
2120,
1035,
2193,
1010,
7047,
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... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/findable.rb | Mongoid.Findable.find_by | def find_by(attrs = {})
result = where(attrs).find_first
if result.nil? && Mongoid.raise_not_found_error
raise(Errors::DocumentNotFound.new(self, attrs))
end
yield(result) if result && block_given?
result
end | ruby | def find_by(attrs = {})
result = where(attrs).find_first
if result.nil? && Mongoid.raise_not_found_error
raise(Errors::DocumentNotFound.new(self, attrs))
end
yield(result) if result && block_given?
result
end | [
"def",
"find_by",
"(",
"attrs",
"=",
"{",
"}",
")",
"result",
"=",
"where",
"(",
"attrs",
")",
".",
"find_first",
"if",
"result",
".",
"nil?",
"&&",
"Mongoid",
".",
"raise_not_found_error",
"raise",
"(",
"Errors",
"::",
"DocumentNotFound",
".",
"new",
"(... | Find the first +Document+ given the conditions.
If a matching Document is not found and
Mongoid.raise_not_found_error is true it raises
Mongoid::Errors::DocumentNotFound, return null nil elsewise.
@example Find the document by attribute other than id
Person.find_by(:username => "superuser")
@param [ Hash ] at... | [
"Find",
"the",
"first",
"+",
"Document",
"+",
"given",
"the",
"conditions",
".",
"If",
"a",
"matching",
"Document",
"is",
"not",
"found",
"and",
"Mongoid",
".",
"raise_not_found_error",
"is",
"true",
"it",
"raises",
"Mongoid",
"::",
"Errors",
"::",
"Document... | 56976e32610f4c2450882b0bfe14da099f0703f4 | https://github.com/mongodb/mongoid/blob/56976e32610f4c2450882b0bfe14da099f0703f4/lib/mongoid/findable.rb#L114-L121 | train | Find the first document matching the given attributes. | [
30522,
13366,
2424,
1035,
2011,
1006,
2012,
16344,
2015,
1027,
1063,
1065,
1007,
2765,
1027,
2073,
1006,
2012,
16344,
2015,
1007,
1012,
2424,
1035,
2034,
2065,
2765,
1012,
9152,
2140,
1029,
1004,
1004,
12256,
3995,
3593,
1012,
5333,
1035,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_automation/lib/2015-10-31/generated/azure_mgmt_automation/runbook_operations.rb | Azure::Automation::Mgmt::V2015_10_31.RunbookOperations.create_or_update_with_http_info | def create_or_update_with_http_info(resource_group_name, automation_account_name, runbook_name, parameters, custom_headers:nil)
create_or_update_async(resource_group_name, automation_account_name, runbook_name, parameters, custom_headers:custom_headers).value!
end | ruby | def create_or_update_with_http_info(resource_group_name, automation_account_name, runbook_name, parameters, custom_headers:nil)
create_or_update_async(resource_group_name, automation_account_name, runbook_name, parameters, custom_headers:custom_headers).value!
end | [
"def",
"create_or_update_with_http_info",
"(",
"resource_group_name",
",",
"automation_account_name",
",",
"runbook_name",
",",
"parameters",
",",
"custom_headers",
":",
"nil",
")",
"create_or_update_async",
"(",
"resource_group_name",
",",
"automation_account_name",
",",
"... | Create the runbook identified by runbook name.
@param resource_group_name [String] Name of an Azure Resource group.
@param automation_account_name [String] The name of the automation account.
@param runbook_name [String] The runbook name.
@param parameters [RunbookCreateOrUpdateParameters] The create or update
pa... | [
"Create",
"the",
"runbook",
"identified",
"by",
"runbook",
"name",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_automation/lib/2015-10-31/generated/azure_mgmt_automation/runbook_operations.rb#L262-L264 | train | Creates or updates a runbook. | [
30522,
13366,
3443,
1035,
2030,
1035,
10651,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
19309,
1035,
4070,
1035,
2171,
1010,
2448,
8654,
1035,
2171,
1010,
11709,
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... |
castwide/solargraph | lib/solargraph/api_map.rb | Solargraph.ApiMap.document | def document path
rake_yard(store)
docs = []
docs.push code_object_at(path) unless code_object_at(path).nil?
docs
end | ruby | def document path
rake_yard(store)
docs = []
docs.push code_object_at(path) unless code_object_at(path).nil?
docs
end | [
"def",
"document",
"path",
"rake_yard",
"(",
"store",
")",
"docs",
"=",
"[",
"]",
"docs",
".",
"push",
"code_object_at",
"(",
"path",
")",
"unless",
"code_object_at",
"(",
"path",
")",
".",
"nil?",
"docs",
"end"
] | Get YARD documentation for the specified path.
@example
api_map.document('String#split')
@param path [String] The path to find
@return [Array<YARD::CodeObject::Base>] | [
"Get",
"YARD",
"documentation",
"for",
"the",
"specified",
"path",
"."
] | 47badb5d151aca775ccbe6c470236089eae7839d | https://github.com/castwide/solargraph/blob/47badb5d151aca775ccbe6c470236089eae7839d/lib/solargraph/api_map.rb#L412-L417 | train | Returns the document at the given path. | [
30522,
13366,
6254,
4130,
26008,
1035,
4220,
1006,
3573,
1007,
9986,
2015,
1027,
1031,
1033,
9986,
2015,
1012,
5245,
3642,
1035,
4874,
1035,
2012,
1006,
4130,
1007,
4983,
3642,
1035,
4874,
1035,
2012,
1006,
4130,
1007,
1012,
30524,
0,
0,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
rmagick/rmagick | lib/rmagick_internal.rb | Magick.Image.each_iptc_dataset | def each_iptc_dataset
Magick::IPTC.constants.each do |record|
rec = Magick::IPTC.const_get(record)
rec.constants.each do |dataset|
data_field = get_iptc_dataset(rec.const_get(dataset))
yield(dataset, data_field) unless data_field.nil?
end
end
nil
end | ruby | def each_iptc_dataset
Magick::IPTC.constants.each do |record|
rec = Magick::IPTC.const_get(record)
rec.constants.each do |dataset|
data_field = get_iptc_dataset(rec.const_get(dataset))
yield(dataset, data_field) unless data_field.nil?
end
end
nil
end | [
"def",
"each_iptc_dataset",
"Magick",
"::",
"IPTC",
".",
"constants",
".",
"each",
"do",
"|",
"record",
"|",
"rec",
"=",
"Magick",
"::",
"IPTC",
".",
"const_get",
"(",
"record",
")",
"rec",
".",
"constants",
".",
"each",
"do",
"|",
"dataset",
"|",
"dat... | Iterate over IPTC record number:dataset tags, yield for each non-nil dataset | [
"Iterate",
"over",
"IPTC",
"record",
"number",
":",
"dataset",
"tags",
"yield",
"for",
"each",
"non",
"-",
"nil",
"dataset"
] | ef6688ed9d76bf123c2ea1a483eff8635051adb7 | https://github.com/rmagick/rmagick/blob/ef6688ed9d76bf123c2ea1a483eff8635051adb7/lib/rmagick_internal.rb#L859-L868 | train | Yields the dataset and the data field for each record. | [
30522,
13366,
2169,
1035,
12997,
13535,
1035,
2951,
13462,
3894,
2243,
1024,
1024,
12997,
13535,
1012,
5377,
2015,
1012,
2169,
2079,
1064,
2501,
1064,
28667,
1027,
3894,
2243,
1024,
1024,
12997,
13535,
1012,
9530,
3367,
1035,
2131,
1006,
25... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
kmuto/review | lib/review/latexbuilder.rb | ReVIEW.LATEXBuilder.inline_list | def inline_list(id)
chapter, id = extract_chapter_id(id)
if get_chap(chapter).nil?
macro('reviewlistref', I18n.t('format_number_without_chapter', [chapter.list(id).number]))
else
macro('reviewlistref', I18n.t('format_number', [get_chap(chapter), chapter.list(id).number]))
end
... | ruby | def inline_list(id)
chapter, id = extract_chapter_id(id)
if get_chap(chapter).nil?
macro('reviewlistref', I18n.t('format_number_without_chapter', [chapter.list(id).number]))
else
macro('reviewlistref', I18n.t('format_number', [get_chap(chapter), chapter.list(id).number]))
end
... | [
"def",
"inline_list",
"(",
"id",
")",
"chapter",
",",
"id",
"=",
"extract_chapter_id",
"(",
"id",
")",
"if",
"get_chap",
"(",
"chapter",
")",
".",
"nil?",
"macro",
"(",
"'reviewlistref'",
",",
"I18n",
".",
"t",
"(",
"'format_number_without_chapter'",
",",
... | FIXME: use TeX native label/ref. | [
"FIXME",
":",
"use",
"TeX",
"native",
"label",
"/",
"ref",
"."
] | 77d1273e671663f05db2992281fd891b776badf0 | https://github.com/kmuto/review/blob/77d1273e671663f05db2992281fd891b776badf0/lib/review/latexbuilder.rb#L934-L943 | train | inline list | [
30522,
13366,
23881,
1035,
2862,
1006,
8909,
1007,
3127,
1010,
8909,
1027,
14817,
1035,
3127,
1035,
8909,
1006,
8909,
1007,
2065,
2131,
1035,
15775,
2361,
1006,
3127,
1007,
1012,
9152,
2140,
1029,
26632,
1006,
1005,
3319,
9863,
2890,
2546,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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_entity | def add_entity(app_id, version_id, model_create_object, custom_headers:nil)
response = add_entity_async(app_id, version_id, model_create_object, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def add_entity(app_id, version_id, model_create_object, custom_headers:nil)
response = add_entity_async(app_id, version_id, model_create_object, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"add_entity",
"(",
"app_id",
",",
"version_id",
",",
"model_create_object",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"add_entity_async",
"(",
"app_id",
",",
"version_id",
",",
"model_create_object",
",",
"custom_headers",
":custom_headers",
")... | Adds a simple entity extractor to a version of the application.
@param app_id The application ID.
@param version_id [String] The version ID.
@param model_create_object [ModelCreateObject] A model object containing the
name for the new simple entity extractor.
@param custom_headers [Hash{String => String}] A hash ... | [
"Adds",
"a",
"simple",
"entity",
"extractor",
"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#L268-L271 | train | Adds an entity to the application version. | [
30522,
13366,
5587,
1035,
9178,
1006,
10439,
1035,
8909,
1010,
2544,
1035,
8909,
1010,
2944,
1035,
3443,
1035,
4874,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
5587,
1035,
9178,
1035,
2004,
6038,
2278,
1006,
10439,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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_load_info_with_http_info | def get_node_load_info_with_http_info(node_name, timeout:60, custom_headers:nil)
get_node_load_info_async(node_name, timeout:timeout, custom_headers:custom_headers).value!
end | ruby | def get_node_load_info_with_http_info(node_name, timeout:60, custom_headers:nil)
get_node_load_info_async(node_name, timeout:timeout, custom_headers:custom_headers).value!
end | [
"def",
"get_node_load_info_with_http_info",
"(",
"node_name",
",",
"timeout",
":",
"60",
",",
"custom_headers",
":",
"nil",
")",
"get_node_load_info_async",
"(",
"node_name",
",",
"timeout",
":",
"timeout",
",",
"custom_headers",
":custom_headers",
")",
".",
"value!... | Gets the load information of a Service Fabric node.
Retrieves the load information of a Service Fabric node for all the metrics
that have load or capacity defined.
@param node_name [String] The name of the node.
@param timeout [Integer] The server timeout for performing the operation in
seconds. This timeout spe... | [
"Gets",
"the",
"load",
"information",
"of",
"a",
"Service",
"Fabric",
"node",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_service_fabric/lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb#L4076-L4078 | train | Gets the load information of the specified node. | [
30522,
13366,
2131,
1035,
13045,
1035,
7170,
1035,
18558,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
13045,
1035,
2171,
1010,
2051,
5833,
1024,
3438,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
2131,
1035,
13045,
1035,
7170,
1035... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | data/azure_service_fabric/lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb | Azure::ServiceFabric::V6_2_0_9.ServiceFabricClientAPIs.get_partition_info_list | def get_partition_info_list(service_id, continuation_token:nil, timeout:60, custom_headers:nil)
response = get_partition_info_list_async(service_id, continuation_token:continuation_token, timeout:timeout, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def get_partition_info_list(service_id, continuation_token:nil, timeout:60, custom_headers:nil)
response = get_partition_info_list_async(service_id, continuation_token:continuation_token, timeout:timeout, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"get_partition_info_list",
"(",
"service_id",
",",
"continuation_token",
":",
"nil",
",",
"timeout",
":",
"60",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"get_partition_info_list_async",
"(",
"service_id",
",",
"continuation_token",
":continuatio... | Gets the list of partitions of a Service Fabric service.
Gets the list of partitions of a Service Fabric service. The response
includes the partition ID, partitioning scheme information, keys supported by
the partition, status, health, and other details about the partition.
@param service_id [String] The identity... | [
"Gets",
"the",
"list",
"of",
"partitions",
"of",
"a",
"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#L11840-L11843 | train | Gets the partition info list for the specified service. | [
30522,
13366,
2131,
1035,
13571,
1035,
18558,
1035,
2862,
1006,
2326,
1035,
8909,
1010,
13633,
1035,
19204,
1024,
9152,
2140,
1010,
2051,
5833,
1024,
3438,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
2131,
1035,
13571... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_customer_insights/lib/2017-01-01/generated/azure_mgmt_customer_insights/interactions.rb | Azure::CustomerInsights::Mgmt::V2017_01_01.Interactions.list_by_hub | def list_by_hub(resource_group_name, hub_name, locale_code:'en-us', custom_headers:nil)
first_page = list_by_hub_as_lazy(resource_group_name, hub_name, locale_code:locale_code, custom_headers:custom_headers)
first_page.get_all_items
end | ruby | def list_by_hub(resource_group_name, hub_name, locale_code:'en-us', custom_headers:nil)
first_page = list_by_hub_as_lazy(resource_group_name, hub_name, locale_code:locale_code, custom_headers:custom_headers)
first_page.get_all_items
end | [
"def",
"list_by_hub",
"(",
"resource_group_name",
",",
"hub_name",
",",
"locale_code",
":",
"'en-us'",
",",
"custom_headers",
":",
"nil",
")",
"first_page",
"=",
"list_by_hub_as_lazy",
"(",
"resource_group_name",
",",
"hub_name",
",",
"locale_code",
":locale_code",
... | Gets all interactions in the hub.
@param resource_group_name [String] The name of the resource group.
@param hub_name [String] The name of the hub.
@param locale_code [String] Locale of interaction to retrieve, default is
en-us.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be... | [
"Gets",
"all",
"interactions",
"in",
"the",
"hub",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_customer_insights/lib/2017-01-01/generated/azure_mgmt_customer_insights/interactions.rb#L189-L192 | train | Gets all the segmentation of the hub. | [
30522,
13366,
2862,
1035,
2011,
1035,
9594,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
9594,
1035,
2171,
1010,
2334,
2063,
1035,
3642,
1024,
1005,
4372,
1011,
2149,
1005,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
2034,
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... |
jnunemaker/flipper | lib/flipper/feature.rb | Flipper.Feature.gate_for | def gate_for(thing)
gates.detect { |gate| gate.protects?(thing) } || raise(GateNotFound, thing)
end | ruby | def gate_for(thing)
gates.detect { |gate| gate.protects?(thing) } || raise(GateNotFound, thing)
end | [
"def",
"gate_for",
"(",
"thing",
")",
"gates",
".",
"detect",
"{",
"|",
"gate",
"|",
"gate",
".",
"protects?",
"(",
"thing",
")",
"}",
"||",
"raise",
"(",
"GateNotFound",
",",
"thing",
")",
"end"
] | Public: Find the gate that protects a thing.
thing - The object for which you would like to find a gate
Returns a Flipper::Gate.
Raises Flipper::GateNotFound if no gate found for thing | [
"Public",
":",
"Find",
"the",
"gate",
"that",
"protects",
"a",
"thing",
"."
] | df0352b663ad3ed45d68710f10a8170249ff9d78 | https://github.com/jnunemaker/flipper/blob/df0352b663ad3ed45d68710f10a8170249ff9d78/lib/flipper/feature.rb#L365-L367 | train | Returns the gate for the given thing. | [
30522,
13366,
4796,
1035,
2005,
1006,
2518,
1007,
6733,
1012,
11487,
1063,
1064,
4796,
1064,
4796,
1012,
18227,
1029,
1006,
2518,
1007,
1065,
1064,
1064,
5333,
1006,
4796,
17048,
14876,
8630,
1010,
2518,
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... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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_monitor/lib/2016-03-01/generated/azure_mgmt_monitor/alert_rules.rb | Azure::Monitor::Mgmt::V2016_03_01.AlertRules.update_with_http_info | def update_with_http_info(resource_group_name, rule_name, alert_rules_resource, custom_headers:nil)
update_async(resource_group_name, rule_name, alert_rules_resource, custom_headers:custom_headers).value!
end | ruby | def update_with_http_info(resource_group_name, rule_name, alert_rules_resource, custom_headers:nil)
update_async(resource_group_name, rule_name, alert_rules_resource, custom_headers:custom_headers).value!
end | [
"def",
"update_with_http_info",
"(",
"resource_group_name",
",",
"rule_name",
",",
"alert_rules_resource",
",",
"custom_headers",
":",
"nil",
")",
"update_async",
"(",
"resource_group_name",
",",
"rule_name",
",",
"alert_rules_resource",
",",
"custom_headers",
":custom_he... | Updates an existing AlertRuleResource. To update other fields use the
CreateOrUpdate method.
@param resource_group_name [String] The name of the resource group.
@param rule_name [String] The name of the rule.
@param alert_rules_resource [AlertRuleResourcePatch] Parameters supplied to
the operation.
@param custom... | [
"Updates",
"an",
"existing",
"AlertRuleResource",
".",
"To",
"update",
"other",
"fields",
"use",
"the",
"CreateOrUpdate",
"method",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_monitor/lib/2016-03-01/generated/azure_mgmt_monitor/alert_rules.rb#L344-L346 | train | Updates an existing alert rule. | [
30522,
13366,
10651,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
3627,
1035,
2171,
1010,
9499,
1035,
3513,
1035,
7692,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
10651,
1035,
2004,
6038,
2278,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_recovery_services_site_recovery/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/replication_protectable_items.rb | Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10.ReplicationProtectableItems.get_with_http_info | def get_with_http_info(fabric_name, protection_container_name, protectable_item_name, custom_headers:nil)
get_async(fabric_name, protection_container_name, protectable_item_name, custom_headers:custom_headers).value!
end | ruby | def get_with_http_info(fabric_name, protection_container_name, protectable_item_name, custom_headers:nil)
get_async(fabric_name, protection_container_name, protectable_item_name, custom_headers:custom_headers).value!
end | [
"def",
"get_with_http_info",
"(",
"fabric_name",
",",
"protection_container_name",
",",
"protectable_item_name",
",",
"custom_headers",
":",
"nil",
")",
"get_async",
"(",
"fabric_name",
",",
"protection_container_name",
",",
"protectable_item_name",
",",
"custom_headers",
... | Gets the details of a protectable item.
The operation to get the details of a protectable item.
@param fabric_name [String] Fabric name.
@param protection_container_name [String] Protection container name.
@param protectable_item_name [String] Protectable item name.
@param custom_headers [Hash{String => String}]... | [
"Gets",
"the",
"details",
"of",
"a",
"protectable",
"item",
"."
] | 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_protectable_items.rb#L158-L160 | train | Gets the protection container protection item. | [
30522,
13366,
2131,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
8313,
1035,
2171,
1010,
3860,
1035,
11661,
1035,
2171,
1010,
4047,
3085,
1035,
8875,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
2131,
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... |
randym/axlsx | lib/axlsx/drawing/pie_3D_chart.rb | Axlsx.Pie3DChart.to_xml_string | def to_xml_string(str = '')
super(str) do
str << '<c:pie3DChart>'
str << ('<c:varyColors val="' << vary_colors.to_s << '"/>')
@series.each { |ser| ser.to_xml_string(str) }
d_lbls.to_xml_string(str) if @d_lbls
str << '</c:pie3DChart>'
end
end | ruby | def to_xml_string(str = '')
super(str) do
str << '<c:pie3DChart>'
str << ('<c:varyColors val="' << vary_colors.to_s << '"/>')
@series.each { |ser| ser.to_xml_string(str) }
d_lbls.to_xml_string(str) if @d_lbls
str << '</c:pie3DChart>'
end
end | [
"def",
"to_xml_string",
"(",
"str",
"=",
"''",
")",
"super",
"(",
"str",
")",
"do",
"str",
"<<",
"'<c:pie3DChart>'",
"str",
"<<",
"(",
"'<c:varyColors val=\"'",
"<<",
"vary_colors",
".",
"to_s",
"<<",
"'\"/>'",
")",
"@series",
".",
"each",
"{",
"|",
"ser... | Creates a new pie chart object
@param [GraphicFrame] frame The workbook that owns this chart.
@option options [Cell, String] title
@option options [Boolean] show_legend
@option options [Symbol] grouping
@option options [String] gap_depth
@option options [Integer] rot_x
@option options [String] h_percent
@option... | [
"Creates",
"a",
"new",
"pie",
"chart",
"object"
] | c593a08b2a929dac7aa8dc418b55e26b4c49dc34 | https://github.com/randym/axlsx/blob/c593a08b2a929dac7aa8dc418b55e26b4c49dc34/lib/axlsx/drawing/pie_3D_chart.rb#L36-L44 | train | Returns the XML string for this chart. | [
30522,
13366,
2000,
1035,
20950,
1035,
5164,
1006,
2358,
2099,
1027,
1005,
1005,
1007,
3565,
1006,
2358,
2099,
1007,
2079,
2358,
2099,
1026,
1026,
1005,
1026,
1039,
1024,
11345,
29097,
7507,
5339,
1028,
1005,
2358,
2099,
1026,
1026,
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... |
decidim/decidim | decidim-core/lib/decidim/metric_operation.rb | Decidim.MetricOperation.for | def for(metric_operation, metric_name = nil)
list = if metric_name
all.find { |manifest| manifest.metric_operation == metric_operation.to_s && manifest.metric_name == metric_name.to_s }
else
all.find_all { |manifest| manifest.metric_operation == metric_operation.to_s }
... | ruby | def for(metric_operation, metric_name = nil)
list = if metric_name
all.find { |manifest| manifest.metric_operation == metric_operation.to_s && manifest.metric_name == metric_name.to_s }
else
all.find_all { |manifest| manifest.metric_operation == metric_operation.to_s }
... | [
"def",
"for",
"(",
"metric_operation",
",",
"metric_name",
"=",
"nil",
")",
"list",
"=",
"if",
"metric_name",
"all",
".",
"find",
"{",
"|",
"manifest",
"|",
"manifest",
".",
"metric_operation",
"==",
"metric_operation",
".",
"to_s",
"&&",
"manifest",
".",
... | Searches for MetricOperationManifest(s) depending on parameters
With 'metric_operation' only:
- Returns all manifest related to that operation
With 'metric_operation' and 'metric_name':
- Returns a single manifest related to that two params | [
"Searches",
"for",
"MetricOperationManifest",
"(",
"s",
")",
"depending",
"on",
"parameters",
"With",
"metric_operation",
"only",
":",
"-",
"Returns",
"all",
"manifest",
"related",
"to",
"that",
"operation",
"With",
"metric_operation",
"and",
"metric_name",
":",
"... | 6e2b14e559a63088669904e3c5c49a5180700cf7 | https://github.com/decidim/decidim/blob/6e2b14e559a63088669904e3c5c49a5180700cf7/decidim-core/lib/decidim/metric_operation.rb#L38-L45 | train | Returns the list of all the artifacts that match the metric_operation and metric_name. | [
30522,
13366,
2005,
1006,
12046,
1035,
3169,
1010,
12046,
1035,
2171,
1027,
9152,
2140,
1007,
2862,
1027,
2065,
12046,
1035,
2171,
2035,
1012,
2424,
1063,
1064,
19676,
1064,
19676,
1012,
12046,
1035,
3169,
1027,
1027,
12046,
1035,
3169,
101... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/migration.rb | ActiveRecord.Migration.say_with_time | def say_with_time(message)
say(message)
result = nil
time = Benchmark.measure { result = yield }
say "%.4fs" % time.real, :subitem
say("#{result} rows", :subitem) if result.is_a?(Integer)
result
end | ruby | def say_with_time(message)
say(message)
result = nil
time = Benchmark.measure { result = yield }
say "%.4fs" % time.real, :subitem
say("#{result} rows", :subitem) if result.is_a?(Integer)
result
end | [
"def",
"say_with_time",
"(",
"message",
")",
"say",
"(",
"message",
")",
"result",
"=",
"nil",
"time",
"=",
"Benchmark",
".",
"measure",
"{",
"result",
"=",
"yield",
"}",
"say",
"\"%.4fs\"",
"%",
"time",
".",
"real",
",",
":subitem",
"say",
"(",
"\"#{r... | Outputs text along with how long it took to run its block.
If the block returns an integer it assumes it is the number of rows affected. | [
"Outputs",
"text",
"along",
"with",
"how",
"long",
"it",
"took",
"to",
"run",
"its",
"block",
".",
"If",
"the",
"block",
"returns",
"an",
"integer",
"it",
"assumes",
"it",
"is",
"the",
"number",
"of",
"rows",
"affected",
"."
] | 85a8bc644be69908f05740a5886ec19cd3679df5 | https://github.com/rails/rails/blob/85a8bc644be69908f05740a5886ec19cd3679df5/activerecord/lib/active_record/migration.rb#L847-L854 | train | Print the result of a block with a given message. | [
30522,
13366,
2360,
1035,
2007,
1035,
2051,
1006,
4471,
1007,
2360,
1006,
4471,
1007,
2765,
1027,
9152,
2140,
2051,
1027,
6847,
10665,
1012,
5468,
1063,
2765,
1027,
10750,
1065,
2360,
1000,
1003,
1012,
1018,
10343,
1000,
1003,
2051,
1012,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
activeadmin/activeadmin | lib/active_admin/namespace.rb | ActiveAdmin.Namespace.add_logout_button_to_menu | def add_logout_button_to_menu(menu, priority = 20, html_options = {})
if logout_link_path
html_options = html_options.reverse_merge(method: logout_link_method || :get)
menu.add id: 'logout', priority: priority, html_options: html_options,
label: -> { I18n.t 'active_admin.logout' },
... | ruby | def add_logout_button_to_menu(menu, priority = 20, html_options = {})
if logout_link_path
html_options = html_options.reverse_merge(method: logout_link_method || :get)
menu.add id: 'logout', priority: priority, html_options: html_options,
label: -> { I18n.t 'active_admin.logout' },
... | [
"def",
"add_logout_button_to_menu",
"(",
"menu",
",",
"priority",
"=",
"20",
",",
"html_options",
"=",
"{",
"}",
")",
"if",
"logout_link_path",
"html_options",
"=",
"html_options",
".",
"reverse_merge",
"(",
"method",
":",
"logout_link_method",
"||",
":get",
")"... | The default logout menu item
@param [ActiveAdmin::MenuItem] menu The menu to add the logout link to
@param [Fixnum] priority The numeric priority for the order in which it appears
@param [Hash] html_options An options hash to pass along to link_to | [
"The",
"default",
"logout",
"menu",
"item"
] | 0759c8dcf97865748c9344459162ac3c7e65a6cd | https://github.com/activeadmin/activeadmin/blob/0759c8dcf97865748c9344459162ac3c7e65a6cd/lib/active_admin/namespace.rb#L149-L157 | train | Add a logout button to the menu | [
30522,
13366,
5587,
1035,
8154,
4904,
1035,
6462,
1035,
2000,
1035,
12183,
1006,
12183,
1010,
9470,
1027,
2322,
1010,
16129,
1035,
7047,
1027,
1063,
1065,
1007,
2065,
8154,
4904,
1035,
4957,
1035,
4130,
16129,
1035,
7047,
1027,
16129,
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... |
randym/axlsx | lib/axlsx/workbook/worksheet/cell.rb | Axlsx.Cell.merge | def merge(target)
start, stop = if target.is_a?(String)
[self.r, target]
elsif(target.is_a?(Cell))
Axlsx.sort_cells([self, target]).map { |c| c.r }
end
self.row.worksheet.merge_cells "#{start}:#{stop}" unless stop.nil?
e... | ruby | def merge(target)
start, stop = if target.is_a?(String)
[self.r, target]
elsif(target.is_a?(Cell))
Axlsx.sort_cells([self, target]).map { |c| c.r }
end
self.row.worksheet.merge_cells "#{start}:#{stop}" unless stop.nil?
e... | [
"def",
"merge",
"(",
"target",
")",
"start",
",",
"stop",
"=",
"if",
"target",
".",
"is_a?",
"(",
"String",
")",
"[",
"self",
".",
"r",
",",
"target",
"]",
"elsif",
"(",
"target",
".",
"is_a?",
"(",
"Cell",
")",
")",
"Axlsx",
".",
"sort_cells",
"... | Merges all the cells in a range created between this cell and the cell or string name for a cell provided
@see worksheet.merge_cells
@param [Cell, String] target The last cell, or str ref for the cell in the merge range | [
"Merges",
"all",
"the",
"cells",
"in",
"a",
"range",
"created",
"between",
"this",
"cell",
"and",
"the",
"cell",
"or",
"string",
"name",
"for",
"a",
"cell",
"provided"
] | c593a08b2a929dac7aa8dc418b55e26b4c49dc34 | https://github.com/randym/axlsx/blob/c593a08b2a929dac7aa8dc418b55e26b4c49dc34/lib/axlsx/workbook/worksheet/cell.rb#L308-L315 | train | Merge cells of the current row with the target cell. | [
30522,
13366,
13590,
1006,
4539,
1007,
2707,
1010,
2644,
1027,
2065,
4539,
1012,
2003,
1035,
1037,
1029,
1006,
5164,
1007,
1031,
2969,
1012,
1054,
1010,
4539,
1033,
3449,
5332,
2546,
1006,
4539,
1012,
2003,
1035,
1037,
1029,
1006,
3526,
1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_consumption/lib/2018-01-31/generated/azure_mgmt_consumption/price_sheet.rb | Azure::Consumption::Mgmt::V2018_01_31.PriceSheet.get_by_billing_period_with_http_info | def get_by_billing_period_with_http_info(billing_period_name, expand:nil, skiptoken:nil, top:nil, custom_headers:nil)
get_by_billing_period_async(billing_period_name, expand:expand, skiptoken:skiptoken, top:top, custom_headers:custom_headers).value!
end | ruby | def get_by_billing_period_with_http_info(billing_period_name, expand:nil, skiptoken:nil, top:nil, custom_headers:nil)
get_by_billing_period_async(billing_period_name, expand:expand, skiptoken:skiptoken, top:top, custom_headers:custom_headers).value!
end | [
"def",
"get_by_billing_period_with_http_info",
"(",
"billing_period_name",
",",
"expand",
":",
"nil",
",",
"skiptoken",
":",
"nil",
",",
"top",
":",
"nil",
",",
"custom_headers",
":",
"nil",
")",
"get_by_billing_period_async",
"(",
"billing_period_name",
",",
"expan... | Get the price sheet for a scope by subscriptionId and billing period. Price
sheet is available via this API only for May 1, 2014 or later.
@param billing_period_name [String] Billing Period Name.
@param expand [String] May be used to expand the properties/meterDetails
within a price sheet. By default, these fields... | [
"Get",
"the",
"price",
"sheet",
"for",
"a",
"scope",
"by",
"subscriptionId",
"and",
"billing",
"period",
".",
"Price",
"sheet",
"is",
"available",
"via",
"this",
"API",
"only",
"for",
"May",
"1",
"2014",
"or",
"later",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_consumption/lib/2018-01-31/generated/azure_mgmt_consumption/price_sheet.rb#L184-L186 | train | Gets the list of all the documents in a billing period. | [
30522,
13366,
2131,
1035,
2011,
1035,
25640,
1035,
2558,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
25640,
1035,
2558,
1035,
2171,
1010,
7818,
1024,
9152,
2140,
1010,
13558,
18715,
2368,
1024,
9152,
2140,
1010,
2327,
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... |
fastlane/fastlane | precheck/lib/precheck/rules/abstract_text_match_rule.rb | Precheck.AbstractTextMatchRule.rule_block | def rule_block
return lambda { |text|
text = text.to_s.strip.downcase
if text.empty?
if pass_if_empty?
return RuleReturn.new(validation_state: Precheck::VALIDATION_STATES[:passed])
else
return RuleReturn.new(validation_state: VALIDATION_STATES[:failed], ... | ruby | def rule_block
return lambda { |text|
text = text.to_s.strip.downcase
if text.empty?
if pass_if_empty?
return RuleReturn.new(validation_state: Precheck::VALIDATION_STATES[:passed])
else
return RuleReturn.new(validation_state: VALIDATION_STATES[:failed], ... | [
"def",
"rule_block",
"return",
"lambda",
"{",
"|",
"text",
"|",
"text",
"=",
"text",
".",
"to_s",
".",
"strip",
".",
"downcase",
"if",
"text",
".",
"empty?",
"if",
"pass_if_empty?",
"return",
"RuleReturn",
".",
"new",
"(",
"validation_state",
":",
"Prechec... | rule block that checks text for any instance of each string in lowercased_words_to_look_for | [
"rule",
"block",
"that",
"checks",
"text",
"for",
"any",
"instance",
"of",
"each",
"string",
"in",
"lowercased_words_to_look_for"
] | 457c5d647c77f0e078dafa5129da616914e002c5 | https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/precheck/lib/precheck/rules/abstract_text_match_rule.rb#L40-L78 | train | Rule block for the given text | [
30522,
13366,
3627,
1035,
3796,
2709,
23375,
1063,
1064,
3793,
1064,
3793,
1027,
3793,
1012,
2000,
1035,
1055,
1012,
6167,
1012,
2091,
18382,
2065,
3793,
1012,
4064,
1029,
2065,
3413,
1035,
2065,
1035,
4064,
1029,
2709,
7786,
3388,
14287,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/create_order_request.rb | SquareConnect.CreateOrderRequest.reference_id= | def reference_id=(reference_id)
if !reference_id.nil? && reference_id.to_s.length > 40
fail ArgumentError, "invalid value for 'reference_id', the character length must be smaller than or equal to 40."
end
@reference_id = reference_id
end | ruby | def reference_id=(reference_id)
if !reference_id.nil? && reference_id.to_s.length > 40
fail ArgumentError, "invalid value for 'reference_id', the character length must be smaller than or equal to 40."
end
@reference_id = reference_id
end | [
"def",
"reference_id",
"=",
"(",
"reference_id",
")",
"if",
"!",
"reference_id",
".",
"nil?",
"&&",
"reference_id",
".",
"to_s",
".",
"length",
">",
"40",
"fail",
"ArgumentError",
",",
"\"invalid value for 'reference_id', the character length must be smaller than or equal... | Custom attribute writer method with validation
@param [Object] reference_id Value to be assigned | [
"Custom",
"attribute",
"writer",
"method",
"with",
"validation"
] | 798eb9ded716f23b9f1518386f1c311a34bca8bf | https://github.com/square/connect-ruby-sdk/blob/798eb9ded716f23b9f1518386f1c311a34bca8bf/lib/square_connect/models/create_order_request.rb#L134-L141 | train | Sets the reference_id of the object. | [
30522,
13366,
4431,
1035,
8909,
1027,
1006,
4431,
1035,
8909,
1007,
2065,
999,
4431,
1035,
8909,
1012,
9152,
2140,
1029,
1004,
1004,
4431,
1035,
8909,
1012,
2000,
1035,
1055,
1012,
3091,
1028,
2871,
8246,
6685,
2121,
29165,
1010,
1000,
19... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/mesh_secret_value.rb | Azure::ServiceFabric::V6_4_0_36.MeshSecretValue.add_value | def add_value(secret_resource_name, secret_value_resource_name, secret_value_resource_description, custom_headers:nil)
response = add_value_async(secret_resource_name, secret_value_resource_name, secret_value_resource_description, custom_headers:custom_headers).value!
response.body unless response.nil?
... | ruby | def add_value(secret_resource_name, secret_value_resource_name, secret_value_resource_description, custom_headers:nil)
response = add_value_async(secret_resource_name, secret_value_resource_name, secret_value_resource_description, custom_headers:custom_headers).value!
response.body unless response.nil?
... | [
"def",
"add_value",
"(",
"secret_resource_name",
",",
"secret_value_resource_name",
",",
"secret_value_resource_description",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"add_value_async",
"(",
"secret_resource_name",
",",
"secret_value_resource_name",
",",
"se... | Adds the specified value as a new version of the specified secret resource.
Creates a new value of the specified secret resource. The name of the value
is typically the version identifier. Once created the value cannot be
changed.
@param secret_resource_name [String] The name of the secret resource.
@param secre... | [
"Adds",
"the",
"specified",
"value",
"as",
"a",
"new",
"version",
"of",
"the",
"specified",
"secret",
"resource",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_service_fabric/lib/6.4.0.36/generated/azure_service_fabric/mesh_secret_value.rb#L42-L45 | train | Adds a value to a specified secret resource. | [
30522,
13366,
5587,
1035,
3643,
1006,
3595,
1035,
7692,
1035,
2171,
1010,
3595,
1035,
3643,
1035,
7692,
1035,
2171,
1010,
3595,
1035,
3643,
1035,
7692,
1035,
6412,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
5587,
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... |
projectcypress/health-data-standards | lib/hqmf-parser/2.0/document_helpers/doc_utilities.rb | HQMF2.DocumentUtilities.criteria_covered_by_criteria? | def criteria_covered_by_criteria?(dc)
@reference_ids.uniq
base_criteria_defs = %w(patient_characteristic_ethnicity patient_characteristic_gender patient_characteristic_payer patient_characteristic_race)
to_reject = true
# don't reject if anything refers directly to this criteria
to_reject... | ruby | def criteria_covered_by_criteria?(dc)
@reference_ids.uniq
base_criteria_defs = %w(patient_characteristic_ethnicity patient_characteristic_gender patient_characteristic_payer patient_characteristic_race)
to_reject = true
# don't reject if anything refers directly to this criteria
to_reject... | [
"def",
"criteria_covered_by_criteria?",
"(",
"dc",
")",
"@reference_ids",
".",
"uniq",
"base_criteria_defs",
"=",
"%w(",
"patient_characteristic_ethnicity",
"patient_characteristic_gender",
"patient_characteristic_payer",
"patient_characteristic_race",
")",
"to_reject",
"=",
"tru... | Checks if one data criteria is covered by another (has all the appropriate elements of) | [
"Checks",
"if",
"one",
"data",
"criteria",
"is",
"covered",
"by",
"another",
"(",
"has",
"all",
"the",
"appropriate",
"elements",
"of",
")"
] | 252d4f0927c513eacde6b9ea41b76faa1423c34b | https://github.com/projectcypress/health-data-standards/blob/252d4f0927c513eacde6b9ea41b76faa1423c34b/lib/hqmf-parser/2.0/document_helpers/doc_utilities.rb#L65-L83 | train | Returns true if the criteria is covered by the criteria | [
30522,
13366,
9181,
1035,
3139,
1035,
2011,
1035,
9181,
1029,
1006,
5887,
1007,
1030,
4431,
1035,
8909,
2015,
1012,
4895,
18515,
2918,
1035,
9181,
1035,
13366,
2015,
1027,
1003,
1059,
1006,
5776,
1035,
8281,
1035,
18240,
5776,
1035,
8281,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/query.rb | GraphQL.Query.lookahead | def lookahead
@lookahead ||= begin
ast_node = selected_operation
root_type = warden.root_type_for_operation(ast_node.operation_type || "query")
root_type = root_type.metadata[:type_class] || raise("Invariant: `lookahead` only works with class-based types")
GraphQL::Execution::Looka... | ruby | def lookahead
@lookahead ||= begin
ast_node = selected_operation
root_type = warden.root_type_for_operation(ast_node.operation_type || "query")
root_type = root_type.metadata[:type_class] || raise("Invariant: `lookahead` only works with class-based types")
GraphQL::Execution::Looka... | [
"def",
"lookahead",
"@lookahead",
"||=",
"begin",
"ast_node",
"=",
"selected_operation",
"root_type",
"=",
"warden",
".",
"root_type_for_operation",
"(",
"ast_node",
".",
"operation_type",
"||",
"\"query\"",
")",
"root_type",
"=",
"root_type",
".",
"metadata",
"[",
... | A lookahead for the root selections of this query
@return [GraphQL::Execution::Lookahead] | [
"A",
"lookahead",
"for",
"the",
"root",
"selections",
"of",
"this",
"query"
] | d5be13a816f220b9efbabeaa69a3e56fedf311f5 | https://github.com/rmosolgo/graphql-ruby/blob/d5be13a816f220b9efbabeaa69a3e56fedf311f5/lib/graphql/query.rb#L151-L158 | train | Returns the lookahead for the current operation. | [
30522,
13366,
2298,
4430,
13775,
1030,
2298,
4430,
13775,
1064,
1064,
1027,
4088,
2004,
2102,
1035,
13045,
1027,
3479,
1035,
3169,
7117,
1035,
2828,
1027,
13745,
1012,
7117,
1035,
2828,
1035,
2005,
1035,
3169,
1006,
2004,
2102,
1035,
13045,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
decidim/decidim | decidim-core/app/helpers/decidim/translations_helper.rb | Decidim.TranslationsHelper.empty_translatable | def empty_translatable(locales = Decidim.available_locales)
locales.each_with_object({}) do |locale, result|
result[locale.to_s] = ""
end
end | ruby | def empty_translatable(locales = Decidim.available_locales)
locales.each_with_object({}) do |locale, result|
result[locale.to_s] = ""
end
end | [
"def",
"empty_translatable",
"(",
"locales",
"=",
"Decidim",
".",
"available_locales",
")",
"locales",
".",
"each_with_object",
"(",
"{",
"}",
")",
"do",
"|",
"locale",
",",
"result",
"|",
"result",
"[",
"locale",
".",
"to_s",
"]",
"=",
"\"\"",
"end",
"e... | Public: Creates an translation for each available language in the list
so empty fields still have the correct format.
locales - A list of locales to scope the translations to. Picks up all the
available locales by default.
Returns a Hash with the locales as keys and the empty strings as values. | [
"Public",
":",
"Creates",
"an",
"translation",
"for",
"each",
"available",
"language",
"in",
"the",
"list",
"so",
"empty",
"fields",
"still",
"have",
"the",
"correct",
"format",
"."
] | 6e2b14e559a63088669904e3c5c49a5180700cf7 | https://github.com/decidim/decidim/blob/6e2b14e559a63088669904e3c5c49a5180700cf7/decidim-core/app/helpers/decidim/translations_helper.rb#L32-L36 | train | Empty the language for the current language | [
30522,
13366,
4064,
1035,
9099,
20051,
3085,
1006,
2334,
2229,
1027,
11703,
28173,
2213,
1012,
2800,
1035,
2334,
2229,
1007,
2334,
2229,
1012,
2169,
1035,
2007,
1035,
4874,
1006,
1063,
1065,
1007,
2079,
1064,
2334,
2063,
1010,
2765,
1064,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_redis/lib/2017-10-01/generated/azure_mgmt_redis/redis.rb | Azure::Redis::Mgmt::V2017_10_01.Redis.list_upgrade_notifications_with_http_info | def list_upgrade_notifications_with_http_info(resource_group_name, name, history, custom_headers:nil)
list_upgrade_notifications_async(resource_group_name, name, history, custom_headers:custom_headers).value!
end | ruby | def list_upgrade_notifications_with_http_info(resource_group_name, name, history, custom_headers:nil)
list_upgrade_notifications_async(resource_group_name, name, history, custom_headers:custom_headers).value!
end | [
"def",
"list_upgrade_notifications_with_http_info",
"(",
"resource_group_name",
",",
"name",
",",
"history",
",",
"custom_headers",
":",
"nil",
")",
"list_upgrade_notifications_async",
"(",
"resource_group_name",
",",
"name",
",",
"history",
",",
"custom_headers",
":custo... | Gets any upgrade notifications for a Redis cache.
@param resource_group_name [String] The name of the resource group.
@param name [String] The name of the Redis cache.
@param history [Float] how many minutes in past to look for upgrade
notifications
@param custom_headers [Hash{String => String}] A hash of custom ... | [
"Gets",
"any",
"upgrade",
"notifications",
"for",
"a",
"Redis",
"cache",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_redis/lib/2017-10-01/generated/azure_mgmt_redis/redis.rb#L143-L145 | train | Gets the list of upgrade notifications for a resource group. | [
30522,
13366,
2862,
1035,
12200,
1035,
26828,
2015,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2171,
1010,
2381,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
2862,
1035,
12200,
1035,
26828,
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... |
aws/aws-sdk-ruby | gems/aws-sdk-sns/lib/aws-sdk-sns/resource.rb | Aws::SNS.Resource.create_platform_application | def create_platform_application(options = {})
resp = @client.create_platform_application(options)
PlatformApplication.new(
arn: resp.data.platform_application_arn,
client: @client
)
end | ruby | def create_platform_application(options = {})
resp = @client.create_platform_application(options)
PlatformApplication.new(
arn: resp.data.platform_application_arn,
client: @client
)
end | [
"def",
"create_platform_application",
"(",
"options",
"=",
"{",
"}",
")",
"resp",
"=",
"@client",
".",
"create_platform_application",
"(",
"options",
")",
"PlatformApplication",
".",
"new",
"(",
"arn",
":",
"resp",
".",
"data",
".",
"platform_application_arn",
"... | @!group Actions
@example Request syntax with placeholder values
platformapplication = sns.create_platform_application({
name: "String", # required
platform: "String", # required
attributes: { # required
"String" => "String",
},
})
@param [Hash] options ({})
@option options [required... | [
"@!group",
"Actions",
"@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#L49-L55 | train | Creates a platform application | [
30522,
13366,
3443,
1035,
4132,
1035,
4646,
1006,
7047,
1027,
1063,
1065,
1007,
24501,
2361,
1027,
1030,
7396,
1012,
3443,
1035,
4132,
1035,
4646,
1006,
7047,
1007,
4132,
29098,
19341,
3508,
1012,
2047,
1006,
12098,
2078,
1024,
24501,
2361,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_datalake_analytics/lib/2016-11-01/generated/azure_mgmt_datalake_analytics/firewall_rules.rb | Azure::DataLakeAnalytics::Mgmt::V2016_11_01.FirewallRules.get_with_http_info | def get_with_http_info(resource_group_name, account_name, firewall_rule_name, custom_headers:nil)
get_async(resource_group_name, account_name, firewall_rule_name, custom_headers:custom_headers).value!
end | ruby | def get_with_http_info(resource_group_name, account_name, firewall_rule_name, custom_headers:nil)
get_async(resource_group_name, account_name, firewall_rule_name, custom_headers:custom_headers).value!
end | [
"def",
"get_with_http_info",
"(",
"resource_group_name",
",",
"account_name",
",",
"firewall_rule_name",
",",
"custom_headers",
":",
"nil",
")",
"get_async",
"(",
"resource_group_name",
",",
"account_name",
",",
"firewall_rule_name",
",",
"custom_headers",
":custom_header... | Gets the specified Data Lake Analytics firewall rule.
@param resource_group_name [String] The name of the Azure resource group.
@param account_name [String] The name of the Data Lake Analytics account.
@param firewall_rule_name [String] The name of the firewall rule to retrieve.
@param custom_headers [Hash{String ... | [
"Gets",
"the",
"specified",
"Data",
"Lake",
"Analytics",
"firewall",
"rule",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_datalake_analytics/lib/2016-11-01/generated/azure_mgmt_datalake_analytics/firewall_rules.rb#L262-L264 | train | Gets the specified firewall rule. | [
30522,
13366,
2131,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
4070,
1035,
2171,
1010,
2543,
9628,
1035,
3627,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
2131,
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... |
randym/axlsx | lib/axlsx/workbook/worksheet/color_scale.rb | Axlsx.ColorScale.initialize_default_cfvos | def initialize_default_cfvos(user_cfvos)
defaults = self.class.default_cfvos
user_cfvos.each_with_index do |cfvo, index|
if index < defaults.size
cfvo = defaults[index].merge(cfvo)
end
add cfvo
end
while colors.size < defaults.size
add defaults[colors.si... | ruby | def initialize_default_cfvos(user_cfvos)
defaults = self.class.default_cfvos
user_cfvos.each_with_index do |cfvo, index|
if index < defaults.size
cfvo = defaults[index].merge(cfvo)
end
add cfvo
end
while colors.size < defaults.size
add defaults[colors.si... | [
"def",
"initialize_default_cfvos",
"(",
"user_cfvos",
")",
"defaults",
"=",
"self",
".",
"class",
".",
"default_cfvos",
"user_cfvos",
".",
"each_with_index",
"do",
"|",
"cfvo",
",",
"index",
"|",
"if",
"index",
"<",
"defaults",
".",
"size",
"cfvo",
"=",
"def... | There has got to be cleaner way of merging these arrays. | [
"There",
"has",
"got",
"to",
"be",
"cleaner",
"way",
"of",
"merging",
"these",
"arrays",
"."
] | c593a08b2a929dac7aa8dc418b55e26b4c49dc34 | https://github.com/randym/axlsx/blob/c593a08b2a929dac7aa8dc418b55e26b4c49dc34/lib/axlsx/workbook/worksheet/color_scale.rb#L97-L108 | train | Initialize the default CFVOs | [
30522,
13366,
3988,
4697,
1035,
12398,
1035,
12935,
19862,
1006,
5310,
1035,
12935,
19862,
1007,
12398,
2015,
1027,
2969,
1012,
2465,
1012,
12398,
1035,
12935,
19862,
5310,
1035,
12935,
19862,
1012,
2169,
1035,
2007,
1035,
5950,
2079,
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... |
fastlane/fastlane | frameit/lib/frameit/config_parser.rb | Frameit.ConfigParser.change_paths_to_absolutes! | def change_paths_to_absolutes!(values)
values.each do |key, value|
if value.kind_of?(Hash)
change_paths_to_absolutes!(value) # recursive call
elsif value.kind_of?(Array)
value.each do |current|
change_paths_to_absolutes!(current) if current.kind_of?(Hash) # recursiv... | ruby | def change_paths_to_absolutes!(values)
values.each do |key, value|
if value.kind_of?(Hash)
change_paths_to_absolutes!(value) # recursive call
elsif value.kind_of?(Array)
value.each do |current|
change_paths_to_absolutes!(current) if current.kind_of?(Hash) # recursiv... | [
"def",
"change_paths_to_absolutes!",
"(",
"values",
")",
"values",
".",
"each",
"do",
"|",
"key",
",",
"value",
"|",
"if",
"value",
".",
"kind_of?",
"(",
"Hash",
")",
"change_paths_to_absolutes!",
"(",
"value",
")",
"# recursive call",
"elsif",
"value",
".",
... | Use absolute paths instead of relative | [
"Use",
"absolute",
"paths",
"instead",
"of",
"relative"
] | 457c5d647c77f0e078dafa5129da616914e002c5 | https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/frameit/lib/frameit/config_parser.rb#L45-L64 | train | Change the paths to absolute ones | [
30522,
13366,
2689,
1035,
10425,
1035,
2000,
1035,
7619,
2015,
999,
1006,
5300,
1007,
5300,
1012,
2169,
2079,
1064,
3145,
1010,
3643,
1064,
2065,
3643,
30524,
999,
1006,
3643,
1007,
1001,
28667,
9236,
3512,
2655,
3449,
5332,
2546,
3643,
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... |
kmuto/review | lib/review/textutils.rb | ReVIEW.TextUtils.trim_lines | def trim_lines(lines)
new_lines = lines.dup
while new_lines[-1] && new_lines[-1].strip.empty?
new_lines.pop
end
new_lines
end | ruby | def trim_lines(lines)
new_lines = lines.dup
while new_lines[-1] && new_lines[-1].strip.empty?
new_lines.pop
end
new_lines
end | [
"def",
"trim_lines",
"(",
"lines",
")",
"new_lines",
"=",
"lines",
".",
"dup",
"while",
"new_lines",
"[",
"-",
"1",
"]",
"&&",
"new_lines",
"[",
"-",
"1",
"]",
".",
"strip",
".",
"empty?",
"new_lines",
".",
"pop",
"end",
"new_lines",
"end"
] | remove elements at the back of `lines` if element is empty string
(`lines` should be Array of String.) | [
"remove",
"elements",
"at",
"the",
"back",
"of",
"lines",
"if",
"element",
"is",
"empty",
"string",
"(",
"lines",
"should",
"be",
"Array",
"of",
"String",
".",
")"
] | 77d1273e671663f05db2992281fd891b776badf0 | https://github.com/kmuto/review/blob/77d1273e671663f05db2992281fd891b776badf0/lib/review/textutils.rb#L40-L46 | train | Trim lines that are empty | [
30522,
13366,
12241,
1035,
3210,
1006,
3210,
1007,
2047,
1035,
3210,
1027,
3210,
1012,
4241,
2361,
2096,
2047,
1035,
3210,
1031,
1011,
1015,
1033,
1004,
1004,
2047,
1035,
3210,
1031,
1011,
1015,
1033,
1012,
6167,
1012,
4064,
1029,
2047,
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... |
square/connect-ruby-sdk | lib/square_connect/api/v1_items_api.rb | SquareConnect.V1ItemsApi.list_fees | def list_fees(location_id, opts = {})
data, _status_code, _headers = list_fees_with_http_info(location_id, opts)
return data
end | ruby | def list_fees(location_id, opts = {})
data, _status_code, _headers = list_fees_with_http_info(location_id, opts)
return data
end | [
"def",
"list_fees",
"(",
"location_id",
",",
"opts",
"=",
"{",
"}",
")",
"data",
",",
"_status_code",
",",
"_headers",
"=",
"list_fees_with_http_info",
"(",
"location_id",
",",
"opts",
")",
"return",
"data",
"end"
] | ListFees
Lists all of a location's fees (taxes).
@param location_id The ID of the location to list fees for.
@param [Hash] opts the optional parameters
@return [Array<V1Fee>] | [
"ListFees",
"Lists",
"all",
"of",
"a",
"location",
"s",
"fees",
"(",
"taxes",
")",
"."
] | 798eb9ded716f23b9f1518386f1c311a34bca8bf | https://github.com/square/connect-ruby-sdk/blob/798eb9ded716f23b9f1518386f1c311a34bca8bf/lib/square_connect/api/v1_items_api.rb#L1349-L1352 | train | Returns a list of fees for a location | [
30522,
13366,
2862,
1035,
9883,
1006,
3295,
1035,
8909,
1010,
23569,
2015,
1027,
1063,
1065,
1007,
2951,
1010,
1035,
3570,
1035,
3642,
1010,
1035,
20346,
2015,
1027,
2862,
1035,
30524,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
cheezy/page-object | lib/page-object/accessors.rb | PageObject.Accessors.table | def table(name, identifier={:index => 0}, &block)
standard_methods(name, identifier, 'table_for', &block)
define_method(name) do
return platform.table_text_for identifier.clone unless block_given?
self.send("#{name}_element").text
end
end | ruby | def table(name, identifier={:index => 0}, &block)
standard_methods(name, identifier, 'table_for', &block)
define_method(name) do
return platform.table_text_for identifier.clone unless block_given?
self.send("#{name}_element").text
end
end | [
"def",
"table",
"(",
"name",
",",
"identifier",
"=",
"{",
":index",
"=>",
"0",
"}",
",",
"&",
"block",
")",
"standard_methods",
"(",
"name",
",",
"identifier",
",",
"'table_for'",
",",
"block",
")",
"define_method",
"(",
"name",
")",
"do",
"return",
"p... | adds three methods - one to return the text for the table, one
to retrieve the table element, and another to
check the table's existence.
@example
table(:cart, :id => 'shopping_cart')
# will generate a 'cart', 'cart_element' and 'cart?' method
@param [Symbol] the name used for the generated methods
@param... | [
"adds",
"three",
"methods",
"-",
"one",
"to",
"return",
"the",
"text",
"for",
"the",
"table",
"one",
"to",
"retrieve",
"the",
"table",
"element",
"and",
"another",
"to",
"check",
"the",
"table",
"s",
"existence",
"."
] | 850d775bf63768fbb1551a34480195785fe8e193 | https://github.com/cheezy/page-object/blob/850d775bf63768fbb1551a34480195785fe8e193/lib/page-object/accessors.rb#L493-L499 | train | Creates a new instance of the Table class. | [
30522,
13366,
2795,
1006,
2171,
1010,
8909,
4765,
18095,
1027,
1063,
1024,
5950,
1027,
1028,
1014,
1065,
1010,
1004,
3796,
1007,
3115,
1035,
4725,
1006,
2171,
1010,
8909,
4765,
18095,
1010,
1005,
2795,
1035,
2005,
1005,
1010,
1004,
3796,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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_mixedreality/lib/2019-02-28-preview/generated/azure_mgmt_mixedreality/spatial_anchors_accounts.rb | Azure::MixedReality::Mgmt::V2019_02_28_preview.SpatialAnchorsAccounts.get_keys | def get_keys(resource_group_name, spatial_anchors_account_name, custom_headers:nil)
response = get_keys_async(resource_group_name, spatial_anchors_account_name, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def get_keys(resource_group_name, spatial_anchors_account_name, custom_headers:nil)
response = get_keys_async(resource_group_name, spatial_anchors_account_name, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"get_keys",
"(",
"resource_group_name",
",",
"spatial_anchors_account_name",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"get_keys_async",
"(",
"resource_group_name",
",",
"spatial_anchors_account_name",
",",
"custom_headers",
":custom_headers",
")",
"... | Get Both of the 2 Keys of a Spatial Anchors Account
@param resource_group_name [String] Name of an Azure resource group.
@param spatial_anchors_account_name [String] Name of an Mixed Reality Spatial
Anchors Account.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the ... | [
"Get",
"Both",
"of",
"the",
"2",
"Keys",
"of",
"a",
"Spatial",
"Anchors",
"Account"
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_mixedreality/lib/2019-02-28-preview/generated/azure_mgmt_mixedreality/spatial_anchors_accounts.rb#L641-L644 | train | Gets the keys for the specified spatial anchors account. | [
30522,
13366,
2131,
1035,
6309,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
13589,
1035,
24674,
1035,
4070,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
2131,
1035,
6309,
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... |
samvera/hyrax | app/presenters/hyrax/fixity_status_presenter.rb | Hyrax.FixityStatusPresenter.render_failed_compact | def render_failed_compact
safe_join(
["<p><strong>Failed checks:</strong></p>".html_safe] +
failing_checks.collect do |log|
safe_join(
[
"<p>".html_safe,
"ChecksumAuditLog id: #{log.id}; ",
content_tag("a", "file", hre... | ruby | def render_failed_compact
safe_join(
["<p><strong>Failed checks:</strong></p>".html_safe] +
failing_checks.collect do |log|
safe_join(
[
"<p>".html_safe,
"ChecksumAuditLog id: #{log.id}; ",
content_tag("a", "file", hre... | [
"def",
"render_failed_compact",
"safe_join",
"(",
"[",
"\"<p><strong>Failed checks:</strong></p>\"",
".",
"html_safe",
"]",
"+",
"failing_checks",
".",
"collect",
"do",
"|",
"log",
"|",
"safe_join",
"(",
"[",
"\"<p>\"",
".",
"html_safe",
",",
"\"ChecksumAuditLog id: #... | A weird display, cause we need it to fit in that 180px column on
FileSet show, and have no real UI to link to for files/versions :(
rubocop:disable Metrics/MethodLength | [
"A",
"weird",
"display",
"cause",
"we",
"need",
"it",
"to",
"fit",
"in",
"that",
"180px",
"column",
"on",
"FileSet",
"show",
"and",
"have",
"no",
"real",
"UI",
"to",
"link",
"to",
"for",
"files",
"/",
"versions",
":",
"(",
"rubocop",
":",
"disable",
... | e2b4f56e829a53b1f11296324736e9d5b8c9ee5f | https://github.com/samvera/hyrax/blob/e2b4f56e829a53b1f11296324736e9d5b8c9ee5f/app/presenters/hyrax/fixity_status_presenter.rb#L38-L55 | train | Renders the failed compact audit logs | [
30522,
13366,
17552,
1035,
3478,
1035,
9233,
3647,
1035,
3693,
1006,
1031,
1000,
1026,
1052,
1028,
1026,
2844,
1028,
3478,
14148,
1024,
1026,
1013,
2844,
1028,
1026,
1013,
1052,
1028,
1000,
1012,
16129,
1035,
3647,
1033,
1009,
7989,
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... |
projectcypress/health-data-standards | lib/hqmf-parser/1.0/utilities.rb | HQMF1.Utilities.check_nil_conjunction_on_child | def check_nil_conjunction_on_child
if (@preconditions.length == 1 && @preconditions.first.conjunction.nil?)
bad_precondition = @preconditions.first
if (bad_precondition.restrictions.empty? && bad_precondition.subset.nil? && bad_precondition.expression.nil?)
@preconditions = @precondition... | ruby | def check_nil_conjunction_on_child
if (@preconditions.length == 1 && @preconditions.first.conjunction.nil?)
bad_precondition = @preconditions.first
if (bad_precondition.restrictions.empty? && bad_precondition.subset.nil? && bad_precondition.expression.nil?)
@preconditions = @precondition... | [
"def",
"check_nil_conjunction_on_child",
"if",
"(",
"@preconditions",
".",
"length",
"==",
"1",
"&&",
"@preconditions",
".",
"first",
".",
"conjunction",
".",
"nil?",
")",
"bad_precondition",
"=",
"@preconditions",
".",
"first",
"if",
"(",
"bad_precondition",
".",... | Preconditions can have nil conjunctions as part of a DATEDIFF, we want to remove these and warn | [
"Preconditions",
"can",
"have",
"nil",
"conjunctions",
"as",
"part",
"of",
"a",
"DATEDIFF",
"we",
"want",
"to",
"remove",
"these",
"and",
"warn"
] | 252d4f0927c513eacde6b9ea41b76faa1423c34b | https://github.com/projectcypress/health-data-standards/blob/252d4f0927c513eacde6b9ea41b76faa1423c34b/lib/hqmf-parser/1.0/utilities.rb#L41-L51 | train | Check that the nil conjunction on the child node is a nil conjunction. | [
30522,
13366,
4638,
1035,
9152,
2140,
1035,
9595,
1035,
2006,
1035,
2775,
2065,
1006,
1030,
3653,
8663,
20562,
2015,
1012,
3091,
1027,
1027,
1015,
1004,
1004,
1030,
3653,
8663,
20562,
2015,
1012,
2034,
1012,
9595,
1012,
9152,
2140,
1029,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | data/azure_service_fabric/lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb | Azure::ServiceFabric::V6_2_0_9.ServiceFabricClientAPIs.get_application_type_info_list_by_name_with_http_info | def get_application_type_info_list_by_name_with_http_info(application_type_name, application_type_version:nil, exclude_application_parameters:false, continuation_token:nil, max_results:0, timeout:60, custom_headers:nil)
get_application_type_info_list_by_name_async(application_type_name, application_type_version:a... | ruby | def get_application_type_info_list_by_name_with_http_info(application_type_name, application_type_version:nil, exclude_application_parameters:false, continuation_token:nil, max_results:0, timeout:60, custom_headers:nil)
get_application_type_info_list_by_name_async(application_type_name, application_type_version:a... | [
"def",
"get_application_type_info_list_by_name_with_http_info",
"(",
"application_type_name",
",",
"application_type_version",
":",
"nil",
",",
"exclude_application_parameters",
":",
"false",
",",
"continuation_token",
":",
"nil",
",",
"max_results",
":",
"0",
",",
"timeout... | Gets the list of application types in the Service Fabric cluster matching
exactly the specified name.
Returns the information about the application types that are provisioned or
in the process of being provisioned in the Service Fabric cluster. These
results are of application types whose name match exactly the on... | [
"Gets",
"the",
"list",
"of",
"application",
"types",
"in",
"the",
"Service",
"Fabric",
"cluster",
"matching",
"exactly",
"the",
"specified",
"name",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_service_fabric/lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb#L4947-L4949 | train | Gets the list of information about the specified application type. | [
30522,
13366,
2131,
1035,
4646,
1035,
2828,
1035,
18558,
1035,
2862,
1035,
2011,
1035,
2171,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
4646,
1035,
2828,
1035,
2171,
1010,
4646,
1035,
2828,
1035,
2544,
1024,
9152,
2140,
1010,
23329,
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... |
puppetlabs/bolt | acceptance/lib/acceptance/bolt_command_helper.rb | Acceptance.BoltCommandHelper.bolt_command_on | def bolt_command_on(host, command, flags = {}, opts = {})
bolt_command = command.dup
flags.each { |k, v| bolt_command << " #{k} #{v}" }
case host['platform']
when /windows/
execute_powershell_script_on(host, bolt_command, opts)
when /osx/
# Ensure Bolt runs with UTF-8 unde... | ruby | def bolt_command_on(host, command, flags = {}, opts = {})
bolt_command = command.dup
flags.each { |k, v| bolt_command << " #{k} #{v}" }
case host['platform']
when /windows/
execute_powershell_script_on(host, bolt_command, opts)
when /osx/
# Ensure Bolt runs with UTF-8 unde... | [
"def",
"bolt_command_on",
"(",
"host",
",",
"command",
",",
"flags",
"=",
"{",
"}",
",",
"opts",
"=",
"{",
"}",
")",
"bolt_command",
"=",
"command",
".",
"dup",
"flags",
".",
"each",
"{",
"|",
"k",
",",
"v",
"|",
"bolt_command",
"<<",
"\" #{k} #{v}\"... | A helper to build a bolt command used in acceptance testing
@param [Beaker::Host] host the host to execute the command on
@param [String] command the command to execute on the bolt SUT
@param [Hash] flags the command flags to append to the command
@option flags [String] '--nodes' the nodes to run on
@option flags ... | [
"A",
"helper",
"to",
"build",
"a",
"bolt",
"command",
"used",
"in",
"acceptance",
"testing"
] | 50689a33699939d262ea7c822a4b24fd8c4f8d8a | https://github.com/puppetlabs/bolt/blob/50689a33699939d262ea7c822a4b24fd8c4f8d8a/acceptance/lib/acceptance/bolt_command_helper.rb#L15-L30 | train | Execute a bolt command on the given host. | [
30522,
13366,
10053,
1035,
3094,
1035,
2006,
1006,
3677,
1010,
3094,
1010,
9245,
1027,
1063,
1065,
1010,
23569,
2015,
1027,
1063,
1065,
1007,
10053,
1035,
3094,
1027,
3094,
1012,
4241,
2361,
9245,
1012,
2169,
1063,
1064,
1047,
1010,
1058,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/features.rb | Azure::CognitiveServices::LuisAuthoring::V2_0.Features.delete_phrase_list | def delete_phrase_list(app_id, version_id, phraselist_id, custom_headers:nil)
response = delete_phrase_list_async(app_id, version_id, phraselist_id, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def delete_phrase_list(app_id, version_id, phraselist_id, custom_headers:nil)
response = delete_phrase_list_async(app_id, version_id, phraselist_id, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"delete_phrase_list",
"(",
"app_id",
",",
"version_id",
",",
"phraselist_id",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"delete_phrase_list_async",
"(",
"app_id",
",",
"version_id",
",",
"phraselist_id",
",",
"custom_headers",
":custom_headers",
... | Deletes a phraselist feature from a version of the application.
@param app_id The application ID.
@param version_id [String] The version ID.
@param phraselist_id [Integer] The ID of the feature to be deleted.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP re... | [
"Deletes",
"a",
"phraselist",
"feature",
"from",
"a",
"version",
"of",
"the",
"application",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_cognitiveservices_luisauthoring/lib/2.0/generated/azure_cognitiveservices_luisauthoring/features.rb#L712-L715 | train | Deletes the phrase list of a version of the application. | [
30522,
13366,
3972,
12870,
1035,
7655,
1035,
2862,
1006,
10439,
1035,
8909,
1010,
2544,
1035,
8909,
1010,
7655,
9863,
1035,
8909,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
3972,
12870,
1035,
7655,
1035,
2862,
1035,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_logic/lib/2016-06-01/generated/azure_mgmt_logic/schemas.rb | Azure::Logic::Mgmt::V2016_06_01.Schemas.create_or_update_with_http_info | def create_or_update_with_http_info(resource_group_name, integration_account_name, schema_name, schema, custom_headers:nil)
create_or_update_async(resource_group_name, integration_account_name, schema_name, schema, custom_headers:custom_headers).value!
end | ruby | def create_or_update_with_http_info(resource_group_name, integration_account_name, schema_name, schema, custom_headers:nil)
create_or_update_async(resource_group_name, integration_account_name, schema_name, schema, custom_headers:custom_headers).value!
end | [
"def",
"create_or_update_with_http_info",
"(",
"resource_group_name",
",",
"integration_account_name",
",",
"schema_name",
",",
"schema",
",",
"custom_headers",
":",
"nil",
")",
"create_or_update_async",
"(",
"resource_group_name",
",",
"integration_account_name",
",",
"sch... | Creates or updates an integration account schema.
@param resource_group_name [String] The resource group name.
@param integration_account_name [String] The integration account name.
@param schema_name [String] The integration account schema name.
@param schema [IntegrationAccountSchema] The integration account sch... | [
"Creates",
"or",
"updates",
"an",
"integration",
"account",
"schema",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_logic/lib/2016-06-01/generated/azure_mgmt_logic/schemas.rb#L250-L252 | train | Creates or updates an integration account schema. | [
30522,
13366,
3443,
1035,
2030,
1035,
10651,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
8346,
1035,
4070,
1035,
2171,
1010,
8040,
28433,
1035,
2171,
1010,
8040,
28433,
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/databases.rb | Azure::SQL::Mgmt::V2014_04_01.Databases.list_metrics_with_http_info | def list_metrics_with_http_info(resource_group_name, server_name, database_name, filter, custom_headers:nil)
list_metrics_async(resource_group_name, server_name, database_name, filter, custom_headers:custom_headers).value!
end | ruby | def list_metrics_with_http_info(resource_group_name, server_name, database_name, filter, custom_headers:nil)
list_metrics_async(resource_group_name, server_name, database_name, filter, custom_headers:custom_headers).value!
end | [
"def",
"list_metrics_with_http_info",
"(",
"resource_group_name",
",",
"server_name",
",",
"database_name",
",",
"filter",
",",
"custom_headers",
":",
"nil",
")",
"list_metrics_async",
"(",
"resource_group_name",
",",
"server_name",
",",
"database_name",
",",
"filter",
... | Returns database metrics.
@param resource_group_name [String] The name of the resource group that
contains the resource. You can obtain this value from the Azure Resource
Manager API or the portal.
@param server_name [String] The name of the server.
@param database_name [String] The name of the database.
@param ... | [
"Returns",
"database",
"metrics",
"."
] | 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#L1154-L1156 | train | Gets metrics for the specified database. | [
30522,
13366,
2862,
1035,
12046,
2015,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
8241,
1035,
2171,
1010,
7809,
1035,
2171,
1010,
11307,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
2862,
1035,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_stor_simple8000_series/lib/2017-06-01/generated/azure_mgmt_stor_simple8000_series/cloud_appliances.rb | Azure::StorSimple8000Series::Mgmt::V2017_06_01.CloudAppliances.begin_provision | def begin_provision(parameters, resource_group_name, manager_name, custom_headers:nil)
response = begin_provision_async(parameters, resource_group_name, manager_name, custom_headers:custom_headers).value!
nil
end | ruby | def begin_provision(parameters, resource_group_name, manager_name, custom_headers:nil)
response = begin_provision_async(parameters, resource_group_name, manager_name, custom_headers:custom_headers).value!
nil
end | [
"def",
"begin_provision",
"(",
"parameters",
",",
"resource_group_name",
",",
"manager_name",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"begin_provision_async",
"(",
"parameters",
",",
"resource_group_name",
",",
"manager_name",
",",
"custom_headers",
"... | Provisions cloud appliance.
@param parameters [CloudAppliance] The cloud appliance
@param resource_group_name [String] The resource group name
@param manager_name [String] The manager name
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request. | [
"Provisions",
"cloud",
"appliance",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_stor_simple8000_series/lib/2017-06-01/generated/azure_mgmt_stor_simple8000_series/cloud_appliances.rb#L168-L171 | train | Creates a new cluster provisioning service. | [
30522,
13366,
4088,
1035,
9347,
1006,
11709,
1010,
7692,
1035,
2177,
1035,
2171,
1010,
3208,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
4088,
1035,
9347,
1035,
2004,
6038,
2278,
1006,
11709,
1010,
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... |
stripe/stripe-ruby | lib/stripe/list_object.rb | Stripe.ListObject.next_page | def next_page(params = {}, opts = {})
return self.class.empty_list(opts) unless has_more
last_id = data.last.id
params = filters.merge(starting_after: last_id).merge(params)
list(params, opts)
end | ruby | def next_page(params = {}, opts = {})
return self.class.empty_list(opts) unless has_more
last_id = data.last.id
params = filters.merge(starting_after: last_id).merge(params)
list(params, opts)
end | [
"def",
"next_page",
"(",
"params",
"=",
"{",
"}",
",",
"opts",
"=",
"{",
"}",
")",
"return",
"self",
".",
"class",
".",
"empty_list",
"(",
"opts",
")",
"unless",
"has_more",
"last_id",
"=",
"data",
".",
"last",
".",
"id",
"params",
"=",
"filters",
... | Fetches the next page in the resource list (if there is one).
This method will try to respect the limit of the current page. If none
was given, the default limit will be fetched again. | [
"Fetches",
"the",
"next",
"page",
"in",
"the",
"resource",
"list",
"(",
"if",
"there",
"is",
"one",
")",
"."
] | 322a8c60be8a9b9ac8aad8857864680a32176935 | https://github.com/stripe/stripe-ruby/blob/322a8c60be8a9b9ac8aad8857864680a32176935/lib/stripe/list_object.rb#L79-L86 | train | Returns the next page of results | [
30522,
13366,
2279,
1035,
3931,
1006,
11498,
5244,
1027,
1063,
1065,
1010,
23569,
2015,
1027,
1063,
1065,
1007,
2709,
2969,
1012,
2465,
1012,
4064,
1035,
2862,
1006,
23569,
2015,
1007,
4983,
2038,
1035,
2062,
2197,
1035,
8909,
1027,
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... |
Azure/azure-sdk-for-ruby | data/azure_cognitiveservices_face/lib/1.0/generated/azure_cognitiveservices_face/person_group_operations.rb | Azure::CognitiveServices::Face::V1_0.PersonGroupOperations.update_with_http_info | def update_with_http_info(person_group_id, name:nil, user_data:nil, custom_headers:nil)
update_async(person_group_id, name:name, user_data:user_data, custom_headers:custom_headers).value!
end | ruby | def update_with_http_info(person_group_id, name:nil, user_data:nil, custom_headers:nil)
update_async(person_group_id, name:name, user_data:user_data, custom_headers:custom_headers).value!
end | [
"def",
"update_with_http_info",
"(",
"person_group_id",
",",
"name",
":",
"nil",
",",
"user_data",
":",
"nil",
",",
"custom_headers",
":",
"nil",
")",
"update_async",
"(",
"person_group_id",
",",
"name",
":",
"name",
",",
"user_data",
":user_data",
",",
"custo... | Update an existing person group's display name and userData. The properties
which does not appear in request body will not be updated.
@param person_group_id [String] Id referencing a particular person group.
@param name [String] User defined name, maximum length is 128.
@param user_data [String] User specified da... | [
"Update",
"an",
"existing",
"person",
"group",
"s",
"display",
"name",
"and",
"userData",
".",
"The",
"properties",
"which",
"does",
"not",
"appear",
"in",
"request",
"body",
"will",
"not",
"be",
"updated",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_cognitiveservices_face/lib/1.0/generated/azure_cognitiveservices_face/person_group_operations.rb#L433-L435 | train | Updates a person group s coverages. | [
30522,
13366,
10651,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
2711,
1035,
2177,
1035,
8909,
1010,
2171,
1024,
9152,
2140,
1010,
5310,
1035,
2951,
1024,
9152,
2140,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
10651,
1035,
2004,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
fastlane/fastlane | spaceship/lib/spaceship/tunes/tunes_client.rb | Spaceship.TunesClient.create_application! | def create_application!(name: nil, primary_language: nil, version: nil, sku: nil, bundle_id: nil, bundle_id_suffix: nil, company_name: nil, platform: nil, itunes_connect_users: nil)
puts("The `version` parameter is deprecated. Use `Spaceship::Tunes::Application.ensure_version!` method instead") if version
... | ruby | def create_application!(name: nil, primary_language: nil, version: nil, sku: nil, bundle_id: nil, bundle_id_suffix: nil, company_name: nil, platform: nil, itunes_connect_users: nil)
puts("The `version` parameter is deprecated. Use `Spaceship::Tunes::Application.ensure_version!` method instead") if version
... | [
"def",
"create_application!",
"(",
"name",
":",
"nil",
",",
"primary_language",
":",
"nil",
",",
"version",
":",
"nil",
",",
"sku",
":",
"nil",
",",
"bundle_id",
":",
"nil",
",",
"bundle_id_suffix",
":",
"nil",
",",
"company_name",
":",
"nil",
",",
"plat... | Creates a new application on App Store Connect
@param name (String): The name of your app as it will appear on the App Store.
This can't be longer than 255 characters.
@param primary_language (String): If localized app information isn't available in an
App Store territory, the information from your primary lang... | [
"Creates",
"a",
"new",
"application",
"on",
"App",
"Store",
"Connect"
] | 457c5d647c77f0e078dafa5129da616914e002c5 | https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/spaceship/lib/spaceship/tunes/tunes_client.rb#L289-L326 | train | Create an application | [
30522,
13366,
3443,
1035,
4646,
999,
1006,
2171,
1024,
9152,
2140,
1010,
3078,
1035,
2653,
1024,
9152,
2140,
1010,
2544,
1024,
9152,
2140,
1010,
15315,
2226,
1024,
9152,
2140,
1010,
14012,
1035,
8909,
1024,
9152,
2140,
1010,
14012,
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... |
hashicorp/vault-ruby | lib/vault/api/sys/mount.rb | Vault.Sys.mounts | def mounts
json = client.get("/v1/sys/mounts")
json = json[:data] if json[:data]
return Hash[*json.map do |k,v|
[k.to_s.chomp("/").to_sym, Mount.decode(v)]
end.flatten]
end | ruby | def mounts
json = client.get("/v1/sys/mounts")
json = json[:data] if json[:data]
return Hash[*json.map do |k,v|
[k.to_s.chomp("/").to_sym, Mount.decode(v)]
end.flatten]
end | [
"def",
"mounts",
"json",
"=",
"client",
".",
"get",
"(",
"\"/v1/sys/mounts\"",
")",
"json",
"=",
"json",
"[",
":data",
"]",
"if",
"json",
"[",
":data",
"]",
"return",
"Hash",
"[",
"json",
".",
"map",
"do",
"|",
"k",
",",
"v",
"|",
"[",
"k",
".",
... | List all mounts in the vault.
@example
Vault.sys.mounts #=> { :secret => #<struct Vault::Mount type="generic", description="generic secret storage"> }
@return [Hash<Symbol, Mount>] | [
"List",
"all",
"mounts",
"in",
"the",
"vault",
"."
] | 02f0532a802ba1a2a0d8703a4585dab76eb9d864 | https://github.com/hashicorp/vault-ruby/blob/02f0532a802ba1a2a0d8703a4585dab76eb9d864/lib/vault/api/sys/mount.rb#L28-L34 | train | Returns a hash of all the mounts that are available for this system. | [
30522,
13366,
19363,
1046,
3385,
1027,
7396,
1012,
2131,
1006,
1000,
1013,
1058,
2487,
1013,
25353,
2015,
1013,
19363,
1000,
1007,
1046,
3385,
1027,
1046,
3385,
1031,
1024,
2951,
1033,
2065,
1046,
3385,
1031,
1024,
2951,
1033,
2709,
23325,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
sds/overcommit | lib/overcommit/configuration.rb | Overcommit.Configuration.apply_environment! | def apply_environment!(hook_context, env)
skipped_hooks = "#{env['SKIP']} #{env['SKIP_CHECKS']} #{env['SKIP_HOOKS']}".split(/[:, ]/)
only_hooks = env.fetch('ONLY') { '' }.split(/[:, ]/)
hook_type = hook_context.hook_class_name
if only_hooks.any? || skipped_hooks.include?('all') || skipped_hooks... | ruby | def apply_environment!(hook_context, env)
skipped_hooks = "#{env['SKIP']} #{env['SKIP_CHECKS']} #{env['SKIP_HOOKS']}".split(/[:, ]/)
only_hooks = env.fetch('ONLY') { '' }.split(/[:, ]/)
hook_type = hook_context.hook_class_name
if only_hooks.any? || skipped_hooks.include?('all') || skipped_hooks... | [
"def",
"apply_environment!",
"(",
"hook_context",
",",
"env",
")",
"skipped_hooks",
"=",
"\"#{env['SKIP']} #{env['SKIP_CHECKS']} #{env['SKIP_HOOKS']}\"",
".",
"split",
"(",
"/",
"/",
")",
"only_hooks",
"=",
"env",
".",
"fetch",
"(",
"'ONLY'",
")",
"{",
"''",
"}",
... | Applies additional configuration settings based on the provided
environment variables. | [
"Applies",
"additional",
"configuration",
"settings",
"based",
"on",
"the",
"provided",
"environment",
"variables",
"."
] | 35d60adb41da942178b789560968e3ad030b0ac7 | https://github.com/sds/overcommit/blob/35d60adb41da942178b789560968e3ad030b0ac7/lib/overcommit/configuration.rb#L157-L179 | train | Apply the environment to the current object. | [
30522,
13366,
6611,
1035,
4044,
999,
1006,
8103,
1035,
6123,
1010,
4372,
2615,
1007,
16791,
1035,
18008,
1027,
1000,
1001,
1063,
4372,
2615,
1031,
1005,
13558,
1005,
1033,
1065,
1001,
1063,
4372,
2615,
1031,
1005,
13558,
1035,
14148,
1005,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_network/lib/2018-08-01/generated/azure_mgmt_network/network_watchers.rb | Azure::Network::Mgmt::V2018_08_01.NetworkWatchers.begin_get_network_configuration_diagnostic_with_http_info | def begin_get_network_configuration_diagnostic_with_http_info(resource_group_name, network_watcher_name, parameters, custom_headers:nil)
begin_get_network_configuration_diagnostic_async(resource_group_name, network_watcher_name, parameters, custom_headers:custom_headers).value!
end | ruby | def begin_get_network_configuration_diagnostic_with_http_info(resource_group_name, network_watcher_name, parameters, custom_headers:nil)
begin_get_network_configuration_diagnostic_async(resource_group_name, network_watcher_name, parameters, custom_headers:custom_headers).value!
end | [
"def",
"begin_get_network_configuration_diagnostic_with_http_info",
"(",
"resource_group_name",
",",
"network_watcher_name",
",",
"parameters",
",",
"custom_headers",
":",
"nil",
")",
"begin_get_network_configuration_diagnostic_async",
"(",
"resource_group_name",
",",
"network_watc... | Get network configuration diagnostic.
@param resource_group_name [String] The name of the resource group.
@param network_watcher_name [String] The name of the network watcher.
@param parameters [NetworkConfigurationDiagnosticParameters] Parameters to
get network configuration diagnostic.
@param custom_headers [Ha... | [
"Get",
"network",
"configuration",
"diagnostic",
"."
] | 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#L2514-L2516 | train | Gets the network configuration diagnostic. | [
30522,
13366,
4088,
1035,
2131,
1035,
2897,
1035,
9563,
1035,
16474,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2897,
1035,
3422,
2121,
1035,
2171,
1010,
11709,
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... |
piotrmurach/github | lib/github_api/api.rb | Github.API.execute | def execute(action, *args, &block)
action_name = action.to_s.gsub(/_with(out)?_callback_.*$/, '')
result = nil
run_callbacks(action_name) do
result = send(action, *args, &block)
end
result
end | ruby | def execute(action, *args, &block)
action_name = action.to_s.gsub(/_with(out)?_callback_.*$/, '')
result = nil
run_callbacks(action_name) do
result = send(action, *args, &block)
end
result
end | [
"def",
"execute",
"(",
"action",
",",
"*",
"args",
",",
"&",
"block",
")",
"action_name",
"=",
"action",
".",
"to_s",
".",
"gsub",
"(",
"/",
"/",
",",
"''",
")",
"result",
"=",
"nil",
"run_callbacks",
"(",
"action_name",
")",
"do",
"result",
"=",
"... | Execute action
@param [Symbol] action
@api private | [
"Execute",
"action"
] | 8702452c66bea33c9388550aed9e9974f76aaef1 | https://github.com/piotrmurach/github/blob/8702452c66bea33c9388550aed9e9974f76aaef1/lib/github_api/api.rb#L246-L253 | train | Execute an action on the current thread. | [
30522,
13366,
15389,
1006,
2895,
1010,
1008,
12098,
5620,
1010,
1004,
3796,
1007,
2895,
1035,
2171,
1027,
2895,
1012,
2000,
1035,
1055,
1012,
28177,
12083,
1006,
1013,
30524,
2765,
1027,
4604,
1006,
2895,
1010,
1008,
12098,
5620,
1010,
1004... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
aws/aws-sdk-ruby | gems/aws-sdk-s3/lib/aws-sdk-s3/client.rb | Aws::S3.Client.get_object_torrent | def get_object_torrent(params = {}, options = {}, &block)
req = build_request(:get_object_torrent, params)
req.send_request(options, &block)
end | ruby | def get_object_torrent(params = {}, options = {}, &block)
req = build_request(:get_object_torrent, params)
req.send_request(options, &block)
end | [
"def",
"get_object_torrent",
"(",
"params",
"=",
"{",
"}",
",",
"options",
"=",
"{",
"}",
",",
"&",
"block",
")",
"req",
"=",
"build_request",
"(",
":get_object_torrent",
",",
"params",
")",
"req",
".",
"send_request",
"(",
"options",
",",
"block",
")",
... | Return torrent files from a bucket.
@option params [String, IO] :response_target
Where to write response data, file path, or IO object.
@option params [required, String] :bucket
@option params [required, String] :key
@option params [String] :request_payer
Confirms that the requester knows that she or he w... | [
"Return",
"torrent",
"files",
"from",
"a",
"bucket",
"."
] | e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d | https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-s3/lib/aws-sdk-s3/client.rb#L3273-L3276 | train | Get object torrent | [
30522,
13366,
2131,
1035,
4874,
1035,
22047,
3372,
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,
4874,
1035,
22047,
3372,
1010,
11498,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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 | def get_node_info(node_name, timeout:60, custom_headers:nil)
response = get_node_info_async(node_name, timeout:timeout, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def get_node_info(node_name, timeout:60, custom_headers:nil)
response = get_node_info_async(node_name, timeout:timeout, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"get_node_info",
"(",
"node_name",
",",
"timeout",
":",
"60",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"get_node_info_async",
"(",
"node_name",
",",
"timeout",
":",
"timeout",
",",
"custom_headers",
":custom_headers",
")",
".",
"value!",
... | Gets the information about a specific node in the Service Fabric cluster.
Gets the information about a specific node in the Service Fabric Cluster. The
response includes the name, status, id, health, uptime, and other details
about the node.
@param node_name [String] The name of the node.
@param timeout [Integer... | [
"Gets",
"the",
"information",
"about",
"a",
"specific",
"node",
"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#L3363-L3366 | train | Gets information about the node. | [
30522,
13366,
2131,
1035,
13045,
1035,
18558,
1006,
13045,
1035,
2171,
1010,
2051,
5833,
1024,
3438,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
2131,
1035,
13045,
1035,
18558,
1035,
2004,
6038,
2278,
1006,
13045,
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... |
aws/aws-sdk-ruby | gems/aws-sdk-ec2/lib/aws-sdk-ec2/instance.rb | Aws::EC2.Instance.terminate | def terminate(options = {})
options = Aws::Util.deep_merge(options, instance_ids: [@id])
resp = @client.terminate_instances(options)
resp.data
end | ruby | def terminate(options = {})
options = Aws::Util.deep_merge(options, instance_ids: [@id])
resp = @client.terminate_instances(options)
resp.data
end | [
"def",
"terminate",
"(",
"options",
"=",
"{",
"}",
")",
"options",
"=",
"Aws",
"::",
"Util",
".",
"deep_merge",
"(",
"options",
",",
"instance_ids",
":",
"[",
"@id",
"]",
")",
"resp",
"=",
"@client",
".",
"terminate_instances",
"(",
"options",
")",
"re... | @example Request syntax with placeholder values
instance.terminate({
dry_run: false,
})
@param [Hash] options ({})
@option options [Boolean] :dry_run
Checks whether you have the required permissions for the action,
without actually making the request, and provides an error response.
If you have t... | [
"@example",
"Request",
"syntax",
"with",
"placeholder",
"values"
] | e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d | https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-ec2/lib/aws-sdk-ec2/instance.rb#L1196-L1200 | train | Terminate the instance | [
30522,
13366,
20320,
1006,
7047,
1027,
1063,
1065,
1007,
7047,
1027,
22091,
2015,
1024,
1024,
21183,
4014,
1012,
2784,
1035,
13590,
1006,
7047,
1010,
6013,
1035,
8909,
2015,
1024,
1031,
1030,
8909,
1033,
1007,
24501,
2361,
1027,
1030,
7396,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
httprb/http | lib/http/chainable.rb | HTTP.Chainable.persistent | def persistent(host, timeout: 5)
options = {:keep_alive_timeout => timeout}
p_client = branch default_options.merge(options).with_persistent host
return p_client unless block_given?
yield p_client
ensure
p_client.close if p_client
end | ruby | def persistent(host, timeout: 5)
options = {:keep_alive_timeout => timeout}
p_client = branch default_options.merge(options).with_persistent host
return p_client unless block_given?
yield p_client
ensure
p_client.close if p_client
end | [
"def",
"persistent",
"(",
"host",
",",
"timeout",
":",
"5",
")",
"options",
"=",
"{",
":keep_alive_timeout",
"=>",
"timeout",
"}",
"p_client",
"=",
"branch",
"default_options",
".",
"merge",
"(",
"options",
")",
".",
"with_persistent",
"host",
"return",
"p_c... | @overload persistent(host, timeout: 5)
Flags as persistent
@param [String] host
@option [Integer] timeout Keep alive timeout
@raise [Request::Error] if Host is invalid
@return [HTTP::Client] Persistent client
@overload persistent(host, timeout: 5, &block)
Executes given block with persistent client... | [
"@overload",
"persistent",
"(",
"host",
"timeout",
":",
"5",
")",
"Flags",
"as",
"persistent",
"@param",
"[",
"String",
"]",
"host",
"@option",
"[",
"Integer",
"]",
"timeout",
"Keep",
"alive",
"timeout",
"@raise",
"[",
"Request",
"::",
"Error",
"]",
"if",
... | f37a10ea4fab3ee411907ea2e4251ddf0ca33a93 | https://github.com/httprb/http/blob/f37a10ea4fab3ee411907ea2e4251ddf0ca33a93/lib/http/chainable.rb#L143-L150 | train | Create a persistent client | [
30522,
13366,
14516,
1006,
3677,
1010,
2051,
5833,
1024,
1019,
1007,
7047,
1027,
1063,
1024,
2562,
1035,
4142,
1035,
2051,
5833,
1027,
1028,
2051,
5833,
1065,
1052,
1035,
7396,
1027,
3589,
12398,
1035,
7047,
1012,
13590,
1006,
7047,
1007,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.