repo stringclasses 235
values | path stringlengths 11 168 | func_name stringlengths 12 143 | original_string stringlengths 83 6.91k | language stringclasses 1
value | code stringlengths 83 6.91k | code_tokens listlengths 15 1.01k | docstring stringlengths 5 25.7k | docstring_tokens listlengths 1 427 | sha stringclasses 235
values | url stringlengths 99 268 | partition stringclasses 1
value | summary stringlengths 7 202 | input_ids listlengths 502 502 | token_type_ids listlengths 502 502 | attention_mask listlengths 502 502 | labels listlengths 502 502 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
sds/haml-lint | lib/haml_lint/cli.rb | HamlLint.CLI.reporter_from_options | def reporter_from_options(options)
if options[:auto_gen_config]
HamlLint::Reporter::DisabledConfigReporter.new(log, limit: options[:auto_gen_exclude_limit] || 15) # rubocop:disable Metrics/LineLength
else
options.fetch(:reporter, HamlLint::Reporter::DefaultReporter).new(log)
end
en... | ruby | def reporter_from_options(options)
if options[:auto_gen_config]
HamlLint::Reporter::DisabledConfigReporter.new(log, limit: options[:auto_gen_exclude_limit] || 15) # rubocop:disable Metrics/LineLength
else
options.fetch(:reporter, HamlLint::Reporter::DefaultReporter).new(log)
end
en... | [
"def",
"reporter_from_options",
"(",
"options",
")",
"if",
"options",
"[",
":auto_gen_config",
"]",
"HamlLint",
"::",
"Reporter",
"::",
"DisabledConfigReporter",
".",
"new",
"(",
"log",
",",
"limit",
":",
"options",
"[",
":auto_gen_exclude_limit",
"]",
"||",
"15... | Instantiates a new reporter based on the options.
@param options [HamlLint::Configuration]
@option options [true, nil] :auto_gen_config whether to use the config
generating reporter
@option options [Class] :reporter the class of reporter to use
@return [HamlLint::Reporter] | [
"Instantiates",
"a",
"new",
"reporter",
"based",
"on",
"the",
"options",
"."
] | 024c773667e54cf88db938c2b368977005d70ee8 | https://github.com/sds/haml-lint/blob/024c773667e54cf88db938c2b368977005d70ee8/lib/haml_lint/cli.rb#L95-L101 | train | Returns a reporter object from the options hash | [
30522,
13366,
6398,
1035,
2013,
1035,
7047,
1006,
7047,
1007,
2065,
7047,
1031,
1024,
8285,
1035,
8991,
1035,
9530,
8873,
2290,
1033,
10654,
21202,
2102,
1024,
1024,
6398,
1024,
1024,
9776,
8663,
8873,
17603,
6442,
2121,
1012,
2047,
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... |
refile/refile | lib/refile/rails/attachment_helper.rb | Refile.AttachmentHelper.attachment_cache_field | def attachment_cache_field(object_name, method, object:, **options)
options[:data] ||= {}
options[:data][:reference] ||= SecureRandom.hex
attacher_value = object.send("#{method}_data")
hidden_options = {
multiple: options[:multiple],
value: attacher_value.try(:to_json),
... | ruby | def attachment_cache_field(object_name, method, object:, **options)
options[:data] ||= {}
options[:data][:reference] ||= SecureRandom.hex
attacher_value = object.send("#{method}_data")
hidden_options = {
multiple: options[:multiple],
value: attacher_value.try(:to_json),
... | [
"def",
"attachment_cache_field",
"(",
"object_name",
",",
"method",
",",
"object",
":",
",",
"**",
"options",
")",
"options",
"[",
":data",
"]",
"||=",
"{",
"}",
"options",
"[",
":data",
"]",
"[",
":reference",
"]",
"||=",
"SecureRandom",
".",
"hex",
"at... | Generates a hidden form field which tracks the id of the file in the cache
before it is permanently stored.
@param object_name The name of the object to generate a field for
@param method The name of the field
@param [Hash] options
@option options [Object] object S... | [
"Generates",
"a",
"hidden",
"form",
"field",
"which",
"tracks",
"the",
"id",
"of",
"the",
"file",
"in",
"the",
"cache",
"before",
"it",
"is",
"permanently",
"stored",
"."
] | e910f5ca5a9060c307bd0a5e813f1fec73219ed5 | https://github.com/refile/refile/blob/e910f5ca5a9060c307bd0a5e813f1fec73219ed5/lib/refile/rails/attachment_helper.rb#L105-L122 | train | Returns a hidden field for the attachment cache | [
30522,
13366,
14449,
1035,
17053,
1035,
2492,
1006,
4874,
1035,
2171,
1010,
4118,
1010,
4874,
1024,
1010,
1008,
1008,
7047,
1007,
7047,
1031,
1024,
2951,
1033,
1064,
1064,
1027,
1063,
1065,
7047,
1031,
1024,
2951,
1033,
1031,
1024,
4431,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
github-changelog-generator/github-changelog-generator | lib/github_changelog_generator/generator/generator_processor.rb | GitHubChangelogGenerator.Generator.filter_by_tag | def filter_by_tag(issues, newer_tag = nil)
issues.select do |issue|
issue["first_occurring_tag"] == (newer_tag.nil? ? nil : newer_tag["name"])
end
end | ruby | def filter_by_tag(issues, newer_tag = nil)
issues.select do |issue|
issue["first_occurring_tag"] == (newer_tag.nil? ? nil : newer_tag["name"])
end
end | [
"def",
"filter_by_tag",
"(",
"issues",
",",
"newer_tag",
"=",
"nil",
")",
"issues",
".",
"select",
"do",
"|",
"issue",
"|",
"issue",
"[",
"\"first_occurring_tag\"",
"]",
"==",
"(",
"newer_tag",
".",
"nil?",
"?",
"nil",
":",
"newer_tag",
"[",
"\"name\"",
... | Method filter issues, that belong only specified tag range
@param [Array] issues issues to filter
@param [Hash, Nil] newer_tag Tag to find PRs of. May be nil for unreleased section
@return [Array] filtered issues | [
"Method",
"filter",
"issues",
"that",
"belong",
"only",
"specified",
"tag",
"range"
] | f18c64b5cc0d7473b059275b88385ac11ca8b564 | https://github.com/github-changelog-generator/github-changelog-generator/blob/f18c64b5cc0d7473b059275b88385ac11ca8b564/lib/github_changelog_generator/generator/generator_processor.rb#L84-L88 | train | Filter by tag | [
30522,
13366,
11307,
1035,
2011,
1035,
6415,
1006,
3314,
1010,
10947,
1035,
6415,
1027,
9152,
2140,
1007,
3314,
1012,
7276,
2079,
1064,
3277,
1064,
3277,
1031,
1000,
2034,
1035,
10066,
1035,
6415,
1000,
1033,
1027,
1027,
1006,
10947,
1035,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
fastlane/fastlane | fastlane/lib/fastlane/commands_generator.rb | Fastlane.CommandsGenerator.ensure_fastfile | def ensure_fastfile
return true if FastlaneCore::FastlaneFolder.setup?
create = UI.confirm('Could not find fastlane in current directory. Make sure to have your fastlane configuration files inside a folder called "fastlane". Would you like to set fastlane up?')
if create
Fastlane::Setup.start... | ruby | def ensure_fastfile
return true if FastlaneCore::FastlaneFolder.setup?
create = UI.confirm('Could not find fastlane in current directory. Make sure to have your fastlane configuration files inside a folder called "fastlane". Would you like to set fastlane up?')
if create
Fastlane::Setup.start... | [
"def",
"ensure_fastfile",
"return",
"true",
"if",
"FastlaneCore",
"::",
"FastlaneFolder",
".",
"setup?",
"create",
"=",
"UI",
".",
"confirm",
"(",
"'Could not find fastlane in current directory. Make sure to have your fastlane configuration files inside a folder called \"fastlane\". ... | Makes sure a Fastfile is available
Shows an appropriate message to the user
if that's not the case
return true if the Fastfile is available | [
"Makes",
"sure",
"a",
"Fastfile",
"is",
"available",
"Shows",
"an",
"appropriate",
"message",
"to",
"the",
"user",
"if",
"that",
"s",
"not",
"the",
"case",
"return",
"true",
"if",
"the",
"Fastfile",
"is",
"available"
] | 457c5d647c77f0e078dafa5129da616914e002c5 | https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/fastlane/lib/fastlane/commands_generator.rb#L340-L348 | train | Ensure that the fastfile is available | [
30522,
13366,
5676,
1035,
3435,
8873,
2571,
2709,
2995,
2065,
3435,
20644,
17345,
1024,
1024,
3435,
20644,
10371,
2121,
1012,
16437,
1029,
3443,
1027,
21318,
1012,
12210,
1006,
1005,
2071,
2025,
2424,
3435,
20644,
1999,
2783,
14176,
1012,
2... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
rmosolgo/graphql-ruby | lib/graphql/union_type.rb | GraphQL.UnionType.get_possible_type | def get_possible_type(type_name, ctx)
type = ctx.query.get_type(type_name)
type if type && ctx.query.schema.possible_types(self).include?(type)
end | ruby | def get_possible_type(type_name, ctx)
type = ctx.query.get_type(type_name)
type if type && ctx.query.schema.possible_types(self).include?(type)
end | [
"def",
"get_possible_type",
"(",
"type_name",
",",
"ctx",
")",
"type",
"=",
"ctx",
".",
"query",
".",
"get_type",
"(",
"type_name",
")",
"type",
"if",
"type",
"&&",
"ctx",
".",
"query",
".",
"schema",
".",
"possible_types",
"(",
"self",
")",
".",
"incl... | Get a possible type of this {UnionType} by type name
@param type_name [String]
@param ctx [GraphQL::Query::Context] The context for the current query
@return [GraphQL::ObjectType, nil] The type named `type_name` if it exists and is a member of this {UnionType}, (else `nil`) | [
"Get",
"a",
"possible",
"type",
"of",
"this",
"{",
"UnionType",
"}",
"by",
"type",
"name"
] | d5be13a816f220b9efbabeaa69a3e56fedf311f5 | https://github.com/rmosolgo/graphql-ruby/blob/d5be13a816f220b9efbabeaa69a3e56fedf311f5/lib/graphql/union_type.rb#L74-L77 | train | Get possible type from the schema | [
30522,
13366,
2131,
1035,
2825,
1035,
2828,
1006,
2828,
1035,
2171,
1010,
14931,
2595,
1007,
2828,
1027,
14931,
2595,
1012,
23032,
1012,
2131,
1035,
2828,
1006,
2828,
1035,
2171,
1007,
2828,
2065,
2828,
1004,
1004,
14931,
2595,
1012,
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... |
samvera/hyrax | app/helpers/hyrax/hyrax_helper_behavior.rb | Hyrax.HyraxHelperBehavior.link_to_profile | def link_to_profile(args)
user_or_key = args.is_a?(Hash) ? args[:value].first : args
user = case user_or_key
when User
user_or_key
when String
::User.find_by_user_key(user_or_key)
end
return user_or_key if user.nil?
text = user... | ruby | def link_to_profile(args)
user_or_key = args.is_a?(Hash) ? args[:value].first : args
user = case user_or_key
when User
user_or_key
when String
::User.find_by_user_key(user_or_key)
end
return user_or_key if user.nil?
text = user... | [
"def",
"link_to_profile",
"(",
"args",
")",
"user_or_key",
"=",
"args",
".",
"is_a?",
"(",
"Hash",
")",
"?",
"args",
"[",
":value",
"]",
".",
"first",
":",
"args",
"user",
"=",
"case",
"user_or_key",
"when",
"User",
"user_or_key",
"when",
"String",
"::",... | *Sometimes* a Blacklight index field helper_method
@param [String,User,Hash{Symbol=>Array}] args if a hash, the user_key must be under :value
@return [ActiveSupport::SafeBuffer] the html_safe link | [
"*",
"Sometimes",
"*",
"a",
"Blacklight",
"index",
"field",
"helper_method"
] | e2b4f56e829a53b1f11296324736e9d5b8c9ee5f | https://github.com/samvera/hyrax/blob/e2b4f56e829a53b1f11296324736e9d5b8c9ee5f/app/helpers/hyrax/hyrax_helper_behavior.rb#L188-L199 | train | Link to a user | [
30522,
13366,
4957,
1035,
2000,
1035,
6337,
1006,
12098,
5620,
1007,
5310,
1035,
2030,
1035,
3145,
1027,
12098,
5620,
1012,
2003,
1035,
1037,
1029,
1006,
23325,
1007,
1029,
12098,
5620,
1031,
1024,
3643,
1033,
1012,
2034,
1024,
12098,
5620,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
gocardless/ibandit | lib/ibandit/iban.rb | Ibandit.IBAN.valid? | def valid?
has_iban = !iban.nil?
has_pseudo_iban = !pseudo_iban.nil?
if has_pseudo_iban && !has_iban
valid_pseudo_iban?
else
valid_iban?
end
end | ruby | def valid?
has_iban = !iban.nil?
has_pseudo_iban = !pseudo_iban.nil?
if has_pseudo_iban && !has_iban
valid_pseudo_iban?
else
valid_iban?
end
end | [
"def",
"valid?",
"has_iban",
"=",
"!",
"iban",
".",
"nil?",
"has_pseudo_iban",
"=",
"!",
"pseudo_iban",
".",
"nil?",
"if",
"has_pseudo_iban",
"&&",
"!",
"has_iban",
"valid_pseudo_iban?",
"else",
"valid_iban?",
"end",
"end"
] | Validations | [
"Validations"
] | 675a4437e9de6c101c5a5b29f978a710fd35cb2c | https://github.com/gocardless/ibandit/blob/675a4437e9de6c101c5a5b29f978a710fd35cb2c/lib/ibandit/iban.rb#L93-L102 | train | Checks if the given object is valid for the given object. | [
30522,
13366,
9398,
1029,
2038,
1035,
21307,
2319,
1027,
999,
21307,
2319,
1012,
9152,
2140,
1029,
2038,
1035,
18404,
1035,
21307,
2319,
1027,
999,
18404,
1035,
21307,
2319,
1012,
9152,
2140,
1029,
2065,
2038,
1035,
18404,
1035,
21307,
2319... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | data/azure_service_fabric/lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb | Azure::ServiceFabric::V6_2_0_9.ServiceFabricClientAPIs.provision_cluster_async | def provision_cluster_async(provision_fabric_description, timeout:60, custom_headers:nil)
api_version = '6.0'
fail ArgumentError, 'provision_fabric_description is nil' if provision_fabric_description.nil?
fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" ... | ruby | def provision_cluster_async(provision_fabric_description, timeout:60, custom_headers:nil)
api_version = '6.0'
fail ArgumentError, 'provision_fabric_description is nil' if provision_fabric_description.nil?
fail ArgumentError, "'timeout' should satisfy the constraint - 'InclusiveMaximum': '4294967295'" ... | [
"def",
"provision_cluster_async",
"(",
"provision_fabric_description",
",",
"timeout",
":",
"60",
",",
"custom_headers",
":",
"nil",
")",
"api_version",
"=",
"'6.0'",
"fail",
"ArgumentError",
",",
"'provision_fabric_description is nil'",
"if",
"provision_fabric_description"... | Provision the code or configuration packages of a Service Fabric cluster.
Validate and provision the code or configuration packages of a Service Fabric
cluster.
@param provision_fabric_description [ProvisionFabricDescription] Describes
the parameters for provisioning a cluster.
@param timeout [Integer] The serve... | [
"Provision",
"the",
"code",
"or",
"configuration",
"packages",
"of",
"a",
"Service",
"Fabric",
"cluster",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_service_fabric/lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb#L2401-L2448 | train | Provision a cluster | [
30522,
13366,
9347,
1035,
9324,
1035,
2004,
6038,
2278,
1006,
9347,
1035,
8313,
1035,
6412,
1010,
2051,
5833,
1024,
3438,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
17928,
1035,
2544,
1027,
1005,
1020,
1012,
1014,
1005,
8246,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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.annotate | def annotate(draw, width, height, x, y, text, &block)
check_destroyed
draw.annotate(self, width, height, x, y, text, &block)
self
end | ruby | def annotate(draw, width, height, x, y, text, &block)
check_destroyed
draw.annotate(self, width, height, x, y, text, &block)
self
end | [
"def",
"annotate",
"(",
"draw",
",",
"width",
",",
"height",
",",
"x",
",",
"y",
",",
"text",
",",
"&",
"block",
")",
"check_destroyed",
"draw",
".",
"annotate",
"(",
"self",
",",
"width",
",",
"height",
",",
"x",
",",
"y",
",",
"text",
",",
"blo... | Provide an alternate version of Draw#annotate, for folks who
want to find it in this class. | [
"Provide",
"an",
"alternate",
"version",
"of",
"Draw#annotate",
"for",
"folks",
"who",
"want",
"to",
"find",
"it",
"in",
"this",
"class",
"."
] | ef6688ed9d76bf123c2ea1a483eff8635051adb7 | https://github.com/rmagick/rmagick/blob/ef6688ed9d76bf123c2ea1a483eff8635051adb7/lib/rmagick_internal.rb#L756-L760 | train | annotate the image with the given text. | [
30522,
13366,
5754,
17287,
2618,
1006,
4009,
1010,
9381,
1010,
4578,
1010,
1060,
1010,
1061,
1010,
3793,
1010,
1004,
3796,
1007,
4638,
1035,
3908,
4009,
1012,
5754,
17287,
2618,
1006,
2969,
1010,
9381,
1010,
4578,
1010,
1060,
1010,
1061,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/site.rb | Jekyll.Site.find_converter_instance | def find_converter_instance(klass)
@find_converter_instance ||= {}
@find_converter_instance[klass] ||= begin
converters.find { |converter| converter.instance_of?(klass) } || \
raise("No Converters found for #{klass}")
end
end | ruby | def find_converter_instance(klass)
@find_converter_instance ||= {}
@find_converter_instance[klass] ||= begin
converters.find { |converter| converter.instance_of?(klass) } || \
raise("No Converters found for #{klass}")
end
end | [
"def",
"find_converter_instance",
"(",
"klass",
")",
"@find_converter_instance",
"||=",
"{",
"}",
"@find_converter_instance",
"[",
"klass",
"]",
"||=",
"begin",
"converters",
".",
"find",
"{",
"|",
"converter",
"|",
"converter",
".",
"instance_of?",
"(",
"klass",
... | Get the implementation class for the given Converter.
Returns the Converter instance implementing the given Converter.
klass - The Class of the Converter to fetch. | [
"Get",
"the",
"implementation",
"class",
"for",
"the",
"given",
"Converter",
".",
"Returns",
"the",
"Converter",
"instance",
"implementing",
"the",
"given",
"Converter",
".",
"klass",
"-",
"The",
"Class",
"of",
"the",
"Converter",
"to",
"fetch",
"."
] | fd74fe3e93a1fb506fa6621a2e271d7b9c5c3e3b | https://github.com/jekyll/jekyll/blob/fd74fe3e93a1fb506fa6621a2e271d7b9c5c3e3b/lib/jekyll/site.rb#L292-L298 | train | Find the Converter instance for a given class. | [
30522,
13366,
2424,
1035,
10463,
2121,
1035,
6013,
1006,
1047,
30524,
2424,
1063,
1064,
10463,
2121,
1064,
10463,
2121,
1012,
6013,
1035,
1997,
1029,
1006,
1047,
27102,
1007,
1065,
1064,
1064,
1032,
5333,
1006,
1000,
2053,
10463,
2545,
2179... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
roo-rb/roo | lib/roo/open_office.rb | Roo.OpenOffice.font | def font(row, col, sheet = nil)
sheet ||= default_sheet
read_cells(sheet)
row, col = normalize(row, col)
style_name = @style[sheet][[row, col]] || @style_defaults[sheet][col - 1] || 'Default'
@font_style_definitions[style_name]
end | ruby | def font(row, col, sheet = nil)
sheet ||= default_sheet
read_cells(sheet)
row, col = normalize(row, col)
style_name = @style[sheet][[row, col]] || @style_defaults[sheet][col - 1] || 'Default'
@font_style_definitions[style_name]
end | [
"def",
"font",
"(",
"row",
",",
"col",
",",
"sheet",
"=",
"nil",
")",
"sheet",
"||=",
"default_sheet",
"read_cells",
"(",
"sheet",
")",
"row",
",",
"col",
"=",
"normalize",
"(",
"row",
",",
"col",
")",
"style_name",
"=",
"@style",
"[",
"sheet",
"]",
... | Given a cell, return the cell's style | [
"Given",
"a",
"cell",
"return",
"the",
"cell",
"s",
"style"
] | 4ec1104f0c3c2a29711c0c907371cd2be12bcc3c | https://github.com/roo-rb/roo/blob/4ec1104f0c3c2a29711c0c907371cd2be12bcc3c/lib/roo/open_office.rb#L134-L140 | train | Returns the font definition for a given cell | [
30522,
13366,
15489,
1006,
5216,
1010,
8902,
1010,
7123,
1027,
9152,
2140,
1007,
7123,
1064,
1064,
1027,
12398,
1035,
7123,
3191,
1035,
4442,
1006,
7123,
1007,
5216,
1010,
8902,
1027,
3671,
4697,
1006,
5216,
1010,
8902,
1007,
2806,
1035,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_recovery_services_site_recovery/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/replicationv_centers.rb | Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10.ReplicationvCenters.begin_update_with_http_info | def begin_update_with_http_info(fabric_name, v_center_name, update_vcenter_request, custom_headers:nil)
begin_update_async(fabric_name, v_center_name, update_vcenter_request, custom_headers:custom_headers).value!
end | ruby | def begin_update_with_http_info(fabric_name, v_center_name, update_vcenter_request, custom_headers:nil)
begin_update_async(fabric_name, v_center_name, update_vcenter_request, custom_headers:custom_headers).value!
end | [
"def",
"begin_update_with_http_info",
"(",
"fabric_name",
",",
"v_center_name",
",",
"update_vcenter_request",
",",
"custom_headers",
":",
"nil",
")",
"begin_update_async",
"(",
"fabric_name",
",",
"v_center_name",
",",
"update_vcenter_request",
",",
"custom_headers",
":c... | Update vCenter operation.
The operation to update a registered vCenter.
@param fabric_name [String] Fabric name.
@param v_center_name [String] vCeneter name
@param update_vcenter_request [UpdateVCenterRequest] The input to the update
vCenter operation.
@param custom_headers [Hash{String => String}] A hash of cu... | [
"Update",
"vCenter",
"operation",
"."
] | 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/replicationv_centers.rb#L688-L690 | train | Updates a virtual network center. | [
30522,
13366,
4088,
1035,
10651,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
8313,
1035,
2171,
1010,
1058,
1035,
2415,
1035,
2171,
1010,
10651,
1035,
18315,
29110,
1035,
5227,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
4088,
1035... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
plaid/plaid-ruby | lib/plaid/products/asset_report.rb | Plaid.AssetReport.refresh | def refresh(asset_report_token, days_requested, options = {})
post_with_auth 'asset_report/refresh',
AssetReportRefreshResponse,
asset_report_token: asset_report_token,
days_requested: days_requested,
options: options
end | ruby | def refresh(asset_report_token, days_requested, options = {})
post_with_auth 'asset_report/refresh',
AssetReportRefreshResponse,
asset_report_token: asset_report_token,
days_requested: days_requested,
options: options
end | [
"def",
"refresh",
"(",
"asset_report_token",
",",
"days_requested",
",",
"options",
"=",
"{",
"}",
")",
"post_with_auth",
"'asset_report/refresh'",
",",
"AssetReportRefreshResponse",
",",
"asset_report_token",
":",
"asset_report_token",
",",
"days_requested",
":",
"days... | Public: Create a new, refreshed asset report.
asset_report_token - The asset report token for the asset report you want
to refresh.
days_requested - Days of transaction history requested to be included
in the Asset Report. Plaid will return as much data
... | [
"Public",
":",
"Create",
"a",
"new",
"refreshed",
"asset",
"report",
"."
] | ce3da1c5559c739de88c5f59e54eef875f296673 | https://github.com/plaid/plaid-ruby/blob/ce3da1c5559c739de88c5f59e54eef875f296673/lib/plaid/products/asset_report.rb#L55-L61 | train | Refresh an asset report | [
30522,
13366,
25416,
21898,
1006,
11412,
1035,
3189,
1035,
19204,
1010,
2420,
1035,
7303,
1010,
7047,
1027,
1063,
1065,
1007,
2695,
1035,
2007,
1035,
8740,
2705,
1005,
11412,
1035,
3189,
1013,
25416,
21898,
1005,
1010,
11412,
2890,
6442,
28... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/source_map_utils.rb | Sprockets.SourceMapUtils.decode_vlq_mappings | def decode_vlq_mappings(str, sources: [], names: [])
mappings = []
source_id = 0
original_line = 1
original_column = 0
name_id = 0
vlq_decode_mappings(str).each_with_index do |group, index|
generated_column = 0
generated_line = index + 1
g... | ruby | def decode_vlq_mappings(str, sources: [], names: [])
mappings = []
source_id = 0
original_line = 1
original_column = 0
name_id = 0
vlq_decode_mappings(str).each_with_index do |group, index|
generated_column = 0
generated_line = index + 1
g... | [
"def",
"decode_vlq_mappings",
"(",
"str",
",",
"sources",
":",
"[",
"]",
",",
"names",
":",
"[",
"]",
")",
"mappings",
"=",
"[",
"]",
"source_id",
"=",
"0",
"original_line",
"=",
"1",
"original_column",
"=",
"0",
"name_id",
"=",
"0",
"vlq_decode_mappings... | Public: Decode VLQ mappings and match up sources and symbol names.
str - VLQ string from 'mappings' attribute
sources - Array of Strings from 'sources' attribute
names - Array of Strings from 'names' attribute
Returns an Array of Mappings. | [
"Public",
":",
"Decode",
"VLQ",
"mappings",
"and",
"match",
"up",
"sources",
"and",
"symbol",
"names",
"."
] | 9e3f0d8e98c44f57e67bc138db87bb8469bf5ddd | https://github.com/rails/sprockets/blob/9e3f0d8e98c44f57e67bc138db87bb8469bf5ddd/lib/sprockets/source_map_utils.rb#L297-L337 | train | Decodula a string in the format of a VLQ - 2. 0. 0 | [
30522,
13366,
21933,
3207,
1035,
1058,
2140,
4160,
1035,
12375,
2015,
1006,
2358,
2099,
1010,
4216,
1024,
1031,
1033,
1010,
3415,
1024,
1031,
1033,
1007,
12375,
2015,
1027,
1031,
1033,
3120,
1035,
8909,
1027,
1014,
2434,
1035,
2240,
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... |
jnunemaker/httparty | lib/httparty.rb | HTTParty.ClassMethods.post | def post(path, options = {}, &block)
perform_request Net::HTTP::Post, path, options, &block
end | ruby | def post(path, options = {}, &block)
perform_request Net::HTTP::Post, path, options, &block
end | [
"def",
"post",
"(",
"path",
",",
"options",
"=",
"{",
"}",
",",
"&",
"block",
")",
"perform_request",
"Net",
"::",
"HTTP",
"::",
"Post",
",",
"path",
",",
"options",
",",
"block",
"end"
] | Allows making a post request to a url.
class Foo
include HTTParty
end
# Simple post with full url and setting the body
Foo.post('http://foo.com/resources', body: {bar: 'baz'})
# Simple post with full url using :query option,
# which appends the parameters to the URI.
Foo.post('http://foo.co... | [
"Allows",
"making",
"a",
"post",
"request",
"to",
"a",
"url",
"."
] | b4099defba01231d2faaaa2660476f867e096bfb | https://github.com/jnunemaker/httparty/blob/b4099defba01231d2faaaa2660476f867e096bfb/lib/httparty.rb#L522-L524 | train | Perform a POST request to the specified path. | [
30522,
13366,
2695,
1006,
4130,
1010,
7047,
1027,
1063,
1065,
1010,
1004,
3796,
1007,
4685,
1035,
5227,
5658,
1024,
1024,
8299,
1024,
1024,
2695,
1010,
4130,
1010,
7047,
1010,
1004,
3796,
2203,
102,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
rails/sprockets | lib/sprockets/context.rb | Sprockets.Context.svg_asset_data_uri | def svg_asset_data_uri(asset)
svg = asset.source.dup
optimize_svg_for_uri_escaping!(svg)
data = Rack::Utils.escape(svg)
optimize_quoted_uri_escapes!(data)
"\"data:#{asset.content_type};charset=utf-8,#{data}\""
end | ruby | def svg_asset_data_uri(asset)
svg = asset.source.dup
optimize_svg_for_uri_escaping!(svg)
data = Rack::Utils.escape(svg)
optimize_quoted_uri_escapes!(data)
"\"data:#{asset.content_type};charset=utf-8,#{data}\""
end | [
"def",
"svg_asset_data_uri",
"(",
"asset",
")",
"svg",
"=",
"asset",
".",
"source",
".",
"dup",
"optimize_svg_for_uri_escaping!",
"(",
"svg",
")",
"data",
"=",
"Rack",
"::",
"Utils",
".",
"escape",
"(",
"svg",
")",
"optimize_quoted_uri_escapes!",
"(",
"data",
... | Returns a URI-encoded data URI (always "-quoted). | [
"Returns",
"a",
"URI",
"-",
"encoded",
"data",
"URI",
"(",
"always",
"-",
"quoted",
")",
"."
] | 9e3f0d8e98c44f57e67bc138db87bb8469bf5ddd | https://github.com/rails/sprockets/blob/9e3f0d8e98c44f57e67bc138db87bb8469bf5ddd/lib/sprockets/context.rb#L262-L268 | train | Returns the data URI for an SVG asset | [
30522,
13366,
17917,
2290,
1035,
11412,
1035,
2951,
1035,
24471,
2072,
1006,
11412,
1007,
17917,
2290,
1027,
11412,
1012,
3120,
1012,
4241,
2361,
23569,
27605,
4371,
1035,
17917,
2290,
1035,
2005,
1035,
24471,
2072,
1035,
13002,
999,
1006,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | data/azure_service_fabric/lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb | Azure::ServiceFabric::V6_2_0_9.ServiceFabricClientAPIs.get_deployed_application_health_using_policy_with_http_info | def get_deployed_application_health_using_policy_with_http_info(node_name, application_id, events_health_state_filter:0, deployed_service_packages_health_state_filter:0, application_health_policy:nil, exclude_health_statistics:false, timeout:60, custom_headers:nil)
get_deployed_application_health_using_policy_asy... | ruby | def get_deployed_application_health_using_policy_with_http_info(node_name, application_id, events_health_state_filter:0, deployed_service_packages_health_state_filter:0, application_health_policy:nil, exclude_health_statistics:false, timeout:60, custom_headers:nil)
get_deployed_application_health_using_policy_asy... | [
"def",
"get_deployed_application_health_using_policy_with_http_info",
"(",
"node_name",
",",
"application_id",
",",
"events_health_state_filter",
":",
"0",
",",
"deployed_service_packages_health_state_filter",
":",
"0",
",",
"application_health_policy",
":",
"nil",
",",
"exclud... | Gets the information about health of an application deployed on a Service
Fabric node. using the specified policy.
Gets the information about health of an application deployed on a Service
Fabric node using the specified policy. Use EventsHealthStateFilter to
optionally filter for the collection of HealthEvent obj... | [
"Gets",
"the",
"information",
"about",
"health",
"of",
"an",
"application",
"deployed",
"on",
"a",
"Service",
"Fabric",
"node",
".",
"using",
"the",
"specified",
"policy",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_service_fabric/lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb#L9172-L9174 | train | Gets the health of the specified application using the health policy. | [
30522,
13366,
2131,
1035,
7333,
1035,
4646,
1035,
2740,
1035,
2478,
1035,
3343,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
13045,
1035,
2171,
1010,
4646,
1035,
8909,
1010,
2824,
1035,
2740,
1035,
2110,
1035,
11307,
1024,
1014,
1010,
7333,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_stor_simple8000_series/lib/2017-06-01/generated/azure_mgmt_stor_simple8000_series/devices.rb | Azure::StorSimple8000Series::Mgmt::V2017_06_01.Devices.begin_install_updates_with_http_info | def begin_install_updates_with_http_info(device_name, resource_group_name, manager_name, custom_headers:nil)
begin_install_updates_async(device_name, resource_group_name, manager_name, custom_headers:custom_headers).value!
end | ruby | def begin_install_updates_with_http_info(device_name, resource_group_name, manager_name, custom_headers:nil)
begin_install_updates_async(device_name, resource_group_name, manager_name, custom_headers:custom_headers).value!
end | [
"def",
"begin_install_updates_with_http_info",
"(",
"device_name",
",",
"resource_group_name",
",",
"manager_name",
",",
"custom_headers",
":",
"nil",
")",
"begin_install_updates_async",
"(",
"device_name",
",",
"resource_group_name",
",",
"manager_name",
",",
"custom_heade... | Downloads and installs the updates on the 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.
... | [
"Downloads",
"and",
"installs",
"the",
"updates",
"on",
"the",
"device",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_stor_simple8000_series/lib/2017-06-01/generated/azure_mgmt_stor_simple8000_series/devices.rb#L1505-L1507 | train | Installs updates to the specified device. | [
30522,
13366,
4088,
1035,
16500,
1035,
14409,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
5080,
1035,
2171,
1010,
7692,
1035,
2177,
1035,
2171,
1010,
3208,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
4088,
1035,
16500,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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.enabled_gates | def enabled_gates
values = gate_values
gates.select { |gate| gate.enabled?(values[gate.key]) }
end | ruby | def enabled_gates
values = gate_values
gates.select { |gate| gate.enabled?(values[gate.key]) }
end | [
"def",
"enabled_gates",
"values",
"=",
"gate_values",
"gates",
".",
"select",
"{",
"|",
"gate",
"|",
"gate",
".",
"enabled?",
"(",
"values",
"[",
"gate",
".",
"key",
"]",
")",
"}",
"end"
] | Public: Get the gates that have been enabled for the feature.
Returns an Array of Flipper::Gate instances. | [
"Public",
":",
"Get",
"the",
"gates",
"that",
"have",
"been",
"enabled",
"for",
"the",
"feature",
"."
] | df0352b663ad3ed45d68710f10a8170249ff9d78 | https://github.com/jnunemaker/flipper/blob/df0352b663ad3ed45d68710f10a8170249ff9d78/lib/flipper/feature.rb#L292-L295 | train | Returns the index of the gates that are enabled | [
30522,
13366,
9124,
1035,
6733,
5300,
1027,
4796,
1035,
5300,
6733,
1012,
7276,
30524,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/workflow_presenter.rb | Hyrax.WorkflowPresenter.actions | def actions
return [] unless sipity_entity && current_ability
actions = Hyrax::Workflow::PermissionQuery.scope_permitted_workflow_actions_available_for_current_state(entity: sipity_entity, user: current_ability.current_user)
actions.map { |action| [action.name, action_label(action)] }
end | ruby | def actions
return [] unless sipity_entity && current_ability
actions = Hyrax::Workflow::PermissionQuery.scope_permitted_workflow_actions_available_for_current_state(entity: sipity_entity, user: current_ability.current_user)
actions.map { |action| [action.name, action_label(action)] }
end | [
"def",
"actions",
"return",
"[",
"]",
"unless",
"sipity_entity",
"&&",
"current_ability",
"actions",
"=",
"Hyrax",
"::",
"Workflow",
"::",
"PermissionQuery",
".",
"scope_permitted_workflow_actions_available_for_current_state",
"(",
"entity",
":",
"sipity_entity",
",",
"... | Returns an array of tuples (key, label) appropriate for a radio group | [
"Returns",
"an",
"array",
"of",
"tuples",
"(",
"key",
"label",
")",
"appropriate",
"for",
"a",
"radio",
"group"
] | e2b4f56e829a53b1f11296324736e9d5b8c9ee5f | https://github.com/samvera/hyrax/blob/e2b4f56e829a53b1f11296324736e9d5b8c9ee5f/app/presenters/hyrax/workflow_presenter.rb#L22-L26 | train | Returns an array of actions that are available for the current state. | [
30522,
13366,
4506,
2709,
1031,
1033,
4983,
10668,
3012,
1035,
9178,
1004,
1004,
2783,
1035,
3754,
4506,
1027,
1044,
19563,
2595,
1024,
1024,
2147,
12314,
1024,
1024,
6656,
4226,
2854,
1012,
9531,
1035,
7936,
1035,
2147,
12314,
1035,
4506,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/capability_host.rb | Vagrant.CapabilityHost.initialize_capabilities! | def initialize_capabilities!(host, hosts, capabilities, *args)
@cap_logger = Log4r::Logger.new(
"vagrant::capability_host::#{self.class.to_s.downcase}")
if host && !hosts[host]
raise Errors::CapabilityHostExplicitNotDetected, value: host.to_s
end
if !host
host = autodet... | ruby | def initialize_capabilities!(host, hosts, capabilities, *args)
@cap_logger = Log4r::Logger.new(
"vagrant::capability_host::#{self.class.to_s.downcase}")
if host && !hosts[host]
raise Errors::CapabilityHostExplicitNotDetected, value: host.to_s
end
if !host
host = autodet... | [
"def",
"initialize_capabilities!",
"(",
"host",
",",
"hosts",
",",
"capabilities",
",",
"*",
"args",
")",
"@cap_logger",
"=",
"Log4r",
"::",
"Logger",
".",
"new",
"(",
"\"vagrant::capability_host::#{self.class.to_s.downcase}\"",
")",
"if",
"host",
"&&",
"!",
"host... | Initializes the capability system by detecting the proper capability
host to execute on and building the chain of capabilities to execute.
@param [Symbol] host The host to use for the capabilities, or nil if
we should auto-detect it.
@param [Hash<Symbol, Array<Class, Symbol>>] hosts Potential capability
hosts... | [
"Initializes",
"the",
"capability",
"system",
"by",
"detecting",
"the",
"proper",
"capability",
"host",
"to",
"execute",
"on",
"and",
"building",
"the",
"chain",
"of",
"capabilities",
"to",
"execute",
"."
] | c22a145c59790c098f95d50141d9afb48e1ef55f | https://github.com/hashicorp/vagrant/blob/c22a145c59790c098f95d50141d9afb48e1ef55f/lib/vagrant/capability_host.rb#L27-L69 | train | Initialize the capabilities for the given host. | [
30522,
13366,
3988,
4697,
1035,
9859,
999,
1006,
3677,
1010,
6184,
1010,
9859,
1010,
1008,
12098,
5620,
1007,
1030,
6178,
1035,
8833,
4590,
1027,
8833,
2549,
2099,
1024,
1024,
8833,
4590,
1012,
2047,
1006,
1000,
12436,
18980,
1024,
1024,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_container_registry/lib/2018-09-01/generated/azure_mgmt_container_registry/tasks.rb | Azure::ContainerRegistry::Mgmt::V2018_09_01.Tasks.delete | def delete(resource_group_name, registry_name, task_name, custom_headers:nil)
response = delete_async(resource_group_name, registry_name, task_name, custom_headers:custom_headers).value!
nil
end | ruby | def delete(resource_group_name, registry_name, task_name, custom_headers:nil)
response = delete_async(resource_group_name, registry_name, task_name, custom_headers:custom_headers).value!
nil
end | [
"def",
"delete",
"(",
"resource_group_name",
",",
"registry_name",
",",
"task_name",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"delete_async",
"(",
"resource_group_name",
",",
"registry_name",
",",
"task_name",
",",
"custom_headers",
":custom_headers",
... | Deletes a specified task.
@param resource_group_name [String] The name of the resource group to which
the container registry belongs.
@param registry_name [String] The name of the container registry.
@param task_name [String] The name of the container registry task.
@param custom_headers [Hash{String => String}] ... | [
"Deletes",
"a",
"specified",
"task",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_container_registry/lib/2018-09-01/generated/azure_mgmt_container_registry/tasks.rb#L287-L290 | train | Deletes a task from the specified container registry. | [
30522,
13366,
3972,
12870,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
15584,
1035,
2171,
1010,
4708,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
3972,
12870,
1035,
2004,
6038,
2278,
1006,
7692,
1035,
2177,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
meew0/discordrb | lib/discordrb/data/server.rb | Discordrb.Server.default_message_notifications= | def default_message_notifications=(notification_level)
notification_level = NOTIFICATION_LEVELS[notification_level] if notification_level.is_a?(Symbol)
update_server_data(default_message_notifications: notification_level)
end | ruby | def default_message_notifications=(notification_level)
notification_level = NOTIFICATION_LEVELS[notification_level] if notification_level.is_a?(Symbol)
update_server_data(default_message_notifications: notification_level)
end | [
"def",
"default_message_notifications",
"=",
"(",
"notification_level",
")",
"notification_level",
"=",
"NOTIFICATION_LEVELS",
"[",
"notification_level",
"]",
"if",
"notification_level",
".",
"is_a?",
"(",
"Symbol",
")",
"update_server_data",
"(",
"default_message_notificat... | Sets the default message notification level
@param notification_level [Integer, Symbol] The default message notificiation 0-1 or Symbol (see {NOTIFICATION_LEVELS}) | [
"Sets",
"the",
"default",
"message",
"notification",
"level"
] | 764298a1ff0be69a1853b510d736f21c2b91a2fe | https://github.com/meew0/discordrb/blob/764298a1ff0be69a1853b510d736f21c2b91a2fe/lib/discordrb/data/server.rb#L686-L690 | train | Update the server data with default message notifications | [
30522,
13366,
12398,
1035,
4471,
1035,
26828,
2015,
1027,
1006,
26828,
1035,
2504,
1007,
26828,
1035,
2504,
1027,
26828,
1035,
3798,
1031,
26828,
1035,
2504,
1033,
2065,
26828,
1035,
2504,
1012,
2003,
1035,
1037,
1029,
1006,
6454,
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... |
square/connect-ruby-sdk | lib/square_connect/models/list_customers_request.rb | SquareConnect.ListCustomersRequest.valid? | def valid?
sort_field_validator = EnumAttributeValidator.new('String', ["DEFAULT", "CREATED_AT"])
return false unless sort_field_validator.valid?(@sort_field)
sort_order_validator = EnumAttributeValidator.new('String', ["DESC", "ASC"])
return false unless sort_order_validator.valid?(@sort_order)... | ruby | def valid?
sort_field_validator = EnumAttributeValidator.new('String', ["DEFAULT", "CREATED_AT"])
return false unless sort_field_validator.valid?(@sort_field)
sort_order_validator = EnumAttributeValidator.new('String', ["DESC", "ASC"])
return false unless sort_order_validator.valid?(@sort_order)... | [
"def",
"valid?",
"sort_field_validator",
"=",
"EnumAttributeValidator",
".",
"new",
"(",
"'String'",
",",
"[",
"\"DEFAULT\"",
",",
"\"CREATED_AT\"",
"]",
")",
"return",
"false",
"unless",
"sort_field_validator",
".",
"valid?",
"(",
"@sort_field",
")",
"sort_order_va... | Check to see if the all the properties in the model are valid
@return true if the model is valid | [
"Check",
"to",
"see",
"if",
"the",
"all",
"the",
"properties",
"in",
"the",
"model",
"are",
"valid"
] | 798eb9ded716f23b9f1518386f1c311a34bca8bf | https://github.com/square/connect-ruby-sdk/blob/798eb9ded716f23b9f1518386f1c311a34bca8bf/lib/square_connect/models/list_customers_request.rb#L95-L101 | train | Returns true if the object is valid for this object. | [
30522,
13366,
9398,
1029,
4066,
1035,
2492,
1035,
9398,
8844,
1027,
4372,
12248,
4779,
3089,
8569,
2618,
10175,
8524,
4263,
1012,
2047,
1006,
1005,
5164,
1005,
1010,
1031,
1000,
12398,
1000,
1010,
1000,
2580,
1035,
2012,
1000,
1033,
1007,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
meew0/discordrb | lib/discordrb/bot.rb | Discordrb.Bot.voice | def voice(thing)
id = thing.resolve_id
return @voices[id] if @voices[id]
channel = channel(id)
return nil unless channel
server_id = channel.server.id
return @voices[server_id] if @voices[server_id]
nil
end | ruby | def voice(thing)
id = thing.resolve_id
return @voices[id] if @voices[id]
channel = channel(id)
return nil unless channel
server_id = channel.server.id
return @voices[server_id] if @voices[server_id]
nil
end | [
"def",
"voice",
"(",
"thing",
")",
"id",
"=",
"thing",
".",
"resolve_id",
"return",
"@voices",
"[",
"id",
"]",
"if",
"@voices",
"[",
"id",
"]",
"channel",
"=",
"channel",
"(",
"id",
")",
"return",
"nil",
"unless",
"channel",
"server_id",
"=",
"channel"... | Gets the voice bot for a particular server or channel. You can connect to a new channel using the {#voice_connect}
method.
@param thing [Channel, Server, Integer] the server or channel you want to get the voice bot for, or its ID.
@return [Voice::VoiceBot, nil] the VoiceBot for the thing you specified, or nil if the... | [
"Gets",
"the",
"voice",
"bot",
"for",
"a",
"particular",
"server",
"or",
"channel",
".",
"You",
"can",
"connect",
"to",
"a",
"new",
"channel",
"using",
"the",
"{",
"#voice_connect",
"}",
"method",
"."
] | 764298a1ff0be69a1853b510d736f21c2b91a2fe | https://github.com/meew0/discordrb/blob/764298a1ff0be69a1853b510d736f21c2b91a2fe/lib/discordrb/bot.rb#L296-L307 | train | Returns the voice for a given thing | [
30522,
13366,
2376,
1006,
2518,
1007,
8909,
1027,
2518,
1012,
10663,
1035,
8909,
2709,
1030,
5755,
1031,
8909,
1033,
2065,
1030,
5755,
1031,
8909,
1033,
3149,
1027,
3149,
1006,
8909,
1007,
2709,
9152,
2140,
4983,
3149,
8241,
1035,
8909,
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_recovery_services_site_recovery/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/replication_protection_containers.rb | Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10.ReplicationProtectionContainers.delete | def delete(fabric_name, protection_container_name, custom_headers:nil)
response = delete_async(fabric_name, protection_container_name, custom_headers:custom_headers).value!
nil
end | ruby | def delete(fabric_name, protection_container_name, custom_headers:nil)
response = delete_async(fabric_name, protection_container_name, custom_headers:custom_headers).value!
nil
end | [
"def",
"delete",
"(",
"fabric_name",
",",
"protection_container_name",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"delete_async",
"(",
"fabric_name",
",",
"protection_container_name",
",",
"custom_headers",
":custom_headers",
")",
".",
"value!",
"nil",
... | Removes a protection container.
Operation to remove a protection container.
@param fabric_name [String] Unique fabric ARM name.
@param protection_container_name [String] Unique protection container ARM
name.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP r... | [
"Removes",
"a",
"protection",
"container",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_recovery_services_site_recovery/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/replication_protection_containers.rb#L330-L333 | train | Deletes the protection container. | [
30522,
13366,
3972,
12870,
1006,
8313,
1035,
2171,
1010,
3860,
1035,
11661,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
3972,
12870,
1035,
2004,
6038,
2278,
1006,
8313,
1035,
2171,
1010,
3860,
1035,
11661,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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_cdn/lib/2015-06-01/generated/azure_mgmt_cdn/origins.rb | Azure::CDN::Mgmt::V2015_06_01.Origins.begin_create | def begin_create(origin_name, origin_properties, endpoint_name, profile_name, resource_group_name, custom_headers:nil)
response = begin_create_async(origin_name, origin_properties, endpoint_name, profile_name, resource_group_name, custom_headers:custom_headers).value!
response.body unless response.nil?
... | ruby | def begin_create(origin_name, origin_properties, endpoint_name, profile_name, resource_group_name, custom_headers:nil)
response = begin_create_async(origin_name, origin_properties, endpoint_name, profile_name, resource_group_name, custom_headers:custom_headers).value!
response.body unless response.nil?
... | [
"def",
"begin_create",
"(",
"origin_name",
",",
"origin_properties",
",",
"endpoint_name",
",",
"profile_name",
",",
"resource_group_name",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"begin_create_async",
"(",
"origin_name",
",",
"origin_properties",
","... | Creates a new CDN origin within an endpoint.
@param origin_name [String] Name of the origin, an arbitrary value but it
needs to be unique under endpoint
@param origin_properties [OriginParameters] Origin properties
@param endpoint_name [String] Name of the endpoint within the CDN profile.
@param profile_name [Str... | [
"Creates",
"a",
"new",
"CDN",
"origin",
"within",
"an",
"endpoint",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_cdn/lib/2015-06-01/generated/azure_mgmt_cdn/origins.rb#L414-L417 | train | Creates an origin. | [
30522,
13366,
4088,
1035,
3443,
1006,
4761,
1035,
2171,
1010,
4761,
1035,
5144,
1010,
2203,
8400,
1035,
2171,
1010,
6337,
1035,
2171,
1010,
7692,
1035,
2177,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
4... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
markdownlint/markdownlint | lib/mdl/doc.rb | MarkdownLint.Doc.find_type_elements_except | def find_type_elements_except(type, nested_except=[], elements=@elements)
results = []
if type.class == Symbol
type = [type]
end
if nested_except.class == Symbol
nested_except = [nested_except]
end
elements.each do |e|
results.push(e) if type.include?(e.type)
... | ruby | def find_type_elements_except(type, nested_except=[], elements=@elements)
results = []
if type.class == Symbol
type = [type]
end
if nested_except.class == Symbol
nested_except = [nested_except]
end
elements.each do |e|
results.push(e) if type.include?(e.type)
... | [
"def",
"find_type_elements_except",
"(",
"type",
",",
"nested_except",
"=",
"[",
"]",
",",
"elements",
"=",
"@elements",
")",
"results",
"=",
"[",
"]",
"if",
"type",
".",
"class",
"==",
"Symbol",
"type",
"=",
"[",
"type",
"]",
"end",
"if",
"nested_except... | A variation on find_type_elements that allows you to skip drilling down
into children of specific element types.
Instead of a single type, a list of types can be provided instead to
find all types.
Unlike find_type_elements, this method will always search for nested
elements, and skip the element types given to ... | [
"A",
"variation",
"on",
"find_type_elements",
"that",
"allows",
"you",
"to",
"skip",
"drilling",
"down",
"into",
"children",
"of",
"specific",
"element",
"types",
"."
] | a9e80fcf3989d73b654b00bb2225a00be53983e8 | https://github.com/markdownlint/markdownlint/blob/a9e80fcf3989d73b654b00bb2225a00be53983e8/lib/mdl/doc.rb#L110-L125 | train | Find all elements except a type | [
30522,
13366,
2424,
1035,
2828,
1035,
3787,
1035,
3272,
1006,
2828,
1010,
9089,
2098,
1035,
3272,
1027,
1031,
1033,
1010,
3787,
1027,
1030,
3787,
1007,
3463,
1027,
1031,
1033,
2065,
2828,
1012,
2465,
1027,
1027,
6454,
2828,
1027,
1031,
28... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
toptal/chewy | lib/chewy/query.rb | Chewy.Query.random_score | def random_score(seed = Time.now, options = {})
scoring = options.merge(random_score: {seed: seed.to_i})
chain { criteria.update_scores scoring }
end | ruby | def random_score(seed = Time.now, options = {})
scoring = options.merge(random_score: {seed: seed.to_i})
chain { criteria.update_scores scoring }
end | [
"def",
"random_score",
"(",
"seed",
"=",
"Time",
".",
"now",
",",
"options",
"=",
"{",
"}",
")",
"scoring",
"=",
"options",
".",
"merge",
"(",
"random_score",
":",
"{",
"seed",
":",
"seed",
".",
"to_i",
"}",
")",
"chain",
"{",
"criteria",
".",
"upd... | Adds a random score to the search request. All scores are
added to the search request and combinded according to
`boost_mode` and `score_mode`
This probably only makes sense if you specify a filter
for the random score as well.
If you do not pass in a seed value, Time.now will be used
@example
UsersIndex.ra... | [
"Adds",
"a",
"random",
"score",
"to",
"the",
"search",
"request",
".",
"All",
"scores",
"are",
"added",
"to",
"the",
"search",
"request",
"and",
"combinded",
"according",
"to",
"boost_mode",
"and",
"score_mode"
] | cb1bb3efb1bd8a31e7e31add6072189cb1f4f01b | https://github.com/toptal/chewy/blob/cb1bb3efb1bd8a31e7e31add6072189cb1f4f01b/lib/chewy/query.rb#L468-L471 | train | Update the scores based on the current random score. | [
30522,
13366,
6721,
1035,
3556,
1006,
6534,
1027,
2051,
1012,
2085,
1010,
7047,
1027,
1063,
1065,
1007,
4577,
1027,
7047,
1012,
13590,
1006,
6721,
1035,
3556,
1024,
1063,
6534,
1024,
6534,
1012,
2000,
1035,
1045,
1065,
1007,
4677,
1063,
9... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
twitter/secure_headers | lib/secure_headers/headers/content_security_policy.rb | SecureHeaders.ContentSecurityPolicy.dedup_source_list | def dedup_source_list(sources)
sources = sources.uniq
wild_sources = sources.select { |source| source =~ STAR_REGEXP }
if wild_sources.any?
sources.reject do |source|
!wild_sources.include?(source) &&
wild_sources.any? { |pattern| File.fnmatch(pattern, source) }
... | ruby | def dedup_source_list(sources)
sources = sources.uniq
wild_sources = sources.select { |source| source =~ STAR_REGEXP }
if wild_sources.any?
sources.reject do |source|
!wild_sources.include?(source) &&
wild_sources.any? { |pattern| File.fnmatch(pattern, source) }
... | [
"def",
"dedup_source_list",
"(",
"sources",
")",
"sources",
"=",
"sources",
".",
"uniq",
"wild_sources",
"=",
"sources",
".",
"select",
"{",
"|",
"source",
"|",
"source",
"=~",
"STAR_REGEXP",
"}",
"if",
"wild_sources",
".",
"any?",
"sources",
".",
"reject",
... | Removes duplicates and sources that already match an existing wild card.
e.g. *.github.com asdf.github.com becomes *.github.com | [
"Removes",
"duplicates",
"and",
"sources",
"that",
"already",
"match",
"an",
"existing",
"wild",
"card",
"."
] | 543e6712aadae08f1653ed973e6b6204f7eac26a | https://github.com/twitter/secure_headers/blob/543e6712aadae08f1653ed973e6b6204f7eac26a/lib/secure_headers/headers/content_security_policy.rb#L148-L160 | train | Returns a list of all the sources that are in the source list. | [
30522,
13366,
2139,
8566,
2361,
1035,
3120,
1035,
2862,
1006,
4216,
1007,
4216,
1027,
4216,
1012,
4895,
18515,
3748,
1035,
4216,
1027,
4216,
1012,
7276,
1063,
1064,
3120,
1064,
3120,
1027,
1066,
2732,
1035,
19723,
10288,
2361,
1065,
2065,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/security_group.rb | Aws::EC2.SecurityGroup.revoke_egress | def revoke_egress(options = {})
options = options.merge(group_id: @id)
resp = @client.revoke_security_group_egress(options)
resp.data
end | ruby | def revoke_egress(options = {})
options = options.merge(group_id: @id)
resp = @client.revoke_security_group_egress(options)
resp.data
end | [
"def",
"revoke_egress",
"(",
"options",
"=",
"{",
"}",
")",
"options",
"=",
"options",
".",
"merge",
"(",
"group_id",
":",
"@id",
")",
"resp",
"=",
"@client",
".",
"revoke_security_group_egress",
"(",
"options",
")",
"resp",
".",
"data",
"end"
] | @example Request syntax with placeholder values
security_group.revoke_egress({
dry_run: false,
ip_permissions: [
{
from_port: 1,
ip_protocol: "String",
ip_ranges: [
{
cidr_ip: "String",
description: "String",
},
],
... | [
"@example",
"Request",
"syntax",
"with",
"placeholder",
"values"
] | e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d | https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-ec2/lib/aws-sdk-ec2/security_group.rb#L535-L539 | train | Revoke Egress security group | [
30522,
13366,
7065,
11045,
1035,
1041,
17603,
4757,
1006,
7047,
1027,
1063,
1065,
1007,
7047,
1027,
7047,
1012,
13590,
1006,
2177,
1035,
8909,
1024,
1030,
8909,
1007,
24501,
2361,
1027,
1030,
7396,
1012,
7065,
11045,
1035,
3036,
1035,
2177,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_recovery_services/lib/2016-06-01/generated/azure_mgmt_recovery_services/vaults.rb | Azure::RecoveryServices::Mgmt::V2016_06_01.Vaults.create_or_update_with_http_info | def create_or_update_with_http_info(resource_group_name, vault_name, vault, custom_headers:nil)
create_or_update_async(resource_group_name, vault_name, vault, custom_headers:custom_headers).value!
end | ruby | def create_or_update_with_http_info(resource_group_name, vault_name, vault, custom_headers:nil)
create_or_update_async(resource_group_name, vault_name, vault, custom_headers:custom_headers).value!
end | [
"def",
"create_or_update_with_http_info",
"(",
"resource_group_name",
",",
"vault_name",
",",
"vault",
",",
"custom_headers",
":",
"nil",
")",
"create_or_update_async",
"(",
"resource_group_name",
",",
"vault_name",
",",
"vault",
",",
"custom_headers",
":custom_headers",
... | Creates or updates a Recovery Services vault.
@param resource_group_name [String] The name of the resource group where the
recovery services vault is present.
@param vault_name [String] The name of the recovery services vault.
@param vault [Vault] Recovery Services Vault to be created.
@param custom_headers [Hash... | [
"Creates",
"or",
"updates",
"a",
"Recovery",
"Services",
"vault",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_recovery_services/lib/2016-06-01/generated/azure_mgmt_recovery_services/vaults.rb#L323-L325 | train | Creates or updates a key vault in the specified subscription. | [
30522,
13366,
3443,
1035,
2030,
1035,
10651,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
11632,
1035,
2171,
1010,
11632,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3443,
1035,
2030,
1035,
10651... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_machine_learning_services/lib/2018-03-01-preview/generated/azure_mgmt_machine_learning_services/workspaces.rb | Azure::MachineLearningServices::Mgmt::V2018_03_01_preview.Workspaces.create_or_update_with_http_info | def create_or_update_with_http_info(resource_group_name, workspace_name, parameters, custom_headers:nil)
create_or_update_async(resource_group_name, workspace_name, parameters, custom_headers:custom_headers).value!
end | ruby | def create_or_update_with_http_info(resource_group_name, workspace_name, parameters, custom_headers:nil)
create_or_update_async(resource_group_name, workspace_name, parameters, custom_headers:custom_headers).value!
end | [
"def",
"create_or_update_with_http_info",
"(",
"resource_group_name",
",",
"workspace_name",
",",
"parameters",
",",
"custom_headers",
":",
"nil",
")",
"create_or_update_async",
"(",
"resource_group_name",
",",
"workspace_name",
",",
"parameters",
",",
"custom_headers",
"... | Creates or updates a workspace with the specified parameters.
@param resource_group_name [String] Name of the resource group in which
workspace is located.
@param workspace_name [String] Name of Azure Machine Learning workspace.
@param parameters [Workspace] The parameters for creating or updating a
machine learn... | [
"Creates",
"or",
"updates",
"a",
"workspace",
"with",
"the",
"specified",
"parameters",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_machine_learning_services/lib/2018-03-01-preview/generated/azure_mgmt_machine_learning_services/workspaces.rb#L151-L153 | train | Creates or updates a managed product. | [
30522,
13366,
3443,
1035,
2030,
1035,
10651,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2573,
15327,
1035,
2171,
1010,
11709,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3443,
1035,
2030,
1035,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
rails/rails | activemodel/lib/active_model/serialization.rb | ActiveModel.Serialization.serializable_add_includes | def serializable_add_includes(options = {}) #:nodoc:
return unless includes = options[:include]
unless includes.is_a?(Hash)
includes = Hash[Array(includes).flat_map { |n| n.is_a?(Hash) ? n.to_a : [[n, {}]] }]
end
includes.each do |association, opts|
if records = sen... | ruby | def serializable_add_includes(options = {}) #:nodoc:
return unless includes = options[:include]
unless includes.is_a?(Hash)
includes = Hash[Array(includes).flat_map { |n| n.is_a?(Hash) ? n.to_a : [[n, {}]] }]
end
includes.each do |association, opts|
if records = sen... | [
"def",
"serializable_add_includes",
"(",
"options",
"=",
"{",
"}",
")",
"#:nodoc:",
"return",
"unless",
"includes",
"=",
"options",
"[",
":include",
"]",
"unless",
"includes",
".",
"is_a?",
"(",
"Hash",
")",
"includes",
"=",
"Hash",
"[",
"Array",
"(",
"inc... | Add associations specified via the <tt>:include</tt> option.
Expects a block that takes as arguments:
+association+ - name of the association
+records+ - the association record(s) to be serialized
+opts+ - options for the association records | [
"Add",
"associations",
"specified",
"via",
"the",
"<tt",
">",
":",
"include<",
"/",
"tt",
">",
"option",
"."
] | 85a8bc644be69908f05740a5886ec19cd3679df5 | https://github.com/rails/rails/blob/85a8bc644be69908f05740a5886ec19cd3679df5/activemodel/lib/active_model/serialization.rb#L178-L190 | train | This method is used to add includes to the record. | [
30522,
13366,
7642,
21335,
3468,
1035,
5587,
1035,
2950,
1006,
7047,
1027,
1063,
1065,
1007,
1001,
1024,
7293,
10085,
1024,
2709,
4983,
2950,
1027,
7047,
1031,
1024,
2421,
1033,
4983,
2950,
1012,
2003,
1035,
1037,
1029,
1006,
23325,
1007,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_web/lib/2018-02-01/generated/azure_mgmt_web/app_service_environments.rb | Azure::Web::Mgmt::V2018_02_01.AppServiceEnvironments.list_app_service_plans | def list_app_service_plans(resource_group_name, name, custom_headers:nil)
first_page = list_app_service_plans_as_lazy(resource_group_name, name, custom_headers:custom_headers)
first_page.get_all_items
end | ruby | def list_app_service_plans(resource_group_name, name, custom_headers:nil)
first_page = list_app_service_plans_as_lazy(resource_group_name, name, custom_headers:custom_headers)
first_page.get_all_items
end | [
"def",
"list_app_service_plans",
"(",
"resource_group_name",
",",
"name",
",",
"custom_headers",
":",
"nil",
")",
"first_page",
"=",
"list_app_service_plans_as_lazy",
"(",
"resource_group_name",
",",
"name",
",",
"custom_headers",
":custom_headers",
")",
"first_page",
"... | Get all App Service plans in an App Service Environment.
Get all App Service plans in an App Service Environment.
@param resource_group_name [String] Name of the resource group to which the
resource belongs.
@param name [String] Name of the App Service Environment.
@param custom_headers [Hash{String => String}] ... | [
"Get",
"all",
"App",
"Service",
"plans",
"in",
"an",
"App",
"Service",
"Environment",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_web/lib/2018-02-01/generated/azure_mgmt_web/app_service_environments.rb#L2644-L2647 | train | Gets all the applications in a service plan. | [
30522,
13366,
2862,
1035,
10439,
1035,
2326,
1035,
3488,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
2034,
1035,
3931,
1027,
2862,
1035,
10439,
1035,
2326,
1035,
3488,
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... |
puppetlabs/bolt | lib/bolt/executor.rb | Bolt.Executor.queue_execute | def queue_execute(targets)
targets.group_by(&:transport).flat_map do |protocol, protocol_targets|
transport = transport(protocol)
report_transport(transport, protocol_targets.count)
transport.batches(protocol_targets).flat_map do |batch|
batch_promises = Array(batch).each_with_ob... | ruby | def queue_execute(targets)
targets.group_by(&:transport).flat_map do |protocol, protocol_targets|
transport = transport(protocol)
report_transport(transport, protocol_targets.count)
transport.batches(protocol_targets).flat_map do |batch|
batch_promises = Array(batch).each_with_ob... | [
"def",
"queue_execute",
"(",
"targets",
")",
"targets",
".",
"group_by",
"(",
":transport",
")",
".",
"flat_map",
"do",
"|",
"protocol",
",",
"protocol_targets",
"|",
"transport",
"=",
"transport",
"(",
"protocol",
")",
"report_transport",
"(",
"transport",
",... | Starts executing the given block on a list of nodes in parallel, one thread per "batch".
This is the main driver of execution on a list of targets. It first
groups targets by transport, then divides each group into batches as
defined by the transport. Yields each batch, along with the corresponding
transport, to t... | [
"Starts",
"executing",
"the",
"given",
"block",
"on",
"a",
"list",
"of",
"nodes",
"in",
"parallel",
"one",
"thread",
"per",
"batch",
"."
] | 50689a33699939d262ea7c822a4b24fd8c4f8d8a | https://github.com/puppetlabs/bolt/blob/50689a33699939d262ea7c822a4b24fd8c4f8d8a/lib/bolt/executor.rb#L70-L112 | train | Execute a block of commands on the given targets. | [
30522,
13366,
24240,
1035,
15389,
1006,
7889,
1007,
7889,
1012,
2177,
1035,
2011,
1006,
1004,
1024,
3665,
1007,
1012,
4257,
1035,
4949,
2079,
1064,
8778,
1010,
8778,
1035,
7889,
1064,
3665,
1027,
3665,
1006,
8778,
1007,
3189,
1035,
3665,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/fields/content_type_field.rb | Mail.ContentTypeField.sanitize | def sanitize(val)
# TODO: check if there are cases where whitespace is not a separator
val = val.
gsub(/\s*=\s*/,'='). # remove whitespaces around equal sign
gsub(/[; ]+/, '; '). #use '; ' as a separator (or EOL)
gsub(/;\s*$/,'') #remove trailing to keep examples below
if val ... | ruby | def sanitize(val)
# TODO: check if there are cases where whitespace is not a separator
val = val.
gsub(/\s*=\s*/,'='). # remove whitespaces around equal sign
gsub(/[; ]+/, '; '). #use '; ' as a separator (or EOL)
gsub(/;\s*$/,'') #remove trailing to keep examples below
if val ... | [
"def",
"sanitize",
"(",
"val",
")",
"# TODO: check if there are cases where whitespace is not a separator",
"val",
"=",
"val",
".",
"gsub",
"(",
"/",
"\\s",
"\\s",
"/",
",",
"'='",
")",
".",
"# remove whitespaces around equal sign",
"gsub",
"(",
"/",
"/",
",",
"';... | Various special cases from random emails found that I am not going to change
the parser for | [
"Various",
"special",
"cases",
"from",
"random",
"emails",
"found",
"that",
"I",
"am",
"not",
"going",
"to",
"change",
"the",
"parser",
"for"
] | fb53fb369eb2bf0494ac70675970c90cdcc3f495 | https://github.com/mikel/mail/blob/fb53fb369eb2bf0494ac70675970c90cdcc3f495/lib/mail/fields/content_type_field.rb#L119-L161 | train | sanitize a string | [
30522,
13366,
2624,
25090,
4371,
1006,
11748,
1007,
1001,
28681,
2080,
1024,
4638,
2065,
2045,
2024,
3572,
2073,
12461,
15327,
2003,
2025,
1037,
19802,
25879,
2953,
11748,
1027,
11748,
1012,
28177,
12083,
1006,
1013,
1032,
1055,
1008,
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... |
sensu/sensu | lib/sensu/utilities.rb | Sensu.Utilities.in_time_windows? | def in_time_windows?(conditions)
in_window = false
window_days = conditions[:days] || {}
if window_days[:all]
in_window = window_days[:all].any? do |condition|
in_time_window?(condition)
end
end
current_day = Time.now.strftime("%A").downcase.to_sym
if !in_wi... | ruby | def in_time_windows?(conditions)
in_window = false
window_days = conditions[:days] || {}
if window_days[:all]
in_window = window_days[:all].any? do |condition|
in_time_window?(condition)
end
end
current_day = Time.now.strftime("%A").downcase.to_sym
if !in_wi... | [
"def",
"in_time_windows?",
"(",
"conditions",
")",
"in_window",
"=",
"false",
"window_days",
"=",
"conditions",
"[",
":days",
"]",
"||",
"{",
"}",
"if",
"window_days",
"[",
":all",
"]",
"in_window",
"=",
"window_days",
"[",
":all",
"]",
".",
"any?",
"do",
... | Determine if time window conditions for one or more days of the
week are met. If a day of the week is provided, it can provide
one or more conditions, each with a `:begin` and `:end` time,
eg. "11:30:00 PM", or `false` will be returned.
@param conditions [Hash]
@option conditions [String] :days of the week.
@ret... | [
"Determine",
"if",
"time",
"window",
"conditions",
"for",
"one",
"or",
"more",
"days",
"of",
"the",
"week",
"are",
"met",
".",
"If",
"a",
"day",
"of",
"the",
"week",
"is",
"provided",
"it",
"can",
"provide",
"one",
"or",
"more",
"conditions",
"each",
"... | 51319e4b58c8d9986f101ad71ff729aa3e51e951 | https://github.com/sensu/sensu/blob/51319e4b58c8d9986f101ad71ff729aa3e51e951/lib/sensu/utilities.rb#L356-L371 | train | Returns true if the current time is in a window | [
30522,
13366,
1999,
1035,
2051,
1035,
3645,
1029,
1006,
3785,
1007,
1999,
1035,
3332,
1027,
6270,
3332,
1035,
2420,
1027,
3785,
1031,
1024,
2420,
1033,
1064,
1064,
1063,
1065,
2065,
3332,
1035,
2420,
1031,
1024,
2035,
1033,
1999,
1035,
33... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
markdownlint/markdownlint | lib/mdl/doc.rb | MarkdownLint.Doc.add_levels | def add_levels(elements, level=1)
elements.each do |e|
e.options[:element_level] = level
add_levels(e.children, level+1)
end
end | ruby | def add_levels(elements, level=1)
elements.each do |e|
e.options[:element_level] = level
add_levels(e.children, level+1)
end
end | [
"def",
"add_levels",
"(",
"elements",
",",
"level",
"=",
"1",
")",
"elements",
".",
"each",
"do",
"|",
"e",
"|",
"e",
".",
"options",
"[",
":element_level",
"]",
"=",
"level",
"add_levels",
"(",
"e",
".",
"children",
",",
"level",
"+",
"1",
")",
"e... | Adds a 'level' option to all elements to show how nested they are | [
"Adds",
"a",
"level",
"option",
"to",
"all",
"elements",
"to",
"show",
"how",
"nested",
"they",
"are"
] | a9e80fcf3989d73b654b00bb2225a00be53983e8 | https://github.com/markdownlint/markdownlint/blob/a9e80fcf3989d73b654b00bb2225a00be53983e8/lib/mdl/doc.rb#L282-L287 | train | Add the levels of the elements to the current page | [
30522,
13366,
5587,
1035,
3798,
1006,
3787,
1010,
2504,
1027,
1015,
1007,
3787,
1012,
2169,
2079,
1064,
1041,
1064,
1041,
1012,
7047,
1031,
1024,
5783,
1035,
2504,
1033,
1027,
2504,
5587,
1035,
3798,
1006,
1041,
1012,
2336,
1010,
2504,
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_media_services/lib/2018-07-01/generated/azure_mgmt_media_services/streaming_endpoints.rb | Azure::MediaServices::Mgmt::V2018_07_01.StreamingEndpoints.scale_async | def scale_async(resource_group_name, account_name, streaming_endpoint_name, parameters, custom_headers:nil)
# Send request
promise = begin_scale_async(resource_group_name, account_name, streaming_endpoint_name, parameters, custom_headers:custom_headers)
promise = promise.then do |response|
# ... | ruby | def scale_async(resource_group_name, account_name, streaming_endpoint_name, parameters, custom_headers:nil)
# Send request
promise = begin_scale_async(resource_group_name, account_name, streaming_endpoint_name, parameters, custom_headers:custom_headers)
promise = promise.then do |response|
# ... | [
"def",
"scale_async",
"(",
"resource_group_name",
",",
"account_name",
",",
"streaming_endpoint_name",
",",
"parameters",
",",
"custom_headers",
":",
"nil",
")",
"# Send request",
"promise",
"=",
"begin_scale_async",
"(",
"resource_group_name",
",",
"account_name",
",",... | @param resource_group_name [String] The name of the resource group within the
Azure subscription.
@param account_name [String] The Media Services account name.
@param streaming_endpoint_name [String] The name of the StreamingEndpoint.
@param parameters [StreamingEntityScaleUnit] StreamingEndpoint scale
parameters
... | [
"@param",
"resource_group_name",
"[",
"String",
"]",
"The",
"name",
"of",
"the",
"resource",
"group",
"within",
"the",
"Azure",
"subscription",
".",
"@param",
"account_name",
"[",
"String",
"]",
"The",
"Media",
"Services",
"account",
"name",
".",
"@param",
"st... | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_media_services/lib/2018-07-01/generated/azure_mgmt_media_services/streaming_endpoints.rb#L505-L519 | train | Scale a streaming endpoint to a specified size. | [
30522,
13366,
4094,
1035,
2004,
6038,
2278,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
4070,
1035,
2171,
1010,
11058,
1035,
2203,
8400,
1035,
2171,
1010,
11709,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
1001,
4604,
5227,
4872,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
httprb/http | lib/http/chainable.rb | HTTP.Chainable.via | def via(*proxy)
proxy_hash = {}
proxy_hash[:proxy_address] = proxy[0] if proxy[0].is_a?(String)
proxy_hash[:proxy_port] = proxy[1] if proxy[1].is_a?(Integer)
proxy_hash[:proxy_username] = proxy[2] if proxy[2].is_a?(String)
proxy_hash[:proxy_password] = proxy[3] if proxy[3].is_a?(Strin... | ruby | def via(*proxy)
proxy_hash = {}
proxy_hash[:proxy_address] = proxy[0] if proxy[0].is_a?(String)
proxy_hash[:proxy_port] = proxy[1] if proxy[1].is_a?(Integer)
proxy_hash[:proxy_username] = proxy[2] if proxy[2].is_a?(String)
proxy_hash[:proxy_password] = proxy[3] if proxy[3].is_a?(Strin... | [
"def",
"via",
"(",
"*",
"proxy",
")",
"proxy_hash",
"=",
"{",
"}",
"proxy_hash",
"[",
":proxy_address",
"]",
"=",
"proxy",
"[",
"0",
"]",
"if",
"proxy",
"[",
"0",
"]",
".",
"is_a?",
"(",
"String",
")",
"proxy_hash",
"[",
":proxy_port",
"]",
"=",
"p... | Make a request through an HTTP proxy
@param [Array] proxy
@raise [Request::Error] if HTTP proxy is invalid | [
"Make",
"a",
"request",
"through",
"an",
"HTTP",
"proxy"
] | f37a10ea4fab3ee411907ea2e4251ddf0ca33a93 | https://github.com/httprb/http/blob/f37a10ea4fab3ee411907ea2e4251ddf0ca33a93/lib/http/chainable.rb#L155-L167 | train | Returns a hash of HTTP proxy options | [
30522,
13366,
3081,
1006,
1008,
24540,
1007,
24540,
1035,
23325,
1027,
1063,
1065,
24540,
1035,
23325,
1031,
1024,
24540,
1035,
4769,
1033,
1027,
24540,
1031,
1014,
1033,
2065,
24540,
1031,
1014,
1033,
1012,
2003,
1035,
1037,
1029,
1006,
51... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/sessions.rb | Azure::Logic::Mgmt::V2016_06_01.Sessions.get_with_http_info | def get_with_http_info(resource_group_name, integration_account_name, session_name, custom_headers:nil)
get_async(resource_group_name, integration_account_name, session_name, custom_headers:custom_headers).value!
end | ruby | def get_with_http_info(resource_group_name, integration_account_name, session_name, custom_headers:nil)
get_async(resource_group_name, integration_account_name, session_name, custom_headers:custom_headers).value!
end | [
"def",
"get_with_http_info",
"(",
"resource_group_name",
",",
"integration_account_name",
",",
"session_name",
",",
"custom_headers",
":",
"nil",
")",
"get_async",
"(",
"resource_group_name",
",",
"integration_account_name",
",",
"session_name",
",",
"custom_headers",
":c... | Gets an integration account session.
@param resource_group_name [String] The resource group name.
@param integration_account_name [String] The integration account name.
@param session_name [String] The integration account session name.
@param custom_headers [Hash{String => String}] A hash of custom headers that
w... | [
"Gets",
"an",
"integration",
"account",
"session",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_logic/lib/2016-06-01/generated/azure_mgmt_logic/sessions.rb#L152-L154 | train | Gets the integration account integration specification. | [
30522,
13366,
2131,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
8346,
1035,
4070,
1035,
2171,
1010,
5219,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
2131,
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_storage/lib/2018-07-01/generated/azure_mgmt_storage/blob_containers.rb | Azure::Storage::Mgmt::V2018_07_01.BlobContainers.create_or_update_immutability_policy | def create_or_update_immutability_policy(resource_group_name, account_name, container_name, parameters:nil, if_match:nil, custom_headers:nil)
response = create_or_update_immutability_policy_async(resource_group_name, account_name, container_name, parameters:parameters, if_match:if_match, custom_headers:custom_hea... | ruby | def create_or_update_immutability_policy(resource_group_name, account_name, container_name, parameters:nil, if_match:nil, custom_headers:nil)
response = create_or_update_immutability_policy_async(resource_group_name, account_name, container_name, parameters:parameters, if_match:if_match, custom_headers:custom_hea... | [
"def",
"create_or_update_immutability_policy",
"(",
"resource_group_name",
",",
"account_name",
",",
"container_name",
",",
"parameters",
":",
"nil",
",",
"if_match",
":",
"nil",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"create_or_update_immutability_pol... | Creates or updates an unlocked immutability policy. ETag in If-Match is
honored if given but not required for this operation.
@param resource_group_name [String] The name of the resource group within the
user's subscription. The name is case insensitive.
@param account_name [String] The name of the storage account... | [
"Creates",
"or",
"updates",
"an",
"unlocked",
"immutability",
"policy",
".",
"ETag",
"in",
"If",
"-",
"Match",
"is",
"honored",
"if",
"given",
"but",
"not",
"required",
"for",
"this",
"operation",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/blob_containers.rb#L988-L991 | train | Creates or updates an immutability policy. | [
30522,
13366,
3443,
1035,
2030,
1035,
10651,
1035,
10047,
28120,
8010,
1035,
3343,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
4070,
1035,
2171,
1010,
11661,
1035,
2171,
1010,
11709,
1024,
9152,
2140,
1010,
2065,
1035,
2674,
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... |
rails/rails | railties/lib/rails/application.rb | Rails.Application.watchable_args | def watchable_args #:nodoc:
files, dirs = config.watchable_files.dup, config.watchable_dirs.dup
ActiveSupport::Dependencies.autoload_paths.each do |path|
dirs[path.to_s] = [:rb]
end
[files, dirs]
end | ruby | def watchable_args #:nodoc:
files, dirs = config.watchable_files.dup, config.watchable_dirs.dup
ActiveSupport::Dependencies.autoload_paths.each do |path|
dirs[path.to_s] = [:rb]
end
[files, dirs]
end | [
"def",
"watchable_args",
"#:nodoc:",
"files",
",",
"dirs",
"=",
"config",
".",
"watchable_files",
".",
"dup",
",",
"config",
".",
"watchable_dirs",
".",
"dup",
"ActiveSupport",
"::",
"Dependencies",
".",
"autoload_paths",
".",
"each",
"do",
"|",
"path",
"|",
... | Returns an array of file paths appended with a hash of
directories-extensions suitable for ActiveSupport::FileUpdateChecker
API. | [
"Returns",
"an",
"array",
"of",
"file",
"paths",
"appended",
"with",
"a",
"hash",
"of",
"directories",
"-",
"extensions",
"suitable",
"for",
"ActiveSupport",
"::",
"FileUpdateChecker",
"API",
"."
] | 85a8bc644be69908f05740a5886ec19cd3679df5 | https://github.com/rails/rails/blob/85a8bc644be69908f05740a5886ec19cd3679df5/railties/lib/rails/application.rb#L348-L356 | train | Returns the arguments for the watchable command. | [
30522,
13366,
3422,
3085,
1035,
12098,
5620,
1001,
1024,
7293,
10085,
1024,
6764,
1010,
16101,
2015,
1027,
9530,
8873,
2290,
1012,
3422,
3085,
1035,
6764,
1012,
4241,
2361,
1010,
9530,
8873,
2290,
1012,
3422,
3085,
1035,
16101,
2015,
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... |
castwide/solargraph | lib/solargraph/workspace.rb | Solargraph.Workspace.synchronize! | def synchronize! updater
source_hash[updater.filename] = source_hash[updater.filename].synchronize(updater)
end | ruby | def synchronize! updater
source_hash[updater.filename] = source_hash[updater.filename].synchronize(updater)
end | [
"def",
"synchronize!",
"updater",
"source_hash",
"[",
"updater",
".",
"filename",
"]",
"=",
"source_hash",
"[",
"updater",
".",
"filename",
"]",
".",
"synchronize",
"(",
"updater",
")",
"end"
] | Synchronize the workspace from the provided updater.
@param updater [Source::Updater]
@return [void] | [
"Synchronize",
"the",
"workspace",
"from",
"the",
"provided",
"updater",
"."
] | 47badb5d151aca775ccbe6c470236089eae7839d | https://github.com/castwide/solargraph/blob/47badb5d151aca775ccbe6c470236089eae7839d/lib/solargraph/workspace.rb#L123-L125 | train | Synchronize the updater. | [
30522,
13366,
26351,
8093,
10698,
4371,
999,
10651,
2099,
3120,
1035,
23325,
1031,
10651,
2099,
1012,
5371,
18442,
1033,
1027,
3120,
1035,
23325,
1031,
10651,
2099,
1012,
5371,
18442,
1033,
1012,
26351,
8093,
10698,
4371,
1006,
10651,
2099,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
ruby/rake | lib/rake/task.rb | Rake.Task.invoke | def invoke(*args)
task_args = TaskArguments.new(arg_names, args)
invoke_with_call_chain(task_args, InvocationChain::EMPTY)
end | ruby | def invoke(*args)
task_args = TaskArguments.new(arg_names, args)
invoke_with_call_chain(task_args, InvocationChain::EMPTY)
end | [
"def",
"invoke",
"(",
"*",
"args",
")",
"task_args",
"=",
"TaskArguments",
".",
"new",
"(",
"arg_names",
",",
"args",
")",
"invoke_with_call_chain",
"(",
"task_args",
",",
"InvocationChain",
"::",
"EMPTY",
")",
"end"
] | Invoke the task if it is needed. Prerequisites are invoked first. | [
"Invoke",
"the",
"task",
"if",
"it",
"is",
"needed",
".",
"Prerequisites",
"are",
"invoked",
"first",
"."
] | 1c22b490ee6cb8bd614fa8d0d6145f671466206b | https://github.com/ruby/rake/blob/1c22b490ee6cb8bd614fa8d0d6145f671466206b/lib/rake/task.rb#L181-L184 | train | Invoke the task with the given arguments | [
30522,
13366,
1999,
6767,
3489,
1006,
1008,
12098,
5620,
1007,
4708,
1035,
12098,
5620,
1027,
4708,
2906,
22850,
11187,
1012,
2047,
1006,
12098,
2290,
1035,
3415,
1010,
12098,
5620,
1007,
1999,
6767,
3489,
1035,
2007,
1035,
2655,
1035,
4677... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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_performances | def get_image_performances(project_id, iteration_id, tag_ids:nil, order_by:nil, take:50, skip:0, custom_headers:nil)
response = get_image_performances_async(project_id, iteration_id, tag_ids:tag_ids, order_by:order_by, take:take, skip:skip, custom_headers:custom_headers).value!
response.body unless response... | ruby | def get_image_performances(project_id, iteration_id, tag_ids:nil, order_by:nil, take:50, skip:0, custom_headers:nil)
response = get_image_performances_async(project_id, iteration_id, tag_ids:tag_ids, order_by:order_by, take:take, skip:skip, custom_headers:custom_headers).value!
response.body unless response... | [
"def",
"get_image_performances",
"(",
"project_id",
",",
"iteration_id",
",",
"tag_ids",
":",
"nil",
",",
"order_by",
":",
"nil",
",",
"take",
":",
"50",
",",
"skip",
":",
"0",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"get_image_performances_... | Get image with its prediction for a given project iteration.
This API supports batching and range selection. By default it will only
return first 50 images matching images.
Use the {take} and {skip} parameters to control how many images to return in
a given batch.
The filtering is on an and/or relationship. For e... | [
"Get",
"image",
"with",
"its",
"prediction",
"for",
"a",
"given",
"project",
"iteration",
"."
] | 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#L2552-L2555 | train | Gets the image performance for an iteration. | [
30522,
13366,
2131,
1035,
3746,
1035,
4616,
1006,
2622,
1035,
8909,
1010,
27758,
1035,
8909,
1010,
6415,
1035,
8909,
2015,
1024,
9152,
2140,
1010,
2344,
1035,
2011,
1024,
9152,
2140,
1010,
2202,
1024,
2753,
1010,
13558,
1024,
1014,
1010,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
rails/rails | activerecord/lib/active_record/relation.rb | ActiveRecord.Relation.to_sql | def to_sql
@to_sql ||= begin
if eager_loading?
apply_join_dependency do |relation, join_dependency|
relation = join_dependency.apply_column_aliases(relation)
relation.to_sql
end
else
conn = klass.connection
conn.unprepared_statement {... | ruby | def to_sql
@to_sql ||= begin
if eager_loading?
apply_join_dependency do |relation, join_dependency|
relation = join_dependency.apply_column_aliases(relation)
relation.to_sql
end
else
conn = klass.connection
conn.unprepared_statement {... | [
"def",
"to_sql",
"@to_sql",
"||=",
"begin",
"if",
"eager_loading?",
"apply_join_dependency",
"do",
"|",
"relation",
",",
"join_dependency",
"|",
"relation",
"=",
"join_dependency",
".",
"apply_column_aliases",
"(",
"relation",
")",
"relation",
".",
"to_sql",
"end",
... | Returns sql statement for the relation.
User.where(name: 'Oscar').to_sql
# => SELECT "users".* FROM "users" WHERE "users"."name" = 'Oscar' | [
"Returns",
"sql",
"statement",
"for",
"the",
"relation",
"."
] | 85a8bc644be69908f05740a5886ec19cd3679df5 | https://github.com/rails/rails/blob/85a8bc644be69908f05740a5886ec19cd3679df5/activerecord/lib/active_record/relation.rb#L639-L651 | train | Returns the SQL representation of the relation. | [
30522,
13366,
2000,
1035,
29296,
1030,
2000,
1035,
29296,
1064,
1064,
1027,
4088,
2065,
9461,
1035,
10578,
1029,
6611,
1035,
3693,
1035,
24394,
2079,
1064,
7189,
1010,
3693,
1035,
24394,
1064,
7189,
1027,
3693,
1035,
24394,
1012,
6611,
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_datalake_store/lib/2015-10-01-preview/generated/azure_mgmt_datalake_store/account.rb | Azure::DataLakeStore::Mgmt::V2015_10_01_preview.Account.list_firewall_rules | def list_firewall_rules(resource_group_name, account_name, custom_headers:nil)
first_page = list_firewall_rules_as_lazy(resource_group_name, account_name, custom_headers:custom_headers)
first_page.get_all_items
end | ruby | def list_firewall_rules(resource_group_name, account_name, custom_headers:nil)
first_page = list_firewall_rules_as_lazy(resource_group_name, account_name, custom_headers:custom_headers)
first_page.get_all_items
end | [
"def",
"list_firewall_rules",
"(",
"resource_group_name",
",",
"account_name",
",",
"custom_headers",
":",
"nil",
")",
"first_page",
"=",
"list_firewall_rules_as_lazy",
"(",
"resource_group_name",
",",
"account_name",
",",
"custom_headers",
":custom_headers",
")",
"first_... | Lists the Data Lake Store firewall rules within the specified Data Lake Store
account.
@param resource_group_name [String] The name of the Azure resource group that
contains the Data Lake Store account.
@param account_name [String] The name of the Data Lake Store account from
which to get the firewall rules.
@pa... | [
"Lists",
"the",
"Data",
"Lake",
"Store",
"firewall",
"rules",
"within",
"the",
"specified",
"Data",
"Lake",
"Store",
"account",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_datalake_store/lib/2015-10-01-preview/generated/azure_mgmt_datalake_store/account.rb#L233-L236 | train | Gets the firewall rules for the specified Data Lake Store account. | [
30522,
13366,
2862,
1035,
2543,
9628,
1035,
3513,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
4070,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
2034,
1035,
3931,
1027,
2862,
1035,
2543,
9628,
1035,
3513,
1035,
2004,
1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_network/lib/2018-07-01/generated/azure_mgmt_network/route_tables.rb | Azure::Network::Mgmt::V2018_07_01.RouteTables.begin_update_tags_with_http_info | def begin_update_tags_with_http_info(resource_group_name, route_table_name, parameters, custom_headers:nil)
begin_update_tags_async(resource_group_name, route_table_name, parameters, custom_headers:custom_headers).value!
end | ruby | def begin_update_tags_with_http_info(resource_group_name, route_table_name, parameters, custom_headers:nil)
begin_update_tags_async(resource_group_name, route_table_name, parameters, custom_headers:custom_headers).value!
end | [
"def",
"begin_update_tags_with_http_info",
"(",
"resource_group_name",
",",
"route_table_name",
",",
"parameters",
",",
"custom_headers",
":",
"nil",
")",
"begin_update_tags_async",
"(",
"resource_group_name",
",",
"route_table_name",
",",
"parameters",
",",
"custom_headers... | Updates a route table tags.
@param resource_group_name [String] The name of the resource group.
@param route_table_name [String] The name of the route table.
@param parameters [TagsObject] Parameters supplied to update route table
tags.
@param custom_headers [Hash{String => String}] A hash of custom headers that
... | [
"Updates",
"a",
"route",
"table",
"tags",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_network/lib/2018-07-01/generated/azure_mgmt_network/route_tables.rb#L647-L649 | train | Updates a route table tags. | [
30522,
13366,
4088,
1035,
10651,
1035,
22073,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2799,
1035,
2795,
1035,
2171,
1010,
11709,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
4088,
1035,
10651... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_logic/lib/2016-06-01/generated/azure_mgmt_logic/workflow_run_action_repetitions.rb | Azure::Logic::Mgmt::V2016_06_01.WorkflowRunActionRepetitions.list_expression_traces | def list_expression_traces(resource_group_name, workflow_name, run_name, action_name, repetition_name, custom_headers:nil)
response = list_expression_traces_async(resource_group_name, workflow_name, run_name, action_name, repetition_name, custom_headers:custom_headers).value!
response.body unless response.n... | ruby | def list_expression_traces(resource_group_name, workflow_name, run_name, action_name, repetition_name, custom_headers:nil)
response = list_expression_traces_async(resource_group_name, workflow_name, run_name, action_name, repetition_name, custom_headers:custom_headers).value!
response.body unless response.n... | [
"def",
"list_expression_traces",
"(",
"resource_group_name",
",",
"workflow_name",
",",
"run_name",
",",
"action_name",
",",
"repetition_name",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"list_expression_traces_async",
"(",
"resource_group_name",
",",
"wor... | Lists a workflow run expression trace.
@param resource_group_name [String] The resource group name.
@param workflow_name [String] The workflow name.
@param run_name [String] The workflow run name.
@param action_name [String] The workflow action name.
@param repetition_name [String] The workflow repetition.
@para... | [
"Lists",
"a",
"workflow",
"run",
"expression",
"trace",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_logic/lib/2016-06-01/generated/azure_mgmt_logic/workflow_run_action_repetitions.rb#L241-L244 | train | Gets the expression traces for a workflow run. | [
30522,
13366,
2862,
1035,
3670,
1035,
10279,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2147,
12314,
1035,
2171,
1010,
2448,
1035,
2171,
1010,
2895,
1035,
2171,
1010,
23318,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_web/lib/2018-02-01/generated/azure_mgmt_web/app_service_environments.rb | Azure::Web::Mgmt::V2018_02_01.AppServiceEnvironments.list_usages_next | def list_usages_next(next_page_link, custom_headers:nil)
response = list_usages_next_async(next_page_link, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def list_usages_next(next_page_link, custom_headers:nil)
response = list_usages_next_async(next_page_link, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"list_usages_next",
"(",
"next_page_link",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"list_usages_next_async",
"(",
"next_page_link",
",",
"custom_headers",
":custom_headers",
")",
".",
"value!",
"response",
".",
"body",
"unless",
"response",
"... | Get global usage metrics of an App Service Environment.
Get global usage metrics of an App Service Environment.
@param next_page_link [String] The NextLink from the previous successful call
to List operation.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP r... | [
"Get",
"global",
"usage",
"metrics",
"of",
"an",
"App",
"Service",
"Environment",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_web/lib/2018-02-01/generated/azure_mgmt_web/app_service_environments.rb#L6366-L6369 | train | Gets the list of all the available usages for a given resource group. | [
30522,
13366,
2862,
1035,
8192,
2015,
1035,
2279,
1006,
2279,
1035,
3931,
1035,
4957,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
2862,
1035,
8192,
2015,
1035,
2279,
1035,
2004,
6038,
2278,
1006,
2279,
1035,
3931,
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... |
grpc/grpc | src/ruby/lib/grpc/generic/client_stub.rb | GRPC.ClientStub.request_response | def request_response(method, req, marshal, unmarshal,
deadline: nil,
return_op: false,
parent: nil,
credentials: nil,
metadata: {})
c = new_active_call(method, marshal, unmarshal,
... | ruby | def request_response(method, req, marshal, unmarshal,
deadline: nil,
return_op: false,
parent: nil,
credentials: nil,
metadata: {})
c = new_active_call(method, marshal, unmarshal,
... | [
"def",
"request_response",
"(",
"method",
",",
"req",
",",
"marshal",
",",
"unmarshal",
",",
"deadline",
":",
"nil",
",",
"return_op",
":",
"false",
",",
"parent",
":",
"nil",
",",
"credentials",
":",
"nil",
",",
"metadata",
":",
"{",
"}",
")",
"c",
... | Creates a new ClientStub.
Minimally, a stub is created with the just the host of the gRPC service
it wishes to access, e.g.,
my_stub = ClientStub.new(example.host.com:50505,
:this_channel_is_insecure)
If a channel_override argument is passed, it will be used as the
underlying chann... | [
"Creates",
"a",
"new",
"ClientStub",
"."
] | f3937f0e55227a4ef3a23f895d3b204a947610f8 | https://github.com/grpc/grpc/blob/f3937f0e55227a4ef3a23f895d3b204a947610f8/src/ruby/lib/grpc/generic/client_stub.rb#L148-L181 | train | Creates a new active_call and returns a new active_call object. | [
30522,
13366,
5227,
1035,
3433,
1006,
4118,
1010,
2128,
4160,
1010,
8610,
1010,
4895,
7849,
7377,
2140,
1010,
15117,
1024,
9152,
2140,
1010,
2709,
1035,
6728,
1024,
6270,
1010,
6687,
1024,
9152,
2140,
1010,
22496,
1024,
9152,
2140,
1010,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | data/azure_key_vault/lib/2016-10-01/generated/azure_key_vault/key_vault_client.rb | Azure::KeyVault::V2016_10_01.KeyVaultClient.get_sas_definition_with_http_info | def get_sas_definition_with_http_info(vault_base_url, storage_account_name, sas_definition_name, custom_headers:nil)
get_sas_definition_async(vault_base_url, storage_account_name, sas_definition_name, custom_headers:custom_headers).value!
end | ruby | def get_sas_definition_with_http_info(vault_base_url, storage_account_name, sas_definition_name, custom_headers:nil)
get_sas_definition_async(vault_base_url, storage_account_name, sas_definition_name, custom_headers:custom_headers).value!
end | [
"def",
"get_sas_definition_with_http_info",
"(",
"vault_base_url",
",",
"storage_account_name",
",",
"sas_definition_name",
",",
"custom_headers",
":",
"nil",
")",
"get_sas_definition_async",
"(",
"vault_base_url",
",",
"storage_account_name",
",",
"sas_definition_name",
",",... | Gets information about a SAS definition for the specified storage account.
This operation requires the storage/getsas permission.
@param vault_base_url [String] The vault name, for example
https://myvault.vault.azure.net.
@param storage_account_name [String] The name of the storage account.
@param sas_definition_... | [
"Gets",
"information",
"about",
"a",
"SAS",
"definition",
"for",
"the",
"specified",
"storage",
"account",
".",
"This",
"operation",
"requires",
"the",
"storage",
"/",
"getsas",
"permission",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_key_vault/lib/2016-10-01/generated/azure_key_vault/key_vault_client.rb#L7901-L7903 | train | Gets the specified SAS definition. | [
30522,
13366,
2131,
1035,
21871,
1035,
6210,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
11632,
1035,
2918,
1035,
24471,
2140,
1010,
5527,
1035,
4070,
1035,
2171,
1010,
21871,
1035,
6210,
1035,
2171,
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... |
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_flow_log_status | def begin_get_flow_log_status(resource_group_name, network_watcher_name, parameters, custom_headers:nil)
response = begin_get_flow_log_status_async(resource_group_name, network_watcher_name, parameters, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def begin_get_flow_log_status(resource_group_name, network_watcher_name, parameters, custom_headers:nil)
response = begin_get_flow_log_status_async(resource_group_name, network_watcher_name, parameters, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"begin_get_flow_log_status",
"(",
"resource_group_name",
",",
"network_watcher_name",
",",
"parameters",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"begin_get_flow_log_status_async",
"(",
"resource_group_name",
",",
"network_watcher_name",
",",
"paramet... | Queries status of flow log and traffic analytics (optional) on a specified
resource.
@param resource_group_name [String] The name of the network watcher resource
group.
@param network_watcher_name [String] The name of the network watcher
resource.
@param parameters [FlowLogStatusParameters] Parameters that defin... | [
"Queries",
"status",
"of",
"flow",
"log",
"and",
"traffic",
"analytics",
"(",
"optional",
")",
"on",
"a",
"specified",
"resource",
"."
] | 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#L2000-L2003 | train | Gets the flow log status of the specified resource group. | [
30522,
13366,
4088,
1035,
2131,
1035,
4834,
1035,
8833,
1035,
3570,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2897,
1035,
3422,
2121,
1035,
2171,
1010,
11709,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
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... |
samvera/hyrax | app/presenters/hyrax/collection_presenter.rb | Hyrax.CollectionPresenter.managed_access | def managed_access
return I18n.t('hyrax.dashboard.my.collection_list.managed_access.manage') if current_ability.can?(:edit, solr_document)
return I18n.t('hyrax.dashboard.my.collection_list.managed_access.deposit') if current_ability.can?(:deposit, solr_document)
return I18n.t('hyrax.dashboard.my.colle... | ruby | def managed_access
return I18n.t('hyrax.dashboard.my.collection_list.managed_access.manage') if current_ability.can?(:edit, solr_document)
return I18n.t('hyrax.dashboard.my.collection_list.managed_access.deposit') if current_ability.can?(:deposit, solr_document)
return I18n.t('hyrax.dashboard.my.colle... | [
"def",
"managed_access",
"return",
"I18n",
".",
"t",
"(",
"'hyrax.dashboard.my.collection_list.managed_access.manage'",
")",
"if",
"current_ability",
".",
"can?",
"(",
":edit",
",",
"solr_document",
")",
"return",
"I18n",
".",
"t",
"(",
"'hyrax.dashboard.my.collection_l... | For the Managed Collections tab, determine the label to use for the level of access the user has for this admin set.
Checks from most permissive to most restrictive.
@return String the access label (e.g. Manage, Deposit, View) | [
"For",
"the",
"Managed",
"Collections",
"tab",
"determine",
"the",
"label",
"to",
"use",
"for",
"the",
"level",
"of",
"access",
"the",
"user",
"has",
"for",
"this",
"admin",
"set",
".",
"Checks",
"from",
"most",
"permissive",
"to",
"most",
"restrictive",
"... | e2b4f56e829a53b1f11296324736e9d5b8c9ee5f | https://github.com/samvera/hyrax/blob/e2b4f56e829a53b1f11296324736e9d5b8c9ee5f/app/presenters/hyrax/collection_presenter.rb#L166-L171 | train | Returns the index of the managed_access_index that is used to determine the index of the managed_access_index. | [
30522,
13366,
3266,
1035,
3229,
2709,
1045,
15136,
2078,
1012,
1056,
1006,
1005,
1044,
19563,
2595,
1012,
24923,
1012,
2026,
1012,
3074,
1035,
2862,
1012,
3266,
1035,
3229,
1012,
6133,
1005,
1007,
2065,
2783,
1035,
3754,
1012,
2064,
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... |
sunspot/sunspot | sunspot/lib/sunspot/indexer.rb | Sunspot.Indexer.add_atomic_update | def add_atomic_update(clazz, updates={})
documents = updates.map { |id, m| prepare_atomic_update(clazz, id, m) }
add_batch_documents(documents)
end | ruby | def add_atomic_update(clazz, updates={})
documents = updates.map { |id, m| prepare_atomic_update(clazz, id, m) }
add_batch_documents(documents)
end | [
"def",
"add_atomic_update",
"(",
"clazz",
",",
"updates",
"=",
"{",
"}",
")",
"documents",
"=",
"updates",
".",
"map",
"{",
"|",
"id",
",",
"m",
"|",
"prepare_atomic_update",
"(",
"clazz",
",",
"id",
",",
"m",
")",
"}",
"add_batch_documents",
"(",
"doc... | Construct a representation of the given class instances for atomic properties update
and send it to the connection for indexing
==== Parameters
clazz<Class>:: the class of the models to be updated
updates<Hash>:: hash of updates where keys are model ids
and values are hash with property name/valu... | [
"Construct",
"a",
"representation",
"of",
"the",
"given",
"class",
"instances",
"for",
"atomic",
"properties",
"update",
"and",
"send",
"it",
"to",
"the",
"connection",
"for",
"indexing"
] | 31dd76cd7a14a4ef7bd541de97483d8cd72ff685 | https://github.com/sunspot/sunspot/blob/31dd76cd7a14a4ef7bd541de97483d8cd72ff685/sunspot/lib/sunspot/indexer.rb#L39-L42 | train | Add an atomic update to the database | [
30522,
13366,
5587,
1035,
9593,
1035,
10651,
1006,
18856,
10936,
2480,
1010,
14409,
1027,
1063,
1065,
1007,
5491,
1027,
14409,
1012,
4949,
1063,
1064,
8909,
1010,
1049,
1064,
7374,
1035,
9593,
1035,
10651,
1006,
18856,
10936,
2480,
1010,
89... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
fastlane/fastlane | fastlane/lib/fastlane/plugins/plugin_manager.rb | Fastlane.PluginManager.plugin_is_added_as_dependency? | def plugin_is_added_as_dependency?(plugin_name)
UI.user_error!("fastlane plugins must start with '#{self.class.plugin_prefix}' string") unless plugin_name.start_with?(self.class.plugin_prefix)
return available_plugins.include?(plugin_name)
end | ruby | def plugin_is_added_as_dependency?(plugin_name)
UI.user_error!("fastlane plugins must start with '#{self.class.plugin_prefix}' string") unless plugin_name.start_with?(self.class.plugin_prefix)
return available_plugins.include?(plugin_name)
end | [
"def",
"plugin_is_added_as_dependency?",
"(",
"plugin_name",
")",
"UI",
".",
"user_error!",
"(",
"\"fastlane plugins must start with '#{self.class.plugin_prefix}' string\"",
")",
"unless",
"plugin_name",
".",
"start_with?",
"(",
"self",
".",
"class",
".",
"plugin_prefix",
"... | Check if a plugin is added as dependency to either the
Gemfile or the Pluginfile | [
"Check",
"if",
"a",
"plugin",
"is",
"added",
"as",
"dependency",
"to",
"either",
"the",
"Gemfile",
"or",
"the",
"Pluginfile"
] | 457c5d647c77f0e078dafa5129da616914e002c5 | https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/fastlane/lib/fastlane/plugins/plugin_manager.rb#L71-L74 | train | Check if a plugin is added as dependency | [
30522,
13366,
13354,
2378,
1035,
2003,
1035,
2794,
1035,
2004,
1035,
24394,
1029,
1006,
13354,
2378,
1035,
2171,
1007,
21318,
1012,
5310,
1035,
7561,
999,
1006,
1000,
3435,
20644,
13354,
7076,
2442,
2707,
2007,
1005,
1001,
1063,
2969,
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... |
samvera/hyrax | app/models/concerns/hyrax/ability.rb | Hyrax.Ability.download_groups | def download_groups(id)
doc = permissions_doc(id)
return [] if doc.nil?
groups = Array(doc[self.class.read_group_field]) + Array(doc[self.class.edit_group_field])
Rails.logger.debug("[CANCAN] download_groups: #{groups.inspect}")
groups
end | ruby | def download_groups(id)
doc = permissions_doc(id)
return [] if doc.nil?
groups = Array(doc[self.class.read_group_field]) + Array(doc[self.class.edit_group_field])
Rails.logger.debug("[CANCAN] download_groups: #{groups.inspect}")
groups
end | [
"def",
"download_groups",
"(",
"id",
")",
"doc",
"=",
"permissions_doc",
"(",
"id",
")",
"return",
"[",
"]",
"if",
"doc",
".",
"nil?",
"groups",
"=",
"Array",
"(",
"doc",
"[",
"self",
".",
"class",
".",
"read_group_field",
"]",
")",
"+",
"Array",
"("... | Samvera doesn't use download user/groups, so make it an alias to read
Grant all groups with read or edit access permission to download | [
"Samvera",
"doesn",
"t",
"use",
"download",
"user",
"/",
"groups",
"so",
"make",
"it",
"an",
"alias",
"to",
"read",
"Grant",
"all",
"groups",
"with",
"read",
"or",
"edit",
"access",
"permission",
"to",
"download"
] | e2b4f56e829a53b1f11296324736e9d5b8c9ee5f | https://github.com/samvera/hyrax/blob/e2b4f56e829a53b1f11296324736e9d5b8c9ee5f/app/models/concerns/hyrax/ability.rb#L38-L44 | train | Returns an array of groups that are available for the user. | [
30522,
13366,
8816,
1035,
2967,
1006,
8909,
1007,
9986,
1027,
6656,
2015,
1035,
9986,
1006,
8909,
1007,
2709,
1031,
1033,
2065,
9986,
1012,
9152,
2140,
1029,
2967,
1027,
9140,
1006,
9986,
1031,
2969,
1012,
2465,
1012,
3191,
1035,
2177,
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... |
meew0/discordrb | lib/discordrb/data/message.rb | Discordrb.Message.delete_own_reaction | def delete_own_reaction(reaction)
reaction = reaction.to_reaction if reaction.respond_to?(:to_reaction)
API::Channel.delete_own_reaction(@bot.token, @channel.id, @id, reaction)
end | ruby | def delete_own_reaction(reaction)
reaction = reaction.to_reaction if reaction.respond_to?(:to_reaction)
API::Channel.delete_own_reaction(@bot.token, @channel.id, @id, reaction)
end | [
"def",
"delete_own_reaction",
"(",
"reaction",
")",
"reaction",
"=",
"reaction",
".",
"to_reaction",
"if",
"reaction",
".",
"respond_to?",
"(",
":to_reaction",
")",
"API",
"::",
"Channel",
".",
"delete_own_reaction",
"(",
"@bot",
".",
"token",
",",
"@channel",
... | Deletes this client's reaction on this message.
@param reaction [String, #to_reaction] the reaction to remove | [
"Deletes",
"this",
"client",
"s",
"reaction",
"on",
"this",
"message",
"."
] | 764298a1ff0be69a1853b510d736f21c2b91a2fe | https://github.com/meew0/discordrb/blob/764298a1ff0be69a1853b510d736f21c2b91a2fe/lib/discordrb/data/message.rb#L277-L280 | train | Delete the reaction from this channel. | [
30522,
13366,
3972,
12870,
1035,
2219,
1035,
4668,
1006,
4668,
1007,
4668,
1027,
4668,
1012,
2000,
1035,
4668,
2065,
4668,
1012,
6869,
1035,
2000,
1029,
1006,
1024,
2000,
1035,
4668,
1007,
17928,
1024,
1024,
3149,
1012,
3972,
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... |
Azure/azure-sdk-for-ruby | data/azure_service_fabric/lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb | Azure::ServiceFabric::V6_2_0_9.ServiceFabricClientAPIs.get_service_name_info_with_http_info | def get_service_name_info_with_http_info(partition_id, timeout:60, custom_headers:nil)
get_service_name_info_async(partition_id, timeout:timeout, custom_headers:custom_headers).value!
end | ruby | def get_service_name_info_with_http_info(partition_id, timeout:60, custom_headers:nil)
get_service_name_info_async(partition_id, timeout:timeout, custom_headers:custom_headers).value!
end | [
"def",
"get_service_name_info_with_http_info",
"(",
"partition_id",
",",
"timeout",
":",
"60",
",",
"custom_headers",
":",
"nil",
")",
"get_service_name_info_async",
"(",
"partition_id",
",",
"timeout",
":",
"timeout",
",",
"custom_headers",
":custom_headers",
")",
".... | Gets the name of the Service Fabric service for a partition.
Gets name of the service for the specified partition. A 404 error is returned
if the partition ID does not exist in the cluster.
@param partition_id The identity of the partition.
@param timeout [Integer] The server timeout for performing the operation ... | [
"Gets",
"the",
"name",
"of",
"the",
"Service",
"Fabric",
"service",
"for",
"a",
"partition",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_service_fabric/lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb#L12113-L12115 | train | Gets the service name info for the specified partition. | [
30522,
13366,
2131,
1035,
2326,
1035,
2171,
1035,
18558,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
13571,
1035,
8909,
1010,
2051,
5833,
1024,
3438,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
2131,
1035,
2326,
1035,
2171,
1035,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
decidim/decidim | decidim-core/app/helpers/decidim/meta_tags_helper.rb | Decidim.MetaTagsHelper.add_decidim_meta_tags | def add_decidim_meta_tags(tags)
add_decidim_page_title(tags[:title])
add_decidim_meta_description(tags[:description])
add_decidim_meta_url(tags[:url])
add_decidim_meta_twitter_handler(tags[:twitter_handler])
add_decidim_meta_image_url(tags[:image_url])
end | ruby | def add_decidim_meta_tags(tags)
add_decidim_page_title(tags[:title])
add_decidim_meta_description(tags[:description])
add_decidim_meta_url(tags[:url])
add_decidim_meta_twitter_handler(tags[:twitter_handler])
add_decidim_meta_image_url(tags[:image_url])
end | [
"def",
"add_decidim_meta_tags",
"(",
"tags",
")",
"add_decidim_page_title",
"(",
"tags",
"[",
":title",
"]",
")",
"add_decidim_meta_description",
"(",
"tags",
"[",
":description",
"]",
")",
"add_decidim_meta_url",
"(",
"tags",
"[",
":url",
"]",
")",
"add_decidim_m... | Public: Sets the given metatags for the page. It's a wrapper for the individual
methods, so that you can set multiple values with a single call. See the docs for
the other methods to see how they work.
tags - A Hash containing the meta tag name as keys and its content as values.
Returns nothing. | [
"Public",
":",
"Sets",
"the",
"given",
"metatags",
"for",
"the",
"page",
".",
"It",
"s",
"a",
"wrapper",
"for",
"the",
"individual",
"methods",
"so",
"that",
"you",
"can",
"set",
"multiple",
"values",
"with",
"a",
"single",
"call",
".",
"See",
"the",
"... | 6e2b14e559a63088669904e3c5c49a5180700cf7 | https://github.com/decidim/decidim/blob/6e2b14e559a63088669904e3c5c49a5180700cf7/decidim-core/app/helpers/decidim/meta_tags_helper.rb#L14-L20 | train | Adds the decidim meta tags to the document. | [
30522,
13366,
5587,
1035,
11703,
28173,
2213,
1035,
18804,
1035,
22073,
1006,
22073,
1007,
5587,
1035,
11703,
28173,
2213,
1035,
3931,
1035,
2516,
1006,
22073,
1031,
1024,
2516,
1033,
1007,
5587,
1035,
11703,
28173,
2213,
1035,
18804,
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... |
sds/haml-lint | lib/haml_lint/cli.rb | HamlLint.CLI.act_on_options | def act_on_options(options)
configure_logger(options)
if options[:help]
print_help(options)
Sysexits::EX_OK
elsif options[:version] || options[:verbose_version]
print_version(options)
Sysexits::EX_OK
elsif options[:show_linters]
print_available_linters
... | ruby | def act_on_options(options)
configure_logger(options)
if options[:help]
print_help(options)
Sysexits::EX_OK
elsif options[:version] || options[:verbose_version]
print_version(options)
Sysexits::EX_OK
elsif options[:show_linters]
print_available_linters
... | [
"def",
"act_on_options",
"(",
"options",
")",
"configure_logger",
"(",
"options",
")",
"if",
"options",
"[",
":help",
"]",
"print_help",
"(",
"options",
")",
"Sysexits",
"::",
"EX_OK",
"elsif",
"options",
"[",
":version",
"]",
"||",
"options",
"[",
":verbose... | Given the provided options, execute the appropriate command.
@return [Integer] exit status code | [
"Given",
"the",
"provided",
"options",
"execute",
"the",
"appropriate",
"command",
"."
] | 024c773667e54cf88db938c2b368977005d70ee8 | https://github.com/sds/haml-lint/blob/024c773667e54cf88db938c2b368977005d70ee8/lib/haml_lint/cli.rb#L37-L55 | train | Acts on the options | [
30522,
13366,
2552,
1035,
2006,
1035,
7047,
1006,
7047,
1007,
9530,
8873,
27390,
2063,
1035,
8833,
4590,
1006,
7047,
1007,
2065,
7047,
1031,
1024,
2393,
1033,
6140,
1035,
2393,
1006,
7047,
1007,
25353,
3366,
9048,
3215,
1024,
1024,
4654,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/client.rb | Spaceship.Client.store_csrf_tokens | def store_csrf_tokens(response)
if response && response.headers
tokens = response.headers.select { |k, v| %w(csrf csrf_ts).include?(k) }
if tokens && !tokens.empty?
@csrf_tokens = tokens
end
end
end | ruby | def store_csrf_tokens(response)
if response && response.headers
tokens = response.headers.select { |k, v| %w(csrf csrf_ts).include?(k) }
if tokens && !tokens.empty?
@csrf_tokens = tokens
end
end
end | [
"def",
"store_csrf_tokens",
"(",
"response",
")",
"if",
"response",
"&&",
"response",
".",
"headers",
"tokens",
"=",
"response",
".",
"headers",
".",
"select",
"{",
"|",
"k",
",",
"v",
"|",
"%w(",
"csrf",
"csrf_ts",
")",
".",
"include?",
"(",
"k",
")",... | Is called from `parse_response` to store the latest csrf_token (if available) | [
"Is",
"called",
"from",
"parse_response",
"to",
"store",
"the",
"latest",
"csrf_token",
"(",
"if",
"available",
")"
] | 457c5d647c77f0e078dafa5129da616914e002c5 | https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/spaceship/lib/spaceship/client.rb#L776-L783 | train | Stores the csrf tokens in the response. | [
30522,
13366,
3573,
1035,
20116,
12881,
1035,
19204,
2015,
1006,
3433,
1007,
2065,
3433,
1004,
1004,
30524,
4064,
1029,
1030,
20116,
12881,
1035,
19204,
2015,
1027,
19204,
2015,
2203,
2203,
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... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_container_registry/lib/2017-10-01/generated/azure_mgmt_container_registry/registries.rb | Azure::ContainerRegistry::Mgmt::V2017_10_01.Registries.begin_update_policies_with_http_info | def begin_update_policies_with_http_info(resource_group_name, registry_name, registry_policies_update_parameters, custom_headers:nil)
begin_update_policies_async(resource_group_name, registry_name, registry_policies_update_parameters, custom_headers:custom_headers).value!
end | ruby | def begin_update_policies_with_http_info(resource_group_name, registry_name, registry_policies_update_parameters, custom_headers:nil)
begin_update_policies_async(resource_group_name, registry_name, registry_policies_update_parameters, custom_headers:custom_headers).value!
end | [
"def",
"begin_update_policies_with_http_info",
"(",
"resource_group_name",
",",
"registry_name",
",",
"registry_policies_update_parameters",
",",
"custom_headers",
":",
"nil",
")",
"begin_update_policies_async",
"(",
"resource_group_name",
",",
"registry_name",
",",
"registry_p... | Updates the policies for the specified container registry.
@param resource_group_name [String] The name of the resource group to which
the container registry belongs.
@param registry_name [String] The name of the container registry.
@param registry_policies_update_parameters [RegistryPolicies] The parameters
for ... | [
"Updates",
"the",
"policies",
"for",
"the",
"specified",
"container",
"registry",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_container_registry/lib/2017-10-01/generated/azure_mgmt_container_registry/registries.rb#L1513-L1515 | train | Updates the policies of the specified container registry. | [
30522,
13366,
4088,
1035,
10651,
1035,
6043,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
15584,
1035,
2171,
1010,
15584,
1035,
6043,
1035,
10651,
1035,
11709,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
214... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_web/lib/2018-02-01/generated/azure_mgmt_web/app_service_environments.rb | Azure::Web::Mgmt::V2018_02_01.AppServiceEnvironments.list_multi_role_pool_instance_metric_definitions_as_lazy | def list_multi_role_pool_instance_metric_definitions_as_lazy(resource_group_name, name, instance, custom_headers:nil)
response = list_multi_role_pool_instance_metric_definitions_async(resource_group_name, name, instance, custom_headers:custom_headers).value!
unless response.nil?
page = response.body... | ruby | def list_multi_role_pool_instance_metric_definitions_as_lazy(resource_group_name, name, instance, custom_headers:nil)
response = list_multi_role_pool_instance_metric_definitions_async(resource_group_name, name, instance, custom_headers:custom_headers).value!
unless response.nil?
page = response.body... | [
"def",
"list_multi_role_pool_instance_metric_definitions_as_lazy",
"(",
"resource_group_name",
",",
"name",
",",
"instance",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"list_multi_role_pool_instance_metric_definitions_async",
"(",
"resource_group_name",
",",
"name... | Get metric definitions for a specific instance of a multi-role pool of an App
Service Environment.
Get metric definitions for a specific instance of a multi-role pool of an App
Service Environment.
@param resource_group_name [String] Name of the resource group to which the
resource belongs.
@param name [String]... | [
"Get",
"metric",
"definitions",
"for",
"a",
"specific",
"instance",
"of",
"a",
"multi",
"-",
"role",
"pool",
"of",
"an",
"App",
"Service",
"Environment",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_web/lib/2018-02-01/generated/azure_mgmt_web/app_service_environments.rb#L7582-L7591 | train | Gets all metric definitions for a multi - role pool instance. | [
30522,
13366,
2862,
1035,
4800,
1035,
2535,
1035,
4770,
1035,
6013,
1035,
12046,
1035,
15182,
1035,
2004,
1035,
13971,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2171,
1010,
6013,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
sds/scss-lint | lib/scss_lint/linter/indentation.rb | SCSSLint.Linter::Indentation.visit_atroot | def visit_atroot(node, &block)
if at_root_contains_inline_selector?(node)
return if check_indentation(node)
yield
else
check_and_visit_children(node, &block)
end
end | ruby | def visit_atroot(node, &block)
if at_root_contains_inline_selector?(node)
return if check_indentation(node)
yield
else
check_and_visit_children(node, &block)
end
end | [
"def",
"visit_atroot",
"(",
"node",
",",
"&",
"block",
")",
"if",
"at_root_contains_inline_selector?",
"(",
"node",
")",
"return",
"if",
"check_indentation",
"(",
"node",
")",
"yield",
"else",
"check_and_visit_children",
"(",
"node",
",",
"block",
")",
"end",
... | Need to define this explicitly since @at-root directives can contain
inline selectors which produces the same parse tree as if the selector was
nested within it. For example:
@at-root {
.something {
...
}
}
...and...
@at-root .something {
...
}
...produce the same parse tree, b... | [
"Need",
"to",
"define",
"this",
"explicitly",
"since",
"@at",
"-",
"root",
"directives",
"can",
"contain",
"inline",
"selectors",
"which",
"produces",
"the",
"same",
"parse",
"tree",
"as",
"if",
"the",
"selector",
"was",
"nested",
"within",
"it",
".",
"For",... | e99afe4ede041a431a06e585c12ce82f6ad50116 | https://github.com/sds/scss-lint/blob/e99afe4ede041a431a06e585c12ce82f6ad50116/lib/scss_lint/linter/indentation.rb#L90-L97 | train | Visit the at - root node | [
30522,
13366,
3942,
1035,
2012,
3217,
4140,
1006,
13045,
1010,
1004,
3796,
1007,
2065,
2012,
1035,
7117,
1035,
3397,
1035,
23881,
1035,
27000,
1029,
1006,
13045,
1007,
2709,
2065,
4638,
1035,
27427,
19304,
1006,
13045,
1007,
10750,
2842,
46... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
david942j/one_gadget | lib/one_gadget/cli.rb | OneGadget.CLI.info_build_id | def info_build_id(id)
result = OneGadget::Gadget.builds_info(id)
return false if result.nil? # invalid form or BuildID not found
OneGadget::Logger.info("Information of #{id}:\n#{result.join("\n")}")
true
end | ruby | def info_build_id(id)
result = OneGadget::Gadget.builds_info(id)
return false if result.nil? # invalid form or BuildID not found
OneGadget::Logger.info("Information of #{id}:\n#{result.join("\n")}")
true
end | [
"def",
"info_build_id",
"(",
"id",
")",
"result",
"=",
"OneGadget",
"::",
"Gadget",
".",
"builds_info",
"(",
"id",
")",
"return",
"false",
"if",
"result",
".",
"nil?",
"# invalid form or BuildID not found",
"OneGadget",
"::",
"Logger",
".",
"info",
"(",
"\"Inf... | Displays libc information given BuildID.
@param [String] id
@return [Boolean]
+false+ is returned if no information found.
@example
CLI.info_build_id('b417c')
# [OneGadget] Information of b417c:
# spec/data/libc-2.27-b417c0ba7cc5cf06d1d1bed6652cedb9253c60d0.so
# Advanced Mi... | [
"Displays",
"libc",
"information",
"given",
"BuildID",
"."
] | ff6ef04541e83441bfe3c2664a6febd1640f4263 | https://github.com/david942j/one_gadget/blob/ff6ef04541e83441bfe3c2664a6febd1640f4263/lib/one_gadget/cli.rb#L92-L98 | train | Returns the BuildID information for a given BuildID | [
30522,
13366,
18558,
1035,
3857,
1035,
8909,
1006,
8909,
1007,
2765,
1027,
2028,
3654,
24291,
1024,
1024,
11721,
24291,
1012,
16473,
1035,
18558,
1006,
8909,
1007,
2709,
6270,
2065,
2765,
1012,
9152,
2140,
1029,
1001,
19528,
2433,
2030,
385... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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_hdinsight/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/locations.rb | Azure::Hdinsight::Mgmt::V2015_03_01_preview.Locations.get_capabilities | def get_capabilities(location, custom_headers:nil)
response = get_capabilities_async(location, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def get_capabilities(location, custom_headers:nil)
response = get_capabilities_async(location, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"get_capabilities",
"(",
"location",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"get_capabilities_async",
"(",
"location",
",",
"custom_headers",
":custom_headers",
")",
".",
"value!",
"response",
".",
"body",
"unless",
"response",
".",
"nil?"... | Gets the capabilities for the specified location.
@param location [String] The location.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request.
@return [CapabilitiesResult] operation results. | [
"Gets",
"the",
"capabilities",
"for",
"the",
"specified",
"location",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_hdinsight/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/locations.rb#L33-L36 | train | Gets the capabilities of the specified resource group. | [
30522,
13366,
2131,
1035,
9859,
1006,
3295,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
2131,
1035,
9859,
1035,
2004,
6038,
2278,
1006,
3295,
1010,
7661,
1035,
20346,
2015,
1024,
7661,
1035,
20346,
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... |
CocoaPods/Xcodeproj | lib/xcodeproj/project.rb | Xcodeproj.Project.recreate_user_schemes | def recreate_user_schemes(visible = true)
schemes_dir = XCScheme.user_data_dir(path)
FileUtils.rm_rf(schemes_dir)
FileUtils.mkdir_p(schemes_dir)
xcschememanagement = {}
xcschememanagement['SchemeUserState'] = {}
xcschememanagement['SuppressBuildableAutocreation'] = {}
targets... | ruby | def recreate_user_schemes(visible = true)
schemes_dir = XCScheme.user_data_dir(path)
FileUtils.rm_rf(schemes_dir)
FileUtils.mkdir_p(schemes_dir)
xcschememanagement = {}
xcschememanagement['SchemeUserState'] = {}
xcschememanagement['SuppressBuildableAutocreation'] = {}
targets... | [
"def",
"recreate_user_schemes",
"(",
"visible",
"=",
"true",
")",
"schemes_dir",
"=",
"XCScheme",
".",
"user_data_dir",
"(",
"path",
")",
"FileUtils",
".",
"rm_rf",
"(",
"schemes_dir",
")",
"FileUtils",
".",
"mkdir_p",
"(",
"schemes_dir",
")",
"xcschememanagemen... | Recreates the user schemes of the project from scratch (removes the
folder) and optionally hides them.
@param [Bool] visible
Whether the schemes should be visible or hidden.
@return [void] | [
"Recreates",
"the",
"user",
"schemes",
"of",
"the",
"project",
"from",
"scratch",
"(",
"removes",
"the",
"folder",
")",
"and",
"optionally",
"hides",
"them",
"."
] | 3be1684437a6f8e69c7836ad4c85a2b78663272f | https://github.com/CocoaPods/Xcodeproj/blob/3be1684437a6f8e69c7836ad4c85a2b78663272f/lib/xcodeproj/project.rb#L839-L863 | train | Recreate the user schemes | [
30522,
13366,
28667,
29313,
1035,
5310,
1035,
11683,
1006,
5710,
1027,
2995,
1007,
11683,
1035,
16101,
1027,
1060,
6169,
5403,
4168,
1012,
5310,
1035,
2951,
1035,
16101,
1006,
4130,
1007,
5371,
21823,
4877,
1012,
28549,
1035,
21792,
1006,
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... |
ambethia/recaptcha | lib/recaptcha/verify.rb | Recaptcha.Verify.verify_recaptcha | def verify_recaptcha(options = {})
options = {model: options} unless options.is_a? Hash
return true if Recaptcha::Verify.skip?(options[:env])
model = options[:model]
attribute = options[:attribute] || :base
recaptcha_response = options[:response] || params['g-recaptcha-response'].to_s
... | ruby | def verify_recaptcha(options = {})
options = {model: options} unless options.is_a? Hash
return true if Recaptcha::Verify.skip?(options[:env])
model = options[:model]
attribute = options[:attribute] || :base
recaptcha_response = options[:response] || params['g-recaptcha-response'].to_s
... | [
"def",
"verify_recaptcha",
"(",
"options",
"=",
"{",
"}",
")",
"options",
"=",
"{",
"model",
":",
"options",
"}",
"unless",
"options",
".",
"is_a?",
"Hash",
"return",
"true",
"if",
"Recaptcha",
"::",
"Verify",
".",
"skip?",
"(",
"options",
"[",
":env",
... | Your private API can be specified in the +options+ hash or preferably
using the Configuration. | [
"Your",
"private",
"API",
"can",
"be",
"specified",
"in",
"the",
"+",
"options",
"+",
"hash",
"or",
"preferably",
"using",
"the",
"Configuration",
"."
] | fcac97960ce29ebd7473315d9ffe89dccce6615e | https://github.com/ambethia/recaptcha/blob/fcac97960ce29ebd7473315d9ffe89dccce6615e/lib/recaptcha/verify.rb#L10-L54 | train | Verify recaptcha response | [
30522,
13366,
20410,
1035,
28667,
9331,
10649,
2050,
1006,
7047,
1027,
1063,
1065,
1007,
7047,
1027,
1063,
2944,
1024,
7047,
1065,
4983,
7047,
1012,
2003,
1035,
1037,
1029,
23325,
2709,
2995,
2065,
28667,
9331,
10649,
2050,
1024,
1024,
2041... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
AaronLasseigne/active_interaction | lib/active_interaction/filters/object_filter.rb | ActiveInteraction.ObjectFilter.klass | def klass
klass_name = options.fetch(:class, name).to_s.camelize
Object.const_get(klass_name)
rescue NameError
raise InvalidClassError, "class #{klass_name.inspect} does not exist"
end | ruby | def klass
klass_name = options.fetch(:class, name).to_s.camelize
Object.const_get(klass_name)
rescue NameError
raise InvalidClassError, "class #{klass_name.inspect} does not exist"
end | [
"def",
"klass",
"klass_name",
"=",
"options",
".",
"fetch",
"(",
":class",
",",
"name",
")",
".",
"to_s",
".",
"camelize",
"Object",
".",
"const_get",
"(",
"klass_name",
")",
"rescue",
"NameError",
"raise",
"InvalidClassError",
",",
"\"class #{klass_name.inspect... | @return [Class]
@raise [InvalidClassError] | [
"@return",
"[",
"Class",
"]"
] | fdc00a041e939ef48948baa2f7fd1ce2e4d66982 | https://github.com/AaronLasseigne/active_interaction/blob/fdc00a041e939ef48948baa2f7fd1ce2e4d66982/lib/active_interaction/filters/object_filter.rb#L61-L66 | train | Returns the class name of the object. | [
30522,
13366,
1047,
27102,
1047,
27102,
1035,
2171,
1027,
7047,
1012,
18584,
1006,
1024,
2465,
1010,
2171,
1007,
1012,
2000,
1035,
1055,
1012,
19130,
4697,
4874,
1012,
9530,
3367,
1035,
2131,
1006,
1047,
27102,
1035,
2171,
1007,
5343,
2171,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
hashicorp/vagrant | lib/vagrant/box_collection.rb | Vagrant.BoxCollection.all | def all
results = []
with_collection_lock do
@logger.debug("Finding all boxes in: #{@directory}")
@directory.children(true).each do |child|
# Ignore non-directories, since files are not interesting to
# us in our folder structure.
next if !child.directory?
... | ruby | def all
results = []
with_collection_lock do
@logger.debug("Finding all boxes in: #{@directory}")
@directory.children(true).each do |child|
# Ignore non-directories, since files are not interesting to
# us in our folder structure.
next if !child.directory?
... | [
"def",
"all",
"results",
"=",
"[",
"]",
"with_collection_lock",
"do",
"@logger",
".",
"debug",
"(",
"\"Finding all boxes in: #{@directory}\"",
")",
"@directory",
".",
"children",
"(",
"true",
")",
".",
"each",
"do",
"|",
"child",
"|",
"# Ignore non-directories, si... | This returns an array of all the boxes on the system, given by
their name and their provider.
@return [Array] Array of `[name, version, provider]` of the boxes
installed on this system. | [
"This",
"returns",
"an",
"array",
"of",
"all",
"the",
"boxes",
"on",
"the",
"system",
"given",
"by",
"their",
"name",
"and",
"their",
"provider",
"."
] | c22a145c59790c098f95d50141d9afb48e1ef55f | https://github.com/hashicorp/vagrant/blob/c22a145c59790c098f95d50141d9afb48e1ef55f/lib/vagrant/box_collection.rb#L215-L263 | train | Returns a list of all the boxes in the current directory. | [
30522,
13366,
2035,
3463,
1027,
1031,
1033,
2007,
1035,
3074,
1035,
5843,
2079,
1030,
8833,
4590,
1012,
2139,
8569,
2290,
1006,
1000,
4531,
2035,
8378,
1999,
1024,
1001,
1063,
1030,
14176,
1065,
1000,
1007,
1030,
14176,
1012,
2336,
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/form_builder.rb | Decidim.FormBuilder.extract_validations | def extract_validations(attribute, options)
min_length = options.delete(:minlength) || length_for_attribute(attribute, :minimum) || 0
max_length = options.delete(:maxlength) || length_for_attribute(attribute, :maximum)
validation_options = {}
validation_options[:pattern] = "^(.|[\n\r]){#{min_le... | ruby | def extract_validations(attribute, options)
min_length = options.delete(:minlength) || length_for_attribute(attribute, :minimum) || 0
max_length = options.delete(:maxlength) || length_for_attribute(attribute, :maximum)
validation_options = {}
validation_options[:pattern] = "^(.|[\n\r]){#{min_le... | [
"def",
"extract_validations",
"(",
"attribute",
",",
"options",
")",
"min_length",
"=",
"options",
".",
"delete",
"(",
":minlength",
")",
"||",
"length_for_attribute",
"(",
"attribute",
",",
":minimum",
")",
"||",
"0",
"max_length",
"=",
"options",
".",
"delet... | Private: Builds a Hash of options to be injected at the HTML output as
HTML5 validations.
attribute - The String name of the attribute to extract the validations.
options - A Hash of options to extract validations.
Returns a Hash. | [
"Private",
":",
"Builds",
"a",
"Hash",
"of",
"options",
"to",
"be",
"injected",
"at",
"the",
"HTML",
"output",
"as",
"HTML5",
"validations",
"."
] | 6e2b14e559a63088669904e3c5c49a5180700cf7 | https://github.com/decidim/decidim/blob/6e2b14e559a63088669904e3c5c49a5180700cf7/decidim-core/lib/decidim/form_builder.rb#L469-L478 | train | Extract validation options for a given attribute | [
30522,
13366,
14817,
1035,
27354,
2015,
1006,
17961,
1010,
7047,
1007,
8117,
1035,
3091,
1027,
7047,
1012,
3972,
12870,
1006,
1024,
8117,
7770,
13512,
2232,
1007,
1064,
1064,
3091,
1035,
2005,
1035,
17961,
1006,
17961,
1010,
1024,
6263,
100... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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-lex/lib/aws-sdk-lex/client.rb | Aws::Lex.Client.post_content | def post_content(params = {}, options = {}, &block)
req = build_request(:post_content, params)
req.send_request(options, &block)
end | ruby | def post_content(params = {}, options = {}, &block)
req = build_request(:post_content, params)
req.send_request(options, &block)
end | [
"def",
"post_content",
"(",
"params",
"=",
"{",
"}",
",",
"options",
"=",
"{",
"}",
",",
"&",
"block",
")",
"req",
"=",
"build_request",
"(",
":post_content",
",",
"params",
")",
"req",
".",
"send_request",
"(",
"options",
",",
"block",
")",
"end"
] | @overload initialize(options)
@param [Hash] options
@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.
* `Aw... | [
"@overload",
"initialize",
"(",
"options",
")",
"@param",
"[",
"Hash",
"]",
"options",
"@option",
"options",
"[",
"required",
"Aws",
"::",
"CredentialProvider",
"]",
":",
"credentials",
"Your",
"AWS",
"credentials",
".",
"This",
"can",
"be",
"an",
"instance",
... | e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d | https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-lex/lib/aws-sdk-lex/client.rb#L494-L497 | train | Post content to the server | [
30522,
13366,
2695,
1035,
4180,
1006,
11498,
5244,
1027,
1063,
1065,
1010,
7047,
1027,
1063,
1065,
1010,
1004,
3796,
1007,
2128,
4160,
1027,
3857,
1035,
5227,
1006,
1024,
2695,
1035,
4180,
1010,
11498,
5244,
1007,
2128,
4160,
1012,
4604,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
heroku/legacy-cli | lib/heroku/command/keys.rb | Heroku::Command.Keys.remove | def remove
key = shift_argument
if key.nil? || key.empty?
error("Usage: heroku keys:remove KEY\nMust specify KEY to remove.")
end
validate_arguments!
action("Removing #{key} SSH key") do
api.delete_key(key)
end
end | ruby | def remove
key = shift_argument
if key.nil? || key.empty?
error("Usage: heroku keys:remove KEY\nMust specify KEY to remove.")
end
validate_arguments!
action("Removing #{key} SSH key") do
api.delete_key(key)
end
end | [
"def",
"remove",
"key",
"=",
"shift_argument",
"if",
"key",
".",
"nil?",
"||",
"key",
".",
"empty?",
"error",
"(",
"\"Usage: heroku keys:remove KEY\\nMust specify KEY to remove.\"",
")",
"end",
"validate_arguments!",
"action",
"(",
"\"Removing #{key} SSH key\"",
")",
"d... | keys:remove [KEY]
remove a key from the current user
Examples:
$ heroku keys:remove email@example.com
Removing email@example.com SSH key... done | [
"keys",
":",
"remove",
"[",
"KEY",
"]"
] | 6f18521a258394bfb79e6b36f7160ad8559a8e16 | https://github.com/heroku/legacy-cli/blob/6f18521a258394bfb79e6b36f7160ad8559a8e16/lib/heroku/command/keys.rb#L80-L90 | train | Remove a key from the current server | [
30522,
13366,
6366,
3145,
1027,
5670,
1035,
6685,
2065,
3145,
1012,
9152,
2140,
1029,
1064,
1064,
3145,
1012,
4064,
1029,
7561,
1006,
1000,
8192,
1024,
5394,
5283,
6309,
1024,
6366,
3145,
1032,
13221,
19966,
20648,
3145,
2000,
6366,
1012,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
aws/aws-sdk-ruby | gems/aws-sdk-autoscaling/lib/aws-sdk-autoscaling/auto_scaling_group.rb | Aws::AutoScaling.AutoScalingGroup.resume_processes | def resume_processes(options = {})
options = options.merge(auto_scaling_group_name: @name)
resp = @client.resume_processes(options)
resp.data
end | ruby | def resume_processes(options = {})
options = options.merge(auto_scaling_group_name: @name)
resp = @client.resume_processes(options)
resp.data
end | [
"def",
"resume_processes",
"(",
"options",
"=",
"{",
"}",
")",
"options",
"=",
"options",
".",
"merge",
"(",
"auto_scaling_group_name",
":",
"@name",
")",
"resp",
"=",
"@client",
".",
"resume_processes",
"(",
"options",
")",
"resp",
".",
"data",
"end"
] | @example Request syntax with placeholder values
auto_scaling_group.resume_processes({
scaling_processes: ["XmlStringMaxLen255"],
})
@param [Hash] options ({})
@option options [Array<String>] :scaling_processes
One or more of the following processes. If you omit this parameter,
all processes are spec... | [
"@example",
"Request",
"syntax",
"with",
"placeholder",
"values"
] | e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d | https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-autoscaling/lib/aws-sdk-autoscaling/auto_scaling_group.rb#L710-L714 | train | Resume processes in the auto scaling group | [
30522,
13366,
13746,
1035,
6194,
1006,
7047,
1027,
1063,
1065,
1007,
7047,
1027,
7047,
1012,
13590,
1006,
8285,
1035,
25169,
1035,
2177,
1035,
2171,
1024,
1030,
2171,
1007,
24501,
2361,
1027,
1030,
7396,
1012,
13746,
1035,
6194,
1006,
7047,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
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.get_with_http_info | def get_with_http_info(fabric_name, protection_container_name, mapping_name, custom_headers:nil)
get_async(fabric_name, protection_container_name, mapping_name, custom_headers:custom_headers).value!
end | ruby | def get_with_http_info(fabric_name, protection_container_name, mapping_name, custom_headers:nil)
get_async(fabric_name, protection_container_name, mapping_name, custom_headers:custom_headers).value!
end | [
"def",
"get_with_http_info",
"(",
"fabric_name",
",",
"protection_container_name",
",",
"mapping_name",
",",
"custom_headers",
":",
"nil",
")",
"get_async",
"(",
"fabric_name",
",",
"protection_container_name",
",",
"mapping_name",
",",
"custom_headers",
":custom_headers"... | Gets a protection container mapping/
Gets the details of a protection container mapping.
@param fabric_name [String] Fabric name.
@param protection_container_name [String] Protection container name.
@param mapping_name [String] Protection Container mapping name.
@param custom_headers [Hash{String => String}] A h... | [
"Gets",
"a",
"protection",
"container",
"mapping",
"/"
] | 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#L155-L157 | train | Gets the protection container mapping. | [
30522,
13366,
2131,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
8313,
1035,
2171,
1010,
3860,
1035,
11661,
1035,
2171,
1010,
12375,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
2131,
1035,
2004,
6038,
2278,
1006,
8313,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
mhenrixon/sidekiq-unique-jobs | lib/sidekiq_unique_jobs/scripts.rb | SidekiqUniqueJobs.Scripts.execute_script | def execute_script(file_name, redis_pool, options = {})
redis(redis_pool) do |conn|
sha = script_sha(conn, file_name)
conn.evalsha(sha, options)
end
end | ruby | def execute_script(file_name, redis_pool, options = {})
redis(redis_pool) do |conn|
sha = script_sha(conn, file_name)
conn.evalsha(sha, options)
end
end | [
"def",
"execute_script",
"(",
"file_name",
",",
"redis_pool",
",",
"options",
"=",
"{",
"}",
")",
"redis",
"(",
"redis_pool",
")",
"do",
"|",
"conn",
"|",
"sha",
"=",
"script_sha",
"(",
"conn",
",",
"file_name",
")",
"conn",
".",
"evalsha",
"(",
"sha",... | Execute the script file
@param [Symbol] file_name the name of the lua script
@param [Sidekiq::RedisConnection, ConnectionPool] redis_pool the redis connection
@param [Hash] options arguments to pass to the script file
@option options [Array] :keys the array of keys to pass to the script
@option options [Array] :a... | [
"Execute",
"the",
"script",
"file"
] | 2944b97c720528f53962ccfd17d43ac939a77f46 | https://github.com/mhenrixon/sidekiq-unique-jobs/blob/2944b97c720528f53962ccfd17d43ac939a77f46/lib/sidekiq_unique_jobs/scripts.rb#L52-L57 | train | Execute a script | [
30522,
13366,
15389,
1035,
5896,
1006,
5371,
1035,
2171,
1010,
2417,
2483,
1035,
4770,
1010,
7047,
1027,
1063,
1065,
1007,
2417,
2483,
1006,
2417,
2483,
1035,
4770,
1007,
2079,
1064,
9530,
2078,
1064,
21146,
1027,
5896,
1035,
21146,
1006,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_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.begin_purge_with_http_info | def begin_purge_with_http_info(fabric_name, protection_container_name, mapping_name, custom_headers:nil)
begin_purge_async(fabric_name, protection_container_name, mapping_name, custom_headers:custom_headers).value!
end | ruby | def begin_purge_with_http_info(fabric_name, protection_container_name, mapping_name, custom_headers:nil)
begin_purge_async(fabric_name, protection_container_name, mapping_name, custom_headers:custom_headers).value!
end | [
"def",
"begin_purge_with_http_info",
"(",
"fabric_name",
",",
"protection_container_name",
",",
"mapping_name",
",",
"custom_headers",
":",
"nil",
")",
"begin_purge_async",
"(",
"fabric_name",
",",
"protection_container_name",
",",
"mapping_name",
",",
"custom_headers",
"... | Purge protection container mapping.
The operation to purge(force delete) a protection container mapping
@param fabric_name [String] Fabric name.
@param protection_container_name [String] Protection container name.
@param mapping_name [String] Protection container mapping name.
@param custom_headers [Hash{String ... | [
"Purge",
"protection",
"container",
"mapping",
"."
] | 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#L654-L656 | train | Purges the protection container mapping. | [
30522,
13366,
4088,
1035,
24694,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
8313,
1035,
2171,
1010,
3860,
1035,
11661,
1035,
2171,
1010,
12375,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
4088,
1035,
24694,
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... |
lostisland/faraday | lib/faraday/dependency_loader.rb | Faraday.DependencyLoader.dependency | def dependency(lib = nil)
lib ? require(lib) : yield
rescue LoadError, NameError => e
self.load_error = e
end | ruby | def dependency(lib = nil)
lib ? require(lib) : yield
rescue LoadError, NameError => e
self.load_error = e
end | [
"def",
"dependency",
"(",
"lib",
"=",
"nil",
")",
"lib",
"?",
"require",
"(",
"lib",
")",
":",
"yield",
"rescue",
"LoadError",
",",
"NameError",
"=>",
"e",
"self",
".",
"load_error",
"=",
"e",
"end"
] | Executes a block which should try to require and reference dependent
libraries | [
"Executes",
"a",
"block",
"which",
"should",
"try",
"to",
"require",
"and",
"reference",
"dependent",
"libraries"
] | 3abe9d1eea4bdf61cdf7b76ff9f1ae7e09482e70 | https://github.com/lostisland/faraday/blob/3abe9d1eea4bdf61cdf7b76ff9f1ae7e09482e70/lib/faraday/dependency_loader.rb#L10-L14 | train | Require the given library. | [
30522,
13366,
24394,
1006,
5622,
2497,
1027,
9152,
2140,
1007,
5622,
2497,
1029,
5478,
1006,
5622,
2497,
1007,
1024,
10750,
5343,
7170,
2121,
29165,
1010,
2171,
2121,
29165,
1027,
1028,
1041,
2969,
1012,
7170,
1035,
7561,
1027,
1041,
2203,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
square/connect-ruby-sdk | lib/square_connect/models/v1_discount.rb | SquareConnect.V1Discount.valid? | def valid?
discount_type_validator = EnumAttributeValidator.new('String', ["FIXED", "VARIABLE_PERCENTAGE", "VARIABLE_AMOUNT"])
return false unless discount_type_validator.valid?(@discount_type)
color_validator = EnumAttributeValidator.new('String', ["9da2a6", "4ab200", "0b8000", "2952cc", "a82ee5", "e... | ruby | def valid?
discount_type_validator = EnumAttributeValidator.new('String', ["FIXED", "VARIABLE_PERCENTAGE", "VARIABLE_AMOUNT"])
return false unless discount_type_validator.valid?(@discount_type)
color_validator = EnumAttributeValidator.new('String', ["9da2a6", "4ab200", "0b8000", "2952cc", "a82ee5", "e... | [
"def",
"valid?",
"discount_type_validator",
"=",
"EnumAttributeValidator",
".",
"new",
"(",
"'String'",
",",
"[",
"\"FIXED\"",
",",
"\"VARIABLE_PERCENTAGE\"",
",",
"\"VARIABLE_AMOUNT\"",
"]",
")",
"return",
"false",
"unless",
"discount_type_validator",
".",
"valid?",
... | Check to see if the all the properties in the model are valid
@return true if the model is valid | [
"Check",
"to",
"see",
"if",
"the",
"all",
"the",
"properties",
"in",
"the",
"model",
"are",
"valid"
] | 798eb9ded716f23b9f1518386f1c311a34bca8bf | https://github.com/square/connect-ruby-sdk/blob/798eb9ded716f23b9f1518386f1c311a34bca8bf/lib/square_connect/models/v1_discount.rb#L140-L146 | train | Returns true if the object is valid for this object. | [
30522,
13366,
9398,
1029,
19575,
1035,
2828,
1035,
9398,
8844,
1027,
4372,
12248,
4779,
3089,
8569,
2618,
10175,
8524,
4263,
1012,
2047,
1006,
1005,
5164,
1005,
1010,
1031,
1000,
4964,
1000,
1010,
1000,
8023,
1035,
7017,
1000,
1010,
1000,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
watir/watir | lib/watir/window.rb | Watir.Window.move_to | def move_to(x_coord, y_coord)
Selenium::WebDriver::Point.new(Integer(x_coord), Integer(y_coord)).tap do |point|
use { @driver.manage.window.position = point }
end
end | ruby | def move_to(x_coord, y_coord)
Selenium::WebDriver::Point.new(Integer(x_coord), Integer(y_coord)).tap do |point|
use { @driver.manage.window.position = point }
end
end | [
"def",
"move_to",
"(",
"x_coord",
",",
"y_coord",
")",
"Selenium",
"::",
"WebDriver",
"::",
"Point",
".",
"new",
"(",
"Integer",
"(",
"x_coord",
")",
",",
"Integer",
"(",
"y_coord",
")",
")",
".",
"tap",
"do",
"|",
"point",
"|",
"use",
"{",
"@driver"... | Moves window to given x and y coordinates.
@example
browser.window.move_to 300, 200
@param [Integer] x_coord
@param [Integer] y_coord | [
"Moves",
"window",
"to",
"given",
"x",
"and",
"y",
"coordinates",
"."
] | 2d8db09811c6221ae401b85b2f61f5fa66e463a3 | https://github.com/watir/watir/blob/2d8db09811c6221ae401b85b2f61f5fa66e463a3/lib/watir/window.rb#L79-L83 | train | Move the window to the specified coordinates. | [
30522,
13366,
2693,
1035,
2000,
1006,
1060,
1035,
2522,
8551,
1010,
1061,
1035,
2522,
8551,
1007,
7367,
7770,
5007,
1024,
1024,
4773,
23663,
2099,
1024,
1024,
2391,
1012,
2047,
1006,
16109,
1006,
1060,
1035,
2522,
8551,
1007,
1010,
16109,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/relation/finder_methods.rb | ActiveRecord.FinderMethods.exists? | def exists?(conditions = :none)
if Base === conditions
raise ArgumentError, <<-MSG.squish
You are passing an instance of ActiveRecord::Base to `exists?`.
Please pass the id of the object by calling `.id`.
MSG
end
return false if !conditions || limit_value == 0
... | ruby | def exists?(conditions = :none)
if Base === conditions
raise ArgumentError, <<-MSG.squish
You are passing an instance of ActiveRecord::Base to `exists?`.
Please pass the id of the object by calling `.id`.
MSG
end
return false if !conditions || limit_value == 0
... | [
"def",
"exists?",
"(",
"conditions",
"=",
":none",
")",
"if",
"Base",
"===",
"conditions",
"raise",
"ArgumentError",
",",
"<<-MSG",
".",
"squish",
"MSG",
"end",
"return",
"false",
"if",
"!",
"conditions",
"||",
"limit_value",
"==",
"0",
"if",
"eager_loading?... | Returns true if a record exists in the table that matches the +id+ or
conditions given, or false otherwise. The argument can take six forms:
* Integer - Finds the record with this primary key.
* String - Finds the record with a primary key corresponding to this
string (such as <tt>'5'</tt>).
* Array - Finds the... | [
"Returns",
"true",
"if",
"a",
"record",
"exists",
"in",
"the",
"table",
"that",
"matches",
"the",
"+",
"id",
"+",
"or",
"conditions",
"given",
"or",
"false",
"otherwise",
".",
"The",
"argument",
"can",
"take",
"six",
"forms",
":"
] | 85a8bc644be69908f05740a5886ec19cd3679df5 | https://github.com/rails/rails/blob/85a8bc644be69908f05740a5886ec19cd3679df5/activerecord/lib/active_record/relation/finder_methods.rb#L300-L318 | train | Returns true if the object exists in the database. | [
30522,
13366,
6526,
1029,
1006,
3785,
1027,
1024,
3904,
1007,
2065,
2918,
1027,
1027,
1027,
3785,
5333,
6685,
2121,
29165,
1010,
1026,
1026,
1011,
5796,
2290,
1012,
5490,
27020,
2232,
2017,
2024,
4458,
2019,
6013,
1997,
3161,
2890,
27108,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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 | sigh/lib/sigh/resign.rb | Sigh.Resign.installed_identities | def installed_identities
available = request_valid_identities
ids = {}
available.split("\n").each do |current|
begin
sha1 = current.match(/[a-zA-Z0-9]{40}/).to_s
name = current.match(/.*\"(.*)\"/)[1]
ids[sha1] = name
rescue
nil
end # the ... | ruby | def installed_identities
available = request_valid_identities
ids = {}
available.split("\n").each do |current|
begin
sha1 = current.match(/[a-zA-Z0-9]{40}/).to_s
name = current.match(/.*\"(.*)\"/)[1]
ids[sha1] = name
rescue
nil
end # the ... | [
"def",
"installed_identities",
"available",
"=",
"request_valid_identities",
"ids",
"=",
"{",
"}",
"available",
".",
"split",
"(",
"\"\\n\"",
")",
".",
"each",
"do",
"|",
"current",
"|",
"begin",
"sha1",
"=",
"current",
".",
"match",
"(",
"/",
"/",
")",
... | Hash of available signing identities | [
"Hash",
"of",
"available",
"signing",
"identities"
] | 457c5d647c77f0e078dafa5129da616914e002c5 | https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/sigh/lib/sigh/resign.rb#L188-L202 | train | Returns the list of available identities | [
30522,
13366,
5361,
1035,
15702,
2800,
1027,
5227,
1035,
9398,
1035,
15702,
8909,
2015,
1027,
1063,
1065,
2800,
1012,
3975,
1006,
1000,
1032,
1050,
1000,
1007,
1012,
2169,
2079,
1064,
2783,
1064,
4088,
21146,
2487,
1027,
2783,
1012,
2674,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
middleman/middleman | middleman-core/lib/middleman-core/sources/source_watcher.rb | Listen.Silencer.silenced? | def silenced?(relative_path, _type)
path = relative_path.to_s
# if only_patterns && type == :file
# return true unless only_patterns.any? { |pattern| path =~ pattern }
# end
return only_patterns.none? { |pattern| path =~ pattern } if only_patterns
ignore_patterns.any? { |pattern... | ruby | def silenced?(relative_path, _type)
path = relative_path.to_s
# if only_patterns && type == :file
# return true unless only_patterns.any? { |pattern| path =~ pattern }
# end
return only_patterns.none? { |pattern| path =~ pattern } if only_patterns
ignore_patterns.any? { |pattern... | [
"def",
"silenced?",
"(",
"relative_path",
",",
"_type",
")",
"path",
"=",
"relative_path",
".",
"to_s",
"# if only_patterns && type == :file",
"# return true unless only_patterns.any? { |pattern| path =~ pattern }",
"# end",
"return",
"only_patterns",
".",
"none?",
"{",
"|"... | TODO: switch type and path places - and verify | [
"TODO",
":",
"switch",
"type",
"and",
"path",
"places",
"-",
"and",
"verify"
] | a0dd9f78094813162895511e8516e0c5507cee50 | https://github.com/middleman/middleman/blob/a0dd9f78094813162895511e8516e0c5507cee50/middleman-core/lib/middleman-core/sources/source_watcher.rb#L11-L21 | train | Returns true if the given path should be silenced. | [
30522,
13366,
25030,
1029,
1006,
5816,
1035,
4130,
1010,
1035,
2828,
1007,
4130,
1027,
5816,
1035,
4130,
1012,
2000,
1035,
1055,
1001,
2065,
2069,
1035,
7060,
1004,
1004,
2828,
1027,
1027,
1024,
5371,
1001,
2709,
2995,
4983,
2069,
1035,
7... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
rails/rails | activerecord/lib/active_record/transactions.rb | ActiveRecord.Transactions.transaction_include_any_action? | def transaction_include_any_action?(actions)
actions.any? do |action|
case action
when :create
persisted? && @_new_record_before_last_commit
when :update
!(@_new_record_before_last_commit || destroyed?) && _trigger_update_callback
when :destroy
... | ruby | def transaction_include_any_action?(actions)
actions.any? do |action|
case action
when :create
persisted? && @_new_record_before_last_commit
when :update
!(@_new_record_before_last_commit || destroyed?) && _trigger_update_callback
when :destroy
... | [
"def",
"transaction_include_any_action?",
"(",
"actions",
")",
"actions",
".",
"any?",
"do",
"|",
"action",
"|",
"case",
"action",
"when",
":create",
"persisted?",
"&&",
"@_new_record_before_last_commit",
"when",
":update",
"!",
"(",
"@_new_record_before_last_commit",
... | Determine if a transaction included an action for :create, :update, or :destroy. Used in filtering callbacks. | [
"Determine",
"if",
"a",
"transaction",
"included",
"an",
"action",
"for",
":",
"create",
":",
"update",
"or",
":",
"destroy",
".",
"Used",
"in",
"filtering",
"callbacks",
"."
] | 85a8bc644be69908f05740a5886ec19cd3679df5 | https://github.com/rails/rails/blob/85a8bc644be69908f05740a5886ec19cd3679df5/activerecord/lib/active_record/transactions.rb#L441-L452 | train | Returns true if the transaction includes any action | [
30522,
13366,
12598,
1035,
2421,
1035,
2151,
1035,
2895,
1029,
1006,
4506,
1007,
4506,
1012,
2151,
1029,
2079,
1064,
2895,
1064,
2553,
2895,
2043,
1024,
3443,
19035,
1029,
1004,
1004,
1030,
1035,
2047,
1035,
2501,
1035,
2077,
1035,
2197,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_stor_simple8000_series/lib/2017-06-01/generated/azure_mgmt_stor_simple8000_series/devices.rb | Azure::StorSimple8000Series::Mgmt::V2017_06_01.Devices.begin_install_updates | def begin_install_updates(device_name, resource_group_name, manager_name, custom_headers:nil)
response = begin_install_updates_async(device_name, resource_group_name, manager_name, custom_headers:custom_headers).value!
nil
end | ruby | def begin_install_updates(device_name, resource_group_name, manager_name, custom_headers:nil)
response = begin_install_updates_async(device_name, resource_group_name, manager_name, custom_headers:custom_headers).value!
nil
end | [
"def",
"begin_install_updates",
"(",
"device_name",
",",
"resource_group_name",
",",
"manager_name",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"begin_install_updates_async",
"(",
"device_name",
",",
"resource_group_name",
",",
"manager_name",
",",
"custom... | Downloads and installs the updates on the 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. | [
"Downloads",
"and",
"installs",
"the",
"updates",
"on",
"the",
"device",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_stor_simple8000_series/lib/2017-06-01/generated/azure_mgmt_stor_simple8000_series/devices.rb#L1489-L1492 | train | Installs updates to the specified device. | [
30522,
13366,
4088,
1035,
16500,
1035,
14409,
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,
4088,
1035,
16500,
1035,
14409,
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... |
meew0/discordrb | lib/discordrb/voice/network.rb | Discordrb::Voice.VoiceWS.send_speaking | def send_speaking(value)
@bot.debug("Speaking: #{value}")
@client.send({
op: 5,
d: {
speaking: value,
delay: 0
}
}.to_json)
end | ruby | def send_speaking(value)
@bot.debug("Speaking: #{value}")
@client.send({
op: 5,
d: {
speaking: value,
delay: 0
}
}.to_json)
end | [
"def",
"send_speaking",
"(",
"value",
")",
"@bot",
".",
"debug",
"(",
"\"Speaking: #{value}\"",
")",
"@client",
".",
"send",
"(",
"{",
"op",
":",
"5",
",",
"d",
":",
"{",
"speaking",
":",
"value",
",",
"delay",
":",
"0",
"}",
"}",
".",
"to_json",
"... | Send a speaking packet (op 5). This determines the green circle around the avatar in the voice channel
@param value [true, false] Whether or not the bot should be speaking | [
"Send",
"a",
"speaking",
"packet",
"(",
"op",
"5",
")",
".",
"This",
"determines",
"the",
"green",
"circle",
"around",
"the",
"avatar",
"in",
"the",
"voice",
"channel"
] | 764298a1ff0be69a1853b510d736f21c2b91a2fe | https://github.com/meew0/discordrb/blob/764298a1ff0be69a1853b510d736f21c2b91a2fe/lib/discordrb/voice/network.rb#L191-L200 | train | Send a speaking message to the server | [
30522,
13366,
4604,
1035,
4092,
1006,
3643,
1007,
1030,
28516,
1012,
2139,
8569,
2290,
1006,
1000,
4092,
1024,
1001,
1063,
3643,
1065,
1000,
1007,
1030,
7396,
1012,
4604,
1006,
1063,
6728,
1024,
1019,
1010,
1040,
1024,
1063,
4092,
1024,
3... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
aws/aws-sdk-ruby | gems/aws-sdk-iam/lib/aws-sdk-iam/policy_version.rb | Aws::IAM.PolicyVersion.delete | def delete(options = {})
options = options.merge(
policy_arn: @arn,
version_id: @version_id
)
resp = @client.delete_policy_version(options)
resp.data
end | ruby | def delete(options = {})
options = options.merge(
policy_arn: @arn,
version_id: @version_id
)
resp = @client.delete_policy_version(options)
resp.data
end | [
"def",
"delete",
"(",
"options",
"=",
"{",
"}",
")",
"options",
"=",
"options",
".",
"merge",
"(",
"policy_arn",
":",
"@arn",
",",
"version_id",
":",
"@version_id",
")",
"resp",
"=",
"@client",
".",
"delete_policy_version",
"(",
"options",
")",
"resp",
"... | @!group Actions
@example Request syntax with placeholder values
policy_version.delete()
@param [Hash] options ({})
@return [EmptyStructure] | [
"@!group",
"Actions",
"@example",
"Request",
"syntax",
"with",
"placeholder",
"values"
] | e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d | https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-iam/lib/aws-sdk-iam/policy_version.rb#L221-L228 | train | Delete a policy version | [
30522,
13366,
3972,
12870,
1006,
7047,
1027,
1063,
1065,
1007,
7047,
1027,
7047,
1012,
13590,
1006,
3343,
1035,
12098,
2078,
1024,
1030,
12098,
2078,
1010,
2544,
1035,
8909,
1024,
1030,
2544,
1035,
8909,
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... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_web/lib/2018-02-01/generated/azure_mgmt_web/app_service_environments.rb | Azure::Web::Mgmt::V2018_02_01.AppServiceEnvironments.list_web_worker_metric_definitions | def list_web_worker_metric_definitions(resource_group_name, name, worker_pool_name, custom_headers:nil)
first_page = list_web_worker_metric_definitions_as_lazy(resource_group_name, name, worker_pool_name, custom_headers:custom_headers)
first_page.get_all_items
end | ruby | def list_web_worker_metric_definitions(resource_group_name, name, worker_pool_name, custom_headers:nil)
first_page = list_web_worker_metric_definitions_as_lazy(resource_group_name, name, worker_pool_name, custom_headers:custom_headers)
first_page.get_all_items
end | [
"def",
"list_web_worker_metric_definitions",
"(",
"resource_group_name",
",",
"name",
",",
"worker_pool_name",
",",
"custom_headers",
":",
"nil",
")",
"first_page",
"=",
"list_web_worker_metric_definitions_as_lazy",
"(",
"resource_group_name",
",",
"name",
",",
"worker_pool... | Get metric definitions for a worker pool of an App Service Environment.
Get metric definitions for a worker pool of an App Service Environment.
@param resource_group_name [String] Name of the resource group to which the
resource belongs.
@param name [String] Name of the App Service Environment.
@param worker_poo... | [
"Get",
"metric",
"definitions",
"for",
"a",
"worker",
"pool",
"of",
"an",
"App",
"Service",
"Environment",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_web/lib/2018-02-01/generated/azure_mgmt_web/app_service_environments.rb#L3696-L3699 | train | Gets all metric definitions for a worker pool. | [
30522,
13366,
2862,
1035,
4773,
1035,
7309,
1035,
12046,
1035,
15182,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2171,
1010,
7309,
1035,
4770,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
2034,
1035,
3931,
1027,
2862,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
ruby/racc | lib/racc/state.rb | Racc.States.path | def path(state, rule)
rule.symbols.each_with_object([]) do |tok, path|
goto = state.gotos[tok]
path << goto
state = goto.to_state
end
end | ruby | def path(state, rule)
rule.symbols.each_with_object([]) do |tok, path|
goto = state.gotos[tok]
path << goto
state = goto.to_state
end
end | [
"def",
"path",
"(",
"state",
",",
"rule",
")",
"rule",
".",
"symbols",
".",
"each_with_object",
"(",
"[",
"]",
")",
"do",
"|",
"tok",
",",
"path",
"|",
"goto",
"=",
"state",
".",
"gotos",
"[",
"tok",
"]",
"path",
"<<",
"goto",
"state",
"=",
"goto... | Sequence of state transitions which would be taken when starting
from 'state', then following the RHS of 'rule' right to the end | [
"Sequence",
"of",
"state",
"transitions",
"which",
"would",
"be",
"taken",
"when",
"starting",
"from",
"state",
"then",
"following",
"the",
"RHS",
"of",
"rule",
"right",
"to",
"the",
"end"
] | d3244edfa11dd6e86e43f570c6444d41c7e3552a | https://github.com/ruby/racc/blob/d3244edfa11dd6e86e43f570c6444d41c7e3552a/lib/racc/state.rb#L208-L214 | train | Returns the path to the given rule. | [
30522,
13366,
4130,
1006,
2110,
1010,
3627,
1007,
3627,
1012,
9255,
1012,
2169,
1035,
2007,
1035,
4874,
1006,
1031,
1033,
1007,
2079,
1064,
2000,
2243,
1010,
4130,
1064,
2288,
2080,
1027,
2110,
1012,
2288,
2891,
1031,
2000,
2243,
1033,
41... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
randym/axlsx | lib/axlsx/drawing/pic.rb | Axlsx.Pic.use_two_cell_anchor | def use_two_cell_anchor
return if @anchor.is_a?(TwoCellAnchor)
new_anchor = TwoCellAnchor.new(@anchor.drawing, :start_at => [@anchor.from.col, @anchor.from.row])
swap_anchor(new_anchor)
end | ruby | def use_two_cell_anchor
return if @anchor.is_a?(TwoCellAnchor)
new_anchor = TwoCellAnchor.new(@anchor.drawing, :start_at => [@anchor.from.col, @anchor.from.row])
swap_anchor(new_anchor)
end | [
"def",
"use_two_cell_anchor",
"return",
"if",
"@anchor",
".",
"is_a?",
"(",
"TwoCellAnchor",
")",
"new_anchor",
"=",
"TwoCellAnchor",
".",
"new",
"(",
"@anchor",
".",
"drawing",
",",
":start_at",
"=>",
"[",
"@anchor",
".",
"from",
".",
"col",
",",
"@anchor",... | changes the anchor type to a two cell anchor | [
"changes",
"the",
"anchor",
"type",
"to",
"a",
"two",
"cell",
"anchor"
] | c593a08b2a929dac7aa8dc418b55e26b4c49dc34 | https://github.com/randym/axlsx/blob/c593a08b2a929dac7aa8dc418b55e26b4c49dc34/lib/axlsx/drawing/pic.rb#L197-L201 | train | Use two cell anchor to get the correct position | [
30522,
13366,
2224,
1035,
2048,
1035,
3526,
1035,
8133,
2709,
2065,
1030,
8133,
1012,
2003,
1035,
1037,
1029,
1006,
2048,
29109,
5802,
9905,
2099,
1007,
2047,
1035,
8133,
1027,
2048,
29109,
5802,
9905,
2099,
1012,
2047,
1006,
1030,
8133,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
watir/watir | lib/watir/after_hooks.rb | Watir.AfterHooks.run | def run
# We can't just rescue exception because Firefox automatically closes alert when exception raised
return unless @after_hooks.any? && !@browser.alert.exists?
each { |after_hook| after_hook.call(@browser) }
rescue Selenium::WebDriver::Error::NoSuchWindowError => ex
Watir.logger.info "... | ruby | def run
# We can't just rescue exception because Firefox automatically closes alert when exception raised
return unless @after_hooks.any? && !@browser.alert.exists?
each { |after_hook| after_hook.call(@browser) }
rescue Selenium::WebDriver::Error::NoSuchWindowError => ex
Watir.logger.info "... | [
"def",
"run",
"# We can't just rescue exception because Firefox automatically closes alert when exception raised",
"return",
"unless",
"@after_hooks",
".",
"any?",
"&&",
"!",
"@browser",
".",
"alert",
".",
"exists?",
"each",
"{",
"|",
"after_hook",
"|",
"after_hook",
".",
... | Runs after hooks. | [
"Runs",
"after",
"hooks",
"."
] | 2d8db09811c6221ae401b85b2f61f5fa66e463a3 | https://github.com/watir/watir/blob/2d8db09811c6221ae401b85b2f61f5fa66e463a3/lib/watir/after_hooks.rb#L67-L74 | train | Run after hooks | [
30522,
13366,
2448,
1001,
2057,
2064,
1005,
1056,
2074,
5343,
6453,
2138,
2543,
14876,
2595,
8073,
14572,
9499,
2043,
6453,
2992,
2709,
4983,
1030,
2044,
1035,
18008,
1012,
2151,
1029,
1004,
1004,
999,
1030,
16602,
1012,
9499,
1012,
6526,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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.set_upgrade_orchestration_service_state | def set_upgrade_orchestration_service_state(upgrade_orchestration_service_state, timeout:60, custom_headers:nil)
response = set_upgrade_orchestration_service_state_async(upgrade_orchestration_service_state, timeout:timeout, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def set_upgrade_orchestration_service_state(upgrade_orchestration_service_state, timeout:60, custom_headers:nil)
response = set_upgrade_orchestration_service_state_async(upgrade_orchestration_service_state, timeout:timeout, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"set_upgrade_orchestration_service_state",
"(",
"upgrade_orchestration_service_state",
",",
"timeout",
":",
"60",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"set_upgrade_orchestration_service_state_async",
"(",
"upgrade_orchestration_service_state",
",",
"t... | Update the service state of Service Fabric Upgrade Orchestration Service.
Update the service state of Service Fabric Upgrade Orchestration Service.
This API is internally used for support purposes.
@param upgrade_orchestration_service_state [UpgradeOrchestrationServiceState]
Service state of Service Fabric Upgrad... | [
"Update",
"the",
"service",
"state",
"of",
"Service",
"Fabric",
"Upgrade",
"Orchestration",
"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#L2240-L2243 | train | Sets the state of the orchestration service to the current state of the orchestration service. | [
30522,
13366,
2275,
1035,
12200,
1035,
4032,
3508,
1035,
2326,
1035,
2110,
1006,
12200,
1035,
4032,
3508,
1035,
2326,
1035,
2110,
1010,
2051,
5833,
1024,
3438,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
2275,
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... |
braintree/braintree_ruby | lib/braintree/graphql_client.rb | Braintree.GraphQLClient.query | def query(definition, variables = {}, operationName = nil)
graphql_connection = _setup_connection(@config.graphql_server, @config.graphql_port)
request = {}
request['query'] = definition
request['operationName'] = operationName if operationName
request['variables'] = variables
resp... | ruby | def query(definition, variables = {}, operationName = nil)
graphql_connection = _setup_connection(@config.graphql_server, @config.graphql_port)
request = {}
request['query'] = definition
request['operationName'] = operationName if operationName
request['variables'] = variables
resp... | [
"def",
"query",
"(",
"definition",
",",
"variables",
"=",
"{",
"}",
",",
"operationName",
"=",
"nil",
")",
"graphql_connection",
"=",
"_setup_connection",
"(",
"@config",
".",
"graphql_server",
",",
"@config",
".",
"graphql_port",
")",
"request",
"=",
"{",
"... | :nodoc: | [
":",
"nodoc",
":"
] | 6e56c7099ea55bcdc4073cbea60b2688cef69663 | https://github.com/braintree/braintree_ruby/blob/6e56c7099ea55bcdc4073cbea60b2688cef69663/lib/braintree/graphql_client.rb#L13-L26 | train | Execute a query on the graphql server | [
30522,
13366,
23032,
1006,
6210,
1010,
10857,
1027,
1063,
1065,
1010,
3169,
18442,
1027,
9152,
2140,
1007,
10629,
4160,
2140,
1035,
4434,
1027,
1035,
16437,
1035,
4434,
1006,
1030,
9530,
8873,
30524,
1033,
1027,
3169,
18442,
2065,
3169,
184... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_container_service/lib/2019-02-01/generated/azure_mgmt_container_service/agent_pools.rb | Azure::ContainerService::Mgmt::V2019_02_01.AgentPools.begin_delete | def begin_delete(resource_group_name, managed_cluster_name, agent_pool_name, custom_headers:nil)
response = begin_delete_async(resource_group_name, managed_cluster_name, agent_pool_name, custom_headers:custom_headers).value!
nil
end | ruby | def begin_delete(resource_group_name, managed_cluster_name, agent_pool_name, custom_headers:nil)
response = begin_delete_async(resource_group_name, managed_cluster_name, agent_pool_name, custom_headers:custom_headers).value!
nil
end | [
"def",
"begin_delete",
"(",
"resource_group_name",
",",
"managed_cluster_name",
",",
"agent_pool_name",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"begin_delete_async",
"(",
"resource_group_name",
",",
"managed_cluster_name",
",",
"agent_pool_name",
",",
"... | Deletes an agent pool.
Deletes the agent pool in the specified managed cluster.
@param resource_group_name [String] The name of the resource group.
@param managed_cluster_name [String] The name of the managed cluster
resource.
@param agent_pool_name [String] The name of the agent pool.
@param custom_headers [Ha... | [
"Deletes",
"an",
"agent",
"pool",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_container_service/lib/2019-02-01/generated/azure_mgmt_container_service/agent_pools.rb#L474-L477 | train | Deletes the managed cluster agent pool. | [
30522,
13366,
4088,
1035,
3972,
12870,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
3266,
1035,
9324,
1035,
2171,
1010,
4005,
1035,
4770,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
4088,
1035,
3972,
12870,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
aws/aws-sdk-ruby | gems/aws-sdk-ec2/lib/aws-sdk-ec2/network_acl.rb | Aws::EC2.NetworkAcl.replace_association | def replace_association(options = {})
options = options.merge(network_acl_id: @id)
resp = @client.replace_network_acl_association(options)
resp.data
end | ruby | def replace_association(options = {})
options = options.merge(network_acl_id: @id)
resp = @client.replace_network_acl_association(options)
resp.data
end | [
"def",
"replace_association",
"(",
"options",
"=",
"{",
"}",
")",
"options",
"=",
"options",
".",
"merge",
"(",
"network_acl_id",
":",
"@id",
")",
"resp",
"=",
"@client",
".",
"replace_network_acl_association",
"(",
"options",
")",
"resp",
".",
"data",
"end"... | @example Request syntax with placeholder values
network_acl.replace_association({
association_id: "String", # required
dry_run: false,
})
@param [Hash] options ({})
@option options [required, String] :association_id
The ID of the current association between the original network ACL and
the subn... | [
"@example",
"Request",
"syntax",
"with",
"placeholder",
"values"
] | e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d | https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-ec2/lib/aws-sdk-ec2/network_acl.rb#L362-L366 | train | Replace the association of this network acl | [
30522,
13366,
5672,
1035,
2523,
1006,
7047,
1027,
1063,
1065,
1007,
7047,
1027,
7047,
1012,
13590,
1006,
2897,
1035,
9353,
2140,
1035,
8909,
1024,
1030,
8909,
1007,
24501,
2361,
1027,
1030,
7396,
1012,
5672,
1035,
2897,
1035,
9353,
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... |
fastlane/fastlane | sigh/lib/sigh/runner.rb | Sigh.Runner.create_profile! | def create_profile!
cert = certificate_to_use
bundle_id = Sigh.config[:app_identifier]
name = Sigh.config[:provisioning_name] || [bundle_id, profile_type.pretty_type].join(' ')
unless Sigh.config[:skip_fetch_profiles]
if Spaceship.provisioning_profile.all.find { |p| p.name == name }
... | ruby | def create_profile!
cert = certificate_to_use
bundle_id = Sigh.config[:app_identifier]
name = Sigh.config[:provisioning_name] || [bundle_id, profile_type.pretty_type].join(' ')
unless Sigh.config[:skip_fetch_profiles]
if Spaceship.provisioning_profile.all.find { |p| p.name == name }
... | [
"def",
"create_profile!",
"cert",
"=",
"certificate_to_use",
"bundle_id",
"=",
"Sigh",
".",
"config",
"[",
":app_identifier",
"]",
"name",
"=",
"Sigh",
".",
"config",
"[",
":provisioning_name",
"]",
"||",
"[",
"bundle_id",
",",
"profile_type",
".",
"pretty_type"... | Create a new profile and return it | [
"Create",
"a",
"new",
"profile",
"and",
"return",
"it"
] | 457c5d647c77f0e078dafa5129da616914e002c5 | https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/sigh/lib/sigh/runner.rb#L122-L142 | train | Creates a new provisioning profile | [
30522,
13366,
3443,
1035,
6337,
999,
8292,
5339,
1027,
8196,
1035,
2000,
1035,
2224,
14012,
1035,
8909,
1027,
6682,
1012,
9530,
8873,
2290,
1031,
1024,
10439,
1035,
8909,
4765,
18095,
1033,
2171,
1027,
6682,
1012,
9530,
8873,
2290,
1031,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_api_management/lib/2019-01-01/generated/azure_mgmt_api_management/user_identities.rb | Azure::ApiManagement::Mgmt::V2019_01_01.UserIdentities.list_with_http_info | def list_with_http_info(resource_group_name, service_name, user_id, custom_headers:nil)
list_async(resource_group_name, service_name, user_id, custom_headers:custom_headers).value!
end | ruby | def list_with_http_info(resource_group_name, service_name, user_id, custom_headers:nil)
list_async(resource_group_name, service_name, user_id, custom_headers:custom_headers).value!
end | [
"def",
"list_with_http_info",
"(",
"resource_group_name",
",",
"service_name",
",",
"user_id",
",",
"custom_headers",
":",
"nil",
")",
"list_async",
"(",
"resource_group_name",
",",
"service_name",
",",
"user_id",
",",
"custom_headers",
":custom_headers",
")",
".",
... | List of all user identities.
@param resource_group_name [String] The name of the resource group.
@param service_name [String] The name of the API Management service.
@param user_id [String] User identifier. Must be unique in the current API
Management service instance.
@param custom_headers [Hash{String => String... | [
"List",
"of",
"all",
"user",
"identities",
"."
] | 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/user_identities.rb#L53-L55 | train | Gets the list of the user s non - existent terms. | [
30522,
13366,
2862,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2326,
1035,
2171,
1010,
5310,
1035,
8909,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
2862,
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... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.