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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
puppetlabs/puppet | lib/puppet/network/resolver.rb | Puppet::Network.Resolver.each_srv_record | def each_srv_record(domain, service_name = :puppet, &block)
if (domain.nil? or domain.empty?)
Puppet.debug "Domain not known; skipping SRV lookup"
return
end
Puppet.debug "Searching for SRV records for domain: #{domain}"
case service_name
when :puppet then service = '_x... | ruby | def each_srv_record(domain, service_name = :puppet, &block)
if (domain.nil? or domain.empty?)
Puppet.debug "Domain not known; skipping SRV lookup"
return
end
Puppet.debug "Searching for SRV records for domain: #{domain}"
case service_name
when :puppet then service = '_x... | [
"def",
"each_srv_record",
"(",
"domain",
",",
"service_name",
"=",
":puppet",
",",
"&",
"block",
")",
"if",
"(",
"domain",
".",
"nil?",
"or",
"domain",
".",
"empty?",
")",
"Puppet",
".",
"debug",
"\"Domain not known; skipping SRV lookup\"",
"return",
"end",
"P... | Iterate through the list of records for this service
and yield each server and port pair. Records are only fetched
via DNS query the first time and cached for the duration of their
service's TTL thereafter.
@param [String] domain the domain to search for
@param [Symbol] service_name the key of the service we are q... | [
"Iterate",
"through",
"the",
"list",
"of",
"records",
"for",
"this",
"service",
"and",
"yield",
"each",
"server",
"and",
"port",
"pair",
".",
"Records",
"are",
"only",
"fetched",
"via",
"DNS",
"query",
"the",
"first",
"time",
"and",
"cached",
"for",
"the",... | 4baeed97cbb7571ddc6635f0a24debe2e8b22cd3 | https://github.com/puppetlabs/puppet/blob/4baeed97cbb7571ddc6635f0a24debe2e8b22cd3/lib/puppet/network/resolver.rb#L42-L80 | train | This method is used to iterate over all the SRV records for a domain. | [
30522,
13366,
2169,
1035,
5034,
2615,
1035,
2501,
1006,
5884,
1010,
2326,
1035,
2171,
1027,
1024,
13997,
1010,
1004,
3796,
1007,
2065,
1006,
5884,
1012,
9152,
2140,
1029,
2030,
5884,
1012,
4064,
1029,
1007,
13997,
1012,
2139,
8569,
2290,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | data/azure_cognitiveservices_luisauthoring/lib/2.0/generated/azure_cognitiveservices_luisauthoring/model.rb | Azure::CognitiveServices::LuisAuthoring::V2_0.Model.create_hierarchical_entity_role_with_http_info | def create_hierarchical_entity_role_with_http_info(app_id, version_id, h_entity_id, entity_role_create_object, custom_headers:nil)
create_hierarchical_entity_role_async(app_id, version_id, h_entity_id, entity_role_create_object, custom_headers:custom_headers).value!
end | ruby | def create_hierarchical_entity_role_with_http_info(app_id, version_id, h_entity_id, entity_role_create_object, custom_headers:nil)
create_hierarchical_entity_role_async(app_id, version_id, h_entity_id, entity_role_create_object, custom_headers:custom_headers).value!
end | [
"def",
"create_hierarchical_entity_role_with_http_info",
"(",
"app_id",
",",
"version_id",
",",
"h_entity_id",
",",
"entity_role_create_object",
",",
"custom_headers",
":",
"nil",
")",
"create_hierarchical_entity_role_async",
"(",
"app_id",
",",
"version_id",
",",
"h_entity... | Create a role for an hierarchical entity in a version of the application.
@param app_id The application ID.
@param version_id [String] The version ID.
@param h_entity_id The hierarchical entity extractor ID.
@param entity_role_create_object [EntityRoleCreateObject] An entity role
object containing the name of rol... | [
"Create",
"a",
"role",
"for",
"an",
"hierarchical",
"entity",
"in",
"a",
"version",
"of",
"the",
"application",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_cognitiveservices_luisauthoring/lib/2.0/generated/azure_cognitiveservices_luisauthoring/model.rb#L7623-L7625 | train | Creates an entity role for a given Hierarchical entity. | [
30522,
13366,
3443,
1035,
25835,
1035,
9178,
1035,
2535,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
10439,
1035,
8909,
1010,
2544,
1035,
8909,
1010,
1044,
1035,
9178,
1035,
8909,
1010,
9178,
1035,
2535,
1035,
3443,
1035,
4874,
1010,
7661,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
chef/ohai | lib/ohai/provides_map.rb | Ohai.ProvidesMap.find_providers_for | def find_providers_for(attributes)
plugins = []
attributes.each do |attribute|
attrs = select_subtree(@map, attribute)
raise Ohai::Exceptions::AttributeNotFound, "No such attribute: \'#{attribute}\'" unless attrs
raise Ohai::Exceptions::ProviderNotFound, "Cannot find plugin providing... | ruby | def find_providers_for(attributes)
plugins = []
attributes.each do |attribute|
attrs = select_subtree(@map, attribute)
raise Ohai::Exceptions::AttributeNotFound, "No such attribute: \'#{attribute}\'" unless attrs
raise Ohai::Exceptions::ProviderNotFound, "Cannot find plugin providing... | [
"def",
"find_providers_for",
"(",
"attributes",
")",
"plugins",
"=",
"[",
"]",
"attributes",
".",
"each",
"do",
"|",
"attribute",
"|",
"attrs",
"=",
"select_subtree",
"(",
"@map",
",",
"attribute",
")",
"raise",
"Ohai",
"::",
"Exceptions",
"::",
"AttributeNo... | gather plugins providing exactly the attributes listed | [
"gather",
"plugins",
"providing",
"exactly",
"the",
"attributes",
"listed"
] | 8d66449940f04237586b2f928231c6b26e2cc19a | https://github.com/chef/ohai/blob/8d66449940f04237586b2f928231c6b26e2cc19a/lib/ohai/provides_map.rb#L52-L61 | train | Find all plugins that are available for the given attributes. | [
30522,
13366,
2424,
1035,
11670,
1035,
2005,
1006,
12332,
1007,
13354,
7076,
1027,
1031,
1033,
12332,
1012,
2169,
2079,
1064,
17961,
1064,
2012,
16344,
2015,
1027,
7276,
1035,
4942,
13334,
1006,
1030,
4949,
1010,
17961,
1007,
5333,
2821,
48... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
aws/aws-sdk-ruby | gems/aws-sdk-rds/lib/aws-sdk-rds/db_subnet_group.rb | Aws::RDS.DBSubnetGroup.delete | def delete(options = {})
options = options.merge(db_subnet_group_name: @name)
resp = @client.delete_db_subnet_group(options)
resp.data
end | ruby | def delete(options = {})
options = options.merge(db_subnet_group_name: @name)
resp = @client.delete_db_subnet_group(options)
resp.data
end | [
"def",
"delete",
"(",
"options",
"=",
"{",
"}",
")",
"options",
"=",
"options",
".",
"merge",
"(",
"db_subnet_group_name",
":",
"@name",
")",
"resp",
"=",
"@client",
".",
"delete_db_subnet_group",
"(",
"options",
")",
"resp",
".",
"data",
"end"
] | @example Request syntax with placeholder values
db_subnet_group.delete()
@param [Hash] options ({})
@return [EmptyStructure] | [
"@example",
"Request",
"syntax",
"with",
"placeholder",
"values"
] | e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d | https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-rds/lib/aws-sdk-rds/db_subnet_group.rb#L236-L240 | train | Delete a DB subnet group | [
30522,
13366,
3972,
12870,
1006,
7047,
1027,
1063,
1065,
1007,
7047,
1027,
7047,
1012,
13590,
1006,
16962,
1035,
4942,
7159,
1035,
2177,
1035,
2171,
1024,
1030,
2171,
1007,
24501,
2361,
1027,
1030,
7396,
1012,
3972,
12870,
1035,
16962,
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... |
splitrb/split | lib/split/trial.rb | Split.Trial.choose! | def choose!(context = nil)
@user.cleanup_old_experiments!
# Only run the process once
return alternative if @alternative_choosen
if override_is_alternative?
self.alternative = @options[:override]
if should_store_alternative? && !@user[@experiment.key]
self.alternative.... | ruby | def choose!(context = nil)
@user.cleanup_old_experiments!
# Only run the process once
return alternative if @alternative_choosen
if override_is_alternative?
self.alternative = @options[:override]
if should_store_alternative? && !@user[@experiment.key]
self.alternative.... | [
"def",
"choose!",
"(",
"context",
"=",
"nil",
")",
"@user",
".",
"cleanup_old_experiments!",
"# Only run the process once",
"return",
"alternative",
"if",
"@alternative_choosen",
"if",
"override_is_alternative?",
"self",
".",
"alternative",
"=",
"@options",
"[",
":overr... | Choose an alternative, add a participant, and save the alternative choice on the user. This
method is guaranteed to only run once, and will skip the alternative choosing process if run
a second time. | [
"Choose",
"an",
"alternative",
"add",
"a",
"participant",
"and",
"save",
"the",
"alternative",
"choice",
"on",
"the",
"user",
".",
"This",
"method",
"is",
"guaranteed",
"to",
"only",
"run",
"once",
"and",
"will",
"skip",
"the",
"alternative",
"choosing",
"pr... | 02f3f14f99288c3395910999cdb657f2ec5a06cd | https://github.com/splitrb/split/blob/02f3f14f99288c3395910999cdb657f2ec5a06cd/lib/split/trial.rb#L51-L87 | train | Choose a alternative from the user | [
30522,
13366,
5454,
999,
1006,
6123,
1027,
9152,
2140,
1007,
1030,
5310,
1012,
27686,
1035,
2214,
1035,
7885,
999,
1001,
2069,
2448,
1996,
2832,
2320,
2709,
4522,
2065,
1030,
4522,
1035,
5454,
2078,
2065,
2058,
15637,
1035,
2003,
1035,
45... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | data/azure_cognitiveservices_face/lib/1.0/generated/azure_cognitiveservices_face/snapshot_operations.rb | Azure::CognitiveServices::Face::V1_0.SnapshotOperations.update | def update(snapshot_id, apply_scope:nil, user_data:nil, custom_headers:nil)
response = update_async(snapshot_id, apply_scope:apply_scope, user_data:user_data, custom_headers:custom_headers).value!
nil
end | ruby | def update(snapshot_id, apply_scope:nil, user_data:nil, custom_headers:nil)
response = update_async(snapshot_id, apply_scope:apply_scope, user_data:user_data, custom_headers:custom_headers).value!
nil
end | [
"def",
"update",
"(",
"snapshot_id",
",",
"apply_scope",
":",
"nil",
",",
"user_data",
":",
"nil",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"update_async",
"(",
"snapshot_id",
",",
"apply_scope",
":apply_scope",
",",
"user_data",
":user_data",
... | Update the information of a snapshot. Only the source subscription who took
the snapshot can update the snapshot.
@param snapshot_id Id referencing a particular snapshot.
@param apply_scope Array of the target Face subscription ids for the
snapshot, specified by the user who created the snapshot when calling
Snap... | [
"Update",
"the",
"information",
"of",
"a",
"snapshot",
".",
"Only",
"the",
"source",
"subscription",
"who",
"took",
"the",
"snapshot",
"can",
"update",
"the",
"snapshot",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_cognitiveservices_face/lib/1.0/generated/azure_cognitiveservices_face/snapshot_operations.rb#L478-L481 | train | Updates a snapshot. | [
30522,
13366,
10651,
1006,
20057,
12326,
1035,
8909,
1010,
6611,
1035,
9531,
1024,
9152,
2140,
1010,
5310,
1035,
2951,
1024,
9152,
2140,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
10651,
1035,
2004,
6038,
2278,
1006,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
samvera/hyrax | app/controllers/hyrax/users_controller.rb | Hyrax.UsersController.search | def search(query)
clause = query.blank? ? nil : "%" + query.downcase + "%"
base = ::User.where(*base_query)
base = base.where("#{Hydra.config.user_key_field} like lower(?) OR display_name like lower(?)", clause, clause) if clause.present?
base.registered
.where("#{Hydra.confi... | ruby | def search(query)
clause = query.blank? ? nil : "%" + query.downcase + "%"
base = ::User.where(*base_query)
base = base.where("#{Hydra.config.user_key_field} like lower(?) OR display_name like lower(?)", clause, clause) if clause.present?
base.registered
.where("#{Hydra.confi... | [
"def",
"search",
"(",
"query",
")",
"clause",
"=",
"query",
".",
"blank?",
"?",
"nil",
":",
"\"%\"",
"+",
"query",
".",
"downcase",
"+",
"\"%\"",
"base",
"=",
"::",
"User",
".",
"where",
"(",
"base_query",
")",
"base",
"=",
"base",
".",
"where",
"(... | TODO: this should move to a service.
Returns a list of users excluding the system users and guest_users
@param query [String] the query string | [
"TODO",
":",
"this",
"should",
"move",
"to",
"a",
"service",
".",
"Returns",
"a",
"list",
"of",
"users",
"excluding",
"the",
"system",
"users",
"and",
"guest_users"
] | e2b4f56e829a53b1f11296324736e9d5b8c9ee5f | https://github.com/samvera/hyrax/blob/e2b4f56e829a53b1f11296324736e9d5b8c9ee5f/app/controllers/hyrax/users_controller.rb#L25-L35 | train | Search for users | [
30522,
13366,
3945,
1006,
23032,
1007,
11075,
1027,
23032,
1012,
8744,
1029,
1029,
9152,
2140,
1024,
1000,
1003,
1000,
1009,
23032,
1012,
2091,
18382,
1009,
1000,
1003,
1000,
2918,
1027,
1024,
1024,
5310,
1012,
2073,
1006,
1008,
2918,
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... |
spohlenz/tinymce-rails | lib/tinymce/rails/helper.rb | TinyMCE::Rails.Helper.tinymce_configuration | def tinymce_configuration(config=:default, options={})
options, config = config, :default if config.is_a?(Hash)
options.stringify_keys!
base_configuration = TinyMCE::Rails.configuration
if base_configuration.is_a?(MultipleConfiguration)
base_configuration = base_configuration.fetch(con... | ruby | def tinymce_configuration(config=:default, options={})
options, config = config, :default if config.is_a?(Hash)
options.stringify_keys!
base_configuration = TinyMCE::Rails.configuration
if base_configuration.is_a?(MultipleConfiguration)
base_configuration = base_configuration.fetch(con... | [
"def",
"tinymce_configuration",
"(",
"config",
"=",
":default",
",",
"options",
"=",
"{",
"}",
")",
"options",
",",
"config",
"=",
"config",
",",
":default",
"if",
"config",
".",
"is_a?",
"(",
"Hash",
")",
"options",
".",
"stringify_keys!",
"base_configurati... | Returns the TinyMCE configuration object.
It should be converted to JavaScript (via #to_javascript) for use within JavaScript. | [
"Returns",
"the",
"TinyMCE",
"configuration",
"object",
".",
"It",
"should",
"be",
"converted",
"to",
"JavaScript",
"(",
"via",
"#to_javascript",
")",
"for",
"use",
"within",
"JavaScript",
"."
] | 6f94b295f030939c8b3c7739f13812e42e6d920a | https://github.com/spohlenz/tinymce-rails/blob/6f94b295f030939c8b3c7739f13812e42e6d920a/lib/tinymce/rails/helper.rb#L52-L63 | train | Returns the configuration for the current application. | [
30522,
13366,
4714,
12458,
2063,
1035,
9563,
1006,
9530,
8873,
2290,
1027,
1024,
12398,
1010,
7047,
1027,
1063,
1065,
1007,
7047,
1010,
9530,
8873,
2290,
1027,
9530,
8873,
2290,
1010,
1024,
12398,
2065,
9530,
8873,
2290,
1012,
2003,
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... |
rmosolgo/graphql-ruby | lib/graphql/schema.rb | GraphQL.Schema.check_resolved_type | def check_resolved_type(type, object, ctx = :__undefined__)
if ctx == :__undefined__
# Old method signature
ctx = object
object = type
type = nil
end
if object.is_a?(GraphQL::Schema::Object)
object = object.object
end
if type.respond_to?(:graphql_d... | ruby | def check_resolved_type(type, object, ctx = :__undefined__)
if ctx == :__undefined__
# Old method signature
ctx = object
object = type
type = nil
end
if object.is_a?(GraphQL::Schema::Object)
object = object.object
end
if type.respond_to?(:graphql_d... | [
"def",
"check_resolved_type",
"(",
"type",
",",
"object",
",",
"ctx",
"=",
":__undefined__",
")",
"if",
"ctx",
"==",
":__undefined__",
"# Old method signature",
"ctx",
"=",
"object",
"object",
"=",
"type",
"type",
"=",
"nil",
"end",
"if",
"object",
".",
"is_... | This is a compatibility hack so that instance-level and class-level
methods can get correctness checks without calling one another
@api private | [
"This",
"is",
"a",
"compatibility",
"hack",
"so",
"that",
"instance",
"-",
"level",
"and",
"class",
"-",
"level",
"methods",
"can",
"get",
"correctness",
"checks",
"without",
"calling",
"one",
"another"
] | d5be13a816f220b9efbabeaa69a3e56fedf311f5 | https://github.com/rmosolgo/graphql-ruby/blob/d5be13a816f220b9efbabeaa69a3e56fedf311f5/lib/graphql/schema.rb#L488-L527 | train | Check that the given object is a GraphQL type. | [
30522,
13366,
4638,
1035,
10395,
1035,
2828,
1006,
2828,
1010,
4874,
1010,
14931,
2595,
1027,
1024,
1035,
1035,
6151,
28344,
1035,
1035,
1007,
2065,
14931,
2595,
1027,
1027,
1024,
1035,
1035,
6151,
28344,
1035,
1035,
1001,
2214,
4118,
8085,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
mongodb/mongoid | lib/mongoid/criteria.rb | Mongoid.Criteria.merge! | def merge!(other)
criteria = other.to_criteria
selector.merge!(criteria.selector)
options.merge!(criteria.options)
self.documents = criteria.documents.dup unless criteria.documents.empty?
self.scoping_options = criteria.scoping_options
self.inclusions = (inclusions + criteria.inclusi... | ruby | def merge!(other)
criteria = other.to_criteria
selector.merge!(criteria.selector)
options.merge!(criteria.options)
self.documents = criteria.documents.dup unless criteria.documents.empty?
self.scoping_options = criteria.scoping_options
self.inclusions = (inclusions + criteria.inclusi... | [
"def",
"merge!",
"(",
"other",
")",
"criteria",
"=",
"other",
".",
"to_criteria",
"selector",
".",
"merge!",
"(",
"criteria",
".",
"selector",
")",
"options",
".",
"merge!",
"(",
"criteria",
".",
"options",
")",
"self",
".",
"documents",
"=",
"criteria",
... | Merge the other criteria into this one.
@example Merge another criteria into this criteria.
criteria.merge(Person.where(name: "bob"))
@param [ Criteria ] other The criteria to merge in.
@return [ Criteria ] The merged criteria.
@since 3.0.0 | [
"Merge",
"the",
"other",
"criteria",
"into",
"this",
"one",
"."
] | 56976e32610f4c2450882b0bfe14da099f0703f4 | https://github.com/mongodb/mongoid/blob/56976e32610f4c2450882b0bfe14da099f0703f4/lib/mongoid/criteria.rb#L242-L250 | train | Merge two criteria together. | [
30522,
13366,
13590,
999,
1006,
2060,
1007,
9181,
1027,
2060,
1012,
2000,
1035,
9181,
27000,
1012,
13590,
999,
1006,
9181,
1012,
27000,
1007,
7047,
1012,
13590,
999,
1006,
9181,
1012,
7047,
1007,
2969,
1012,
5491,
1027,
9181,
1012,
5491,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_storagesync/lib/2018-07-01/generated/azure_mgmt_storagesync/server_endpoints.rb | Azure::StorageSync::Mgmt::V2018_07_01.ServerEndpoints.begin_recall_action | def begin_recall_action(resource_group_name, storage_sync_service_name, sync_group_name, server_endpoint_name, parameters, custom_headers:nil)
response = begin_recall_action_async(resource_group_name, storage_sync_service_name, sync_group_name, server_endpoint_name, parameters, custom_headers:custom_headers).valu... | ruby | def begin_recall_action(resource_group_name, storage_sync_service_name, sync_group_name, server_endpoint_name, parameters, custom_headers:nil)
response = begin_recall_action_async(resource_group_name, storage_sync_service_name, sync_group_name, server_endpoint_name, parameters, custom_headers:custom_headers).valu... | [
"def",
"begin_recall_action",
"(",
"resource_group_name",
",",
"storage_sync_service_name",
",",
"sync_group_name",
",",
"server_endpoint_name",
",",
"parameters",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"begin_recall_action_async",
"(",
"resource_group_nam... | Recall a server endpoint.
@param resource_group_name [String] The name of the resource group. The name
is case insensitive.
@param storage_sync_service_name [String] Name of Storage Sync Service
resource.
@param sync_group_name [String] Name of Sync Group resource.
@param server_endpoint_name [String] Name of Se... | [
"Recall",
"a",
"server",
"endpoint",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_storagesync/lib/2018-07-01/generated/azure_mgmt_storagesync/server_endpoints.rb#L807-L810 | train | Recall the specified server endpoint. | [
30522,
13366,
4088,
1035,
9131,
1035,
2895,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
5527,
1035,
26351,
1035,
2326,
1035,
2171,
1010,
26351,
1035,
2177,
1035,
2171,
1010,
8241,
1035,
2203,
8400,
1035,
2171,
1010,
11709,
1010,
7661,
1035,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_web/lib/2018-02-01/generated/azure_mgmt_web/diagnostics.rb | Azure::Web::Mgmt::V2018_02_01.Diagnostics.list_hosting_environment_detector_responses_as_lazy | def list_hosting_environment_detector_responses_as_lazy(resource_group_name, name, custom_headers:nil)
response = list_hosting_environment_detector_responses_async(resource_group_name, name, custom_headers:custom_headers).value!
unless response.nil?
page = response.body
page.next_method = Pr... | ruby | def list_hosting_environment_detector_responses_as_lazy(resource_group_name, name, custom_headers:nil)
response = list_hosting_environment_detector_responses_async(resource_group_name, name, custom_headers:custom_headers).value!
unless response.nil?
page = response.body
page.next_method = Pr... | [
"def",
"list_hosting_environment_detector_responses_as_lazy",
"(",
"resource_group_name",
",",
"name",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"list_hosting_environment_detector_responses_async",
"(",
"resource_group_name",
",",
"name",
",",
"custom_headers",
... | List Hosting Environment Detector Responses
List Hosting Environment Detector Responses
@param resource_group_name [String] Name of the resource group to which the
resource belongs.
@param name [String] Site Name
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the H... | [
"List",
"Hosting",
"Environment",
"Detector",
"Responses"
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_web/lib/2018-02-01/generated/azure_mgmt_web/diagnostics.rb#L3570-L3579 | train | Gets the list of all the detectors for a specified App Service Environment. | [
30522,
13366,
2862,
1035,
9936,
1035,
4044,
1035,
19034,
1035,
10960,
1035,
2004,
1035,
13971,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
2862,
1035,
9936,
1035,
4044,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
sporkmonger/addressable | lib/addressable/uri.rb | Addressable.URI.scheme= | def scheme=(new_scheme)
if new_scheme && !new_scheme.respond_to?(:to_str)
raise TypeError, "Can't convert #{new_scheme.class} into String."
elsif new_scheme
new_scheme = new_scheme.to_str
end
if new_scheme && new_scheme !~ /\A[a-z][a-z0-9\.\+\-]*\z/i
raise InvalidURIError... | ruby | def scheme=(new_scheme)
if new_scheme && !new_scheme.respond_to?(:to_str)
raise TypeError, "Can't convert #{new_scheme.class} into String."
elsif new_scheme
new_scheme = new_scheme.to_str
end
if new_scheme && new_scheme !~ /\A[a-z][a-z0-9\.\+\-]*\z/i
raise InvalidURIError... | [
"def",
"scheme",
"=",
"(",
"new_scheme",
")",
"if",
"new_scheme",
"&&",
"!",
"new_scheme",
".",
"respond_to?",
"(",
":to_str",
")",
"raise",
"TypeError",
",",
"\"Can't convert #{new_scheme.class} into String.\"",
"elsif",
"new_scheme",
"new_scheme",
"=",
"new_scheme",... | Sets the scheme component for this URI.
@param [String, #to_str] new_scheme The new scheme component. | [
"Sets",
"the",
"scheme",
"component",
"for",
"this",
"URI",
"."
] | 5894c95a7768435cb46d1355954611dbd194832e | https://github.com/sporkmonger/addressable/blob/5894c95a7768435cb46d1355954611dbd194832e/lib/addressable/uri.rb#L876-L894 | train | Sets the scheme of this URI. | [
30522,
13366,
5679,
1027,
1006,
2047,
1035,
5679,
1007,
2065,
2047,
1035,
5679,
1004,
1004,
999,
2047,
1035,
5679,
1012,
6869,
1035,
2000,
1029,
1006,
1024,
2000,
1035,
2358,
2099,
1007,
5333,
2828,
2121,
29165,
1010,
1000,
2064,
1005,
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_analysis_services/lib/2017-08-01-beta/generated/azure_mgmt_analysis_services/servers.rb | Azure::AnalysisServices::Mgmt::V2017_08_01_beta.Servers.list_operation_results | def list_operation_results(location, operation_id, custom_headers:nil)
response = list_operation_results_async(location, operation_id, custom_headers:custom_headers).value!
nil
end | ruby | def list_operation_results(location, operation_id, custom_headers:nil)
response = list_operation_results_async(location, operation_id, custom_headers:custom_headers).value!
nil
end | [
"def",
"list_operation_results",
"(",
"location",
",",
"operation_id",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"list_operation_results_async",
"(",
"location",
",",
"operation_id",
",",
"custom_headers",
":custom_headers",
")",
".",
"value!",
"nil",
... | List the result of the specified operation.
@param location [String] The region name which the operation will lookup
into.
@param operation_id [String] The target operation Id.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request. | [
"List",
"the",
"result",
"of",
"the",
"specified",
"operation",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_analysis_services/lib/2017-08-01-beta/generated/azure_mgmt_analysis_services/servers.rb#L1057-L1060 | train | Gets the list of the results of the operation. | [
30522,
13366,
2862,
1035,
3169,
1035,
3463,
1006,
3295,
1010,
3169,
1035,
8909,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
2862,
1035,
3169,
1035,
3463,
1035,
2004,
6038,
2278,
1006,
3295,
1010,
3169,
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_compute/lib/2016-04-30-preview/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb | Azure::Compute::Mgmt::V2016_04_30_preview.VirtualMachineScaleSets.begin_power_off_with_http_info | def begin_power_off_with_http_info(resource_group_name, vm_scale_set_name, vm_instance_ids:nil, custom_headers:nil)
begin_power_off_async(resource_group_name, vm_scale_set_name, vm_instance_ids:vm_instance_ids, custom_headers:custom_headers).value!
end | ruby | def begin_power_off_with_http_info(resource_group_name, vm_scale_set_name, vm_instance_ids:nil, custom_headers:nil)
begin_power_off_async(resource_group_name, vm_scale_set_name, vm_instance_ids:vm_instance_ids, custom_headers:custom_headers).value!
end | [
"def",
"begin_power_off_with_http_info",
"(",
"resource_group_name",
",",
"vm_scale_set_name",
",",
"vm_instance_ids",
":",
"nil",
",",
"custom_headers",
":",
"nil",
")",
"begin_power_off_async",
"(",
"resource_group_name",
",",
"vm_scale_set_name",
",",
"vm_instance_ids",
... | Power off (stop) one or more virtual machines in a VM scale set. Note that
resources are still attached and you are getting charged for the resources.
Instead, use deallocate to release resources and avoid charges.
@param resource_group_name [String] The name of the resource group.
@param vm_scale_set_name [String... | [
"Power",
"off",
"(",
"stop",
")",
"one",
"or",
"more",
"virtual",
"machines",
"in",
"a",
"VM",
"scale",
"set",
".",
"Note",
"that",
"resources",
"are",
"still",
"attached",
"and",
"you",
"are",
"getting",
"charged",
"for",
"the",
"resources",
".",
"Inste... | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_compute/lib/2016-04-30-preview/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb#L1392-L1394 | train | Power off the virtual machines in a VM scale set. | [
30522,
13366,
4088,
1035,
2373,
1035,
2125,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
1058,
2213,
1035,
4094,
1035,
2275,
1035,
2171,
1010,
1058,
2213,
1035,
6013,
1035,
8909,
2015,
1024,
9152,
2140,
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... |
CocoaPods/Xcodeproj | spec/spec_helper/project_helper.rb | SpecHelper.ProjectHelper.load_settings | def load_settings(path, type)
# Load fixture
base_path = Pathname(fixture_path("CommonBuildSettings/configs/#{path}"))
config_fixture = base_path + "#{path}_#{type}.xcconfig"
config = Xcodeproj::Config.new(config_fixture)
settings = config.to_hash
# Filter exclusions
settings ... | ruby | def load_settings(path, type)
# Load fixture
base_path = Pathname(fixture_path("CommonBuildSettings/configs/#{path}"))
config_fixture = base_path + "#{path}_#{type}.xcconfig"
config = Xcodeproj::Config.new(config_fixture)
settings = config.to_hash
# Filter exclusions
settings ... | [
"def",
"load_settings",
"(",
"path",
",",
"type",
")",
"# Load fixture",
"base_path",
"=",
"Pathname",
"(",
"fixture_path",
"(",
"\"CommonBuildSettings/configs/#{path}\"",
")",
")",
"config_fixture",
"=",
"base_path",
"+",
"\"#{path}_#{type}.xcconfig\"",
"config",
"=",
... | Load settings from fixtures
@param [String] path
the directory, where the fixture set is located.
@param [Symbol] type
the type, where the specific
@param [Hash{String => String}]
the build settings | [
"Load",
"settings",
"from",
"fixtures"
] | 3be1684437a6f8e69c7836ad4c85a2b78663272f | https://github.com/CocoaPods/Xcodeproj/blob/3be1684437a6f8e69c7836ad4c85a2b78663272f/spec/spec_helper/project_helper.rb#L81-L96 | train | Load the settings from a file | [
30522,
13366,
7170,
1035,
10906,
1006,
4130,
1010,
2828,
1007,
1001,
7170,
15083,
2918,
1035,
4130,
1027,
4130,
18442,
1006,
15083,
1035,
4130,
1006,
1000,
2691,
8569,
4014,
5104,
18319,
3070,
2015,
1013,
9530,
8873,
5620,
1013,
1001,
1063,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | data/azure_service_fabric/lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb | Azure::ServiceFabric::V6_2_0_9.ServiceFabricClientAPIs.get_application_name_info_with_http_info | def get_application_name_info_with_http_info(service_id, timeout:60, custom_headers:nil)
get_application_name_info_async(service_id, timeout:timeout, custom_headers:custom_headers).value!
end | ruby | def get_application_name_info_with_http_info(service_id, timeout:60, custom_headers:nil)
get_application_name_info_async(service_id, timeout:timeout, custom_headers:custom_headers).value!
end | [
"def",
"get_application_name_info_with_http_info",
"(",
"service_id",
",",
"timeout",
":",
"60",
",",
"custom_headers",
":",
"nil",
")",
"get_application_name_info_async",
"(",
"service_id",
",",
"timeout",
":",
"timeout",
",",
"custom_headers",
":custom_headers",
")",
... | Gets the name of the Service Fabric application for a service.
Gets the name of the application for the specified service. A 404
FABRIC_E_SERVICE_DOES_NOT_EXIST error is returned if a service with the
provided service ID does not exist.
@param service_id [String] The identity of the service. This is typically the... | [
"Gets",
"the",
"name",
"of",
"the",
"Service",
"Fabric",
"application",
"for",
"a",
"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#L10017-L10019 | train | Gets the application name info for the specified service. | [
30522,
13366,
2131,
1035,
4646,
1035,
2171,
1035,
18558,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
2326,
1035,
8909,
1010,
2051,
5833,
1024,
3438,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
2131,
1035,
4646,
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... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_logic/lib/2016-06-01/generated/azure_mgmt_logic/agreements.rb | Azure::Logic::Mgmt::V2016_06_01.Agreements.get_with_http_info | def get_with_http_info(resource_group_name, integration_account_name, agreement_name, custom_headers:nil)
get_async(resource_group_name, integration_account_name, agreement_name, custom_headers:custom_headers).value!
end | ruby | def get_with_http_info(resource_group_name, integration_account_name, agreement_name, custom_headers:nil)
get_async(resource_group_name, integration_account_name, agreement_name, custom_headers:custom_headers).value!
end | [
"def",
"get_with_http_info",
"(",
"resource_group_name",
",",
"integration_account_name",
",",
"agreement_name",
",",
"custom_headers",
":",
"nil",
")",
"get_async",
"(",
"resource_group_name",
",",
"integration_account_name",
",",
"agreement_name",
",",
"custom_headers",
... | Gets an integration account agreement.
@param resource_group_name [String] The resource group name.
@param integration_account_name [String] The integration account name.
@param agreement_name [String] The integration account agreement name.
@param custom_headers [Hash{String => String}] A hash of custom headers t... | [
"Gets",
"an",
"integration",
"account",
"agreement",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_logic/lib/2016-06-01/generated/azure_mgmt_logic/agreements.rb#L152-L154 | train | Gets the specified integration account agreement. | [
30522,
13366,
2131,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
8346,
1035,
4070,
1035,
2171,
1010,
3820,
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... |
hashicorp/vault-ruby | lib/vault/api/logical.rb | Vault.Logical.unwrap | def unwrap(wrapper)
client.with_token(wrapper) do |client|
json = client.get("/v1/cubbyhole/response")
secret = Secret.decode(json)
# If there is nothing in the cubbyhole, return early.
if secret.nil? || secret.data.nil? || secret.data[:response].nil?
return nil
... | ruby | def unwrap(wrapper)
client.with_token(wrapper) do |client|
json = client.get("/v1/cubbyhole/response")
secret = Secret.decode(json)
# If there is nothing in the cubbyhole, return early.
if secret.nil? || secret.data.nil? || secret.data[:response].nil?
return nil
... | [
"def",
"unwrap",
"(",
"wrapper",
")",
"client",
".",
"with_token",
"(",
"wrapper",
")",
"do",
"|",
"client",
"|",
"json",
"=",
"client",
".",
"get",
"(",
"\"/v1/cubbyhole/response\"",
")",
"secret",
"=",
"Secret",
".",
"decode",
"(",
"json",
")",
"# If t... | Unwrap the data stored against the given token. If the secret does not
exist, `nil` will be returned.
@example
Vault.logical.unwrap("f363dba8-25a7-08c5-430c-00b2367124e6") #=> #<Vault::Secret lease_id="">
@param [String] wrapper
the token to use when unwrapping the value
@return [Secret, nil] | [
"Unwrap",
"the",
"data",
"stored",
"against",
"the",
"given",
"token",
".",
"If",
"the",
"secret",
"does",
"not",
"exist",
"nil",
"will",
"be",
"returned",
"."
] | 02f0532a802ba1a2a0d8703a4585dab76eb9d864 | https://github.com/hashicorp/vault-ruby/blob/02f0532a802ba1a2a0d8703a4585dab76eb9d864/lib/vault/api/logical.rb#L101-L119 | train | Unwrap the cubbyhole response | [
30522,
13366,
4895,
13088,
9331,
1006,
10236,
4842,
1007,
7396,
1012,
2007,
1035,
19204,
1006,
10236,
4842,
1007,
2079,
1064,
7396,
1064,
1046,
3385,
1027,
7396,
1012,
2131,
1006,
1000,
1013,
1058,
2487,
1013,
21987,
3762,
11484,
1013,
3433... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_network/lib/2019-02-01/generated/azure_mgmt_network/application_gateways.rb | Azure::Network::Mgmt::V2019_02_01.ApplicationGateways.start | def start(resource_group_name, application_gateway_name, custom_headers:nil)
response = start_async(resource_group_name, application_gateway_name, custom_headers:custom_headers).value!
nil
end | ruby | def start(resource_group_name, application_gateway_name, custom_headers:nil)
response = start_async(resource_group_name, application_gateway_name, custom_headers:custom_headers).value!
nil
end | [
"def",
"start",
"(",
"resource_group_name",
",",
"application_gateway_name",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"start_async",
"(",
"resource_group_name",
",",
"application_gateway_name",
",",
"custom_headers",
":custom_headers",
")",
".",
"value!"... | Starts the specified application gateway.
@param resource_group_name [String] The name of the resource group.
@param application_gateway_name [String] The name of the application gateway.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request. | [
"Starts",
"the",
"specified",
"application",
"gateway",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_network/lib/2019-02-01/generated/azure_mgmt_network/application_gateways.rb#L426-L429 | train | Starts an application gateway in a resource group. | [
30522,
13366,
2707,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
4646,
1035,
11909,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
2707,
1035,
2004,
6038,
2278,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
4646,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
palkan/logidze | lib/logidze/history.rb | Logidze.History.changes_to | def changes_to(time: nil, version: nil, data: {}, from: 0)
raise ArgumentError, "Time or version must be specified" if time.nil? && version.nil?
filter = time.nil? ? method(:version_filter) : method(:time_filter)
versions.each_with_object(data.dup) do |v, acc|
next if v.version < from
... | ruby | def changes_to(time: nil, version: nil, data: {}, from: 0)
raise ArgumentError, "Time or version must be specified" if time.nil? && version.nil?
filter = time.nil? ? method(:version_filter) : method(:time_filter)
versions.each_with_object(data.dup) do |v, acc|
next if v.version < from
... | [
"def",
"changes_to",
"(",
"time",
":",
"nil",
",",
"version",
":",
"nil",
",",
"data",
":",
"{",
"}",
",",
"from",
":",
"0",
")",
"raise",
"ArgumentError",
",",
"\"Time or version must be specified\"",
"if",
"time",
".",
"nil?",
"&&",
"version",
".",
"ni... | Return diff from the initial state to specified time or version.
Optional `data` paramater can be used as initial diff state. | [
"Return",
"diff",
"from",
"the",
"initial",
"state",
"to",
"specified",
"time",
"or",
"version",
".",
"Optional",
"data",
"paramater",
"can",
"be",
"used",
"as",
"initial",
"diff",
"state",
"."
] | ffa0f793cb9c6fab96fa67a285341ca9aaa7ded8 | https://github.com/palkan/logidze/blob/ffa0f793cb9c6fab96fa67a285341ca9aaa7ded8/lib/logidze/history.rb#L60-L70 | train | Returns the changes to the given time version and data | [
30522,
13366,
3431,
1035,
2000,
1006,
2051,
1024,
9152,
2140,
1010,
2544,
1024,
9152,
2140,
1010,
2951,
1024,
1063,
1065,
1010,
2013,
1024,
1014,
1007,
5333,
6685,
2121,
29165,
1010,
1000,
2051,
2030,
2544,
2442,
2022,
9675,
1000,
2065,
2... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/open_id_connect_provider.rb | Azure::ApiManagement::Mgmt::V2018_01_01.OpenIdConnectProvider.delete_with_http_info | def delete_with_http_info(resource_group_name, service_name, opid, if_match, custom_headers:nil)
delete_async(resource_group_name, service_name, opid, if_match, custom_headers:custom_headers).value!
end | ruby | def delete_with_http_info(resource_group_name, service_name, opid, if_match, custom_headers:nil)
delete_async(resource_group_name, service_name, opid, if_match, custom_headers:custom_headers).value!
end | [
"def",
"delete_with_http_info",
"(",
"resource_group_name",
",",
"service_name",
",",
"opid",
",",
"if_match",
",",
"custom_headers",
":",
"nil",
")",
"delete_async",
"(",
"resource_group_name",
",",
"service_name",
",",
"opid",
",",
"if_match",
",",
"custom_headers... | Deletes specific OpenID Connect Provider of the API Management service
instance.
@param resource_group_name [String] The name of the resource group.
@param service_name [String] The name of the API Management service.
@param opid [String] Identifier of the OpenID Connect Provider.
@param if_match [String] ETag of... | [
"Deletes",
"specific",
"OpenID",
"Connect",
"Provider",
"of",
"the",
"API",
"Management",
"service",
"instance",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/open_id_connect_provider.rb#L617-L619 | train | Deletes an existing Advisor Specifier. | [
30522,
13366,
3972,
12870,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2326,
1035,
2171,
1010,
6728,
3593,
1010,
2065,
1035,
2674,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3972,
12870,
1035,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_network/lib/2018-10-01/generated/azure_mgmt_network/packet_captures.rb | Azure::Network::Mgmt::V2018_10_01.PacketCaptures.begin_get_status_with_http_info | def begin_get_status_with_http_info(resource_group_name, network_watcher_name, packet_capture_name, custom_headers:nil)
begin_get_status_async(resource_group_name, network_watcher_name, packet_capture_name, custom_headers:custom_headers).value!
end | ruby | def begin_get_status_with_http_info(resource_group_name, network_watcher_name, packet_capture_name, custom_headers:nil)
begin_get_status_async(resource_group_name, network_watcher_name, packet_capture_name, custom_headers:custom_headers).value!
end | [
"def",
"begin_get_status_with_http_info",
"(",
"resource_group_name",
",",
"network_watcher_name",
",",
"packet_capture_name",
",",
"custom_headers",
":",
"nil",
")",
"begin_get_status_async",
"(",
"resource_group_name",
",",
"network_watcher_name",
",",
"packet_capture_name",
... | Query the status of a running packet capture session.
@param resource_group_name [String] The name of the resource group.
@param network_watcher_name [String] The name of the Network Watcher
resource.
@param packet_capture_name [String] The name given to the packet capture
session.
@param custom_headers [Hash{St... | [
"Query",
"the",
"status",
"of",
"a",
"running",
"packet",
"capture",
"session",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_network/lib/2018-10-01/generated/azure_mgmt_network/packet_captures.rb#L702-L704 | train | Gets the status of a specified packet capture. | [
30522,
13366,
4088,
1035,
2131,
1035,
3570,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2897,
1035,
3422,
2121,
1035,
2171,
1010,
14771,
1035,
5425,
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... |
plataformatec/responders | lib/action_controller/respond_with.rb | ActionController.RespondWith.verify_requested_format! | def verify_requested_format!
mimes = collect_mimes_from_class_level
collector = ActionController::MimeResponds::Collector.new(mimes, request.variant)
unless collector.negotiate_format(request)
raise ActionController::UnknownFormat
end
end | ruby | def verify_requested_format!
mimes = collect_mimes_from_class_level
collector = ActionController::MimeResponds::Collector.new(mimes, request.variant)
unless collector.negotiate_format(request)
raise ActionController::UnknownFormat
end
end | [
"def",
"verify_requested_format!",
"mimes",
"=",
"collect_mimes_from_class_level",
"collector",
"=",
"ActionController",
"::",
"MimeResponds",
"::",
"Collector",
".",
"new",
"(",
"mimes",
",",
"request",
".",
"variant",
")",
"unless",
"collector",
".",
"negotiate_form... | Before action callback that can be used to prevent requests that do not
match the mime types defined through <tt>respond_to</tt> from being executed.
class PeopleController < ApplicationController
respond_to :html, :xml, :json
before_action :verify_requested_format!
end | [
"Before",
"action",
"callback",
"that",
"can",
"be",
"used",
"to",
"prevent",
"requests",
"that",
"do",
"not",
"match",
"the",
"mime",
"types",
"defined",
"through",
"<tt",
">",
"respond_to<",
"/",
"tt",
">",
"from",
"being",
"executed",
"."
] | a1a2706091d4ffcbbe387407ddfc5671a59ad842 | https://github.com/plataformatec/responders/blob/a1a2706091d4ffcbbe387407ddfc5671a59ad842/lib/action_controller/respond_with.rb#L227-L234 | train | Verify the requested format is correct | [
30522,
13366,
20410,
1035,
7303,
1035,
4289,
999,
2771,
7834,
1027,
8145,
1035,
2771,
7834,
1035,
2013,
1035,
2465,
1035,
2504,
10018,
1027,
2895,
8663,
13181,
10820,
1024,
1024,
2771,
13759,
13102,
15422,
2015,
1024,
1024,
10018,
1012,
204... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | data/azure_cognitiveservices_luisauthoring/lib/2.0/generated/azure_cognitiveservices_luisauthoring/model.rb | Azure::CognitiveServices::LuisAuthoring::V2_0.Model.list_pattern_any_entity_roles_with_http_info | def list_pattern_any_entity_roles_with_http_info(app_id, version_id, entity_id, custom_headers:nil)
list_pattern_any_entity_roles_async(app_id, version_id, entity_id, custom_headers:custom_headers).value!
end | ruby | def list_pattern_any_entity_roles_with_http_info(app_id, version_id, entity_id, custom_headers:nil)
list_pattern_any_entity_roles_async(app_id, version_id, entity_id, custom_headers:custom_headers).value!
end | [
"def",
"list_pattern_any_entity_roles_with_http_info",
"(",
"app_id",
",",
"version_id",
",",
"entity_id",
",",
"custom_headers",
":",
"nil",
")",
"list_pattern_any_entity_roles_async",
"(",
"app_id",
",",
"version_id",
",",
"entity_id",
",",
"custom_headers",
":custom_he... | Get all roles for a Pattern.any entity in a version of the application
@param app_id The application ID.
@param version_id [String] The version ID.
@param entity_id entity Id
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request.
@return [MsRestAzure::Azu... | [
"Get",
"all",
"roles",
"for",
"a",
"Pattern",
".",
"any",
"entity",
"in",
"a",
"version",
"of",
"the",
"application"
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_cognitiveservices_luisauthoring/lib/2.0/generated/azure_cognitiveservices_luisauthoring/model.rb#L7281-L7283 | train | Gets the roles of the specified entity in a version of the application. | [
30522,
13366,
2862,
1035,
5418,
1035,
2151,
1035,
9178,
1035,
4395,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
10439,
1035,
8909,
1010,
2544,
1035,
8909,
1010,
9178,
1035,
8909,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
2862,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_event_grid/lib/2018-01-01/generated/azure_mgmt_event_grid/event_subscriptions.rb | Azure::EventGrid::Mgmt::V2018_01_01.EventSubscriptions.list_global_by_subscription_for_topic_type | def list_global_by_subscription_for_topic_type(topic_type_name, custom_headers:nil)
response = list_global_by_subscription_for_topic_type_async(topic_type_name, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def list_global_by_subscription_for_topic_type(topic_type_name, custom_headers:nil)
response = list_global_by_subscription_for_topic_type_async(topic_type_name, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"list_global_by_subscription_for_topic_type",
"(",
"topic_type_name",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"list_global_by_subscription_for_topic_type_async",
"(",
"topic_type_name",
",",
"custom_headers",
":custom_headers",
")",
".",
"value!",
"res... | List all global event subscriptions for a topic type
List all global event subscriptions under an Azure subscription for a topic
type.
@param topic_type_name [String] Name of the topic type
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request.
@return [... | [
"List",
"all",
"global",
"event",
"subscriptions",
"for",
"a",
"topic",
"type"
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_event_grid/lib/2018-01-01/generated/azure_mgmt_event_grid/event_subscriptions.rb#L581-L584 | train | Gets all the global policy rules for a topic type. | [
30522,
13366,
2862,
1035,
3795,
1035,
2011,
1035,
15002,
1035,
2005,
1035,
8476,
1035,
2828,
1006,
8476,
1035,
2828,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
2862,
1035,
3795,
1035,
2011,
1035,
15002,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_container_registry/lib/2018-02-01-preview/generated/azure_mgmt_container_registry/build_tasks.rb | Azure::ContainerRegistry::Mgmt::V2018_02_01_preview.BuildTasks.list_source_repository_properties_with_http_info | def list_source_repository_properties_with_http_info(resource_group_name, registry_name, build_task_name, custom_headers:nil)
list_source_repository_properties_async(resource_group_name, registry_name, build_task_name, custom_headers:custom_headers).value!
end | ruby | def list_source_repository_properties_with_http_info(resource_group_name, registry_name, build_task_name, custom_headers:nil)
list_source_repository_properties_async(resource_group_name, registry_name, build_task_name, custom_headers:custom_headers).value!
end | [
"def",
"list_source_repository_properties_with_http_info",
"(",
"resource_group_name",
",",
"registry_name",
",",
"build_task_name",
",",
"custom_headers",
":",
"nil",
")",
"list_source_repository_properties_async",
"(",
"resource_group_name",
",",
"registry_name",
",",
"build_... | Get the source control properties for a build 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 build_task_name [String] The name of the container registry build
task.
@param c... | [
"Get",
"the",
"source",
"control",
"properties",
"for",
"a",
"build",
"task",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_container_registry/lib/2018-02-01-preview/generated/azure_mgmt_container_registry/build_tasks.rb#L418-L420 | train | Gets the properties of the source repository. | [
30522,
13366,
2862,
1035,
3120,
1035,
22409,
1035,
5144,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
15584,
1035,
2171,
1010,
3857,
1035,
4708,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
fastlane/fastlane | gym/lib/gym/runner.rb | Gym.Runner.move_app_thinning | def move_app_thinning
if File.exist?(PackageCommandGenerator.app_thinning_path)
FileUtils.mv(PackageCommandGenerator.app_thinning_path, File.expand_path(Gym.config[:output_directory]), force: true)
app_thinning_path = File.join(File.expand_path(Gym.config[:output_directory]), File.basename(Package... | ruby | def move_app_thinning
if File.exist?(PackageCommandGenerator.app_thinning_path)
FileUtils.mv(PackageCommandGenerator.app_thinning_path, File.expand_path(Gym.config[:output_directory]), force: true)
app_thinning_path = File.join(File.expand_path(Gym.config[:output_directory]), File.basename(Package... | [
"def",
"move_app_thinning",
"if",
"File",
".",
"exist?",
"(",
"PackageCommandGenerator",
".",
"app_thinning_path",
")",
"FileUtils",
".",
"mv",
"(",
"PackageCommandGenerator",
".",
"app_thinning_path",
",",
"File",
".",
"expand_path",
"(",
"Gym",
".",
"config",
"[... | Move the app-thinning.plist file into the output directory | [
"Move",
"the",
"app",
"-",
"thinning",
".",
"plist",
"file",
"into",
"the",
"output",
"directory"
] | 457c5d647c77f0e078dafa5129da616914e002c5 | https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/gym/lib/gym/runner.rb#L225-L234 | train | Move the app - thinning. plist file to the output directory | [
30522,
13366,
2693,
1035,
10439,
1035,
4857,
5582,
2065,
5371,
1012,
4839,
1029,
1006,
7427,
9006,
2386,
11818,
3678,
8844,
1012,
10439,
1035,
4857,
5582,
1035,
4130,
1007,
5371,
21823,
4877,
1012,
19842,
1006,
7427,
9006,
2386,
11818,
3678... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
fastlane/fastlane | deliver/lib/deliver/upload_metadata.rb | Deliver.UploadMetadata.load_from_filesystem | def load_from_filesystem(options)
return if options[:skip_metadata]
# Load localised data
ignore_validation = options[:ignore_language_directory_validation]
Loader.language_folders(options[:metadata_path], ignore_validation).each do |lang_folder|
language = File.basename(lang_folder)
... | ruby | def load_from_filesystem(options)
return if options[:skip_metadata]
# Load localised data
ignore_validation = options[:ignore_language_directory_validation]
Loader.language_folders(options[:metadata_path], ignore_validation).each do |lang_folder|
language = File.basename(lang_folder)
... | [
"def",
"load_from_filesystem",
"(",
"options",
")",
"return",
"if",
"options",
"[",
":skip_metadata",
"]",
"# Load localised data",
"ignore_validation",
"=",
"options",
"[",
":ignore_language_directory_validation",
"]",
"Loader",
".",
"language_folders",
"(",
"options",
... | Loads the metadata files and stores them into the options object | [
"Loads",
"the",
"metadata",
"files",
"and",
"stores",
"them",
"into",
"the",
"options",
"object"
] | 457c5d647c77f0e078dafa5129da616914e002c5 | https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/deliver/lib/deliver/upload_metadata.rb#L284-L331 | train | Load metadata from the filesystem | [
30522,
13366,
7170,
1035,
2013,
1035,
6764,
27268,
6633,
1006,
7047,
1007,
2709,
2065,
7047,
1031,
1024,
13558,
1035,
27425,
1033,
1001,
7170,
2334,
5084,
2951,
8568,
1035,
27354,
1027,
7047,
1031,
1024,
8568,
1035,
2653,
1035,
14176,
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... |
jeremytregunna/ruby-trello | lib/trello/card.rb | Trello.Card.move_to_list | def move_to_list(list)
list_number = list.is_a?(String) ? list : list.id
unless list_id == list_number
client.put("/cards/#{id}/idList", {
value: list_number
})
end
end | ruby | def move_to_list(list)
list_number = list.is_a?(String) ? list : list.id
unless list_id == list_number
client.put("/cards/#{id}/idList", {
value: list_number
})
end
end | [
"def",
"move_to_list",
"(",
"list",
")",
"list_number",
"=",
"list",
".",
"is_a?",
"(",
"String",
")",
"?",
"list",
":",
"list",
".",
"id",
"unless",
"list_id",
"==",
"list_number",
"client",
".",
"put",
"(",
"\"/cards/#{id}/idList\"",
",",
"{",
"value",
... | Move this card to the given list | [
"Move",
"this",
"card",
"to",
"the",
"given",
"list"
] | ad79c9d8152ad5395b3b61c43170908f1912bfb2 | https://github.com/jeremytregunna/ruby-trello/blob/ad79c9d8152ad5395b3b61c43170908f1912bfb2/lib/trello/card.rb#L338-L345 | train | Move the list to the next list | [
30522,
13366,
2693,
1035,
2000,
1035,
2862,
1006,
2862,
1007,
2862,
1035,
2193,
1027,
2862,
1012,
2003,
1035,
1037,
1029,
1006,
5164,
1007,
1029,
2862,
1024,
2862,
1012,
8909,
4983,
2862,
1035,
8909,
1027,
1027,
2862,
1035,
2193,
7396,
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... |
aws/aws-sdk-ruby | gems/aws-sdk-sns/lib/aws-sdk-sns/topic.rb | Aws::SNS.Topic.confirm_subscription | def confirm_subscription(options = {})
options = options.merge(topic_arn: @arn)
resp = @client.confirm_subscription(options)
Subscription.new(
arn: resp.data.subscription_arn,
client: @client
)
end | ruby | def confirm_subscription(options = {})
options = options.merge(topic_arn: @arn)
resp = @client.confirm_subscription(options)
Subscription.new(
arn: resp.data.subscription_arn,
client: @client
)
end | [
"def",
"confirm_subscription",
"(",
"options",
"=",
"{",
"}",
")",
"options",
"=",
"options",
".",
"merge",
"(",
"topic_arn",
":",
"@arn",
")",
"resp",
"=",
"@client",
".",
"confirm_subscription",
"(",
"options",
")",
"Subscription",
".",
"new",
"(",
"arn"... | @example Request syntax with placeholder values
subscription = topic.confirm_subscription({
token: "token", # required
authenticate_on_unsubscribe: "authenticateOnUnsubscribe",
})
@param [Hash] options ({})
@option options [required, String] :token
Short-lived token sent to an endpoint during the ... | [
"@example",
"Request",
"syntax",
"with",
"placeholder",
"values"
] | e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d | https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-sns/lib/aws-sdk-sns/topic.rb#L143-L150 | train | confirm subscription | [
30522,
13366,
12210,
1035,
15002,
1006,
7047,
1027,
1063,
1065,
1007,
7047,
1027,
7047,
1012,
13590,
1006,
8476,
1035,
12098,
2078,
1024,
1030,
12098,
2078,
1007,
24501,
2361,
1027,
1030,
7396,
1012,
12210,
1035,
15002,
1006,
7047,
1007,
15... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
piotrmurach/github | lib/github_api/response/follow_redirects.rb | Github.Response::FollowRedirects.safe_escape | def safe_escape(uri)
uri = uri.split('#')[0] # we want to remove the fragment if present
uri.to_s.gsub(URI_UNSAFE) { |match|
'%' + match.unpack('H2' * match.bytesize).join('%').upcase
}
end | ruby | def safe_escape(uri)
uri = uri.split('#')[0] # we want to remove the fragment if present
uri.to_s.gsub(URI_UNSAFE) { |match|
'%' + match.unpack('H2' * match.bytesize).join('%').upcase
}
end | [
"def",
"safe_escape",
"(",
"uri",
")",
"uri",
"=",
"uri",
".",
"split",
"(",
"'#'",
")",
"[",
"0",
"]",
"# we want to remove the fragment if present",
"uri",
".",
"to_s",
".",
"gsub",
"(",
"URI_UNSAFE",
")",
"{",
"|",
"match",
"|",
"'%'",
"+",
"match",
... | Internal: escapes unsafe characters from an URL which might be a path
component only or a fully qualified URI so that it can be joined onto an
URI:HTTP using the `+` operator. Doesn't escape "%" characters so to not
risk double-escaping. | [
"Internal",
":",
"escapes",
"unsafe",
"characters",
"from",
"an",
"URL",
"which",
"might",
"be",
"a",
"path",
"component",
"only",
"or",
"a",
"fully",
"qualified",
"URI",
"so",
"that",
"it",
"can",
"be",
"joined",
"onto",
"an",
"URI",
":",
"HTTP",
"using... | 8702452c66bea33c9388550aed9e9974f76aaef1 | https://github.com/piotrmurach/github/blob/8702452c66bea33c9388550aed9e9974f76aaef1/lib/github_api/response/follow_redirects.rb#L133-L138 | train | escape the URI | [
30522,
13366,
3647,
1035,
4019,
1006,
24471,
2072,
1007,
24471,
2072,
1027,
24471,
2072,
1012,
3975,
1006,
1005,
1001,
1005,
1007,
1031,
1014,
1033,
1001,
2057,
2215,
2000,
6366,
1996,
15778,
2065,
2556,
24471,
2072,
1012,
2000,
1035,
1055,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
JsonApiClient/json_api_client | lib/json_api_client/resource.rb | JsonApiClient.Resource.as_json_api | def as_json_api(*)
attributes.slice(self.class.primary_key, :type).tap do |h|
relationships_for_serialization.tap do |r|
h[:relationships] = self.class.key_formatter.format_keys(r) unless r.empty?
end
h[:attributes] = self.class.key_formatter.format_keys(attributes_for_serializat... | ruby | def as_json_api(*)
attributes.slice(self.class.primary_key, :type).tap do |h|
relationships_for_serialization.tap do |r|
h[:relationships] = self.class.key_formatter.format_keys(r) unless r.empty?
end
h[:attributes] = self.class.key_formatter.format_keys(attributes_for_serializat... | [
"def",
"as_json_api",
"(",
"*",
")",
"attributes",
".",
"slice",
"(",
"self",
".",
"class",
".",
"primary_key",
",",
":type",
")",
".",
"tap",
"do",
"|",
"h",
"|",
"relationships_for_serialization",
".",
"tap",
"do",
"|",
"r",
"|",
"h",
"[",
":relation... | When we represent this resource for serialization (create/update), we do so
with this implementation
@return [Hash] Representation of this object as JSONAPI object | [
"When",
"we",
"represent",
"this",
"resource",
"for",
"serialization",
"(",
"create",
"/",
"update",
")",
"we",
"do",
"so",
"with",
"this",
"implementation"
] | e4b763f5579c4fae4b03dcc935b20627f5c14eaa | https://github.com/JsonApiClient/json_api_client/blob/e4b763f5579c4fae4b03dcc935b20627f5c14eaa/lib/json_api_client/resource.rb#L404-L411 | train | Returns a hash of the attributes for the object. | [
30522,
13366,
2004,
1035,
1046,
3385,
1035,
17928,
1006,
1008,
1007,
12332,
1012,
14704,
1006,
2969,
1012,
2465,
1012,
3078,
1035,
3145,
1010,
1024,
2828,
1007,
1012,
11112,
2079,
1064,
1044,
1064,
6550,
1035,
2005,
1035,
7642,
3989,
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-sns/lib/aws-sdk-sns/topic.rb | Aws::SNS.Topic.set_attributes | def set_attributes(options = {})
options = options.merge(topic_arn: @arn)
resp = @client.set_topic_attributes(options)
resp.data
end | ruby | def set_attributes(options = {})
options = options.merge(topic_arn: @arn)
resp = @client.set_topic_attributes(options)
resp.data
end | [
"def",
"set_attributes",
"(",
"options",
"=",
"{",
"}",
")",
"options",
"=",
"options",
".",
"merge",
"(",
"topic_arn",
":",
"@arn",
")",
"resp",
"=",
"@client",
".",
"set_topic_attributes",
"(",
"options",
")",
"resp",
".",
"data",
"end"
] | @example Request syntax with placeholder values
topic.set_attributes({
attribute_name: "attributeName", # required
attribute_value: "attributeValue",
})
@param [Hash] options ({})
@option options [required, String] :attribute_name
A map of attributes with their corresponding values.
The follow... | [
"@example",
"Request",
"syntax",
"with",
"placeholder",
"values"
] | e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d | https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-sns/lib/aws-sdk-sns/topic.rb#L344-L348 | train | Set the attributes of the topic | [
30522,
13366,
2275,
1035,
12332,
1006,
7047,
1027,
1063,
1065,
1007,
7047,
1027,
7047,
1012,
13590,
1006,
8476,
1035,
12098,
2078,
1024,
1030,
12098,
2078,
1007,
24501,
2361,
1027,
1030,
7396,
1012,
2275,
1035,
8476,
1035,
12332,
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 | 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.recover_partition | def recover_partition(partition_id, timeout:60, custom_headers:nil)
response = recover_partition_async(partition_id, timeout:timeout, custom_headers:custom_headers).value!
nil
end | ruby | def recover_partition(partition_id, timeout:60, custom_headers:nil)
response = recover_partition_async(partition_id, timeout:timeout, custom_headers:custom_headers).value!
nil
end | [
"def",
"recover_partition",
"(",
"partition_id",
",",
"timeout",
":",
"60",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"recover_partition_async",
"(",
"partition_id",
",",
"timeout",
":",
"timeout",
",",
"custom_headers",
":custom_headers",
")",
".",... | Indicates to the Service Fabric cluster that it should attempt to recover a
specific partition which is currently stuck in quorum loss.
Indicates to the Service Fabric cluster that it should attempt to recover a
specific partition which is currently stuck in quorum loss. This operation
should only be performed if ... | [
"Indicates",
"to",
"the",
"Service",
"Fabric",
"cluster",
"that",
"it",
"should",
"attempt",
"to",
"recover",
"a",
"specific",
"partition",
"which",
"is",
"currently",
"stuck",
"in",
"quorum",
"loss",
"."
] | 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#L13188-L13191 | train | Recover the specified partition. | [
30522,
13366,
8980,
1035,
13571,
1006,
13571,
1035,
8909,
1010,
2051,
5833,
1024,
3438,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
8980,
1035,
13571,
1035,
2004,
6038,
2278,
1006,
13571,
1035,
8909,
1010,
2051,
5833,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | data/azure_service_fabric/lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb | Azure::ServiceFabric::V6_2_0_9.ServiceFabricClientAPIs.get_application_info_list | def get_application_info_list(application_definition_kind_filter:0, application_type_name:nil, exclude_application_parameters:false, continuation_token:nil, max_results:0, timeout:60, custom_headers:nil)
response = get_application_info_list_async(application_definition_kind_filter:application_definition_kind_filt... | ruby | def get_application_info_list(application_definition_kind_filter:0, application_type_name:nil, exclude_application_parameters:false, continuation_token:nil, max_results:0, timeout:60, custom_headers:nil)
response = get_application_info_list_async(application_definition_kind_filter:application_definition_kind_filt... | [
"def",
"get_application_info_list",
"(",
"application_definition_kind_filter",
":",
"0",
",",
"application_type_name",
":",
"nil",
",",
"exclude_application_parameters",
":",
"false",
",",
"continuation_token",
":",
"nil",
",",
"max_results",
":",
"0",
",",
"timeout",
... | Gets the list of applications created in the Service Fabric cluster that
match the specified filters.
Gets the information about the applications that were created or in the
process of being created in the Service Fabric cluster and match the
specified filters. The response includes the name, type, status, paramet... | [
"Gets",
"the",
"list",
"of",
"applications",
"created",
"in",
"the",
"Service",
"Fabric",
"cluster",
"that",
"match",
"the",
"specified",
"filters",
"."
] | 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#L6486-L6489 | train | Gets the list of all the applications in a given App Service Environment. | [
30522,
13366,
2131,
1035,
4646,
1035,
18558,
1035,
2862,
1006,
4646,
1035,
6210,
1035,
2785,
1035,
11307,
1024,
1014,
1010,
4646,
1035,
2828,
1035,
2171,
1024,
9152,
2140,
1010,
23329,
1035,
4646,
1035,
11709,
1024,
6270,
1010,
13633,
1035,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
projectcypress/health-data-standards | lib/hqmf-parser/2.0/document.rb | HQMF2.Document.handle_specific_source_data_criteria_reference | def handle_specific_source_data_criteria_reference(criteria)
original_sdc = find(@source_data_criteria, :id, criteria.source_data_criteria)
updated_sdc = find(@source_data_criteria, :id, criteria.id)
if !updated_sdc.nil? && !criteria.specific_occurrence.nil? && (original_sdc.nil? || original_sdc.speci... | ruby | def handle_specific_source_data_criteria_reference(criteria)
original_sdc = find(@source_data_criteria, :id, criteria.source_data_criteria)
updated_sdc = find(@source_data_criteria, :id, criteria.id)
if !updated_sdc.nil? && !criteria.specific_occurrence.nil? && (original_sdc.nil? || original_sdc.speci... | [
"def",
"handle_specific_source_data_criteria_reference",
"(",
"criteria",
")",
"original_sdc",
"=",
"find",
"(",
"@source_data_criteria",
",",
":id",
",",
"criteria",
".",
"source_data_criteria",
")",
"updated_sdc",
"=",
"find",
"(",
"@source_data_criteria",
",",
":id",... | For specific occurrence data criteria, make sure the source data criteria reference points
to the correct source data criteria. | [
"For",
"specific",
"occurrence",
"data",
"criteria",
"make",
"sure",
"the",
"source",
"data",
"criteria",
"reference",
"points",
"to",
"the",
"correct",
"source",
"data",
"criteria",
"."
] | 252d4f0927c513eacde6b9ea41b76faa1423c34b | https://github.com/projectcypress/health-data-standards/blob/252d4f0927c513eacde6b9ea41b76faa1423c34b/lib/hqmf-parser/2.0/document.rb#L289-L301 | train | handle specific source data criteria reference | [
30522,
13366,
5047,
1035,
3563,
1035,
3120,
1035,
2951,
1035,
9181,
1035,
4431,
1006,
9181,
1007,
2434,
1035,
17371,
2278,
1027,
2424,
1006,
1030,
3120,
1035,
2951,
1035,
9181,
1010,
1024,
8909,
1010,
9181,
1012,
3120,
1035,
2951,
1035,
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... |
projectcypress/health-data-standards | lib/hqmf-parser/2.0/data_criteria.rb | HQMF2.DataCriteria.retrieve_title_and_description_for_model | def retrieve_title_and_description_for_model
# drop "* Value Set" from titles
exact_desc = title.split(' ')[0...-3].join(' ')
# don't drop anything for patient characterstic titles
exact_desc = title if @definition.start_with?('patient_characteristic') && !title.end_with?('Value Set')
# r... | ruby | def retrieve_title_and_description_for_model
# drop "* Value Set" from titles
exact_desc = title.split(' ')[0...-3].join(' ')
# don't drop anything for patient characterstic titles
exact_desc = title if @definition.start_with?('patient_characteristic') && !title.end_with?('Value Set')
# r... | [
"def",
"retrieve_title_and_description_for_model",
"# drop \"* Value Set\" from titles",
"exact_desc",
"=",
"title",
".",
"split",
"(",
"' '",
")",
"[",
"0",
"...",
"-",
"3",
"]",
".",
"join",
"(",
"' '",
")",
"# don't drop anything for patient characterstic titles",
"e... | Generate the title and description used when producing the model | [
"Generate",
"the",
"title",
"and",
"description",
"used",
"when",
"producing",
"the",
"model"
] | 252d4f0927c513eacde6b9ea41b76faa1423c34b | https://github.com/projectcypress/health-data-standards/blob/252d4f0927c513eacde6b9ea41b76faa1423c34b/lib/hqmf-parser/2.0/data_criteria.rb#L267-L278 | train | Retrieve the title and description for the model | [
30522,
13366,
12850,
1035,
2516,
1035,
1998,
1035,
6412,
1035,
2005,
1035,
2944,
1001,
4530,
1000,
1008,
3643,
2275,
1000,
2013,
4486,
6635,
1035,
4078,
2278,
1027,
2516,
1012,
3975,
1006,
1005,
1005,
1007,
1031,
1014,
1012,
1012,
1012,
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... |
castwide/solargraph | lib/solargraph/workspace.rb | Solargraph.Workspace.would_require? | def would_require? path
require_paths.each do |rp|
return true if File.exist?(File.join(rp, "#{path}.rb"))
end
false
end | ruby | def would_require? path
require_paths.each do |rp|
return true if File.exist?(File.join(rp, "#{path}.rb"))
end
false
end | [
"def",
"would_require?",
"path",
"require_paths",
".",
"each",
"do",
"|",
"rp",
"|",
"return",
"true",
"if",
"File",
".",
"exist?",
"(",
"File",
".",
"join",
"(",
"rp",
",",
"\"#{path}.rb\"",
")",
")",
"end",
"false",
"end"
] | True if the path resolves to a file in the workspace's require paths.
@param path [String]
@return [Boolean] | [
"True",
"if",
"the",
"path",
"resolves",
"to",
"a",
"file",
"in",
"the",
"workspace",
"s",
"require",
"paths",
"."
] | 47badb5d151aca775ccbe6c470236089eae7839d | https://github.com/castwide/solargraph/blob/47badb5d151aca775ccbe6c470236089eae7839d/lib/solargraph/workspace.rb#L97-L102 | train | Returns true if the given path would require the given path. | [
30522,
13366,
2052,
1035,
5478,
1029,
4130,
5478,
1035,
10425,
1012,
2169,
2079,
1064,
1054,
2361,
1064,
2709,
2995,
2065,
5371,
1012,
4839,
1029,
1006,
5371,
1012,
3693,
1006,
1054,
2361,
1010,
1000,
1001,
1063,
4130,
1065,
1012,
21144,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_scheduler/lib/2016-03-01/generated/azure_mgmt_scheduler/job_collections.rb | Azure::Scheduler::Mgmt::V2016_03_01.JobCollections.enable | def enable(resource_group_name, job_collection_name, custom_headers:nil)
response = enable_async(resource_group_name, job_collection_name, custom_headers:custom_headers).value!
nil
end | ruby | def enable(resource_group_name, job_collection_name, custom_headers:nil)
response = enable_async(resource_group_name, job_collection_name, custom_headers:custom_headers).value!
nil
end | [
"def",
"enable",
"(",
"resource_group_name",
",",
"job_collection_name",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"enable_async",
"(",
"resource_group_name",
",",
"job_collection_name",
",",
"custom_headers",
":custom_headers",
")",
".",
"value!",
"nil... | Enables all of the jobs in the job collection.
@param resource_group_name [String] The resource group name.
@param job_collection_name [String] The job collection name.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request. | [
"Enables",
"all",
"of",
"the",
"jobs",
"in",
"the",
"job",
"collection",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_scheduler/lib/2016-03-01/generated/azure_mgmt_scheduler/job_collections.rb#L556-L559 | train | Enables the specified job collection. | [
30522,
13366,
9585,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
3105,
1035,
3074,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
9585,
1035,
2004,
6038,
2278,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
3105,
1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
aws/aws-sdk-ruby | gems/aws-sdk-s3/lib/aws-sdk-s3/resource.rb | Aws::S3.Resource.buckets | def buckets(options = {})
batches = Enumerator.new do |y|
batch = []
resp = @client.list_buckets(options)
resp.data.buckets.each do |b|
batch << Bucket.new(
name: b.name,
data: b,
client: @client
)
end
y.yield(batch)
... | ruby | def buckets(options = {})
batches = Enumerator.new do |y|
batch = []
resp = @client.list_buckets(options)
resp.data.buckets.each do |b|
batch << Bucket.new(
name: b.name,
data: b,
client: @client
)
end
y.yield(batch)
... | [
"def",
"buckets",
"(",
"options",
"=",
"{",
"}",
")",
"batches",
"=",
"Enumerator",
".",
"new",
"do",
"|",
"y",
"|",
"batch",
"=",
"[",
"]",
"resp",
"=",
"@client",
".",
"list_buckets",
"(",
"options",
")",
"resp",
".",
"data",
".",
"buckets",
".",... | @example Request syntax with placeholder values
s3.buckets()
@param [Hash] options ({})
@return [Bucket::Collection] | [
"@example",
"Request",
"syntax",
"with",
"placeholder",
"values"
] | e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d | https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-s3/lib/aws-sdk-s3/resource.rb#L84-L98 | train | List all buckets | [
30522,
13366,
13610,
2015,
1006,
7047,
1027,
1063,
1065,
1007,
14108,
2229,
1027,
4372,
17897,
16259,
1012,
2047,
2079,
1064,
1061,
1064,
14108,
1027,
1031,
1033,
24501,
2361,
1027,
1030,
7396,
1012,
2862,
1035,
13610,
2015,
1006,
7047,
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... |
rails/rails | actionview/lib/action_view/renderer/streaming_template_renderer.rb | ActionView.StreamingTemplateRenderer.render_template | def render_template(view, template, layout_name = nil, locals = {}) #:nodoc:
return [super.body] unless layout_name && template.supports_streaming?
locals ||= {}
layout = layout_name && find_layout(layout_name, locals.keys, [formats.first])
Body.new do |buffer|
delayed_render(buffer,... | ruby | def render_template(view, template, layout_name = nil, locals = {}) #:nodoc:
return [super.body] unless layout_name && template.supports_streaming?
locals ||= {}
layout = layout_name && find_layout(layout_name, locals.keys, [formats.first])
Body.new do |buffer|
delayed_render(buffer,... | [
"def",
"render_template",
"(",
"view",
",",
"template",
",",
"layout_name",
"=",
"nil",
",",
"locals",
"=",
"{",
"}",
")",
"#:nodoc:",
"return",
"[",
"super",
".",
"body",
"]",
"unless",
"layout_name",
"&&",
"template",
".",
"supports_streaming?",
"locals",
... | For streaming, instead of rendering a given a template, we return a Body
object that responds to each. This object is initialized with a block
that knows how to render the template. | [
"For",
"streaming",
"instead",
"of",
"rendering",
"a",
"given",
"a",
"template",
"we",
"return",
"a",
"Body",
"object",
"that",
"responds",
"to",
"each",
".",
"This",
"object",
"is",
"initialized",
"with",
"a",
"block",
"that",
"knows",
"how",
"to",
"rende... | 85a8bc644be69908f05740a5886ec19cd3679df5 | https://github.com/rails/rails/blob/85a8bc644be69908f05740a5886ec19cd3679df5/actionview/lib/action_view/renderer/streaming_template_renderer.rb#L46-L55 | train | Render a template. | [
30522,
13366,
17552,
1035,
23561,
1006,
3193,
1010,
23561,
1010,
9621,
1035,
2171,
1027,
9152,
2140,
1010,
10575,
1027,
1063,
1065,
1007,
1001,
1024,
7293,
10085,
1024,
2709,
1031,
3565,
1012,
2303,
1033,
4983,
9621,
1035,
2171,
1004,
1004,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_container_registry/lib/2017-06-01-preview/generated/azure_mgmt_container_registry/webhooks.rb | Azure::ContainerRegistry::Mgmt::V2017_06_01_preview.Webhooks.ping_with_http_info | def ping_with_http_info(resource_group_name, registry_name, webhook_name, custom_headers:nil)
ping_async(resource_group_name, registry_name, webhook_name, custom_headers:custom_headers).value!
end | ruby | def ping_with_http_info(resource_group_name, registry_name, webhook_name, custom_headers:nil)
ping_async(resource_group_name, registry_name, webhook_name, custom_headers:custom_headers).value!
end | [
"def",
"ping_with_http_info",
"(",
"resource_group_name",
",",
"registry_name",
",",
"webhook_name",
",",
"custom_headers",
":",
"nil",
")",
"ping_async",
"(",
"resource_group_name",
",",
"registry_name",
",",
"webhook_name",
",",
"custom_headers",
":custom_headers",
")... | Triggers a ping event to be sent to the webhook.
@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 webhook_name [String] The name of the webhook.
@param custom_headers [Hash{String =>... | [
"Triggers",
"a",
"ping",
"event",
"to",
"be",
"sent",
"to",
"the",
"webhook",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_container_registry/lib/2017-06-01-preview/generated/azure_mgmt_container_registry/webhooks.rb#L398-L400 | train | Gets the list of all the webhook s artifacts in a resource group. | [
30522,
13366,
17852,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
15584,
1035,
2171,
1010,
4773,
6806,
6559,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
17852,
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... |
rails/sprockets | lib/sprockets/processing.rb | Sprockets.Processing.register_pipeline | def register_pipeline(name, proc = nil, &block)
proc ||= block
self.config = hash_reassoc(config, :pipeline_exts) do |pipeline_exts|
pipeline_exts.merge(".#{name}".freeze => name.to_sym)
end
self.config = hash_reassoc(config, :pipelines) do |pipelines|
pipelines.merge(name.to_s... | ruby | def register_pipeline(name, proc = nil, &block)
proc ||= block
self.config = hash_reassoc(config, :pipeline_exts) do |pipeline_exts|
pipeline_exts.merge(".#{name}".freeze => name.to_sym)
end
self.config = hash_reassoc(config, :pipelines) do |pipelines|
pipelines.merge(name.to_s... | [
"def",
"register_pipeline",
"(",
"name",
",",
"proc",
"=",
"nil",
",",
"&",
"block",
")",
"proc",
"||=",
"block",
"self",
".",
"config",
"=",
"hash_reassoc",
"(",
"config",
",",
":pipeline_exts",
")",
"do",
"|",
"pipeline_exts",
"|",
"pipeline_exts",
".",
... | Registers a pipeline that will be called by `call_processor` method. | [
"Registers",
"a",
"pipeline",
"that",
"will",
"be",
"called",
"by",
"call_processor",
"method",
"."
] | 9e3f0d8e98c44f57e67bc138db87bb8469bf5ddd | https://github.com/rails/sprockets/blob/9e3f0d8e98c44f57e67bc138db87bb8469bf5ddd/lib/sprockets/processing.rb#L19-L29 | train | Register a pipeline with the given name. | [
30522,
13366,
4236,
1035,
13117,
1006,
2171,
1010,
4013,
2278,
1027,
9152,
2140,
1010,
1004,
3796,
1007,
4013,
2278,
1064,
1064,
1027,
3796,
2969,
1012,
9530,
8873,
2290,
1027,
23325,
1035,
2128,
12054,
10085,
1006,
9530,
8873,
2290,
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... |
palkan/logidze | lib/logidze/model.rb | Logidze.Model.at! | def at!(ts = nil, time: nil, version: nil)
Deprecations.show_ts_deprecation_for("#at!") if ts
return at_version!(version) if version
time ||= ts
time = parse_time(time)
return self if log_data.current_ts?(time)
return false unless log_data.exists_ts?(time)
version = log_dat... | ruby | def at!(ts = nil, time: nil, version: nil)
Deprecations.show_ts_deprecation_for("#at!") if ts
return at_version!(version) if version
time ||= ts
time = parse_time(time)
return self if log_data.current_ts?(time)
return false unless log_data.exists_ts?(time)
version = log_dat... | [
"def",
"at!",
"(",
"ts",
"=",
"nil",
",",
"time",
":",
"nil",
",",
"version",
":",
"nil",
")",
"Deprecations",
".",
"show_ts_deprecation_for",
"(",
"\"#at!\"",
")",
"if",
"ts",
"return",
"at_version!",
"(",
"version",
")",
"if",
"version",
"time",
"||=",... | rubocop: enable Metrics/MethodLength
Revert record to the version at specified time (without saving to DB) | [
"rubocop",
":",
"enable",
"Metrics",
"/",
"MethodLength",
"Revert",
"record",
"to",
"the",
"version",
"at",
"specified",
"time",
"(",
"without",
"saving",
"to",
"DB",
")"
] | ffa0f793cb9c6fab96fa67a285341ca9aaa7ded8 | https://github.com/palkan/logidze/blob/ffa0f793cb9c6fab96fa67a285341ca9aaa7ded8/lib/logidze/model.rb#L94-L108 | train | Returns the log at the given time or the current version. | [
30522,
13366,
2012,
999,
1006,
24529,
1027,
9152,
2140,
1010,
2051,
1024,
9152,
2140,
1010,
2544,
1024,
9152,
2140,
1007,
2139,
28139,
10719,
2015,
1012,
2265,
1035,
24529,
1035,
2139,
28139,
10719,
1035,
2005,
1006,
1000,
1001,
2012,
999,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | data/azure_service_fabric/lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb | Azure::ServiceFabric::V6_2_0_9.ServiceFabricClientAPIs.get_image_store_content | def get_image_store_content(content_path, timeout:60, custom_headers:nil)
response = get_image_store_content_async(content_path, timeout:timeout, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def get_image_store_content(content_path, timeout:60, custom_headers:nil)
response = get_image_store_content_async(content_path, timeout:timeout, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"get_image_store_content",
"(",
"content_path",
",",
"timeout",
":",
"60",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"get_image_store_content_async",
"(",
"content_path",
",",
"timeout",
":",
"timeout",
",",
"custom_headers",
":custom_headers",
... | Gets the image store content information.
Returns the information about the image store content at the specified
contentPath relative to the root of the image store.
@param content_path [String] Relative path to file or folder in the image
store from its root.
@param timeout [Integer] The server timeout for perf... | [
"Gets",
"the",
"image",
"store",
"content",
"information",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_service_fabric/lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb#L19300-L19303 | train | Gets the content of an image store. | [
30522,
13366,
2131,
1035,
3746,
1035,
3573,
1035,
4180,
1006,
4180,
1035,
4130,
1010,
2051,
5833,
1024,
3438,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
2131,
1035,
3746,
1035,
3573,
1035,
4180,
1035,
2004,
6038,
2... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | data/azure_service_fabric/lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb | Azure::ServiceFabric::V6_2_0_9.ServiceFabricClientAPIs.recover_service_partitions | def recover_service_partitions(service_id, timeout:60, custom_headers:nil)
response = recover_service_partitions_async(service_id, timeout:timeout, custom_headers:custom_headers).value!
nil
end | ruby | def recover_service_partitions(service_id, timeout:60, custom_headers:nil)
response = recover_service_partitions_async(service_id, timeout:timeout, custom_headers:custom_headers).value!
nil
end | [
"def",
"recover_service_partitions",
"(",
"service_id",
",",
"timeout",
":",
"60",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"recover_service_partitions_async",
"(",
"service_id",
",",
"timeout",
":",
"timeout",
",",
"custom_headers",
":custom_headers",... | Indicates to the Service Fabric cluster that it should attempt to recover the
specified service which is currently stuck in quorum loss.
Indicates to the Service Fabric cluster that it should attempt to recover the
specified service which is currently stuck in quorum loss. This operation
should only be performed i... | [
"Indicates",
"to",
"the",
"Service",
"Fabric",
"cluster",
"that",
"it",
"should",
"attempt",
"to",
"recover",
"the",
"specified",
"service",
"which",
"is",
"currently",
"stuck",
"in",
"quorum",
"loss",
"."
] | 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#L13302-L13305 | train | Recover all partitions of a service. | [
30522,
13366,
8980,
1035,
2326,
1035,
13571,
2015,
1006,
2326,
30524,
1035,
20346,
2015,
1024,
7661,
1035,
20346,
2015,
1007,
1012,
3643,
999,
9152,
2140,
2203,
102,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/cache.rb | Sprockets.Cache.peek_key | def peek_key(key)
case key
when Integer
key.to_s
when String
key[0, PEEK_SIZE].inspect
when Array
str = []
key.each { |k| str << peek_key(k) }
str.join(':')[0, PEEK_SIZE]
else
peek_key(DigestUtils.pack_urlsafe_base64dige... | ruby | def peek_key(key)
case key
when Integer
key.to_s
when String
key[0, PEEK_SIZE].inspect
when Array
str = []
key.each { |k| str << peek_key(k) }
str.join(':')[0, PEEK_SIZE]
else
peek_key(DigestUtils.pack_urlsafe_base64dige... | [
"def",
"peek_key",
"(",
"key",
")",
"case",
"key",
"when",
"Integer",
"key",
".",
"to_s",
"when",
"String",
"key",
"[",
"0",
",",
"PEEK_SIZE",
"]",
".",
"inspect",
"when",
"Array",
"str",
"=",
"[",
"]",
"key",
".",
"each",
"{",
"|",
"k",
"|",
"st... | Internal: Show first 100 characters of cache key for logging purposes.
Returns a String with a length less than 100 characters. | [
"Internal",
":",
"Show",
"first",
"100",
"characters",
"of",
"cache",
"key",
"for",
"logging",
"purposes",
"."
] | 9e3f0d8e98c44f57e67bc138db87bb8469bf5ddd | https://github.com/rails/sprockets/blob/9e3f0d8e98c44f57e67bc138db87bb8469bf5ddd/lib/sprockets/cache.rb#L181-L194 | train | Get the next key from the cache | [
30522,
13366,
19043,
1035,
3145,
1006,
3145,
1007,
2553,
3145,
2043,
16109,
3145,
1012,
2000,
1035,
1055,
2043,
5164,
3145,
1031,
1014,
1010,
19043,
1035,
2946,
1033,
1012,
22459,
2043,
9140,
2358,
2099,
1027,
1031,
1033,
3145,
1012,
2169,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
square/connect-ruby-sdk | lib/square_connect/api/customers_api.rb | SquareConnect.CustomersApi.create_customer_card | def create_customer_card(customer_id, body, opts = {})
data, _status_code, _headers = create_customer_card_with_http_info(customer_id, body, opts)
return data
end | ruby | def create_customer_card(customer_id, body, opts = {})
data, _status_code, _headers = create_customer_card_with_http_info(customer_id, body, opts)
return data
end | [
"def",
"create_customer_card",
"(",
"customer_id",
",",
"body",
",",
"opts",
"=",
"{",
"}",
")",
"data",
",",
"_status_code",
",",
"_headers",
"=",
"create_customer_card_with_http_info",
"(",
"customer_id",
",",
"body",
",",
"opts",
")",
"return",
"data",
"end... | CreateCustomerCard
Adds a card on file to an existing customer. As with charges, calls to `CreateCustomerCard` are idempotent. Multiple calls with the same card nonce return the same card record that was created with the provided nonce during the _first_ call. Cards on file are automatically updated on a monthly bas... | [
"CreateCustomerCard",
"Adds",
"a",
"card",
"on",
"file",
"to",
"an",
"existing",
"customer",
".",
"As",
"with",
"charges",
"calls",
"to",
"CreateCustomerCard",
"are",
"idempotent",
".",
"Multiple",
"calls",
"with",
"the",
"same",
"card",
"nonce",
"return",
"th... | 798eb9ded716f23b9f1518386f1c311a34bca8bf | https://github.com/square/connect-ruby-sdk/blob/798eb9ded716f23b9f1518386f1c311a34bca8bf/lib/square_connect/api/customers_api.rb#L81-L84 | train | Creates a customer card | [
30522,
13366,
3443,
1035,
8013,
1035,
4003,
1006,
8013,
1035,
8909,
1010,
2303,
1010,
23569,
2015,
1027,
1063,
1065,
1007,
2951,
1010,
1035,
3570,
1035,
3642,
1010,
1035,
20346,
2015,
1027,
3443,
1035,
8013,
1035,
4003,
1035,
2007,
1035,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
fastlane/fastlane | fastlane_core/lib/fastlane_core/project.rb | FastlaneCore.Project.select_scheme | def select_scheme(preferred_to_include: nil)
if options[:scheme].to_s.length > 0
# Verify the scheme is available
unless schemes.include?(options[:scheme].to_s)
UI.error("Couldn't find specified scheme '#{options[:scheme]}'. Please make sure that the scheme is shared, see https://develop... | ruby | def select_scheme(preferred_to_include: nil)
if options[:scheme].to_s.length > 0
# Verify the scheme is available
unless schemes.include?(options[:scheme].to_s)
UI.error("Couldn't find specified scheme '#{options[:scheme]}'. Please make sure that the scheme is shared, see https://develop... | [
"def",
"select_scheme",
"(",
"preferred_to_include",
":",
"nil",
")",
"if",
"options",
"[",
":scheme",
"]",
".",
"to_s",
".",
"length",
">",
"0",
"# Verify the scheme is available",
"unless",
"schemes",
".",
"include?",
"(",
"options",
"[",
":scheme",
"]",
"."... | Let the user select a scheme
Use a scheme containing the preferred_to_include string when multiple schemes were found | [
"Let",
"the",
"user",
"select",
"a",
"scheme",
"Use",
"a",
"scheme",
"containing",
"the",
"preferred_to_include",
"string",
"when",
"multiple",
"schemes",
"were",
"found"
] | 457c5d647c77f0e078dafa5129da616914e002c5 | https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/fastlane_core/lib/fastlane_core/project.rb#L130-L168 | train | Select a scheme based on the current scheme. | [
30522,
13366,
7276,
1035,
5679,
1006,
6871,
1035,
2000,
1035,
2421,
1024,
9152,
2140,
1007,
2065,
7047,
1031,
1024,
5679,
1033,
1012,
2000,
1035,
1055,
1012,
3091,
1028,
1014,
1001,
20410,
1996,
5679,
2003,
2800,
4983,
11683,
1012,
2421,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | data/azure_cognitiveservices_luisauthoring/lib/2.0/generated/azure_cognitiveservices_luisauthoring/model.rb | Azure::CognitiveServices::LuisAuthoring::V2_0.Model.delete_pattern_any_entity_model | def delete_pattern_any_entity_model(app_id, version_id, entity_id, custom_headers:nil)
response = delete_pattern_any_entity_model_async(app_id, version_id, entity_id, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def delete_pattern_any_entity_model(app_id, version_id, entity_id, custom_headers:nil)
response = delete_pattern_any_entity_model_async(app_id, version_id, entity_id, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"delete_pattern_any_entity_model",
"(",
"app_id",
",",
"version_id",
",",
"entity_id",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"delete_pattern_any_entity_model_async",
"(",
"app_id",
",",
"version_id",
",",
"entity_id",
",",
"custom_headers",
"... | Deletes a Pattern.Any entity extractor from a version of the application.
@param app_id The application ID.
@param version_id [String] The version ID.
@param entity_id The Pattern.Any entity extractor ID.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP reques... | [
"Deletes",
"a",
"Pattern",
".",
"Any",
"entity",
"extractor",
"from",
"a",
"version",
"of",
"the",
"application",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_cognitiveservices_luisauthoring/lib/2.0/generated/azure_cognitiveservices_luisauthoring/model.rb#L8685-L8688 | train | Deletes an entity model in a version of the application. | [
30522,
13366,
3972,
12870,
1035,
5418,
1035,
2151,
1035,
9178,
1035,
2944,
1006,
10439,
1035,
8909,
1010,
2544,
1035,
8909,
1010,
9178,
1035,
8909,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
3972,
12870,
1035,
5418,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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_entry | def replace_entry(options = {})
options = options.merge(network_acl_id: @id)
resp = @client.replace_network_acl_entry(options)
resp.data
end | ruby | def replace_entry(options = {})
options = options.merge(network_acl_id: @id)
resp = @client.replace_network_acl_entry(options)
resp.data
end | [
"def",
"replace_entry",
"(",
"options",
"=",
"{",
"}",
")",
"options",
"=",
"options",
".",
"merge",
"(",
"network_acl_id",
":",
"@id",
")",
"resp",
"=",
"@client",
".",
"replace_network_acl_entry",
"(",
"options",
")",
"resp",
".",
"data",
"end"
] | @example Request syntax with placeholder values
network_acl.replace_entry({
cidr_block: "String",
dry_run: false,
egress: false, # required
icmp_type_code: {
code: 1,
type: 1,
},
ipv_6_cidr_block: "String",
port_range: {
from: 1,
to: 1,
},
pro... | [
"@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#L424-L428 | train | Replace an existing entry in the network acl | [
30522,
13366,
5672,
1035,
4443,
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... |
rmosolgo/graphql-ruby | lib/graphql/analysis/analyze_query.rb | GraphQL.Analysis.reduce_node | def reduce_node(irep_node, reducer_states)
visit_analyzers(:enter, irep_node, reducer_states)
irep_node.typed_children.each do |type_defn, children|
children.each do |name, child_irep_node|
reduce_node(child_irep_node, reducer_states)
end
end
visit_analyzers(:leave, i... | ruby | def reduce_node(irep_node, reducer_states)
visit_analyzers(:enter, irep_node, reducer_states)
irep_node.typed_children.each do |type_defn, children|
children.each do |name, child_irep_node|
reduce_node(child_irep_node, reducer_states)
end
end
visit_analyzers(:leave, i... | [
"def",
"reduce_node",
"(",
"irep_node",
",",
"reducer_states",
")",
"visit_analyzers",
"(",
":enter",
",",
"irep_node",
",",
"reducer_states",
")",
"irep_node",
".",
"typed_children",
".",
"each",
"do",
"|",
"type_defn",
",",
"children",
"|",
"children",
".",
... | Enter the node, visit its children, then leave the node. | [
"Enter",
"the",
"node",
"visit",
"its",
"children",
"then",
"leave",
"the",
"node",
"."
] | d5be13a816f220b9efbabeaa69a3e56fedf311f5 | https://github.com/rmosolgo/graphql-ruby/blob/d5be13a816f220b9efbabeaa69a3e56fedf311f5/lib/graphql/analysis/analyze_query.rb#L67-L77 | train | Reduce the node with the children of the given irep node. | [
30522,
13366,
5547,
1035,
13045,
1006,
20868,
13699,
1035,
13045,
1010,
5547,
2099,
1035,
2163,
1007,
3942,
1035,
17908,
2869,
1006,
1024,
4607,
1010,
20868,
13699,
1035,
13045,
1010,
5547,
2099,
1035,
2163,
1007,
20868,
13699,
1035,
13045,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
gocardless/business | lib/business/calendar.rb | Business.Calendar.set_working_days | def set_working_days(working_days)
@working_days = (working_days || default_working_days).map do |day|
day.downcase.strip[0..2].tap do |normalised_day|
raise "Invalid day #{day}" unless DAY_NAMES.include?(normalised_day)
end
end
extra_working_dates_names = @extra_working_date... | ruby | def set_working_days(working_days)
@working_days = (working_days || default_working_days).map do |day|
day.downcase.strip[0..2].tap do |normalised_day|
raise "Invalid day #{day}" unless DAY_NAMES.include?(normalised_day)
end
end
extra_working_dates_names = @extra_working_date... | [
"def",
"set_working_days",
"(",
"working_days",
")",
"@working_days",
"=",
"(",
"working_days",
"||",
"default_working_days",
")",
".",
"map",
"do",
"|",
"day",
"|",
"day",
".",
"downcase",
".",
"strip",
"[",
"0",
"..",
"2",
"]",
".",
"tap",
"do",
"|",
... | Internal method for assigning working days from a calendar config. | [
"Internal",
"method",
"for",
"assigning",
"working",
"days",
"from",
"a",
"calendar",
"config",
"."
] | 62a2a09008095403bafa78033a8be1afe6debbf6 | https://github.com/gocardless/business/blob/62a2a09008095403bafa78033a8be1afe6debbf6/lib/business/calendar.rb#L167-L176 | train | Set the working days for this calendar | [
30522,
13366,
2275,
1035,
2551,
1035,
2420,
1006,
2551,
1035,
2420,
1007,
1030,
2551,
1035,
2420,
1027,
1006,
2551,
1035,
2420,
1064,
1064,
12398,
1035,
2551,
1035,
2420,
1007,
1012,
4949,
2079,
1064,
2154,
1064,
2154,
1012,
2091,
18382,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
aws/aws-sdk-ruby | gems/aws-sdk-ec2/lib/aws-sdk-ec2/resource.rb | Aws::EC2.Resource.classic_addresses | def classic_addresses(options = {})
batches = Enumerator.new do |y|
batch = []
options = Aws::Util.deep_merge(options, filters: [{
name: "domain",
values: ["standard"]
}])
resp = @client.describe_addresses(options)
resp.data.addresses.each do |a|
... | ruby | def classic_addresses(options = {})
batches = Enumerator.new do |y|
batch = []
options = Aws::Util.deep_merge(options, filters: [{
name: "domain",
values: ["standard"]
}])
resp = @client.describe_addresses(options)
resp.data.addresses.each do |a|
... | [
"def",
"classic_addresses",
"(",
"options",
"=",
"{",
"}",
")",
"batches",
"=",
"Enumerator",
".",
"new",
"do",
"|",
"y",
"|",
"batch",
"=",
"[",
"]",
"options",
"=",
"Aws",
"::",
"Util",
".",
"deep_merge",
"(",
"options",
",",
"filters",
":",
"[",
... | @!group Associations
@example Request syntax with placeholder values
classic_addresses = ec2.classic_addresses({
filters: [
{
name: "String",
values: ["String"],
},
],
public_ips: ["String"],
allocation_ids: ["String"],
dry_run: false,
})
@param [Hash] o... | [
"@!group",
"Associations",
"@example",
"Request",
"syntax",
"with",
"placeholder",
"values"
] | e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d | https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-ec2/lib/aws-sdk-ec2/resource.rb#L1254-L1272 | train | Returns a collection of all the classic addresses | [
30522,
13366,
4438,
1035,
11596,
1006,
7047,
1027,
1063,
1065,
1007,
14108,
2229,
1027,
4372,
17897,
16259,
1012,
2047,
2079,
1064,
1061,
1064,
14108,
1027,
1031,
1033,
7047,
1027,
22091,
2015,
1024,
1024,
21183,
4014,
1012,
2784,
1035,
135... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_iot_hub/lib/2017-01-19/generated/azure_mgmt_iot_hub/iot_hub_resource.rb | Azure::IotHub::Mgmt::V2017_01_19.IotHubResource.list_jobs_next | def list_jobs_next(next_page_link, custom_headers:nil)
response = list_jobs_next_async(next_page_link, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def list_jobs_next(next_page_link, custom_headers:nil)
response = list_jobs_next_async(next_page_link, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"list_jobs_next",
"(",
"next_page_link",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"list_jobs_next_async",
"(",
"next_page_link",
",",
"custom_headers",
":custom_headers",
")",
".",
"value!",
"response",
".",
"body",
"unless",
"response",
".",
... | Get a list of all the jobs in an IoT hub. For more information, see:
https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry.
Get a list of all the jobs in an IoT hub. For more information, see:
https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry.
@param next_page_link ... | [
"Get",
"a",
"list",
"of",
"all",
"the",
"jobs",
"in",
"an",
"IoT",
"hub",
".",
"For",
"more",
"information",
"see",
":",
"https",
":",
"//",
"docs",
".",
"microsoft",
".",
"com",
"/",
"azure",
"/",
"iot",
"-",
"hub",
"/",
"iot",
"-",
"hub",
"-",
... | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_iot_hub/lib/2017-01-19/generated/azure_mgmt_iot_hub/iot_hub_resource.rb#L2607-L2610 | train | Gets the list of jobs for a subscription. | [
30522,
13366,
2862,
1035,
5841,
1035,
2279,
1006,
2279,
1035,
3931,
1035,
4957,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
2862,
1035,
5841,
1035,
2279,
1035,
2004,
6038,
2278,
1006,
2279,
1035,
3931,
1035,
4957,
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_operational_insights/lib/2015-03-20/generated/azure_mgmt_operational_insights/workspaces.rb | Azure::OperationalInsights::Mgmt::V2015_03_20.Workspaces.update_search_results | def update_search_results(resource_group_name, workspace_name, id, custom_headers:nil)
response = update_search_results_async(resource_group_name, workspace_name, id, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def update_search_results(resource_group_name, workspace_name, id, custom_headers:nil)
response = update_search_results_async(resource_group_name, workspace_name, id, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"update_search_results",
"(",
"resource_group_name",
",",
"workspace_name",
",",
"id",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"update_search_results_async",
"(",
"resource_group_name",
",",
"workspace_name",
",",
"id",
",",
"custom_headers",
"... | Gets updated search results for a given search query.
@param resource_group_name [String] The name of the resource group to get.
The name is case insensitive.
@param workspace_name [String] Log Analytics workspace name
@param id [String] The id of the search that will have results updated. You
can get the id from... | [
"Gets",
"updated",
"search",
"results",
"for",
"a",
"given",
"search",
"query",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_operational_insights/lib/2015-03-20/generated/azure_mgmt_operational_insights/workspaces.rb#L291-L294 | train | Updates the search results of a given workspace. | [
30522,
13366,
10651,
1035,
3945,
1035,
3463,
30524,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
10651,
1035,
3945,
1035,
3463,
1035,
2004,
6038,
2278,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2573,
15327,
1035,
2171,
1010,
8909,
1010,
7661,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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.paging | def paging
page = 0
results = []
loop do
page += 1
current = yield(page)
results += current
break if (current || []).count < page_size # no more results
end
return results
end | ruby | def paging
page = 0
results = []
loop do
page += 1
current = yield(page)
results += current
break if (current || []).count < page_size # no more results
end
return results
end | [
"def",
"paging",
"page",
"=",
"0",
"results",
"=",
"[",
"]",
"loop",
"do",
"page",
"+=",
"1",
"current",
"=",
"yield",
"(",
"page",
")",
"results",
"+=",
"current",
"break",
"if",
"(",
"current",
"||",
"[",
"]",
")",
".",
"count",
"<",
"page_size",... | Handles the paging for you... for free
Just pass a block and use the parameter as page number | [
"Handles",
"the",
"paging",
"for",
"you",
"...",
"for",
"free",
"Just",
"pass",
"a",
"block",
"and",
"use",
"the",
"parameter",
"as",
"page",
"number"
] | 457c5d647c77f0e078dafa5129da616914e002c5 | https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/spaceship/lib/spaceship/client.rb#L312-L325 | train | Yields the results of the block | [
30522,
13366,
6643,
4726,
3931,
1027,
1014,
3463,
1027,
1031,
1033,
7077,
2079,
3931,
1009,
1027,
1015,
2783,
1027,
10750,
1006,
3931,
1007,
3463,
1009,
1027,
2783,
3338,
2065,
1006,
2783,
1064,
1064,
1031,
1033,
1007,
1012,
4175,
1026,
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... |
strongself/Generamba | lib/generamba/template/processor/template_processor.rb | Generamba.TemplateProcessor.clear_installed_templates | def clear_installed_templates
install_path = Pathname.new(TEMPLATES_FOLDER)
FileUtils.rm_rf(Dir.glob(install_path))
end | ruby | def clear_installed_templates
install_path = Pathname.new(TEMPLATES_FOLDER)
FileUtils.rm_rf(Dir.glob(install_path))
end | [
"def",
"clear_installed_templates",
"install_path",
"=",
"Pathname",
".",
"new",
"(",
"TEMPLATES_FOLDER",
")",
"FileUtils",
".",
"rm_rf",
"(",
"Dir",
".",
"glob",
"(",
"install_path",
")",
")",
"end"
] | Clears all of the currently installed templates | [
"Clears",
"all",
"of",
"the",
"currently",
"installed",
"templates"
] | 9ef343805f3a66f58bc36e120e822d5436a4da97 | https://github.com/strongself/Generamba/blob/9ef343805f3a66f58bc36e120e822d5436a4da97/lib/generamba/template/processor/template_processor.rb#L49-L52 | train | Clear the installed templates and the generated template. | [
30522,
13366,
3154,
1035,
5361,
1035,
23561,
2015,
16500,
1035,
4130,
1027,
4130,
30524,
2203,
102,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
hashicorp/vault-ruby | lib/vault/api/logical.rb | Vault.Logical.list | def list(path, options = {})
headers = extract_headers!(options)
json = client.list("/v1/#{encode_path(path)}", {}, headers)
json[:data][:keys] || []
rescue HTTPError => e
return [] if e.code == 404
raise
end | ruby | def list(path, options = {})
headers = extract_headers!(options)
json = client.list("/v1/#{encode_path(path)}", {}, headers)
json[:data][:keys] || []
rescue HTTPError => e
return [] if e.code == 404
raise
end | [
"def",
"list",
"(",
"path",
",",
"options",
"=",
"{",
"}",
")",
"headers",
"=",
"extract_headers!",
"(",
"options",
")",
"json",
"=",
"client",
".",
"list",
"(",
"\"/v1/#{encode_path(path)}\"",
",",
"{",
"}",
",",
"headers",
")",
"json",
"[",
":data",
... | List the secrets at the given path, if the path supports listing. If the
the path does not exist, an exception will be raised.
@example
Vault.logical.list("secret") #=> [#<Vault::Secret>, #<Vault::Secret>, ...]
@param [String] path
the path to list
@return [Array<String>] | [
"List",
"the",
"secrets",
"at",
"the",
"given",
"path",
"if",
"the",
"path",
"supports",
"listing",
".",
"If",
"the",
"the",
"path",
"does",
"not",
"exist",
"an",
"exception",
"will",
"be",
"raised",
"."
] | 02f0532a802ba1a2a0d8703a4585dab76eb9d864 | https://github.com/hashicorp/vault-ruby/blob/02f0532a802ba1a2a0d8703a4585dab76eb9d864/lib/vault/api/logical.rb#L26-L33 | train | List the keys of a given path. | [
30522,
13366,
2862,
1006,
4130,
1010,
7047,
1027,
1063,
1065,
1007,
20346,
2015,
1027,
14817,
1035,
20346,
2015,
999,
1006,
7047,
1007,
1046,
3385,
1027,
7396,
1012,
2862,
1006,
1000,
1013,
1058,
2487,
1013,
1001,
1063,
4372,
16044,
1035,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
aws/aws-sdk-ruby | gems/aws-sdk-rds/lib/aws-sdk-rds/db_cluster.rb | Aws::RDS.DBCluster.failover | def failover(options = {})
options = options.merge(db_cluster_identifier: @id)
resp = @client.failover_db_cluster(options)
DBCluster.new(
id: resp.data.db_cluster.db_cluster_identifier,
data: resp.data.db_cluster,
client: @client
)
end | ruby | def failover(options = {})
options = options.merge(db_cluster_identifier: @id)
resp = @client.failover_db_cluster(options)
DBCluster.new(
id: resp.data.db_cluster.db_cluster_identifier,
data: resp.data.db_cluster,
client: @client
)
end | [
"def",
"failover",
"(",
"options",
"=",
"{",
"}",
")",
"options",
"=",
"options",
".",
"merge",
"(",
"db_cluster_identifier",
":",
"@id",
")",
"resp",
"=",
"@client",
".",
"failover_db_cluster",
"(",
"options",
")",
"DBCluster",
".",
"new",
"(",
"id",
":... | @example Request syntax with placeholder values
dbcluster = db_cluster.failover({
target_db_instance_identifier: "String",
})
@param [Hash] options ({})
@option options [String] :target_db_instance_identifier
The name of the instance to promote to the primary instance.
You must specify the instance... | [
"@example",
"Request",
"syntax",
"with",
"placeholder",
"values"
] | e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d | https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-rds/lib/aws-sdk-rds/db_cluster.rb#L932-L940 | train | failover the database cluster | [
30522,
13366,
8246,
7840,
1006,
7047,
1027,
1063,
1065,
1007,
7047,
1027,
7047,
1012,
13590,
1006,
16962,
1035,
9324,
1035,
8909,
4765,
18095,
1024,
1030,
8909,
1007,
24501,
2361,
1027,
1030,
7396,
1012,
8246,
7840,
1035,
16962,
1035,
9324,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
mongodb/mongo-ruby-driver | lib/mongo/session.rb | Mongo.Session.suppress_read_write_concern! | def suppress_read_write_concern!(command)
command.tap do |c|
next unless in_transaction?
c.delete(:readConcern) unless starting_transaction?
c.delete(:writeConcern) unless c[:commitTransaction] || c[:abortTransaction]
end
end | ruby | def suppress_read_write_concern!(command)
command.tap do |c|
next unless in_transaction?
c.delete(:readConcern) unless starting_transaction?
c.delete(:writeConcern) unless c[:commitTransaction] || c[:abortTransaction]
end
end | [
"def",
"suppress_read_write_concern!",
"(",
"command",
")",
"command",
".",
"tap",
"do",
"|",
"c",
"|",
"next",
"unless",
"in_transaction?",
"c",
".",
"delete",
"(",
":readConcern",
")",
"unless",
"starting_transaction?",
"c",
".",
"delete",
"(",
":writeConcern"... | Remove the read concern and/or write concern from the command if not applicable.
@example
session.suppress_read_write_concern!(cmd)
@return [ Hash, BSON::Document ] The command document.
@since 2.6.0
@api private | [
"Remove",
"the",
"read",
"concern",
"and",
"/",
"or",
"write",
"concern",
"from",
"the",
"command",
"if",
"not",
"applicable",
"."
] | dca26d0870cb3386fad9ccc1d17228097c1fe1c8 | https://github.com/mongodb/mongo-ruby-driver/blob/dca26d0870cb3386fad9ccc1d17228097c1fe1c8/lib/mongo/session.rb#L332-L339 | train | Disallow read and write concern from the command. | [
30522,
13366,
16081,
1035,
3191,
1035,
4339,
1035,
5142,
999,
1006,
3094,
1007,
3094,
1012,
11112,
2079,
1064,
1039,
1064,
2279,
4983,
1999,
1035,
12598,
1029,
1039,
1012,
3972,
12870,
1006,
1024,
3191,
8663,
17119,
2078,
1007,
4983,
3225,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
devise-security/devise-security | lib/devise-security/routes.rb | ActionDispatch::Routing.Mapper.devise_password_expired | def devise_password_expired(mapping, controllers)
resource :password_expired, only: [:show, :update], path: mapping.path_names[:password_expired], controller: controllers[:password_expired]
end | ruby | def devise_password_expired(mapping, controllers)
resource :password_expired, only: [:show, :update], path: mapping.path_names[:password_expired], controller: controllers[:password_expired]
end | [
"def",
"devise_password_expired",
"(",
"mapping",
",",
"controllers",
")",
"resource",
":password_expired",
",",
"only",
":",
"[",
":show",
",",
":update",
"]",
",",
"path",
":",
"mapping",
".",
"path_names",
"[",
":password_expired",
"]",
",",
"controller",
"... | route for handle expired passwords | [
"route",
"for",
"handle",
"expired",
"passwords"
] | d0b44a7bb249f6763641f45d34dd52e7fda3fca2 | https://github.com/devise-security/devise-security/blob/d0b44a7bb249f6763641f45d34dd52e7fda3fca2/lib/devise-security/routes.rb#L9-L11 | train | This method is used to devise the password_expired resource | [
30522,
13366,
14386,
3366,
1035,
20786,
1035,
13735,
1006,
12375,
1010,
21257,
1007,
7692,
1024,
20786,
1035,
13735,
1010,
2069,
1024,
1031,
1024,
2265,
1010,
1024,
10651,
1033,
1010,
4130,
1024,
12375,
1012,
4130,
1035,
3415,
1031,
1024,
2... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/server_azure_adadministrators.rb | Azure::SQL::Mgmt::V2014_04_01.ServerAzureADAdministrators.create_or_update_async | def create_or_update_async(resource_group_name, server_name, properties, custom_headers:nil)
# Send request
promise = begin_create_or_update_async(resource_group_name, server_name, properties, custom_headers:custom_headers)
promise = promise.then do |response|
# Defining deserialization metho... | ruby | def create_or_update_async(resource_group_name, server_name, properties, custom_headers:nil)
# Send request
promise = begin_create_or_update_async(resource_group_name, server_name, properties, custom_headers:custom_headers)
promise = promise.then do |response|
# Defining deserialization metho... | [
"def",
"create_or_update_async",
"(",
"resource_group_name",
",",
"server_name",
",",
"properties",
",",
"custom_headers",
":",
"nil",
")",
"# Send request",
"promise",
"=",
"begin_create_or_update_async",
"(",
"resource_group_name",
",",
"server_name",
",",
"properties",... | @param resource_group_name [String] The name of the resource group that
contains the resource. You can obtain this value from the Azure Resource
Manager API or the portal.
@param server_name [String] The name of the server.
@param properties [ServerAzureADAdministrator] The required parameters for
creating or upda... | [
"@param",
"resource_group_name",
"[",
"String",
"]",
"The",
"name",
"of",
"the",
"resource",
"group",
"that",
"contains",
"the",
"resource",
".",
"You",
"can",
"obtain",
"this",
"value",
"from",
"the",
"Azure",
"Resource",
"Manager",
"API",
"or",
"the",
"por... | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/server_azure_adadministrators.rb#L60-L76 | train | Creates or updates a server in the specified subscription. | [
30522,
13366,
3443,
1035,
2030,
1035,
10651,
1035,
2004,
6038,
2278,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
8241,
1035,
2171,
1010,
5144,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
1001,
4604,
5227,
4872,
1027,
4088,
1035,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
square/connect-ruby-sdk | lib/square_connect/api/catalog_api.rb | SquareConnect.CatalogApi.search_catalog_objects | def search_catalog_objects(body, opts = {})
data, _status_code, _headers = search_catalog_objects_with_http_info(body, opts)
return data
end | ruby | def search_catalog_objects(body, opts = {})
data, _status_code, _headers = search_catalog_objects_with_http_info(body, opts)
return data
end | [
"def",
"search_catalog_objects",
"(",
"body",
",",
"opts",
"=",
"{",
"}",
")",
"data",
",",
"_status_code",
",",
"_headers",
"=",
"search_catalog_objects_with_http_info",
"(",
"body",
",",
"opts",
")",
"return",
"data",
"end"
] | SearchCatalogObjects
Queries the targeted catalog using a variety of query types: [CatalogQuerySortedAttribute](#type-catalogquerysortedattribute), [CatalogQueryExact](#type-catalogqueryexact), [CatalogQueryRange](#type-catalogqueryrange), [CatalogQueryText](#type-catalogquerytext), [CatalogQueryItemsForTax](#type-cat... | [
"SearchCatalogObjects",
"Queries",
"the",
"targeted",
"catalog",
"using",
"a",
"variety",
"of",
"query",
"types",
":",
"[",
"CatalogQuerySortedAttribute",
"]",
"(",
"#type",
"-",
"catalogquerysortedattribute",
")",
"[",
"CatalogQueryExact",
"]",
"(",
"#type",
"-",
... | 798eb9ded716f23b9f1518386f1c311a34bca8bf | https://github.com/square/connect-ruby-sdk/blob/798eb9ded716f23b9f1518386f1c311a34bca8bf/lib/square_connect/api/catalog_api.rb#L411-L414 | train | SearchCatalogObjects Returns an array of objects that are in the catalog. | [
30522,
13366,
3945,
1035,
12105,
1035,
5200,
1006,
2303,
1010,
23569,
2015,
1027,
1063,
1065,
1007,
2951,
1010,
1035,
3570,
1035,
3642,
1010,
1035,
20346,
2015,
1027,
3945,
1035,
12105,
1035,
5200,
1035,
2007,
1035,
8299,
1035,
18558,
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... |
cloudfoundry/bosh | src/bosh-director/lib/bosh/director/compiled_package_requirement.rb | Bosh::Director.CompiledPackageRequirement.dependency_spec | def dependency_spec
spec = {}
@dependencies.each do |dependency|
unless dependency.compiled?
raise DirectorError,
'Cannot generate package dependency spec ' \
"for '#{@package.name}', " \
"'#{dependency.package.name}' hasn't been compiled ye... | ruby | def dependency_spec
spec = {}
@dependencies.each do |dependency|
unless dependency.compiled?
raise DirectorError,
'Cannot generate package dependency spec ' \
"for '#{@package.name}', " \
"'#{dependency.package.name}' hasn't been compiled ye... | [
"def",
"dependency_spec",
"spec",
"=",
"{",
"}",
"@dependencies",
".",
"each",
"do",
"|",
"dependency",
"|",
"unless",
"dependency",
".",
"compiled?",
"raise",
"DirectorError",
",",
"'Cannot generate package dependency spec '",
"\"for '#{@package.name}', \"",
"\"'#{depend... | This call only makes sense if all dependencies have already been compiled,
otherwise it raises an exception
@return [Hash] Hash representation of all package dependencies. Agent uses
that to download package dependencies before compiling the package on a
compilation VM. | [
"This",
"call",
"only",
"makes",
"sense",
"if",
"all",
"dependencies",
"have",
"already",
"been",
"compiled",
"otherwise",
"it",
"raises",
"an",
"exception"
] | 2eaa7100879ddd20cd909cd698514746195e28b7 | https://github.com/cloudfoundry/bosh/blob/2eaa7100879ddd20cd909cd698514746195e28b7/src/bosh-director/lib/bosh/director/compiled_package_requirement.rb#L107-L129 | train | Generate the dependency spec for this package | [
30522,
13366,
24394,
1035,
28699,
28699,
1027,
1063,
1065,
1030,
12530,
15266,
1012,
2169,
2079,
1064,
24394,
1064,
4983,
24394,
1012,
9227,
1029,
5333,
2472,
2121,
29165,
1010,
1005,
3685,
9699,
7427,
24394,
28699,
1005,
1032,
1000,
2005,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/disaster_recovery_configurations.rb | Azure::SQL::Mgmt::V2014_04_01.DisasterRecoveryConfigurations.begin_create_or_update_with_http_info | def begin_create_or_update_with_http_info(resource_group_name, server_name, disaster_recovery_configuration_name, custom_headers:nil)
begin_create_or_update_async(resource_group_name, server_name, disaster_recovery_configuration_name, custom_headers:custom_headers).value!
end | ruby | def begin_create_or_update_with_http_info(resource_group_name, server_name, disaster_recovery_configuration_name, custom_headers:nil)
begin_create_or_update_async(resource_group_name, server_name, disaster_recovery_configuration_name, custom_headers:custom_headers).value!
end | [
"def",
"begin_create_or_update_with_http_info",
"(",
"resource_group_name",
",",
"server_name",
",",
"disaster_recovery_configuration_name",
",",
"custom_headers",
":",
"nil",
")",
"begin_create_or_update_async",
"(",
"resource_group_name",
",",
"server_name",
",",
"disaster_re... | Creates or updates a disaster recovery configuration.
@param resource_group_name [String] The name of the resource group that
contains the resource. You can obtain this value from the Azure Resource
Manager API or the portal.
@param server_name [String] The name of the server.
@param disaster_recovery_configurati... | [
"Creates",
"or",
"updates",
"a",
"disaster",
"recovery",
"configuration",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/disaster_recovery_configurations.rb#L546-L548 | train | Creates or updates a disaster recovery configuration. | [
30522,
13366,
4088,
1035,
3443,
1035,
2030,
1035,
10651,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
8241,
1035,
2171,
1010,
7071,
1035,
7233,
1035,
9563,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | data/azure_cognitiveservices_contentmoderator/lib/1.0/generated/azure_cognitiveservices_contentmoderator/list_management_image.rb | Azure::CognitiveServices::ContentModerator::V1_0.ListManagementImage.add_image_with_http_info | def add_image_with_http_info(list_id, tag:nil, label:nil, custom_headers:nil)
add_image_async(list_id, tag:tag, label:label, custom_headers:custom_headers).value!
end | ruby | def add_image_with_http_info(list_id, tag:nil, label:nil, custom_headers:nil)
add_image_async(list_id, tag:tag, label:label, custom_headers:custom_headers).value!
end | [
"def",
"add_image_with_http_info",
"(",
"list_id",
",",
"tag",
":",
"nil",
",",
"label",
":",
"nil",
",",
"custom_headers",
":",
"nil",
")",
"add_image_async",
"(",
"list_id",
",",
"tag",
":",
"tag",
",",
"label",
":",
"label",
",",
"custom_headers",
":cus... | Add an image to the list with list Id equal to list Id passed.
@param list_id [String] List Id of the image list.
@param tag [Integer] Tag for the image.
@param label [String] The image label.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request.
@return... | [
"Add",
"an",
"image",
"to",
"the",
"list",
"with",
"list",
"Id",
"equal",
"to",
"list",
"Id",
"passed",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_cognitiveservices_contentmoderator/lib/1.0/generated/azure_cognitiveservices_contentmoderator/list_management_image.rb#L61-L63 | train | Adds an image to a list. | [
30522,
13366,
5587,
1035,
3746,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
2862,
1035,
8909,
1010,
6415,
1024,
9152,
2140,
1010,
3830,
1024,
9152,
2140,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
5587,
1035,
3746,
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... |
castwide/solargraph | lib/solargraph/source.rb | Solargraph.Source.associated_comments | def associated_comments
@associated_comments ||= begin
result = {}
Parser::Source::Comment.associate_locations(node, comments).each_pair do |loc, all|
block = all #.select{ |l| l.document? || code.lines[l.loc.line].strip.start_with?('#')}
next if block.empty?
result[l... | ruby | def associated_comments
@associated_comments ||= begin
result = {}
Parser::Source::Comment.associate_locations(node, comments).each_pair do |loc, all|
block = all #.select{ |l| l.document? || code.lines[l.loc.line].strip.start_with?('#')}
next if block.empty?
result[l... | [
"def",
"associated_comments",
"@associated_comments",
"||=",
"begin",
"result",
"=",
"{",
"}",
"Parser",
"::",
"Source",
"::",
"Comment",
".",
"associate_locations",
"(",
"node",
",",
"comments",
")",
".",
"each_pair",
"do",
"|",
"loc",
",",
"all",
"|",
"blo... | Get a hash of comments grouped by the line numbers of the associated code.
@return [Hash{Integer => Array<Parser::Source::Comment>}] | [
"Get",
"a",
"hash",
"of",
"comments",
"grouped",
"by",
"the",
"line",
"numbers",
"of",
"the",
"associated",
"code",
"."
] | 47badb5d151aca775ccbe6c470236089eae7839d | https://github.com/castwide/solargraph/blob/47badb5d151aca775ccbe6c470236089eae7839d/lib/solargraph/source.rb#L289-L300 | train | Returns the array of the associated comments for this node. | [
30522,
13366,
3378,
1035,
7928,
1030,
3378,
1035,
7928,
1064,
1064,
1027,
4088,
2765,
1027,
1063,
1065,
11968,
8043,
1024,
1024,
3120,
1024,
1024,
7615,
1012,
5482,
1035,
5269,
1006,
13045,
1010,
7928,
1007,
1012,
2169,
1035,
3940,
2079,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
commander-rb/commander | lib/commander/user_interaction.rb | Commander.UI.ask_editor | def ask_editor(input = nil, preferred_editor = nil)
editor = available_editor preferred_editor
program = Commander::Runner.instance.program(:name).downcase rescue 'commander'
tmpfile = Tempfile.new program
begin
tmpfile.write input if input
tmpfile.close
system("#{editor}... | ruby | def ask_editor(input = nil, preferred_editor = nil)
editor = available_editor preferred_editor
program = Commander::Runner.instance.program(:name).downcase rescue 'commander'
tmpfile = Tempfile.new program
begin
tmpfile.write input if input
tmpfile.close
system("#{editor}... | [
"def",
"ask_editor",
"(",
"input",
"=",
"nil",
",",
"preferred_editor",
"=",
"nil",
")",
"editor",
"=",
"available_editor",
"preferred_editor",
"program",
"=",
"Commander",
"::",
"Runner",
".",
"instance",
".",
"program",
"(",
":name",
")",
".",
"downcase",
... | Prompt an editor for input. Optionally supply initial
_input_ which is written to the editor.
_preferred_editor_ can be hinted.
=== Examples
ask_editor # => prompts EDITOR with no input
ask_editor('foo') # => prompts EDITOR with default text of 'foo'
ask_editor('foo', 'mate -w') #... | [
"Prompt",
"an",
"editor",
"for",
"input",
".",
"Optionally",
"supply",
"initial",
"_input_",
"which",
"is",
"written",
"to",
"the",
"editor",
"."
] | 332047c14948225462fe60042eed23adfb996d68 | https://github.com/commander-rb/commander/blob/332047c14948225462fe60042eed23adfb996d68/lib/commander/user_interaction.rb#L258-L269 | train | Ask the editor to use | [
30522,
13366,
3198,
1035,
3559,
1006,
7953,
1027,
9152,
2140,
1010,
6871,
1035,
3559,
1027,
9152,
2140,
1007,
3559,
1027,
2800,
1035,
3559,
6871,
1035,
3559,
2565,
1027,
3474,
1024,
1024,
5479,
1012,
6013,
1012,
2565,
1006,
1024,
2171,
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_container_service/lib/2019-02-01/generated/azure_mgmt_container_service/agent_pools.rb | Azure::ContainerService::Mgmt::V2019_02_01.AgentPools.delete | def delete(resource_group_name, managed_cluster_name, agent_pool_name, custom_headers:nil)
response = delete_async(resource_group_name, managed_cluster_name, agent_pool_name, custom_headers:custom_headers).value!
nil
end | ruby | def delete(resource_group_name, managed_cluster_name, agent_pool_name, custom_headers:nil)
response = delete_async(resource_group_name, managed_cluster_name, agent_pool_name, custom_headers:custom_headers).value!
nil
end | [
"def",
"delete",
"(",
"resource_group_name",
",",
"managed_cluster_name",
",",
"agent_pool_name",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"delete_async",
"(",
"resource_group_name",
",",
"managed_cluster_name",
",",
"agent_pool_name",
",",
"custom_heade... | 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#L299-L302 | train | Deletes the specified managed cluster agent pool. | [
30522,
13366,
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,
3972,
12870,
1035,
2004,
6038,
2278,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
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_apps_as_lazy | def list_web_apps_as_lazy(resource_group_name, name, properties_to_include:nil, custom_headers:nil)
response = list_web_apps_async(resource_group_name, name, properties_to_include:properties_to_include, custom_headers:custom_headers).value!
unless response.nil?
page = response.body
page.next... | ruby | def list_web_apps_as_lazy(resource_group_name, name, properties_to_include:nil, custom_headers:nil)
response = list_web_apps_async(resource_group_name, name, properties_to_include:properties_to_include, custom_headers:custom_headers).value!
unless response.nil?
page = response.body
page.next... | [
"def",
"list_web_apps_as_lazy",
"(",
"resource_group_name",
",",
"name",
",",
"properties_to_include",
":",
"nil",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"list_web_apps_async",
"(",
"resource_group_name",
",",
"name",
",",
"properties_to_include",
":... | Get all apps in an App Service Environment.
Get all apps 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 properties_to_include [String] Comma separated list of app propert... | [
"Get",
"all",
"apps",
"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#L7772-L7781 | train | Gets a list of all the apps in an App Service Environment. | [
30522,
13366,
2862,
1035,
4773,
1035,
18726,
1035,
2004,
1035,
13971,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2171,
1010,
5144,
1035,
2000,
1035,
2421,
1024,
9152,
2140,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
sds/overcommit | lib/overcommit/cli.rb | Overcommit.CLI.print_installed_hooks | def print_installed_hooks
config.all_hook_configs.each do |hook_type, hook_configs|
print_hooks_for_hook_type(config, hook_configs, hook_type)
end
halt
end | ruby | def print_installed_hooks
config.all_hook_configs.each do |hook_type, hook_configs|
print_hooks_for_hook_type(config, hook_configs, hook_type)
end
halt
end | [
"def",
"print_installed_hooks",
"config",
".",
"all_hook_configs",
".",
"each",
"do",
"|",
"hook_type",
",",
"hook_configs",
"|",
"print_hooks_for_hook_type",
"(",
"config",
",",
"hook_configs",
",",
"hook_type",
")",
"end",
"halt",
"end"
] | Prints the hooks available in the current repo and whether they're
enabled/disabled. | [
"Prints",
"the",
"hooks",
"available",
"in",
"the",
"current",
"repo",
"and",
"whether",
"they",
"re",
"enabled",
"/",
"disabled",
"."
] | 35d60adb41da942178b789560968e3ad030b0ac7 | https://github.com/sds/overcommit/blob/35d60adb41da942178b789560968e3ad030b0ac7/lib/overcommit/cli.rb#L156-L162 | train | Print the installed hooks | [
30522,
13366,
6140,
1035,
5361,
1035,
18008,
9530,
8873,
2290,
1012,
2035,
1035,
8103,
1035,
9530,
8873,
5620,
1012,
2169,
2079,
1064,
8103,
1035,
2828,
1010,
8103,
1035,
9530,
8873,
5620,
1064,
6140,
1035,
18008,
1035,
2005,
1035,
8103,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/agreements.rb | Azure::Logic::Mgmt::V2016_06_01.Agreements.create_or_update | def create_or_update(resource_group_name, integration_account_name, agreement_name, agreement, custom_headers:nil)
response = create_or_update_async(resource_group_name, integration_account_name, agreement_name, agreement, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def create_or_update(resource_group_name, integration_account_name, agreement_name, agreement, custom_headers:nil)
response = create_or_update_async(resource_group_name, integration_account_name, agreement_name, agreement, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"create_or_update",
"(",
"resource_group_name",
",",
"integration_account_name",
",",
"agreement_name",
",",
"agreement",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"create_or_update_async",
"(",
"resource_group_name",
",",
"integration_account_name",
... | Creates or updates an integration account agreement.
@param resource_group_name [String] The resource group name.
@param integration_account_name [String] The integration account name.
@param agreement_name [String] The integration account agreement name.
@param agreement [IntegrationAccountAgreement] The integrat... | [
"Creates",
"or",
"updates",
"an",
"integration",
"account",
"agreement",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_logic/lib/2016-06-01/generated/azure_mgmt_logic/agreements.rb#L234-L237 | train | Creates or updates an integration account agreement. | [
30522,
13366,
3443,
1035,
2030,
1035,
10651,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
8346,
1035,
4070,
1035,
2171,
1010,
3820,
1035,
2171,
1010,
3820,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
3443,
1035,
2030,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_compute/lib/2018-04-01/generated/azure_mgmt_compute/virtual_machine_extensions.rb | Azure::Compute::Mgmt::V2018_04_01.VirtualMachineExtensions.get_with_http_info | def get_with_http_info(resource_group_name, vm_name, vm_extension_name, expand:nil, custom_headers:nil)
get_async(resource_group_name, vm_name, vm_extension_name, expand:expand, custom_headers:custom_headers).value!
end | ruby | def get_with_http_info(resource_group_name, vm_name, vm_extension_name, expand:nil, custom_headers:nil)
get_async(resource_group_name, vm_name, vm_extension_name, expand:expand, custom_headers:custom_headers).value!
end | [
"def",
"get_with_http_info",
"(",
"resource_group_name",
",",
"vm_name",
",",
"vm_extension_name",
",",
"expand",
":",
"nil",
",",
"custom_headers",
":",
"nil",
")",
"get_async",
"(",
"resource_group_name",
",",
"vm_name",
",",
"vm_extension_name",
",",
"expand",
... | The operation to get the extension.
@param resource_group_name [String] The name of the resource group.
@param vm_name [String] The name of the virtual machine containing the
extension.
@param vm_extension_name [String] The name of the virtual machine extension.
@param expand [String] The expand expression to app... | [
"The",
"operation",
"to",
"get",
"the",
"extension",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_compute/lib/2018-04-01/generated/azure_mgmt_compute/virtual_machine_extensions.rb#L197-L199 | train | Gets the specified virtual machine extension. | [
30522,
13366,
2131,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
1058,
2213,
1035,
2171,
1010,
1058,
2213,
1035,
5331,
1035,
2171,
1010,
7818,
1024,
9152,
2140,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
fastlane/fastlane | spaceship/lib/spaceship/tunes/tunes_client.rb | Spaceship.TunesClient.upload_large_icon | def upload_large_icon(app_version, upload_image)
raise "app_version is required" unless app_version
raise "upload_image is required" unless upload_image
du_client.upload_large_icon(app_version, upload_image, content_provider_id, sso_token_for_image)
end | ruby | def upload_large_icon(app_version, upload_image)
raise "app_version is required" unless app_version
raise "upload_image is required" unless upload_image
du_client.upload_large_icon(app_version, upload_image, content_provider_id, sso_token_for_image)
end | [
"def",
"upload_large_icon",
"(",
"app_version",
",",
"upload_image",
")",
"raise",
"\"app_version is required\"",
"unless",
"app_version",
"raise",
"\"upload_image is required\"",
"unless",
"upload_image",
"du_client",
".",
"upload_large_icon",
"(",
"app_version",
",",
"upl... | @!group App Icons
Uploads a large icon
@param app_version (AppVersion): The version of your app
@param upload_image (UploadFile): The icon to upload
@return [JSON] the response | [
"@!group",
"App",
"Icons"
] | 457c5d647c77f0e078dafa5129da616914e002c5 | https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/spaceship/lib/spaceship/tunes/tunes_client.rb#L776-L781 | train | Upload a large icon to the app. | [
30522,
13366,
2039,
11066,
1035,
2312,
1035,
12696,
1006,
10439,
1035,
2544,
1010,
2039,
11066,
1035,
3746,
1007,
5333,
1000,
10439,
1035,
2544,
2003,
3223,
1000,
4983,
10439,
1035,
2544,
5333,
1000,
2039,
11066,
1035,
3746,
2003,
3223,
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... |
rails/rails | activerecord/lib/active_record/attribute_methods.rb | ActiveRecord.AttributeMethods.attribute_present? | def attribute_present?(attribute)
value = _read_attribute(attribute)
!value.nil? && !(value.respond_to?(:empty?) && value.empty?)
end | ruby | def attribute_present?(attribute)
value = _read_attribute(attribute)
!value.nil? && !(value.respond_to?(:empty?) && value.empty?)
end | [
"def",
"attribute_present?",
"(",
"attribute",
")",
"value",
"=",
"_read_attribute",
"(",
"attribute",
")",
"!",
"value",
".",
"nil?",
"&&",
"!",
"(",
"value",
".",
"respond_to?",
"(",
":empty?",
")",
"&&",
"value",
".",
"empty?",
")",
"end"
] | Returns +true+ if the specified +attribute+ has been set by the user or by a
database load and is neither +nil+ nor <tt>empty?</tt> (the latter only applies
to objects that respond to <tt>empty?</tt>, most notably Strings). Otherwise, +false+.
Note that it always returns +true+ with boolean attributes.
class Tas... | [
"Returns",
"+",
"true",
"+",
"if",
"the",
"specified",
"+",
"attribute",
"+",
"has",
"been",
"set",
"by",
"the",
"user",
"or",
"by",
"a",
"database",
"load",
"and",
"is",
"neither",
"+",
"nil",
"+",
"nor",
"<tt",
">",
"empty?<",
"/",
"tt",
">",
"("... | 85a8bc644be69908f05740a5886ec19cd3679df5 | https://github.com/rails/rails/blob/85a8bc644be69908f05740a5886ec19cd3679df5/activerecord/lib/active_record/attribute_methods.rb#L351-L354 | train | Returns true if the attribute is present in the current object. | [
30522,
13366,
17961,
1035,
30524,
1007,
1004,
1004,
3643,
1012,
4064,
1029,
1007,
2203,
102,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
commander-rb/commander | lib/commander/runner.rb | Commander.Runner.remove_global_options | def remove_global_options(options, args)
# TODO: refactor with flipflop, please TJ ! have time to refactor me !
options.each do |option|
switches = option[:switches].dup
next if switches.empty?
if (switch_has_arg = switches.any? { |s| s =~ /[ =]/ })
switches.map! { |s| s[0... | ruby | def remove_global_options(options, args)
# TODO: refactor with flipflop, please TJ ! have time to refactor me !
options.each do |option|
switches = option[:switches].dup
next if switches.empty?
if (switch_has_arg = switches.any? { |s| s =~ /[ =]/ })
switches.map! { |s| s[0... | [
"def",
"remove_global_options",
"(",
"options",
",",
"args",
")",
"# TODO: refactor with flipflop, please TJ ! have time to refactor me !",
"options",
".",
"each",
"do",
"|",
"option",
"|",
"switches",
"=",
"option",
"[",
":switches",
"]",
".",
"dup",
"next",
"if",
... | Removes global _options_ from _args_. This prevents an invalid
option error from occurring when options are parsed
again for the command. | [
"Removes",
"global",
"_options_",
"from",
"_args_",
".",
"This",
"prevents",
"an",
"invalid",
"option",
"error",
"from",
"occurring",
"when",
"options",
"are",
"parsed",
"again",
"for",
"the",
"command",
"."
] | 332047c14948225462fe60042eed23adfb996d68 | https://github.com/commander-rb/commander/blob/332047c14948225462fe60042eed23adfb996d68/lib/commander/runner.rb#L330-L355 | train | Remove global options from the given list of options | [
30522,
13366,
6366,
1035,
3795,
1035,
7047,
1006,
7047,
1010,
12098,
5620,
1007,
1001,
28681,
2080,
1024,
25416,
18908,
2953,
2007,
11238,
10258,
7361,
1010,
3531,
1056,
3501,
999,
2031,
2051,
2000,
25416,
18908,
2953,
2033,
999,
7047,
1012... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
aws/aws-sdk-ruby | gems/aws-sdk-rds/lib/aws-sdk-rds/db_cluster_snapshot.rb | Aws::RDS.DBClusterSnapshot.restore | def restore(options = {})
options = options.merge(snapshot_identifier: @snapshot_id)
resp = @client.restore_db_cluster_from_snapshot(options)
DBCluster.new(
id: resp.data.db_cluster.db_cluster_identifier,
data: resp.data.db_cluster,
client: @client
)
end | ruby | def restore(options = {})
options = options.merge(snapshot_identifier: @snapshot_id)
resp = @client.restore_db_cluster_from_snapshot(options)
DBCluster.new(
id: resp.data.db_cluster.db_cluster_identifier,
data: resp.data.db_cluster,
client: @client
)
end | [
"def",
"restore",
"(",
"options",
"=",
"{",
"}",
")",
"options",
"=",
"options",
".",
"merge",
"(",
"snapshot_identifier",
":",
"@snapshot_id",
")",
"resp",
"=",
"@client",
".",
"restore_db_cluster_from_snapshot",
"(",
"options",
")",
"DBCluster",
".",
"new",
... | @example Request syntax with placeholder values
dbcluster = db_cluster_snapshot.restore({
availability_zones: ["String"],
db_cluster_identifier: "String", # required
engine: "String", # required
engine_version: "String",
port: 1,
db_subnet_group_name: "String",
database_name: "Str... | [
"@example",
"Request",
"syntax",
"with",
"placeholder",
"values"
] | e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d | https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-rds/lib/aws-sdk-rds/db_cluster_snapshot.rb#L608-L616 | train | Restore the cluster from a snapshot | [
30522,
13366,
9239,
1006,
7047,
1027,
1063,
1065,
1007,
7047,
1027,
7047,
1012,
13590,
1006,
20057,
12326,
1035,
8909,
4765,
18095,
1024,
1030,
20057,
12326,
1035,
8909,
1007,
24501,
2361,
1027,
1030,
7396,
1012,
9239,
1035,
16962,
1035,
93... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
randym/axlsx | lib/axlsx/workbook/worksheet/rich_text_run.rb | Axlsx.RichTextRun.string_width | def string_width(string, font_size)
font_scale = font_size / 10.0
string.count(Worksheet::THIN_CHARS) * font_scale
end | ruby | def string_width(string, font_size)
font_scale = font_size / 10.0
string.count(Worksheet::THIN_CHARS) * font_scale
end | [
"def",
"string_width",
"(",
"string",
",",
"font_size",
")",
"font_scale",
"=",
"font_size",
"/",
"10.0",
"string",
".",
"count",
"(",
"Worksheet",
"::",
"THIN_CHARS",
")",
"*",
"font_scale",
"end"
] | Returns the width of a string according to the current style
This is still not perfect...
- scaling is not linear as font sizes increase | [
"Returns",
"the",
"width",
"of",
"a",
"string",
"according",
"to",
"the",
"current",
"style",
"This",
"is",
"still",
"not",
"perfect",
"...",
"-",
"scaling",
"is",
"not",
"linear",
"as",
"font",
"sizes",
"increase"
] | c593a08b2a929dac7aa8dc418b55e26b4c49dc34 | https://github.com/randym/axlsx/blob/c593a08b2a929dac7aa8dc418b55e26b4c49dc34/lib/axlsx/workbook/worksheet/rich_text_run.rb#L216-L219 | train | Returns the width of a string in the given font size | [
30522,
13366,
5164,
1035,
9381,
1006,
5164,
1010,
15489,
1035,
2946,
1007,
15489,
1035,
4094,
1027,
15489,
1035,
2946,
1013,
2184,
1012,
1014,
5164,
1012,
4175,
1006,
2573,
21030,
2102,
1024,
1024,
4857,
1035,
25869,
2015,
1007,
1008,
15489... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Shopify/liquid | lib/liquid/context.rb | Liquid.Context.find_variable | def find_variable(key, raise_on_not_found: true)
# This was changed from find() to find_index() because this is a very hot
# path and find_index() is optimized in MRI to reduce object allocation
index = @scopes.find_index { |s| s.key?(key) }
scope = @scopes[index] if index
variable = nil
... | ruby | def find_variable(key, raise_on_not_found: true)
# This was changed from find() to find_index() because this is a very hot
# path and find_index() is optimized in MRI to reduce object allocation
index = @scopes.find_index { |s| s.key?(key) }
scope = @scopes[index] if index
variable = nil
... | [
"def",
"find_variable",
"(",
"key",
",",
"raise_on_not_found",
":",
"true",
")",
"# This was changed from find() to find_index() because this is a very hot",
"# path and find_index() is optimized in MRI to reduce object allocation",
"index",
"=",
"@scopes",
".",
"find_index",
"{",
... | Fetches an object starting at the local scope and then moving up the hierachy | [
"Fetches",
"an",
"object",
"starting",
"at",
"the",
"local",
"scope",
"and",
"then",
"moving",
"up",
"the",
"hierachy"
] | b3b63a683f6daaea7e70f1602ee829abdf970ef3 | https://github.com/Shopify/liquid/blob/b3b63a683f6daaea7e70f1602ee829abdf970ef3/lib/liquid/context.rb#L163-L190 | train | Find a variable by its key | [
30522,
13366,
2424,
1035,
8023,
1006,
3145,
1010,
5333,
1035,
2006,
1035,
2025,
1035,
2179,
1024,
2995,
1007,
1001,
2023,
2001,
2904,
2013,
2424,
1006,
1007,
2000,
2424,
1035,
5950,
1006,
1007,
2138,
2023,
2003,
1037,
2200,
2980,
1001,
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... |
samvera/hyrax | app/controllers/hyrax/downloads_controller.rb | Hyrax.DownloadsController.authorize_download! | def authorize_download!
authorize! :download, params[asset_param_key]
rescue CanCan::AccessDenied
unauthorized_image = Rails.root.join("app", "assets", "images", "unauthorized.png")
send_file unauthorized_image, status: :unauthorized
end | ruby | def authorize_download!
authorize! :download, params[asset_param_key]
rescue CanCan::AccessDenied
unauthorized_image = Rails.root.join("app", "assets", "images", "unauthorized.png")
send_file unauthorized_image, status: :unauthorized
end | [
"def",
"authorize_download!",
"authorize!",
":download",
",",
"params",
"[",
"asset_param_key",
"]",
"rescue",
"CanCan",
"::",
"AccessDenied",
"unauthorized_image",
"=",
"Rails",
".",
"root",
".",
"join",
"(",
"\"app\"",
",",
"\"assets\"",
",",
"\"images\"",
",",
... | Customize the :read ability in your Ability class, or override this method.
Hydra::Ability#download_permissions can't be used in this case because it assumes
that files are in a LDP basic container, and thus, included in the asset's uri. | [
"Customize",
"the",
":",
"read",
"ability",
"in",
"your",
"Ability",
"class",
"or",
"override",
"this",
"method",
".",
"Hydra",
"::",
"Ability#download_permissions",
"can",
"t",
"be",
"used",
"in",
"this",
"case",
"because",
"it",
"assumes",
"that",
"files",
... | e2b4f56e829a53b1f11296324736e9d5b8c9ee5f | https://github.com/samvera/hyrax/blob/e2b4f56e829a53b1f11296324736e9d5b8c9ee5f/app/controllers/hyrax/downloads_controller.rb#L42-L47 | train | Authorize download of the image | [
30522,
13366,
3166,
4697,
1035,
8816,
999,
3166,
4697,
999,
1024,
8816,
1010,
11498,
5244,
1031,
11412,
1035,
11498,
2213,
1035,
3145,
1033,
5343,
2064,
9336,
1024,
1024,
3229,
4181,
6340,
24641,
1035,
3746,
1027,
15168,
30524,
10439,
1000,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | data/azure_service_fabric/lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb | Azure::ServiceFabric::V6_2_0_9.ServiceFabricClientAPIs.get_node_event_list_with_http_info | def get_node_event_list_with_http_info(node_name, start_time_utc, end_time_utc, timeout:60, events_types_filter:nil, exclude_analysis_events:nil, skip_correlation_lookup:nil, custom_headers:nil)
get_node_event_list_async(node_name, start_time_utc, end_time_utc, timeout:timeout, events_types_filter:events_types_fi... | ruby | def get_node_event_list_with_http_info(node_name, start_time_utc, end_time_utc, timeout:60, events_types_filter:nil, exclude_analysis_events:nil, skip_correlation_lookup:nil, custom_headers:nil)
get_node_event_list_async(node_name, start_time_utc, end_time_utc, timeout:timeout, events_types_filter:events_types_fi... | [
"def",
"get_node_event_list_with_http_info",
"(",
"node_name",
",",
"start_time_utc",
",",
"end_time_utc",
",",
"timeout",
":",
"60",
",",
"events_types_filter",
":",
"nil",
",",
"exclude_analysis_events",
":",
"nil",
",",
"skip_correlation_lookup",
":",
"nil",
",",
... | Gets a Node-related events.
The response is list of NodeEvent objects.
@param node_name [String] The name of the node.
@param start_time_utc [String] The start time of a lookup query in ISO UTC
yyyy-MM-ddTHH:mm:ssZ.
@param end_time_utc [String] The end time of a lookup query in ISO UTC
yyyy-MM-ddTHH:mm:ssZ.
@p... | [
"Gets",
"a",
"Node",
"-",
"related",
"events",
"."
] | 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#L27563-L27565 | train | Gets the node event list. | [
30522,
13366,
2131,
1035,
13045,
1035,
2724,
1035,
2862,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
13045,
1035,
2171,
1010,
2707,
1035,
2051,
1035,
11396,
1010,
2203,
1035,
2051,
1035,
11396,
1010,
2051,
5833,
1024,
3438,
1010,
2824,
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... |
meew0/discordrb | lib/discordrb/data/server.rb | Discordrb.Server.invites | def invites
invites = JSON.parse(API::Server.invites(@bot.token, @id))
invites.map { |invite| Invite.new(invite, @bot) }
end | ruby | def invites
invites = JSON.parse(API::Server.invites(@bot.token, @id))
invites.map { |invite| Invite.new(invite, @bot) }
end | [
"def",
"invites",
"invites",
"=",
"JSON",
".",
"parse",
"(",
"API",
"::",
"Server",
".",
"invites",
"(",
"@bot",
".",
"token",
",",
"@id",
")",
")",
"invites",
".",
"map",
"{",
"|",
"invite",
"|",
"Invite",
".",
"new",
"(",
"invite",
",",
"@bot",
... | Requests a list of Invites to the server.
@return [Array<Invite>] invites to the server. | [
"Requests",
"a",
"list",
"of",
"Invites",
"to",
"the",
"server",
"."
] | 764298a1ff0be69a1853b510d736f21c2b91a2fe | https://github.com/meew0/discordrb/blob/764298a1ff0be69a1853b510d736f21c2b91a2fe/lib/discordrb/data/server.rb#L739-L742 | train | Returns an array of Invite objects | [
30522,
13366,
18675,
18675,
1027,
1046,
3385,
1012,
11968,
3366,
1006,
17928,
1024,
1024,
8241,
1012,
18675,
1006,
1030,
28516,
1012,
19204,
1010,
1030,
8909,
1007,
1007,
18675,
1012,
4949,
1063,
1064,
13260,
1064,
13260,
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... |
sds/scss-lint | lib/scss_lint/linter/declaration_order.rb | SCSSLint.Linter::DeclarationOrder.check_children_order | def check_children_order(sorted_children, children)
sorted_children.each_with_index do |sorted_item, index|
next if sorted_item == children[index]
add_lint(sorted_item.first.line,
"Expected item on line #{sorted_item.first.line} to appear " \
"before line #{child... | ruby | def check_children_order(sorted_children, children)
sorted_children.each_with_index do |sorted_item, index|
next if sorted_item == children[index]
add_lint(sorted_item.first.line,
"Expected item on line #{sorted_item.first.line} to appear " \
"before line #{child... | [
"def",
"check_children_order",
"(",
"sorted_children",
",",
"children",
")",
"sorted_children",
".",
"each_with_index",
"do",
"|",
"sorted_item",
",",
"index",
"|",
"next",
"if",
"sorted_item",
"==",
"children",
"[",
"index",
"]",
"add_lint",
"(",
"sorted_item",
... | Find the child that is out of place | [
"Find",
"the",
"child",
"that",
"is",
"out",
"of",
"place"
] | e99afe4ede041a431a06e585c12ce82f6ad50116 | https://github.com/sds/scss-lint/blob/e99afe4ede041a431a06e585c12ce82f6ad50116/lib/scss_lint/linter/declaration_order.rb#L52-L61 | train | Check that the children are in the correct order | [
30522,
13366,
4638,
1035,
2336,
1035,
2344,
1006,
19616,
1035,
2336,
1010,
2336,
1007,
19616,
1035,
2336,
1012,
2169,
1035,
2007,
1035,
5950,
2079,
1064,
19616,
1035,
8875,
1010,
5950,
1064,
2279,
2065,
19616,
1035,
8875,
1027,
1027,
2336,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_labservices/lib/2018-10-15/generated/azure_mgmt_labservices/gallery_images.rb | Azure::Labservices::Mgmt::V2018_10_15.GalleryImages.create_or_update | def create_or_update(resource_group_name, lab_account_name, gallery_image_name, gallery_image, custom_headers:nil)
response = create_or_update_async(resource_group_name, lab_account_name, gallery_image_name, gallery_image, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def create_or_update(resource_group_name, lab_account_name, gallery_image_name, gallery_image, custom_headers:nil)
response = create_or_update_async(resource_group_name, lab_account_name, gallery_image_name, gallery_image, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"create_or_update",
"(",
"resource_group_name",
",",
"lab_account_name",
",",
"gallery_image_name",
",",
"gallery_image",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"create_or_update_async",
"(",
"resource_group_name",
",",
"lab_account_name",
",",
... | Create or replace an existing Gallery Image.
@param resource_group_name [String] The name of the resource group.
@param lab_account_name [String] The name of the lab Account.
@param gallery_image_name [String] The name of the gallery Image.
@param gallery_image [GalleryImage] Represents an image from the Azure
Ma... | [
"Create",
"or",
"replace",
"an",
"existing",
"Gallery",
"Image",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_labservices/lib/2018-10-15/generated/azure_mgmt_labservices/gallery_images.rb#L252-L255 | train | Creates or updates a gallery image. | [
30522,
13366,
3443,
1035,
2030,
1035,
10651,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
6845,
1035,
4070,
1035,
2171,
1010,
3916,
1035,
3746,
1035,
2171,
1010,
3916,
1035,
3746,
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... |
haml/haml | lib/haml/buffer.rb | Haml.Buffer.rstrip! | def rstrip!
if capture_position.nil?
buffer.rstrip!
return
end
buffer << buffer.slice!(capture_position..-1).rstrip
end | ruby | def rstrip!
if capture_position.nil?
buffer.rstrip!
return
end
buffer << buffer.slice!(capture_position..-1).rstrip
end | [
"def",
"rstrip!",
"if",
"capture_position",
".",
"nil?",
"buffer",
".",
"rstrip!",
"return",
"end",
"buffer",
"<<",
"buffer",
".",
"slice!",
"(",
"capture_position",
"..",
"-",
"1",
")",
".",
"rstrip",
"end"
] | Remove the whitespace from the right side of the buffer string.
Doesn't do anything if we're at the beginning of a capture_haml block. | [
"Remove",
"the",
"whitespace",
"from",
"the",
"right",
"side",
"of",
"the",
"buffer",
"string",
".",
"Doesn",
"t",
"do",
"anything",
"if",
"we",
"re",
"at",
"the",
"beginning",
"of",
"a",
"capture_haml",
"block",
"."
] | 9aa0fbe4a91b999978927be569d2ad0cd39076f1 | https://github.com/haml/haml/blob/9aa0fbe4a91b999978927be569d2ad0cd39076f1/lib/haml/buffer.rb#L146-L153 | train | Return the trailing whitespace of the buffer. | [
30522,
13366,
12667,
24901,
999,
2065,
5425,
1035,
2597,
1012,
9152,
2140,
1029,
17698,
1012,
12667,
24901,
999,
2709,
2203,
17698,
1026,
1026,
17698,
1012,
14704,
999,
1006,
5425,
1035,
2597,
1012,
1012,
1011,
1015,
1007,
1012,
12667,
2490... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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_metrics_as_lazy | def list_web_worker_metrics_as_lazy(resource_group_name, name, worker_pool_name, details:nil, filter:nil, custom_headers:nil)
response = list_web_worker_metrics_async(resource_group_name, name, worker_pool_name, details:details, filter:filter, custom_headers:custom_headers).value!
unless response.nil?
... | ruby | def list_web_worker_metrics_as_lazy(resource_group_name, name, worker_pool_name, details:nil, filter:nil, custom_headers:nil)
response = list_web_worker_metrics_async(resource_group_name, name, worker_pool_name, details:details, filter:filter, custom_headers:custom_headers).value!
unless response.nil?
... | [
"def",
"list_web_worker_metrics_as_lazy",
"(",
"resource_group_name",
",",
"name",
",",
"worker_pool_name",
",",
"details",
":",
"nil",
",",
"filter",
":",
"nil",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"list_web_worker_metrics_async",
"(",
"resourc... | Get metrics for a worker pool of a AppServiceEnvironment (App Service
Environment).
Get metrics for a worker pool of a AppServiceEnvironment (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 Envir... | [
"Get",
"metrics",
"for",
"a",
"worker",
"pool",
"of",
"a",
"AppServiceEnvironment",
"(",
"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#L7950-L7959 | train | Gets metrics for a worker pool. | [
30522,
13366,
2862,
1035,
4773,
1035,
7309,
1035,
12046,
2015,
1035,
2004,
1035,
13971,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2171,
1010,
7309,
1035,
4770,
1035,
2171,
1010,
4751,
1024,
9152,
2140,
1010,
11307,
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... |
watir/watir | lib/watir/navigation.rb | Watir.Navigation.goto | def goto(uri)
uri = "http://#{uri}" unless uri =~ URI::DEFAULT_PARSER.make_regexp
@driver.navigate.to uri
@after_hooks.run
uri
end | ruby | def goto(uri)
uri = "http://#{uri}" unless uri =~ URI::DEFAULT_PARSER.make_regexp
@driver.navigate.to uri
@after_hooks.run
uri
end | [
"def",
"goto",
"(",
"uri",
")",
"uri",
"=",
"\"http://#{uri}\"",
"unless",
"uri",
"=~",
"URI",
"::",
"DEFAULT_PARSER",
".",
"make_regexp",
"@driver",
".",
"navigate",
".",
"to",
"uri",
"@after_hooks",
".",
"run",
"uri",
"end"
] | Goes to the given URL.
@example
browser.goto "watir.github.io"
@param [String] uri The url.
@return [String] The url you end up at. | [
"Goes",
"to",
"the",
"given",
"URL",
"."
] | 2d8db09811c6221ae401b85b2f61f5fa66e463a3 | https://github.com/watir/watir/blob/2d8db09811c6221ae401b85b2f61f5fa66e463a3/lib/watir/navigation.rb#L13-L20 | train | Goes to the specified URI. | [
30522,
13366,
2288,
2080,
1006,
24471,
2072,
1007,
24471,
2072,
1027,
1000,
8299,
1024,
1013,
1013,
1001,
1063,
24471,
2072,
1065,
1000,
4983,
24471,
2072,
1027,
1066,
24471,
2072,
1024,
1024,
12398,
1035,
11968,
8043,
1012,
2191,
1035,
197... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
geokit/geokit | lib/geokit/bounds.rb | Geokit.Bounds.to_span | def to_span
lat_span = @ne.lat - @sw.lat
lng_span = crosses_meridian? ? 360 + @ne.lng - @sw.lng : @ne.lng - @sw.lng
Geokit::LatLng.new(lat_span.abs, lng_span.abs)
end | ruby | def to_span
lat_span = @ne.lat - @sw.lat
lng_span = crosses_meridian? ? 360 + @ne.lng - @sw.lng : @ne.lng - @sw.lng
Geokit::LatLng.new(lat_span.abs, lng_span.abs)
end | [
"def",
"to_span",
"lat_span",
"=",
"@ne",
".",
"lat",
"-",
"@sw",
".",
"lat",
"lng_span",
"=",
"crosses_meridian?",
"?",
"360",
"+",
"@ne",
".",
"lng",
"-",
"@sw",
".",
"lng",
":",
"@ne",
".",
"lng",
"-",
"@sw",
".",
"lng",
"Geokit",
"::",
"LatLng"... | Returns true if the candidate object is logically equal. Logical
equivalence is true if the lat and lng attributes are the same for both
objects.
Equivalent to Google Maps API's .toSpan() method on GLatLng's.
Returns a LatLng object, whose coordinates represent the size of a
rectangle defined by these bounds. | [
"Returns",
"true",
"if",
"the",
"candidate",
"object",
"is",
"logically",
"equal",
".",
"Logical",
"equivalence",
"is",
"true",
"if",
"the",
"lat",
"and",
"lng",
"attributes",
"are",
"the",
"same",
"for",
"both",
"objects",
".",
"Equivalent",
"to",
"Google",... | b7c13376bd85bf14f9534228ea466d09ac0afbf4 | https://github.com/geokit/geokit/blob/b7c13376bd85bf14f9534228ea466d09ac0afbf4/lib/geokit/bounds.rb#L60-L64 | train | Returns a new array of the coordinates of the segment in the segment. | [
30522,
13366,
2000,
1035,
8487,
2474,
2102,
1035,
8487,
1027,
1030,
11265,
1012,
2474,
2102,
1011,
1030,
25430,
1012,
2474,
2102,
1048,
3070,
1035,
8487,
1027,
7821,
1035,
17984,
1029,
1029,
9475,
1009,
1030,
11265,
1012,
1048,
3070,
1011,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | data/azure_cognitiveservices_contentmoderator/lib/1.0/generated/azure_cognitiveservices_contentmoderator/reviews.rb | Azure::CognitiveServices::ContentModerator::V1_0.Reviews.add_video_frame_stream_with_http_info | def add_video_frame_stream_with_http_info(content_type, team_name, review_id, frame_image_zip, frame_metadata, timescale:nil, custom_headers:nil)
add_video_frame_stream_async(content_type, team_name, review_id, frame_image_zip, frame_metadata, timescale:timescale, custom_headers:custom_headers).value!
end | ruby | def add_video_frame_stream_with_http_info(content_type, team_name, review_id, frame_image_zip, frame_metadata, timescale:nil, custom_headers:nil)
add_video_frame_stream_async(content_type, team_name, review_id, frame_image_zip, frame_metadata, timescale:timescale, custom_headers:custom_headers).value!
end | [
"def",
"add_video_frame_stream_with_http_info",
"(",
"content_type",
",",
"team_name",
",",
"review_id",
",",
"frame_image_zip",
",",
"frame_metadata",
",",
"timescale",
":",
"nil",
",",
"custom_headers",
":",
"nil",
")",
"add_video_frame_stream_async",
"(",
"content_ty... | Use this method to add frames for a video review.Timescale: This parameter is
a factor which is used to convert the timestamp on a frame into milliseconds.
Timescale is provided in the output of the Content Moderator video media
processor on the Azure Media Services platform.Timescale in the Video
Moderation output... | [
"Use",
"this",
"method",
"to",
"add",
"frames",
"for",
"a",
"video",
"review",
".",
"Timescale",
":",
"This",
"parameter",
"is",
"a",
"factor",
"which",
"is",
"used",
"to",
"convert",
"the",
"timestamp",
"on",
"a",
"frame",
"into",
"milliseconds",
".",
"... | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_cognitiveservices_contentmoderator/lib/1.0/generated/azure_cognitiveservices_contentmoderator/reviews.rb#L1744-L1746 | train | Adds a video frame stream to the review. | [
30522,
13366,
5587,
1035,
2678,
1035,
4853,
1035,
5460,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
4180,
1035,
2828,
1010,
2136,
1035,
2171,
1010,
3319,
1035,
8909,
1010,
4853,
1035,
3746,
1035,
14101,
1010,
4853,
1035,
27425,
1010,
2335,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_policy_insights/lib/2018-07-01-preview/generated/azure_mgmt_policy_insights/policy_tracked_resources.rb | Azure::PolicyInsights::Mgmt::V2018_07_01_preview.PolicyTrackedResources.list_query_results_for_management_group | def list_query_results_for_management_group(management_group_name, query_options:nil, custom_headers:nil)
first_page = list_query_results_for_management_group_as_lazy(management_group_name, query_options:query_options, custom_headers:custom_headers)
first_page.get_all_items
end | ruby | def list_query_results_for_management_group(management_group_name, query_options:nil, custom_headers:nil)
first_page = list_query_results_for_management_group_as_lazy(management_group_name, query_options:query_options, custom_headers:custom_headers)
first_page.get_all_items
end | [
"def",
"list_query_results_for_management_group",
"(",
"management_group_name",
",",
"query_options",
":",
"nil",
",",
"custom_headers",
":",
"nil",
")",
"first_page",
"=",
"list_query_results_for_management_group_as_lazy",
"(",
"management_group_name",
",",
"query_options",
... | Queries policy tracked resources under the management group.
@param management_group_name [String] Management group name.
@param query_options [QueryOptions] Additional parameters for the operation
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request.
@re... | [
"Queries",
"policy",
"tracked",
"resources",
"under",
"the",
"management",
"group",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_policy_insights/lib/2018-07-01-preview/generated/azure_mgmt_policy_insights/policy_tracked_resources.rb#L34-L37 | train | Gets all the available advisor terms. | [
30522,
13366,
2862,
1035,
23032,
1035,
3463,
1035,
2005,
1035,
2968,
1035,
2177,
1006,
2968,
1035,
2177,
1035,
2171,
1010,
23032,
1035,
7047,
1024,
9152,
2140,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
2034,
1035,
3931,
1027,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_event_grid/lib/2019-02-01-preview/generated/azure_mgmt_event_grid/topics.rb | Azure::EventGrid::Mgmt::V2019_02_01_preview.Topics.list_event_types_with_http_info | def list_event_types_with_http_info(resource_group_name, provider_namespace, resource_type_name, resource_name, custom_headers:nil)
list_event_types_async(resource_group_name, provider_namespace, resource_type_name, resource_name, custom_headers:custom_headers).value!
end | ruby | def list_event_types_with_http_info(resource_group_name, provider_namespace, resource_type_name, resource_name, custom_headers:nil)
list_event_types_async(resource_group_name, provider_namespace, resource_type_name, resource_name, custom_headers:custom_headers).value!
end | [
"def",
"list_event_types_with_http_info",
"(",
"resource_group_name",
",",
"provider_namespace",
",",
"resource_type_name",
",",
"resource_name",
",",
"custom_headers",
":",
"nil",
")",
"list_event_types_async",
"(",
"resource_group_name",
",",
"provider_namespace",
",",
"r... | List topic event types
List event types for a topic
@param resource_group_name [String] The name of the resource group within the
user's subscription.
@param provider_namespace [String] Namespace of the provider of the topic
@param resource_type_name [String] Name of the topic type
@param resource_name [String]... | [
"List",
"topic",
"event",
"types"
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_event_grid/lib/2019-02-01-preview/generated/azure_mgmt_event_grid/topics.rb#L715-L717 | train | Gets the list of event types. | [
30522,
13366,
2862,
1035,
2724,
1035,
4127,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
10802,
1035,
3415,
15327,
1010,
7692,
1035,
2828,
1035,
2171,
1010,
7692,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
savonrb/savon | lib/savon/model.rb | Savon.Model.class_operation_module | def class_operation_module
@class_operation_module ||= Module.new {
def client(globals = {})
@client ||= Savon::Client.new(globals)
rescue InitializationError
raise_initialization_error!
end
def global(option, *value)
client.globals[option] = value
... | ruby | def class_operation_module
@class_operation_module ||= Module.new {
def client(globals = {})
@client ||= Savon::Client.new(globals)
rescue InitializationError
raise_initialization_error!
end
def global(option, *value)
client.globals[option] = value
... | [
"def",
"class_operation_module",
"@class_operation_module",
"||=",
"Module",
".",
"new",
"{",
"def",
"client",
"(",
"globals",
"=",
"{",
"}",
")",
"@client",
"||=",
"Savon",
"::",
"Client",
".",
"new",
"(",
"globals",
")",
"rescue",
"InitializationError",
"rai... | Class methods. | [
"Class",
"methods",
"."
] | 0fa08fc30ecce2cd1109474bfcc14abf13a0c297 | https://github.com/savonrb/savon/blob/0fa08fc30ecce2cd1109474bfcc14abf13a0c297/lib/savon/model.rb#L48-L71 | train | Returns a module that can be used to create the class operation. | [
30522,
13366,
2465,
1035,
3169,
1035,
11336,
1030,
2465,
1035,
3169,
1035,
11336,
1064,
1064,
1027,
11336,
1012,
2047,
1063,
13366,
7396,
1006,
3795,
2015,
1027,
1063,
1065,
1007,
1030,
7396,
1064,
1064,
1027,
7842,
17789,
1024,
1024,
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_policy_insights/lib/2018-07-01-preview/generated/azure_mgmt_policy_insights/remediations.rb | Azure::PolicyInsights::Mgmt::V2018_07_01_preview.Remediations.delete_at_resource_group | def delete_at_resource_group(resource_group_name, remediation_name, custom_headers:nil)
response = delete_at_resource_group_async(resource_group_name, remediation_name, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def delete_at_resource_group(resource_group_name, remediation_name, custom_headers:nil)
response = delete_at_resource_group_async(resource_group_name, remediation_name, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"delete_at_resource_group",
"(",
"resource_group_name",
",",
"remediation_name",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"delete_at_resource_group_async",
"(",
"resource_group_name",
",",
"remediation_name",
",",
"custom_headers",
":custom_headers",
... | Deletes an existing remediation at resource group scope.
@param resource_group_name [String] Resource group name.
@param remediation_name [String] The name of the remediation.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request.
@return [Remediation] ope... | [
"Deletes",
"an",
"existing",
"remediation",
"at",
"resource",
"group",
"scope",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_policy_insights/lib/2018-07-01-preview/generated/azure_mgmt_policy_insights/remediations.rb#L1679-L1682 | train | Deletes a remediation at resource group scope. | [
30522,
13366,
3972,
12870,
1035,
2012,
1035,
7692,
1035,
2177,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2128,
16969,
3508,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
3972,
12870,
1035,
2012,
1035,
7692,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
piotrmurach/github | lib/github_api/client/authorizations.rb | Github.Client::Authorizations.update | def update(*args)
raise_authentication_error unless authenticated?
arguments(args, required: [:id])
patch_request("/authorizations/#{arguments.id}", arguments.params)
end | ruby | def update(*args)
raise_authentication_error unless authenticated?
arguments(args, required: [:id])
patch_request("/authorizations/#{arguments.id}", arguments.params)
end | [
"def",
"update",
"(",
"*",
"args",
")",
"raise_authentication_error",
"unless",
"authenticated?",
"arguments",
"(",
"args",
",",
"required",
":",
"[",
":id",
"]",
")",
"patch_request",
"(",
"\"/authorizations/#{arguments.id}\"",
",",
"arguments",
".",
"params",
")... | Update an existing authorization
@see https://developer.github.com/v3/oauth_authorizations/#update-an-existing-authorization
@param [Hash] inputs
@option inputs [Array] :scopes
Optional array - A list of scopes that this authorization is in.
@option inputs [Array] :add_scopes
Optional array - A list of scop... | [
"Update",
"an",
"existing",
"authorization"
] | 8702452c66bea33c9388550aed9e9974f76aaef1 | https://github.com/piotrmurach/github/blob/8702452c66bea33c9388550aed9e9974f76aaef1/lib/github_api/client/authorizations.rb#L110-L115 | train | Update an existing authorization | [
30522,
13366,
10651,
1006,
1008,
12098,
5620,
1007,
5333,
1035,
27280,
1035,
7561,
4983,
14469,
4383,
1029,
9918,
1006,
12098,
5620,
1010,
3223,
1024,
1031,
1024,
8909,
1033,
1007,
8983,
1035,
5227,
1006,
1000,
1013,
20104,
2015,
1013,
1001... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_links/lib/2016-09-01/generated/azure_mgmt_links/resource_links.rb | Azure::Links::Mgmt::V2016_09_01.ResourceLinks.list_at_source_scope_with_http_info | def list_at_source_scope_with_http_info(scope, filter:nil, custom_headers:nil)
list_at_source_scope_async(scope, filter:filter, custom_headers:custom_headers).value!
end | ruby | def list_at_source_scope_with_http_info(scope, filter:nil, custom_headers:nil)
list_at_source_scope_async(scope, filter:filter, custom_headers:custom_headers).value!
end | [
"def",
"list_at_source_scope_with_http_info",
"(",
"scope",
",",
"filter",
":",
"nil",
",",
"custom_headers",
":",
"nil",
")",
"list_at_source_scope_async",
"(",
"scope",
",",
"filter",
":",
"filter",
",",
"custom_headers",
":custom_headers",
")",
".",
"value!",
"... | Gets a list of resource links at and below the specified source scope.
@param scope [String] The fully qualified ID of the scope for getting the
resource links. For example, to list resource links at and under a resource
group, set the scope to
/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myG... | [
"Gets",
"a",
"list",
"of",
"resource",
"links",
"at",
"and",
"below",
"the",
"specified",
"source",
"scope",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_links/lib/2016-09-01/generated/azure_mgmt_links/resource_links.rb#L461-L463 | train | Gets the list of the adults at source scope. | [
30522,
13366,
2862,
1035,
2012,
1035,
3120,
1035,
9531,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
9531,
1010,
11307,
1024,
9152,
2140,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
2862,
1035,
2012,
1035,
3120,
1035,
9531,
1035,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | data/azure_cognitiveservices_customvisionprediction/lib/3.0/generated/azure_cognitiveservices_customvisionprediction/customvisionprediction_client.rb | Azure::CognitiveServices::Customvisionprediction::V3_0.CustomvisionpredictionClient.classify_image_url_with_http_info | def classify_image_url_with_http_info(project_id, published_name, image_url, application:nil, custom_headers:nil)
classify_image_url_async(project_id, published_name, image_url, application:application, custom_headers:custom_headers).value!
end | ruby | def classify_image_url_with_http_info(project_id, published_name, image_url, application:nil, custom_headers:nil)
classify_image_url_async(project_id, published_name, image_url, application:application, custom_headers:custom_headers).value!
end | [
"def",
"classify_image_url_with_http_info",
"(",
"project_id",
",",
"published_name",
",",
"image_url",
",",
"application",
":",
"nil",
",",
"custom_headers",
":",
"nil",
")",
"classify_image_url_async",
"(",
"project_id",
",",
"published_name",
",",
"image_url",
",",... | Classify an image url and saves the result.
@param project_id The project id.
@param published_name [String] Specifies the name of the model to evaluate
against.
@param image_url [ImageUrl] An ImageUrl that contains the url of the image to
be evaluated.
@param application [String] Optional. Specifies the name of... | [
"Classify",
"an",
"image",
"url",
"and",
"saves",
"the",
"result",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_cognitiveservices_customvisionprediction/lib/3.0/generated/azure_cognitiveservices_customvisionprediction/customvisionprediction_client.rb#L149-L151 | train | Classifies the image url. | [
30522,
13366,
26268,
1035,
3746,
1035,
24471,
2140,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
2622,
1035,
8909,
1010,
2405,
1035,
2171,
1010,
3746,
1035,
24471,
2140,
1010,
4646,
1024,
9152,
2140,
1010,
7661,
1035,
20346,
2015,
1024,
9152,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
resque/resque | lib/resque/job.rb | Resque.Job.perform | def perform
job = payload_class
job_args = args || []
job_was_performed = false
begin
# Execute before_perform hook. Abort the job gracefully if
# Resque::DontPerform is raised.
begin
before_hooks.each do |hook|
job.send(hook, *job_args)
e... | ruby | def perform
job = payload_class
job_args = args || []
job_was_performed = false
begin
# Execute before_perform hook. Abort the job gracefully if
# Resque::DontPerform is raised.
begin
before_hooks.each do |hook|
job.send(hook, *job_args)
e... | [
"def",
"perform",
"job",
"=",
"payload_class",
"job_args",
"=",
"args",
"||",
"[",
"]",
"job_was_performed",
"=",
"false",
"begin",
"# Execute before_perform hook. Abort the job gracefully if",
"# Resque::DontPerform is raised.",
"begin",
"before_hooks",
".",
"each",
"do",
... | Attempts to perform the work represented by this job instance.
Calls #perform on the class given in the payload with the
arguments given in the payload. | [
"Attempts",
"to",
"perform",
"the",
"work",
"represented",
"by",
"this",
"job",
"instance",
".",
"Calls",
"#perform",
"on",
"the",
"class",
"given",
"in",
"the",
"payload",
"with",
"the",
"arguments",
"given",
"in",
"the",
"payload",
"."
] | adb633a0f6b98b1eb5a5a85bb36ebac9309978fd | https://github.com/resque/resque/blob/adb633a0f6b98b1eb5a5a85bb36ebac9309978fd/lib/resque/job.rb#L150-L205 | train | Perform a job | [
30522,
13366,
4685,
3105,
1027,
18093,
1035,
2465,
3105,
1035,
12098,
5620,
1027,
12098,
5620,
1064,
1064,
1031,
1033,
3105,
1035,
2001,
1035,
2864,
1027,
6270,
4088,
1001,
15389,
2077,
1035,
4685,
8103,
1012,
11113,
11589,
1996,
3105,
2826... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/record_filter.rb | ActiveInteraction.RecordFilter.cast | def cast(value, context, reconstantize: true, convert: true)
@klass ||= klass
if matches?(value)
value
elsif reconstantize
@klass = klass
public_send(__method__, value, context,
reconstantize: false,
convert: convert
)
elsif !value.nil? && con... | ruby | def cast(value, context, reconstantize: true, convert: true)
@klass ||= klass
if matches?(value)
value
elsif reconstantize
@klass = klass
public_send(__method__, value, context,
reconstantize: false,
convert: convert
)
elsif !value.nil? && con... | [
"def",
"cast",
"(",
"value",
",",
"context",
",",
"reconstantize",
":",
"true",
",",
"convert",
":",
"true",
")",
"@klass",
"||=",
"klass",
"if",
"matches?",
"(",
"value",
")",
"value",
"elsif",
"reconstantize",
"@klass",
"=",
"klass",
"public_send",
"(",
... | rubocop:disable Metrics/MethodLength | [
"rubocop",
":",
"disable",
"Metrics",
"/",
"MethodLength"
] | fdc00a041e939ef48948baa2f7fd1ce2e4d66982 | https://github.com/AaronLasseigne/active_interaction/blob/fdc00a041e939ef48948baa2f7fd1ce2e4d66982/lib/active_interaction/filters/record_filter.rb#L32-L53 | train | Casts a value to a new object. | [
30522,
30524,
3643,
3449,
5332,
2546,
28667,
5644,
5794,
3775,
4371,
1030,
1047,
27102,
1027,
1047,
27102,
2270,
1035,
4604,
1006,
1035,
1035,
4118,
1035,
1035,
1010,
3643,
1010,
6123,
1010,
28667,
5644,
5794,
3775,
4371,
1024,
6270,
1010,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.