repo stringclasses 237
values | path stringlengths 11 168 | func_name stringlengths 10 147 | original_string stringlengths 79 124k | language stringclasses 1
value | code stringlengths 79 124k | code_tokens listlengths 16 45.3k | docstring stringlengths 4 23.5k | docstring_tokens listlengths 1 452 | sha stringclasses 237
values | url stringlengths 95 268 | partition stringclasses 1
value | summary stringlengths 8 229 | input_ids listlengths 502 502 | token_type_ids listlengths 502 502 | attention_mask listlengths 502 502 | labels listlengths 502 502 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Azure/azure-sdk-for-ruby | management/azure_mgmt_storage/lib/2018-11-01/generated/azure_mgmt_storage/storage_accounts.rb | Azure::Storage::Mgmt::V2018_11_01.StorageAccounts.list_service_sas | def list_service_sas(resource_group_name, account_name, parameters, custom_headers:nil)
response = list_service_sas_async(resource_group_name, account_name, parameters, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def list_service_sas(resource_group_name, account_name, parameters, custom_headers:nil)
response = list_service_sas_async(resource_group_name, account_name, parameters, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"list_service_sas",
"(",
"resource_group_name",
",",
"account_name",
",",
"parameters",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"list_service_sas_async",
"(",
"resource_group_name",
",",
"account_name",
",",
"parameters",
",",
"custom_headers",
... | List service SAS credentials of a specific resource.
@param resource_group_name [String] The name of the resource group within the
user's subscription. The name is case insensitive.
@param account_name [String] The name of the storage account within the
specified resource group. Storage account names must be betwe... | [
"List",
"service",
"SAS",
"credentials",
"of",
"a",
"specific",
"resource",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_storage/lib/2018-11-01/generated/azure_mgmt_storage/storage_accounts.rb#L1110-L1113 | train | Gets the SAS of the specified service account. | [
30522,
13366,
2862,
1035,
2326,
1035,
21871,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
4070,
1035,
2171,
1010,
11709,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
2862,
1035,
2326,
1035,
21871,
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... |
Dynamoid/dynamoid | lib/dynamoid/persistence.rb | Dynamoid.Persistence.update_attributes! | def update_attributes!(attributes)
attributes.each { |attribute, value| write_attribute(attribute, value) }
save!
end | ruby | def update_attributes!(attributes)
attributes.each { |attribute, value| write_attribute(attribute, value) }
save!
end | [
"def",
"update_attributes!",
"(",
"attributes",
")",
"attributes",
".",
"each",
"{",
"|",
"attribute",
",",
"value",
"|",
"write_attribute",
"(",
"attribute",
",",
"value",
")",
"}",
"save!",
"end"
] | Updates multiple attributes at once, saving the object once the updates are complete.
Raises a Dynamoid::Errors::DocumentNotValid exception if there is vaidation and it fails.
@param [Hash] attributes a hash of attributes to update | [
"Updates",
"multiple",
"attributes",
"at",
"once",
"saving",
"the",
"object",
"once",
"the",
"updates",
"are",
"complete",
".",
"Raises",
"a",
"Dynamoid",
"::",
"Errors",
"::",
"DocumentNotValid",
"exception",
"if",
"there",
"is",
"vaidation",
"and",
"it",
"fa... | 9e3d006b039e45877b003564ded65509b10b6354 | https://github.com/Dynamoid/dynamoid/blob/9e3d006b039e45877b003564ded65509b10b6354/lib/dynamoid/persistence.rb#L167-L170 | train | Update the attributes of the object. | [
30522,
13366,
10651,
1035,
12332,
999,
1006,
12332,
1007,
12332,
1012,
2169,
1063,
1064,
17961,
1010,
3643,
1064,
4339,
1035,
17961,
1006,
17961,
1010,
3643,
1007,
1065,
3828,
999,
2203,
102,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_automation/lib/2015-10-31/generated/azure_mgmt_automation/node_reports.rb | Azure::Automation::Mgmt::V2015_10_31.NodeReports.get_content_with_http_info | def get_content_with_http_info(resource_group_name, automation_account_name, node_id, report_id, custom_headers:nil)
get_content_async(resource_group_name, automation_account_name, node_id, report_id, custom_headers:custom_headers).value!
end | ruby | def get_content_with_http_info(resource_group_name, automation_account_name, node_id, report_id, custom_headers:nil)
get_content_async(resource_group_name, automation_account_name, node_id, report_id, custom_headers:custom_headers).value!
end | [
"def",
"get_content_with_http_info",
"(",
"resource_group_name",
",",
"automation_account_name",
",",
"node_id",
",",
"report_id",
",",
"custom_headers",
":",
"nil",
")",
"get_content_async",
"(",
"resource_group_name",
",",
"automation_account_name",
",",
"node_id",
",",... | Retrieve the Dsc node reports by node id and report id.
@param resource_group_name [String] Name of an Azure Resource group.
@param automation_account_name [String] The name of the automation account.
@param node_id [String] The Dsc node id.
@param report_id [String] The report id.
@param custom_headers [Hash{Str... | [
"Retrieve",
"the",
"Dsc",
"node",
"reports",
"by",
"node",
"id",
"and",
"report",
"id",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_automation/lib/2015-10-31/generated/azure_mgmt_automation/node_reports.rb#L258-L260 | train | Gets the content of the node. | [
30522,
13366,
2131,
1035,
4180,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
19309,
1035,
4070,
1035,
2171,
1010,
13045,
1035,
8909,
1010,
3189,
1035,
8909,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | data/azure_service_fabric/lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb | Azure::ServiceFabric::V6_2_0_9.ServiceFabricClientAPIs.delete_image_store_content | def delete_image_store_content(content_path, timeout:60, custom_headers:nil)
response = delete_image_store_content_async(content_path, timeout:timeout, custom_headers:custom_headers).value!
nil
end | ruby | def delete_image_store_content(content_path, timeout:60, custom_headers:nil)
response = delete_image_store_content_async(content_path, timeout:timeout, custom_headers:custom_headers).value!
nil
end | [
"def",
"delete_image_store_content",
"(",
"content_path",
",",
"timeout",
":",
"60",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"delete_image_store_content_async",
"(",
"content_path",
",",
"timeout",
":",
"timeout",
",",
"custom_headers",
":custom_heade... | Deletes existing image store content.
Deletes existing image store content being found within the given image store
relative path. This can be used to delete uploaded application packages once
they are provisioned.
@param content_path [String] Relative path to file or folder in the image
store from its root.
@p... | [
"Deletes",
"existing",
"image",
"store",
"content",
"."
] | 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#L19413-L19416 | train | Delete the content of an image store. | [
30522,
13366,
3972,
12870,
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,
3972,
12870,
1035,
3746,
1035,
3573,
1035,
4180,
1035,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Katello/katello | app/models/katello/kt_environment.rb | Katello.KTEnvironment.insert_successor | def insert_successor(create_params, path)
self.class.transaction do
new_successor = self.class.create!(create_params)
if library?
if path
old_successor = path.first
old_successor.prior = new_successor
end
save_successor new_successor
el... | ruby | def insert_successor(create_params, path)
self.class.transaction do
new_successor = self.class.create!(create_params)
if library?
if path
old_successor = path.first
old_successor.prior = new_successor
end
save_successor new_successor
el... | [
"def",
"insert_successor",
"(",
"create_params",
",",
"path",
")",
"self",
".",
"class",
".",
"transaction",
"do",
"new_successor",
"=",
"self",
".",
"class",
".",
"create!",
"(",
"create_params",
")",
"if",
"library?",
"if",
"path",
"old_successor",
"=",
"p... | creates new env from create_params with self as a prior | [
"creates",
"new",
"env",
"from",
"create_params",
"with",
"self",
"as",
"a",
"prior"
] | a1c9280067607999cae43bab89b53ba870856b76 | https://github.com/Katello/katello/blob/a1c9280067607999cae43bab89b53ba870856b76/app/models/katello/kt_environment.rb#L104-L123 | train | Insert a successor into the database | [
30522,
13366,
19274,
1035,
6332,
1006,
3443,
1035,
11498,
5244,
1010,
4130,
1007,
2969,
1012,
2465,
1012,
12598,
2079,
2047,
1035,
6332,
1027,
2969,
1012,
2465,
1012,
3443,
999,
1006,
3443,
1035,
11498,
5244,
1007,
2065,
3075,
1029,
2065,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
rails/rails | activerecord/lib/active_record/autosave_association.rb | ActiveRecord.AutosaveAssociation.save_has_one_association | def save_has_one_association(reflection)
association = association_instance_get(reflection.name)
record = association && association.load_target
if record && !record.destroyed?
autosave = reflection.options[:autosave]
if autosave && record.marked_for_destruction?
... | ruby | def save_has_one_association(reflection)
association = association_instance_get(reflection.name)
record = association && association.load_target
if record && !record.destroyed?
autosave = reflection.options[:autosave]
if autosave && record.marked_for_destruction?
... | [
"def",
"save_has_one_association",
"(",
"reflection",
")",
"association",
"=",
"association_instance_get",
"(",
"reflection",
".",
"name",
")",
"record",
"=",
"association",
"&&",
"association",
".",
"load_target",
"if",
"record",
"&&",
"!",
"record",
".",
"destro... | Saves the associated record if it's new or <tt>:autosave</tt> is enabled
on the association.
In addition, it will destroy the association if it was marked for
destruction with #mark_for_destruction.
This all happens inside a transaction, _if_ the Transactions module is included into
ActiveRecord::Base after the ... | [
"Saves",
"the",
"associated",
"record",
"if",
"it",
"s",
"new",
"or",
"<tt",
">",
":",
"autosave<",
"/",
"tt",
">",
"is",
"enabled",
"on",
"the",
"association",
"."
] | 85a8bc644be69908f05740a5886ec19cd3679df5 | https://github.com/rails/rails/blob/85a8bc644be69908f05740a5886ec19cd3679df5/activerecord/lib/active_record/autosave_association.rb#L428-L454 | train | Save has_one association to database | [
30522,
13366,
3828,
1035,
2038,
1035,
2028,
1035,
2523,
1006,
9185,
1007,
2523,
1027,
2523,
1035,
6013,
1035,
2131,
1006,
9185,
1012,
2171,
1007,
2501,
1027,
2523,
1004,
1004,
2523,
1012,
7170,
1035,
4539,
2065,
2501,
1004,
1004,
999,
250... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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_search/lib/2015-08-19/generated/azure_mgmt_search/services.rb | Azure::Search::Mgmt::V2015_08_19.Services.update_with_http_info | def update_with_http_info(resource_group_name, search_service_name, service, search_management_request_options:nil, custom_headers:nil)
update_async(resource_group_name, search_service_name, service, search_management_request_options:search_management_request_options, custom_headers:custom_headers).value!
end | ruby | def update_with_http_info(resource_group_name, search_service_name, service, search_management_request_options:nil, custom_headers:nil)
update_async(resource_group_name, search_service_name, service, search_management_request_options:search_management_request_options, custom_headers:custom_headers).value!
end | [
"def",
"update_with_http_info",
"(",
"resource_group_name",
",",
"search_service_name",
",",
"service",
",",
"search_management_request_options",
":",
"nil",
",",
"custom_headers",
":",
"nil",
")",
"update_async",
"(",
"resource_group_name",
",",
"search_service_name",
",... | Updates an existing Search service in the given resource group.
@param resource_group_name [String] The name of the resource group within the
current subscription. You can obtain this value from the Azure Resource
Manager API or the portal.
@param search_service_name [String] The name of the Azure Search service t... | [
"Updates",
"an",
"existing",
"Search",
"service",
"in",
"the",
"given",
"resource",
"group",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_search/lib/2015-08-19/generated/azure_mgmt_search/services.rb#L131-L133 | train | Updates an existing search service s index. | [
30522,
13366,
10651,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
3945,
1035,
2326,
1035,
2171,
1010,
2326,
1010,
3945,
1035,
2968,
1035,
5227,
1035,
7047,
1024,
9152,
2140,
1010,
7661,
1035,
20346,
2015,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_web/lib/2018-02-01/generated/azure_mgmt_web/diagnostics.rb | Azure::Web::Mgmt::V2018_02_01.Diagnostics.get_site_detector_slot_next | def get_site_detector_slot_next(next_page_link, custom_headers:nil)
response = get_site_detector_slot_next_async(next_page_link, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def get_site_detector_slot_next(next_page_link, custom_headers:nil)
response = get_site_detector_slot_next_async(next_page_link, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"get_site_detector_slot_next",
"(",
"next_page_link",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"get_site_detector_slot_next_async",
"(",
"next_page_link",
",",
"custom_headers",
":custom_headers",
")",
".",
"value!",
"response",
".",
"body",
"unle... | Get Detector
Get Detector
@param next_page_link [String] The NextLink from the previous successful call
to List operation.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request.
@return [DiagnosticDetectorCollection] operation results. | [
"Get",
"Detector"
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_web/lib/2018-02-01/generated/azure_mgmt_web/diagnostics.rb#L3474-L3477 | train | Gets the site detector slot. | [
30522,
13366,
2131,
1035,
2609,
1035,
19034,
1035,
10453,
1035,
2279,
1006,
2279,
1035,
3931,
1035,
4957,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
2131,
1035,
2609,
1035,
19034,
1035,
10453,
1035,
2279,
1035,
2004,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_network/lib/2019-02-01/generated/azure_mgmt_network/interface_endpoints.rb | Azure::Network::Mgmt::V2019_02_01.InterfaceEndpoints.delete | def delete(resource_group_name, interface_endpoint_name, custom_headers:nil)
response = delete_async(resource_group_name, interface_endpoint_name, custom_headers:custom_headers).value!
nil
end | ruby | def delete(resource_group_name, interface_endpoint_name, custom_headers:nil)
response = delete_async(resource_group_name, interface_endpoint_name, custom_headers:custom_headers).value!
nil
end | [
"def",
"delete",
"(",
"resource_group_name",
",",
"interface_endpoint_name",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"delete_async",
"(",
"resource_group_name",
",",
"interface_endpoint_name",
",",
"custom_headers",
":custom_headers",
")",
".",
"value!"... | Deletes the specified interface endpoint.
@param resource_group_name [String] The name of the resource group.
@param interface_endpoint_name [String] The name of the interface endpoint.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request. | [
"Deletes",
"the",
"specified",
"interface",
"endpoint",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_network/lib/2019-02-01/generated/azure_mgmt_network/interface_endpoints.rb#L32-L35 | train | Deletes an interface endpoint. | [
30522,
13366,
3972,
12870,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
8278,
1035,
2203,
8400,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
3972,
12870,
1035,
2004,
6038,
2278,
1006,
7692,
1035,
2177,
1035,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
decidim/decidim | decidim-core/app/commands/decidim/invite_user_again.rb | Decidim.InviteUserAgain.call | def call
return broadcast(:invalid) unless user&.invited_to_sign_up?
user.invite!(user.invited_by, invitation_instructions: instructions)
broadcast(:ok)
end | ruby | def call
return broadcast(:invalid) unless user&.invited_to_sign_up?
user.invite!(user.invited_by, invitation_instructions: instructions)
broadcast(:ok)
end | [
"def",
"call",
"return",
"broadcast",
"(",
":invalid",
")",
"unless",
"user",
"&.",
"invited_to_sign_up?",
"user",
".",
"invite!",
"(",
"user",
".",
"invited_by",
",",
"invitation_instructions",
":",
"instructions",
")",
"broadcast",
"(",
":ok",
")",
"end"
] | Public: Initializes the command.
form - A form object with the params. | [
"Public",
":",
"Initializes",
"the",
"command",
"."
] | 6e2b14e559a63088669904e3c5c49a5180700cf7 | https://github.com/decidim/decidim/blob/6e2b14e559a63088669904e3c5c49a5180700cf7/decidim-core/app/commands/decidim/invite_user_again.rb#L14-L20 | train | invites the user to sign up and returns the result of the call | [
30522,
13366,
2655,
2709,
3743,
1006,
1024,
19528,
1007,
4983,
5310,
1004,
1012,
4778,
1035,
2000,
1035,
3696,
1035,
2039,
1029,
5310,
1012,
13260,
999,
1006,
5310,
1012,
4778,
1035,
2011,
1010,
8468,
1035,
8128,
1024,
8128,
1007,
3743,
1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
roo-rb/roo | lib/roo/excelx.rb | Roo.Excelx.extract_worksheet_ids | def extract_worksheet_ids(entries, path)
wb = entries.find { |e| e.name[/workbook.xml$/] }
fail ArgumentError 'missing required workbook file' if wb.nil?
wb.extract(path)
workbook_doc = Roo::Utils.load_xml(path).remove_namespaces!
workbook_doc.xpath('//sheet').map { |s| s['id'] }
end | ruby | def extract_worksheet_ids(entries, path)
wb = entries.find { |e| e.name[/workbook.xml$/] }
fail ArgumentError 'missing required workbook file' if wb.nil?
wb.extract(path)
workbook_doc = Roo::Utils.load_xml(path).remove_namespaces!
workbook_doc.xpath('//sheet').map { |s| s['id'] }
end | [
"def",
"extract_worksheet_ids",
"(",
"entries",
",",
"path",
")",
"wb",
"=",
"entries",
".",
"find",
"{",
"|",
"e",
"|",
"e",
".",
"name",
"[",
"/",
"/",
"]",
"}",
"fail",
"ArgumentError",
"'missing required workbook file'",
"if",
"wb",
".",
"nil?",
"wb"... | Internal: extracts the worksheet_ids from the workbook.xml file. xlsx
documents require a workbook.xml file, so a if the file is missing
it is not a valid xlsx file. In these cases, an ArgumentError is
raised.
wb - a Zip::Entry for the workbook.xml file.
path - A String for Zip::Entr... | [
"Internal",
":",
"extracts",
"the",
"worksheet_ids",
"from",
"the",
"workbook",
".",
"xml",
"file",
".",
"xlsx",
"documents",
"require",
"a",
"workbook",
".",
"xml",
"file",
"so",
"a",
"if",
"the",
"file",
"is",
"missing",
"it",
"is",
"not",
"a",
"valid"... | 4ec1104f0c3c2a29711c0c907371cd2be12bcc3c | https://github.com/roo-rb/roo/blob/4ec1104f0c3c2a29711c0c907371cd2be12bcc3c/lib/roo/excelx.rb#L331-L338 | train | Extract the sheet ids from the workbook file | [
30522,
13366,
14817,
1035,
2573,
21030,
2102,
1035,
8909,
2015,
1006,
10445,
1010,
4130,
1007,
25610,
1027,
10445,
1012,
2424,
1063,
1064,
1041,
1064,
1041,
1012,
2171,
1031,
1013,
2147,
8654,
1012,
20950,
1002,
1013,
1033,
1065,
8246,
6685... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
etewiah/property_web_builder | app/services/pwb/page_part_manager.rb | Pwb.PagePartManager.seed_container_block_content | def seed_container_block_content(locale, seed_content)
page_part_editor_setup = page_part.editor_setup
raise "Invalid editorBlocks for page_part_editor_setup" unless page_part_editor_setup && page_part_editor_setup["editorBlocks"].present?
# page = page_part.page
# page_part_key uniquely identif... | ruby | def seed_container_block_content(locale, seed_content)
page_part_editor_setup = page_part.editor_setup
raise "Invalid editorBlocks for page_part_editor_setup" unless page_part_editor_setup && page_part_editor_setup["editorBlocks"].present?
# page = page_part.page
# page_part_key uniquely identif... | [
"def",
"seed_container_block_content",
"(",
"locale",
",",
"seed_content",
")",
"page_part_editor_setup",
"=",
"page_part",
".",
"editor_setup",
"raise",
"\"Invalid editorBlocks for page_part_editor_setup\"",
"unless",
"page_part_editor_setup",
"&&",
"page_part_editor_setup",
"["... | seed_content is ... | [
"seed_content",
"is",
"..."
] | fba4e6d4ffa7bc1f4d3b50dfa5a6a9fbfee23f21 | https://github.com/etewiah/property_web_builder/blob/fba4e6d4ffa7bc1f4d3b50dfa5a6a9fbfee23f21/app/services/pwb/page_part_manager.rb#L56-L97 | train | seed the content of a block in a page part | [
30522,
13366,
6534,
1035,
11661,
1035,
3796,
1035,
4180,
1006,
2334,
2063,
1010,
6534,
1035,
4180,
1007,
3931,
1035,
2112,
1035,
3559,
1035,
16437,
1027,
3931,
1035,
2112,
1012,
3559,
1035,
30524,
1033,
1012,
2556,
1029,
1001,
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_service_fabric/lib/2017-07-01-preview/generated/azure_mgmt_service_fabric/clusters.rb | Azure::ServiceFabric::Mgmt::V2017_07_01_preview.Clusters.begin_update_with_http_info | def begin_update_with_http_info(resource_group_name, cluster_name, api_version, subscription_id, parameters, custom_headers:nil)
begin_update_async(resource_group_name, cluster_name, api_version, subscription_id, parameters, custom_headers:custom_headers).value!
end | ruby | def begin_update_with_http_info(resource_group_name, cluster_name, api_version, subscription_id, parameters, custom_headers:nil)
begin_update_async(resource_group_name, cluster_name, api_version, subscription_id, parameters, custom_headers:custom_headers).value!
end | [
"def",
"begin_update_with_http_info",
"(",
"resource_group_name",
",",
"cluster_name",
",",
"api_version",
",",
"subscription_id",
",",
"parameters",
",",
"custom_headers",
":",
"nil",
")",
"begin_update_async",
"(",
"resource_group_name",
",",
"cluster_name",
",",
"api... | Update cluster configuration
Update cluster configuration
@param resource_group_name [String] The name of the resource group.
@param cluster_name [String] The name of the cluster resource
@param api_version [String] The version of the API.
@param subscription_id [String] The customer subscription identifier
@p... | [
"Update",
"cluster",
"configuration"
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_service_fabric/lib/2017-07-01-preview/generated/azure_mgmt_service_fabric/clusters.rb#L694-L696 | train | Updates a cluster s existing specification. | [
30522,
13366,
4088,
1035,
10651,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
9324,
1035,
2171,
1010,
17928,
1035,
2544,
1010,
15002,
1035,
8909,
1010,
11709,
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... |
activeadmin/activeadmin | lib/active_admin/form_builder.rb | ActiveAdmin.HasManyBuilder.render_has_many_form | def render_has_many_form(form_builder, parent, &block)
index = parent && form_builder.send(:parent_child_index, parent)
template.concat template.capture { yield(form_builder, index) }
template.concat has_many_actions(form_builder, "".html_safe)
end | ruby | def render_has_many_form(form_builder, parent, &block)
index = parent && form_builder.send(:parent_child_index, parent)
template.concat template.capture { yield(form_builder, index) }
template.concat has_many_actions(form_builder, "".html_safe)
end | [
"def",
"render_has_many_form",
"(",
"form_builder",
",",
"parent",
",",
"&",
"block",
")",
"index",
"=",
"parent",
"&&",
"form_builder",
".",
"send",
"(",
":parent_child_index",
",",
"parent",
")",
"template",
".",
"concat",
"template",
".",
"capture",
"{",
... | Renders the Formtastic inputs then appends ActiveAdmin delete and sort actions. | [
"Renders",
"the",
"Formtastic",
"inputs",
"then",
"appends",
"ActiveAdmin",
"delete",
"and",
"sort",
"actions",
"."
] | 0759c8dcf97865748c9344459162ac3c7e65a6cd | https://github.com/activeadmin/activeadmin/blob/0759c8dcf97865748c9344459162ac3c7e65a6cd/lib/active_admin/form_builder.rb#L101-L105 | train | Renders a has_many form. | [
30522,
13366,
17552,
1035,
2038,
1035,
2116,
1035,
2433,
1006,
2433,
1035,
12508,
1010,
6687,
1010,
1004,
3796,
1007,
5950,
1027,
6687,
1004,
1004,
2433,
1035,
12508,
1012,
4604,
1006,
1024,
6687,
1035,
2775,
1035,
5950,
1010,
6687,
1007,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_monitor/lib/2017-04-01/generated/azure_mgmt_monitor/activity_log_alerts.rb | Azure::Monitor::Mgmt::V2017_04_01.ActivityLogAlerts.create_or_update_with_http_info | def create_or_update_with_http_info(resource_group_name, activity_log_alert_name, activity_log_alert, custom_headers:nil)
create_or_update_async(resource_group_name, activity_log_alert_name, activity_log_alert, custom_headers:custom_headers).value!
end | ruby | def create_or_update_with_http_info(resource_group_name, activity_log_alert_name, activity_log_alert, custom_headers:nil)
create_or_update_async(resource_group_name, activity_log_alert_name, activity_log_alert, custom_headers:custom_headers).value!
end | [
"def",
"create_or_update_with_http_info",
"(",
"resource_group_name",
",",
"activity_log_alert_name",
",",
"activity_log_alert",
",",
"custom_headers",
":",
"nil",
")",
"create_or_update_async",
"(",
"resource_group_name",
",",
"activity_log_alert_name",
",",
"activity_log_aler... | Create a new activity log alert or update an existing one.
@param resource_group_name [String] The name of the resource group.
@param activity_log_alert_name [String] The name of the activity log alert.
@param activity_log_alert [ActivityLogAlertResource] The activity log alert
to create or use for the update.
@p... | [
"Create",
"a",
"new",
"activity",
"log",
"alert",
"or",
"update",
"an",
"existing",
"one",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_monitor/lib/2017-04-01/generated/azure_mgmt_monitor/activity_log_alerts.rb#L53-L55 | train | Creates or updates an existing ActivityLogAlert. | [
30522,
13366,
3443,
1035,
2030,
1035,
10651,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
4023,
1035,
8833,
1035,
9499,
1035,
2171,
1010,
4023,
1035,
8833,
1035,
9499,
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... |
stympy/faker | lib/helpers/unique_generator.rb | Faker.UniqueGenerator.method_missing | def method_missing(name, *arguments)
self.class.marked_unique.add(self)
@max_retries.times do
result = @generator.public_send(name, *arguments)
next if @previous_results[[name, arguments]].include?(result)
@previous_results[[name, arguments]] << result
return result
... | ruby | def method_missing(name, *arguments)
self.class.marked_unique.add(self)
@max_retries.times do
result = @generator.public_send(name, *arguments)
next if @previous_results[[name, arguments]].include?(result)
@previous_results[[name, arguments]] << result
return result
... | [
"def",
"method_missing",
"(",
"name",
",",
"*",
"arguments",
")",
"self",
".",
"class",
".",
"marked_unique",
".",
"add",
"(",
"self",
")",
"@max_retries",
".",
"times",
"do",
"result",
"=",
"@generator",
".",
"public_send",
"(",
"name",
",",
"arguments",
... | rubocop:disable Style/MethodMissingSuper | [
"rubocop",
":",
"disable",
"Style",
"/",
"MethodMissingSuper"
] | cc9f09e287fea252339c485046fe99a9ff41df07 | https://github.com/stympy/faker/blob/cc9f09e287fea252339c485046fe99a9ff41df07/lib/helpers/unique_generator.rb#L18-L31 | train | Calls the generator method with the given name and arguments. | [
30522,
13366,
4118,
1035,
4394,
1006,
2171,
1010,
1008,
9918,
1007,
2969,
1012,
2465,
1012,
4417,
1035,
4310,
1012,
5587,
1006,
2969,
1007,
1030,
4098,
1035,
2128,
21011,
1012,
2335,
2079,
2765,
1027,
1030,
13103,
1012,
2270,
1035,
4604,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
piotrmurach/github | lib/github_api/response/raise_error.rb | Github.Response::RaiseError.on_complete | def on_complete(env)
status_code = env[:status].to_i
service_error = Github::Error::ServiceError
error_class = service_error.error_mapping[status_code]
if !error_class and (400...600) === status_code
error_class = service_error
end
raise error_class.new(env) if error_class
... | ruby | def on_complete(env)
status_code = env[:status].to_i
service_error = Github::Error::ServiceError
error_class = service_error.error_mapping[status_code]
if !error_class and (400...600) === status_code
error_class = service_error
end
raise error_class.new(env) if error_class
... | [
"def",
"on_complete",
"(",
"env",
")",
"status_code",
"=",
"env",
"[",
":status",
"]",
".",
"to_i",
"service_error",
"=",
"Github",
"::",
"Error",
"::",
"ServiceError",
"error_class",
"=",
"service_error",
".",
"error_mapping",
"[",
"status_code",
"]",
"if",
... | Check if status code requires raising a ServiceError
@api private | [
"Check",
"if",
"status",
"code",
"requires",
"raising",
"a",
"ServiceError"
] | 8702452c66bea33c9388550aed9e9974f76aaef1 | https://github.com/piotrmurach/github/blob/8702452c66bea33c9388550aed9e9974f76aaef1/lib/github_api/response/raise_error.rb#L12-L20 | train | Returns an array of error objects for the given environment. | [
30522,
13366,
2006,
1035,
3143,
1006,
4372,
2615,
1007,
3570,
1035,
3642,
1027,
4372,
2615,
1031,
1024,
3570,
1033,
1012,
2000,
1035,
1045,
2326,
1035,
7561,
1027,
21025,
2705,
12083,
1024,
1024,
7561,
1024,
1024,
2326,
2121,
29165,
7561,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
piotrmurach/github | lib/github_api/client/repos/comments.rb | Github.Client::Repos::Comments.update | def update(*args)
arguments(args, required: [:user, :repo, :id]) do
assert_required REQUIRED_COMMENT_OPTIONS
end
patch_request("/repos/#{arguments.user}/#{arguments.repo}/comments/#{arguments.id}", arguments.params)
end | ruby | def update(*args)
arguments(args, required: [:user, :repo, :id]) do
assert_required REQUIRED_COMMENT_OPTIONS
end
patch_request("/repos/#{arguments.user}/#{arguments.repo}/comments/#{arguments.id}", arguments.params)
end | [
"def",
"update",
"(",
"*",
"args",
")",
"arguments",
"(",
"args",
",",
"required",
":",
"[",
":user",
",",
":repo",
",",
":id",
"]",
")",
"do",
"assert_required",
"REQUIRED_COMMENT_OPTIONS",
"end",
"patch_request",
"(",
"\"/repos/#{arguments.user}/#{arguments.repo... | Update a commit comment
@param [Hash] params
@option params [String] :body
Required. The contents of the comment.
@example
github = Github.new
github.repos.comments.update 'user-name', 'repo-name', 'id',
body: "Nice change"
@api public | [
"Update",
"a",
"commit",
"comment"
] | 8702452c66bea33c9388550aed9e9974f76aaef1 | https://github.com/piotrmurach/github/blob/8702452c66bea33c9388550aed9e9974f76aaef1/lib/github_api/client/repos/comments.rb#L104-L110 | train | Update a comment | [
30522,
13366,
10651,
1006,
1008,
12098,
5620,
1007,
9918,
1006,
12098,
5620,
1010,
3223,
1024,
1031,
1024,
5310,
1010,
1024,
16360,
2080,
1010,
1024,
30524,
11498,
5244,
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... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
fastlane/fastlane | frameit/lib/frameit/config_parser.rb | Frameit.ConfigParser.validate_values | def validate_values(values)
values.each do |key, value|
if value.kind_of?(Hash)
validate_values(value) # recursive call
else
validate_key(key, value)
end
end
end | ruby | def validate_values(values)
values.each do |key, value|
if value.kind_of?(Hash)
validate_values(value) # recursive call
else
validate_key(key, value)
end
end
end | [
"def",
"validate_values",
"(",
"values",
")",
"values",
".",
"each",
"do",
"|",
"key",
",",
"value",
"|",
"if",
"value",
".",
"kind_of?",
"(",
"Hash",
")",
"validate_values",
"(",
"value",
")",
"# recursive call",
"else",
"validate_key",
"(",
"key",
",",
... | Make sure the paths/colors are valid | [
"Make",
"sure",
"the",
"paths",
"/",
"colors",
"are",
"valid"
] | 457c5d647c77f0e078dafa5129da616914e002c5 | https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/frameit/lib/frameit/config_parser.rb#L67-L75 | train | Validate the values | [
30522,
13366,
9398,
3686,
1035,
5300,
1006,
5300,
1007,
5300,
1012,
2169,
2079,
1064,
3145,
1010,
3643,
1064,
2065,
3643,
1012,
2785,
1035,
1997,
1029,
1006,
23325,
1007,
9398,
3686,
1035,
5300,
1006,
3643,
1007,
1001,
28667,
9236,
3512,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_policy_insights/lib/2018-07-01-preview/generated/azure_mgmt_policy_insights/remediations.rb | Azure::PolicyInsights::Mgmt::V2018_07_01_preview.Remediations.list_deployments_at_management_group_next | def list_deployments_at_management_group_next(next_page_link, custom_headers:nil)
response = list_deployments_at_management_group_next_async(next_page_link, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def list_deployments_at_management_group_next(next_page_link, custom_headers:nil)
response = list_deployments_at_management_group_next_async(next_page_link, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"list_deployments_at_management_group_next",
"(",
"next_page_link",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"list_deployments_at_management_group_next_async",
"(",
"next_page_link",
",",
"custom_headers",
":custom_headers",
")",
".",
"value!",
"respons... | Gets all deployments for a remediation at management group scope.
@param next_page_link [String] The NextLink from the previous successful call
to List operation.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request.
@return [RemediationDeploymentsListRes... | [
"Gets",
"all",
"deployments",
"for",
"a",
"remediation",
"at",
"management",
"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#L2357-L2360 | train | Gets the list of deployments at management group level. | [
30522,
13366,
2862,
1035,
10813,
2015,
1035,
2012,
1035,
2968,
1035,
2177,
1035,
2279,
1006,
2279,
1035,
3931,
1035,
4957,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
2862,
1035,
10813,
2015,
1035,
2012,
1035,
2968,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
sds/haml-lint | lib/haml_lint/linter.rb | HamlLint.Linter.inline_node_content | def inline_node_content(node)
inline_content = node.script
if contains_interpolation?(inline_content)
strip_surrounding_quotes(inline_content)
else
inline_content
end
end | ruby | def inline_node_content(node)
inline_content = node.script
if contains_interpolation?(inline_content)
strip_surrounding_quotes(inline_content)
else
inline_content
end
end | [
"def",
"inline_node_content",
"(",
"node",
")",
"inline_content",
"=",
"node",
".",
"script",
"if",
"contains_interpolation?",
"(",
"inline_content",
")",
"strip_surrounding_quotes",
"(",
"inline_content",
")",
"else",
"inline_content",
"end",
"end"
] | Get the inline content for this node.
Inline content is the content that appears inline right after the
tag/script. For example, in the code below...
%tag Some inline content
..."Some inline content" would be the inline content.
@param node [HamlLint::Tree::Node]
@return [String] | [
"Get",
"the",
"inline",
"content",
"for",
"this",
"node",
"."
] | 024c773667e54cf88db938c2b368977005d70ee8 | https://github.com/sds/haml-lint/blob/024c773667e54cf88db938c2b368977005d70ee8/lib/haml_lint/linter.rb#L138-L146 | train | Returns the inline content of the node | [
30522,
13366,
23881,
1035,
13045,
1035,
4180,
1006,
13045,
1007,
23881,
1035,
4180,
1027,
13045,
1012,
5896,
2065,
3397,
1035,
6970,
18155,
3370,
1029,
1006,
23881,
1035,
4180,
1007,
6167,
1035,
4193,
1035,
16614,
1006,
23881,
1035,
4180,
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... |
rails/rails | actionview/lib/action_view/renderer/template_renderer.rb | ActionView.TemplateRenderer.determine_template | def determine_template(options)
keys = options.has_key?(:locals) ? options[:locals].keys : []
if options.key?(:body)
Template::Text.new(options[:body])
elsif options.key?(:plain)
Template::Text.new(options[:plain])
elsif options.key?(:html)
Template::HTML.n... | ruby | def determine_template(options)
keys = options.has_key?(:locals) ? options[:locals].keys : []
if options.key?(:body)
Template::Text.new(options[:body])
elsif options.key?(:plain)
Template::Text.new(options[:plain])
elsif options.key?(:html)
Template::HTML.n... | [
"def",
"determine_template",
"(",
"options",
")",
"keys",
"=",
"options",
".",
"has_key?",
"(",
":locals",
")",
"?",
"options",
"[",
":locals",
"]",
".",
"keys",
":",
"[",
"]",
"if",
"options",
".",
"key?",
"(",
":body",
")",
"Template",
"::",
"Text",
... | Determine the template to be rendered using the given options. | [
"Determine",
"the",
"template",
"to",
"be",
"rendered",
"using",
"the",
"given",
"options",
"."
] | 85a8bc644be69908f05740a5886ec19cd3679df5 | https://github.com/rails/rails/blob/85a8bc644be69908f05740a5886ec19cd3679df5/actionview/lib/action_view/renderer/template_renderer.rb#L19-L52 | train | Determine the template object | [
30522,
13366,
5646,
1035,
23561,
1006,
7047,
1007,
6309,
1027,
7047,
1012,
2038,
1035,
3145,
1029,
1006,
1024,
10575,
1007,
1029,
7047,
1031,
1024,
10575,
1033,
1012,
6309,
1024,
1031,
1033,
2065,
7047,
1012,
3145,
1029,
1006,
1024,
2303,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
watir/watir | lib/watir/elements/element.rb | Watir.Element.click | def click(*modifiers)
# TODO: Should wait_for_enabled be default, or `Button` specific behavior?
element_call(:wait_for_enabled) do
if modifiers.any?
action = driver.action
modifiers.each { |mod| action.key_down mod }
action.click @element
modifiers.each { |mo... | ruby | def click(*modifiers)
# TODO: Should wait_for_enabled be default, or `Button` specific behavior?
element_call(:wait_for_enabled) do
if modifiers.any?
action = driver.action
modifiers.each { |mod| action.key_down mod }
action.click @element
modifiers.each { |mo... | [
"def",
"click",
"(",
"*",
"modifiers",
")",
"# TODO: Should wait_for_enabled be default, or `Button` specific behavior?",
"element_call",
"(",
":wait_for_enabled",
")",
"do",
"if",
"modifiers",
".",
"any?",
"action",
"=",
"driver",
".",
"action",
"modifiers",
".",
"each... | Clicks the element, optionally while pressing the given modifier keys.
Note that support for holding a modifier key is currently experimental,
and may not work at all.
@example Click an element
browser.element(name: "new_user_button").click
@example Click an element with shift key pressed
browser.element(na... | [
"Clicks",
"the",
"element",
"optionally",
"while",
"pressing",
"the",
"given",
"modifier",
"keys",
".",
"Note",
"that",
"support",
"for",
"holding",
"a",
"modifier",
"key",
"is",
"currently",
"experimental",
"and",
"may",
"not",
"work",
"at",
"all",
"."
] | 2d8db09811c6221ae401b85b2f61f5fa66e463a3 | https://github.com/watir/watir/blob/2d8db09811c6221ae401b85b2f61f5fa66e463a3/lib/watir/elements/element.rb#L143-L159 | train | Clicks the element with the given modifiers. | [
30522,
13366,
11562,
1006,
1008,
16913,
28295,
1007,
1001,
28681,
2080,
1024,
2323,
3524,
1035,
2005,
1035,
9124,
2022,
12398,
1010,
2030,
1036,
6462,
1036,
3563,
5248,
1029,
5783,
1035,
2655,
1006,
1024,
3524,
1035,
2005,
1035,
9124,
1007,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_analysis_services/lib/2017-08-01-beta/generated/azure_mgmt_analysis_services/servers.rb | Azure::AnalysisServices::Mgmt::V2017_08_01_beta.Servers.list_skus_for_existing | def list_skus_for_existing(resource_group_name, server_name, custom_headers:nil)
response = list_skus_for_existing_async(resource_group_name, server_name, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def list_skus_for_existing(resource_group_name, server_name, custom_headers:nil)
response = list_skus_for_existing_async(resource_group_name, server_name, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"list_skus_for_existing",
"(",
"resource_group_name",
",",
"server_name",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"list_skus_for_existing_async",
"(",
"resource_group_name",
",",
"server_name",
",",
"custom_headers",
":custom_headers",
")",
".",
... | Lists eligible SKUs for an Analysis Services resource.
@param resource_group_name [String] The name of the Azure Resource group of
which a given Analysis Services server is part. This name must be at least 1
character in length, and no more than 90.
@param server_name [String] The name of the Analysis Services ser... | [
"Lists",
"eligible",
"SKUs",
"for",
"an",
"Analysis",
"Services",
"resource",
"."
] | 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#L648-L651 | train | Gets the skus for the specified server. | [
30522,
13366,
2862,
1035,
15315,
2271,
1035,
2005,
1035,
4493,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
8241,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
2862,
1035,
15315,
2271,
1035,
2005,
1035,
4493,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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 | build_tools/changelog.rb | BuildTools.Changelog.add_entry | def add_entry(options)
add_unreleased_changes_section unless read.lines.to_a[0].strip == 'Unreleased Changes'
lines = read.lines.to_a
lines = lines[0..2] + Entry.new(options).lines + lines[3..-1]
write(lines.join)
end | ruby | def add_entry(options)
add_unreleased_changes_section unless read.lines.to_a[0].strip == 'Unreleased Changes'
lines = read.lines.to_a
lines = lines[0..2] + Entry.new(options).lines + lines[3..-1]
write(lines.join)
end | [
"def",
"add_entry",
"(",
"options",
")",
"add_unreleased_changes_section",
"unless",
"read",
".",
"lines",
".",
"to_a",
"[",
"0",
"]",
".",
"strip",
"==",
"'Unreleased Changes'",
"lines",
"=",
"read",
".",
"lines",
".",
"to_a",
"lines",
"=",
"lines",
"[",
... | @option options [required, Symbol] :type
Must be one of the following:
* :feature
* :issue
@option options [required, String<markdown>] :text
A description of the change. This should be formatted as markdown.
@option options [optional, Integer] :issue A related GitHub issue number.
@option options [o... | [
"@option",
"options",
"[",
"required",
"Symbol",
"]",
":",
"type",
"Must",
"be",
"one",
"of",
"the",
"following",
":"
] | e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d | https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/build_tools/changelog.rb#L51-L56 | train | Add an entry to the archive | [
30522,
13366,
5587,
1035,
4443,
1006,
7047,
1007,
5587,
1035,
13270,
1035,
3431,
1035,
2930,
4983,
3191,
1012,
3210,
1012,
2000,
1035,
1037,
1031,
1014,
1033,
1012,
30524,
1012,
1011,
1015,
1033,
4339,
1006,
3210,
1012,
3693,
1007,
2203,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
square/connect-ruby-sdk | lib/square_connect/api/v1_items_api.rb | SquareConnect.V1ItemsApi.update_page_cell | def update_page_cell(location_id, page_id, body, opts = {})
data, _status_code, _headers = update_page_cell_with_http_info(location_id, page_id, body, opts)
return data
end | ruby | def update_page_cell(location_id, page_id, body, opts = {})
data, _status_code, _headers = update_page_cell_with_http_info(location_id, page_id, body, opts)
return data
end | [
"def",
"update_page_cell",
"(",
"location_id",
",",
"page_id",
",",
"body",
",",
"opts",
"=",
"{",
"}",
")",
"data",
",",
"_status_code",
",",
"_headers",
"=",
"update_page_cell_with_http_info",
"(",
"location_id",
",",
"page_id",
",",
"body",
",",
"opts",
"... | UpdatePageCell
Modifies a cell of a Favorites page in Square Register.
@param location_id The ID of the Favorites page's associated location.
@param page_id The ID of the page the cell belongs to.
@param body An object containing the fields to POST for the request. See the corresponding object definition for f... | [
"UpdatePageCell",
"Modifies",
"a",
"cell",
"of",
"a",
"Favorites",
"page",
"in",
"Square",
"Register",
"."
] | 798eb9ded716f23b9f1518386f1c311a34bca8bf | https://github.com/square/connect-ruby-sdk/blob/798eb9ded716f23b9f1518386f1c311a34bca8bf/lib/square_connect/api/v1_items_api.rb#L2324-L2327 | train | UpdatePageCell Update a page cell | [
30522,
13366,
10651,
1035,
3931,
1035,
3526,
1006,
3295,
1035,
8909,
1010,
3931,
1035,
8909,
1010,
2303,
1010,
23569,
2015,
1027,
1063,
1065,
1007,
2951,
1010,
1035,
3570,
1035,
3642,
1010,
1035,
20346,
2015,
1027,
10651,
1035,
3931,
1035,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
braintree/braintree_ruby | lib/braintree/address.rb | Braintree.Address.update | def update(attributes)
warn "[DEPRECATED] update as an instance method is deprecated. Please use Address.update"
result = @gateway.address.update(customer_id, id, attributes)
if result.success?
copy_instance_variables_from_object result.address
end
result
end | ruby | def update(attributes)
warn "[DEPRECATED] update as an instance method is deprecated. Please use Address.update"
result = @gateway.address.update(customer_id, id, attributes)
if result.success?
copy_instance_variables_from_object result.address
end
result
end | [
"def",
"update",
"(",
"attributes",
")",
"warn",
"\"[DEPRECATED] update as an instance method is deprecated. Please use Address.update\"",
"result",
"=",
"@gateway",
".",
"address",
".",
"update",
"(",
"customer_id",
",",
"id",
",",
"attributes",
")",
"if",
"result",
".... | Deprecated. Use Braintree::Address.update | [
"Deprecated",
".",
"Use",
"Braintree",
"::",
"Address",
".",
"update"
] | 6e56c7099ea55bcdc4073cbea60b2688cef69663 | https://github.com/braintree/braintree_ruby/blob/6e56c7099ea55bcdc4073cbea60b2688cef69663/lib/braintree/address.rb#L63-L70 | train | Update an existing address | [
30522,
13366,
10651,
1006,
12332,
1007,
11582,
1000,
1031,
2139,
28139,
12921,
1033,
10651,
2004,
2019,
6013,
4118,
2003,
2139,
28139,
12921,
1012,
3531,
2224,
4769,
1012,
10651,
1000,
2765,
1027,
1030,
11909,
1012,
4769,
1012,
10651,
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... |
sporkmonger/addressable | lib/addressable/uri.rb | Addressable.URI.userinfo | def userinfo
current_user = self.user
current_password = self.password
(current_user || current_password) && @userinfo ||= begin
if current_user && current_password
"#{current_user}:#{current_password}"
elsif current_user && !current_password
"#{current_user}"
... | ruby | def userinfo
current_user = self.user
current_password = self.password
(current_user || current_password) && @userinfo ||= begin
if current_user && current_password
"#{current_user}:#{current_password}"
elsif current_user && !current_password
"#{current_user}"
... | [
"def",
"userinfo",
"current_user",
"=",
"self",
".",
"user",
"current_password",
"=",
"self",
".",
"password",
"(",
"current_user",
"||",
"current_password",
")",
"&&",
"@userinfo",
"||=",
"begin",
"if",
"current_user",
"&&",
"current_password",
"\"#{current_user}:#... | The userinfo component for this URI.
Combines the user and password components.
@return [String] The userinfo component. | [
"The",
"userinfo",
"component",
"for",
"this",
"URI",
".",
"Combines",
"the",
"user",
"and",
"password",
"components",
"."
] | 5894c95a7768435cb46d1355954611dbd194832e | https://github.com/sporkmonger/addressable/blob/5894c95a7768435cb46d1355954611dbd194832e/lib/addressable/uri.rb#L1019-L1029 | train | Returns the userinfo object | [
30522,
13366,
5310,
2378,
14876,
2783,
1035,
5310,
1027,
2969,
1012,
5310,
2783,
1035,
20786,
1027,
2969,
1012,
20786,
1006,
2783,
1035,
5310,
1064,
1064,
2783,
1035,
20786,
1007,
1004,
1004,
1030,
5310,
2378,
14876,
1064,
1064,
1027,
4088,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
cloudfoundry/bosh | src/bosh-director/lib/bosh/director/instance_updater/state_applier.rb | Bosh::Director.InstanceUpdater::StateApplier.watch_schedule | def watch_schedule(min_watch_time, max_watch_time)
delta = (max_watch_time - min_watch_time).to_f
watch_intervals = 10
step = [1000, delta / (watch_intervals - 1), 15000].sort[1]
[min_watch_time] + ([step] * (delta / step).floor)
end | ruby | def watch_schedule(min_watch_time, max_watch_time)
delta = (max_watch_time - min_watch_time).to_f
watch_intervals = 10
step = [1000, delta / (watch_intervals - 1), 15000].sort[1]
[min_watch_time] + ([step] * (delta / step).floor)
end | [
"def",
"watch_schedule",
"(",
"min_watch_time",
",",
"max_watch_time",
")",
"delta",
"=",
"(",
"max_watch_time",
"-",
"min_watch_time",
")",
".",
"to_f",
"watch_intervals",
"=",
"10",
"step",
"=",
"[",
"1000",
",",
"delta",
"/",
"(",
"watch_intervals",
"-",
... | Returns an array of wait times distributed
on the [min_watch_time..max_watch_time] interval.
Tries to respect intervals but doesn't allow an interval to
fall below 1 second or go over 15 seconds.
All times are in milliseconds.
@param [Numeric] min_watch_time minimum time to watch the jobs
@param [Numeric] max_wa... | [
"Returns",
"an",
"array",
"of",
"wait",
"times",
"distributed",
"on",
"the",
"[",
"min_watch_time",
"..",
"max_watch_time",
"]",
"interval",
"."
] | 2eaa7100879ddd20cd909cd698514746195e28b7 | https://github.com/cloudfoundry/bosh/blob/2eaa7100879ddd20cd909cd698514746195e28b7/src/bosh-director/lib/bosh/director/instance_updater/state_applier.rb#L97-L103 | train | Returns the watch schedule for the given time range | [
30522,
13366,
3422,
1035,
6134,
1006,
8117,
1035,
3422,
1035,
2051,
1010,
4098,
1035,
3422,
1035,
2051,
1007,
7160,
1027,
1006,
4098,
1035,
3422,
1035,
2051,
1011,
8117,
1035,
3422,
1035,
2051,
1007,
1012,
2000,
1035,
1042,
3422,
1035,
14... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_mixedreality/lib/2019-02-28-preview/generated/azure_mgmt_mixedreality/spatial_anchors_accounts.rb | Azure::MixedReality::Mgmt::V2019_02_28_preview.SpatialAnchorsAccounts.update | def update(resource_group_name, spatial_anchors_account_name, spatial_anchors_account, custom_headers:nil)
response = update_async(resource_group_name, spatial_anchors_account_name, spatial_anchors_account, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def update(resource_group_name, spatial_anchors_account_name, spatial_anchors_account, custom_headers:nil)
response = update_async(resource_group_name, spatial_anchors_account_name, spatial_anchors_account, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"update",
"(",
"resource_group_name",
",",
"spatial_anchors_account_name",
",",
"spatial_anchors_account",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"update_async",
"(",
"resource_group_name",
",",
"spatial_anchors_account_name",
",",
"spatial_anchors_... | Updating a Spatial Anchors Account
@param resource_group_name [String] Name of an Azure resource group.
@param spatial_anchors_account_name [String] Name of an Mixed Reality Spatial
Anchors Account.
@param spatial_anchors_account [SpatialAnchorsAccount] Spatial Anchors
Account parameter.
@param custom_headers [H... | [
"Updating",
"a",
"Spatial",
"Anchors",
"Account"
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_mixedreality/lib/2019-02-28-preview/generated/azure_mgmt_mixedreality/spatial_anchors_accounts.rb#L403-L406 | train | Updates a spatial anchors account. | [
30522,
13366,
10651,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
13589,
1035,
24674,
1035,
4070,
1035,
2171,
1010,
13589,
1035,
24674,
1035,
4070,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
10651,
1035,
2004,
6038,
227... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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.start_data_loss_with_http_info | def start_data_loss_with_http_info(service_id, partition_id, operation_id, data_loss_mode, timeout:60, custom_headers:nil)
start_data_loss_async(service_id, partition_id, operation_id, data_loss_mode, timeout:timeout, custom_headers:custom_headers).value!
end | ruby | def start_data_loss_with_http_info(service_id, partition_id, operation_id, data_loss_mode, timeout:60, custom_headers:nil)
start_data_loss_async(service_id, partition_id, operation_id, data_loss_mode, timeout:timeout, custom_headers:custom_headers).value!
end | [
"def",
"start_data_loss_with_http_info",
"(",
"service_id",
",",
"partition_id",
",",
"operation_id",
",",
"data_loss_mode",
",",
"timeout",
":",
"60",
",",
"custom_headers",
":",
"nil",
")",
"start_data_loss_async",
"(",
"service_id",
",",
"partition_id",
",",
"ope... | This API will induce data loss for the specified partition. It will trigger a
call to the OnDataLossAsync API of the partition.
This API will induce data loss for the specified partition. It will trigger a
call to the OnDataLoss API of the partition.
Actual data loss will depend on the specified DataLossMode
Part... | [
"This",
"API",
"will",
"induce",
"data",
"loss",
"for",
"the",
"specified",
"partition",
".",
"It",
"will",
"trigger",
"a",
"call",
"to",
"the",
"OnDataLossAsync",
"API",
"of",
"the",
"partition",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_service_fabric/lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb#L20738-L20740 | train | Starts data loss for the specified partition. | [
30522,
13366,
2707,
1035,
2951,
1035,
3279,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
2326,
1035,
8909,
1010,
13571,
1035,
8909,
1010,
3169,
1035,
8909,
1010,
2951,
1035,
3279,
1035,
5549,
1010,
2051,
5833,
1024,
3438,
1010,
7661,
1035,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
david942j/one_gadget | lib/one_gadget/helper.rb | OneGadget.Helper.objdump_arch_supported? | def objdump_arch_supported?(bin, arch)
return false if bin.nil?
arch = objdump_arch(arch)
`#{::Shellwords.join([bin, '--help'])}`.lines.any? { |c| c.split.include?(arch) }
end | ruby | def objdump_arch_supported?(bin, arch)
return false if bin.nil?
arch = objdump_arch(arch)
`#{::Shellwords.join([bin, '--help'])}`.lines.any? { |c| c.split.include?(arch) }
end | [
"def",
"objdump_arch_supported?",
"(",
"bin",
",",
"arch",
")",
"return",
"false",
"if",
"bin",
".",
"nil?",
"arch",
"=",
"objdump_arch",
"(",
"arch",
")",
"`",
"#{",
"::",
"Shellwords",
".",
"join",
"(",
"[",
"bin",
",",
"'--help'",
"]",
")",
"}",
"... | Checks if the given objdump supports certain architecture.
@param [String] bin
@param [Symbol] arch
@return [Boolean]
@example
Helper.objdump_arch_supported?('/usr/bin/objdump', :i386)
#=> true | [
"Checks",
"if",
"the",
"given",
"objdump",
"supports",
"certain",
"architecture",
"."
] | ff6ef04541e83441bfe3c2664a6febd1640f4263 | https://github.com/david942j/one_gadget/blob/ff6ef04541e83441bfe3c2664a6febd1640f4263/lib/one_gadget/helper.rb#L292-L297 | train | Returns true if the arch is supported by the objdump. | [
30522,
13366,
27885,
3501,
8566,
8737,
1035,
7905,
1035,
3569,
1029,
1006,
8026,
1010,
7905,
1007,
2709,
6270,
2065,
8026,
1012,
9152,
2140,
1029,
7905,
1027,
27885,
3501,
8566,
8737,
1035,
7905,
1006,
7905,
1007,
1036,
1001,
1063,
1024,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | data/azure_service_fabric/lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb | Azure::ServiceFabric::V6_2_0_9.ServiceFabricClientAPIs.report_service_health | def report_service_health(service_id, health_information, immediate:false, timeout:60, custom_headers:nil)
response = report_service_health_async(service_id, health_information, immediate:immediate, timeout:timeout, custom_headers:custom_headers).value!
nil
end | ruby | def report_service_health(service_id, health_information, immediate:false, timeout:60, custom_headers:nil)
response = report_service_health_async(service_id, health_information, immediate:immediate, timeout:timeout, custom_headers:custom_headers).value!
nil
end | [
"def",
"report_service_health",
"(",
"service_id",
",",
"health_information",
",",
"immediate",
":",
"false",
",",
"timeout",
":",
"60",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"report_service_health_async",
"(",
"service_id",
",",
"health_informati... | Sends a health report on the Service Fabric service.
Reports health state of the specified Service Fabric service. The report must
contain the information about the source of the health report and property on
which it is reported.
The report is sent to a Service Fabric gateway Service, which forwards to the
healt... | [
"Sends",
"a",
"health",
"report",
"on",
"the",
"Service",
"Fabric",
"service",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_service_fabric/lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb#L11464-L11467 | train | Report service health. | [
30522,
13366,
3189,
1035,
2326,
1035,
2740,
1006,
2326,
1035,
8909,
1010,
2740,
1035,
2592,
1010,
6234,
1024,
6270,
1010,
2051,
5833,
1024,
3438,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
3189,
1035,
2326,
1035,
2... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | data/azure_key_vault/lib/2016-10-01/generated/azure_key_vault/key_vault_client.rb | Azure::KeyVault::V2016_10_01.KeyVaultClient.recover_deleted_certificate | def recover_deleted_certificate(vault_base_url, certificate_name, custom_headers:nil)
response = recover_deleted_certificate_async(vault_base_url, certificate_name, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def recover_deleted_certificate(vault_base_url, certificate_name, custom_headers:nil)
response = recover_deleted_certificate_async(vault_base_url, certificate_name, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"recover_deleted_certificate",
"(",
"vault_base_url",
",",
"certificate_name",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"recover_deleted_certificate_async",
"(",
"vault_base_url",
",",
"certificate_name",
",",
"custom_headers",
":custom_headers",
")",... | Recovers the deleted certificate back to its current version under
/certificates.
The RecoverDeletedCertificate operation performs the reversal of the Delete
operation. The operation is applicable in vaults enabled for soft-delete, and
must be issued during the retention interval (available in the deleted
certifi... | [
"Recovers",
"the",
"deleted",
"certificate",
"back",
"to",
"its",
"current",
"version",
"under",
"/",
"certificates",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_key_vault/lib/2016-10-01/generated/azure_key_vault/key_vault_client.rb#L6859-L6862 | train | Recover the deleted certificate. | [
30522,
13366,
8980,
1035,
17159,
1035,
8196,
1006,
11632,
1035,
2918,
1035,
24471,
2140,
1010,
8196,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
8980,
1035,
17159,
1035,
8196,
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... |
zendesk/ruby-kafka | lib/kafka/connection.rb | Kafka.Connection.write_request | def write_request(request, notification)
message = Kafka::Protocol::RequestMessage.new(
api_key: request.api_key,
api_version: request.respond_to?(:api_version) ? request.api_version : 0,
correlation_id: @correlation_id,
client_id: @client_id,
request: request,
)
... | ruby | def write_request(request, notification)
message = Kafka::Protocol::RequestMessage.new(
api_key: request.api_key,
api_version: request.respond_to?(:api_version) ? request.api_version : 0,
correlation_id: @correlation_id,
client_id: @client_id,
request: request,
)
... | [
"def",
"write_request",
"(",
"request",
",",
"notification",
")",
"message",
"=",
"Kafka",
"::",
"Protocol",
"::",
"RequestMessage",
".",
"new",
"(",
"api_key",
":",
"request",
".",
"api_key",
",",
"api_version",
":",
"request",
".",
"respond_to?",
"(",
":ap... | Writes a request over the connection.
@param request [#encode] the request that should be encoded and written.
@return [nil] | [
"Writes",
"a",
"request",
"over",
"the",
"connection",
"."
] | 2a73471b6a607a52dc85c79301ba522acb4566b5 | https://github.com/zendesk/ruby-kafka/blob/2a73471b6a607a52dc85c79301ba522acb4566b5/lib/kafka/connection.rb#L156-L174 | train | Write a request to the client | [
30522,
13366,
4339,
1035,
5227,
1006,
5227,
1010,
26828,
1007,
30524,
2050,
1024,
1024,
8778,
1024,
1024,
5227,
7834,
3736,
3351,
1012,
2047,
1006,
17928,
1035,
3145,
1024,
5227,
1012,
17928,
1035,
3145,
1010,
17928,
1035,
2544,
1024,
5227,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | data/azure_cognitiveservices_computervision/lib/2.0/generated/azure_cognitiveservices_computervision/computer_vision_client.rb | Azure::CognitiveServices::ComputerVision::V2_0.ComputerVisionClient.analyze_image_in_stream | def analyze_image_in_stream(image, visual_features:nil, details:nil, language:nil, custom_headers:nil)
response = analyze_image_in_stream_async(image, visual_features:visual_features, details:details, language:language, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def analyze_image_in_stream(image, visual_features:nil, details:nil, language:nil, custom_headers:nil)
response = analyze_image_in_stream_async(image, visual_features:visual_features, details:details, language:language, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"analyze_image_in_stream",
"(",
"image",
",",
"visual_features",
":",
"nil",
",",
"details",
":",
"nil",
",",
"language",
":",
"nil",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"analyze_image_in_stream_async",
"(",
"image",
",",
"visual_feat... | This operation extracts a rich set of visual features based on the image
content.
Two input methods are supported -- (1) Uploading an image or (2) specifying
an image URL. Within your request, there is an optional parameter to allow
you to choose which features to return. By default, image categories are
returned ... | [
"This",
"operation",
"extracts",
"a",
"rich",
"set",
"of",
"visual",
"features",
"based",
"on",
"the",
"image",
"content",
".",
"Two",
"input",
"methods",
"are",
"supported",
"--",
"(",
"1",
")",
"Uploading",
"an",
"image",
"or",
"(",
"2",
")",
"specifyi... | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_cognitiveservices_computervision/lib/2.0/generated/azure_cognitiveservices_computervision/computer_vision_client.rb#L1821-L1824 | train | Analyze an image in an image stream. | [
30522,
13366,
17908,
1035,
3746,
1035,
1999,
1035,
5460,
1006,
3746,
1010,
5107,
1035,
2838,
1024,
9152,
2140,
1010,
4751,
1024,
9152,
2140,
1010,
2653,
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... |
aws/aws-sdk-ruby | gems/aws-sdk-rds/lib/aws-sdk-rds/event_subscription.rb | Aws::RDS.EventSubscription.modify | def modify(options = {})
options = options.merge(subscription_name: @name)
resp = @client.modify_event_subscription(options)
EventSubscription.new(
name: resp.data.event_subscription.cust_subscription_id,
data: resp.data.event_subscription,
client: @client
)
end | ruby | def modify(options = {})
options = options.merge(subscription_name: @name)
resp = @client.modify_event_subscription(options)
EventSubscription.new(
name: resp.data.event_subscription.cust_subscription_id,
data: resp.data.event_subscription,
client: @client
)
end | [
"def",
"modify",
"(",
"options",
"=",
"{",
"}",
")",
"options",
"=",
"options",
".",
"merge",
"(",
"subscription_name",
":",
"@name",
")",
"resp",
"=",
"@client",
".",
"modify_event_subscription",
"(",
"options",
")",
"EventSubscription",
".",
"new",
"(",
... | @example Request syntax with placeholder values
eventsubscription = event_subscription.modify({
sns_topic_arn: "String",
source_type: "String",
event_categories: ["String"],
enabled: false,
})
@param [Hash] options ({})
@option options [String] :sns_topic_arn
The Amazon Resource Name (AR... | [
"@example",
"Request",
"syntax",
"with",
"placeholder",
"values"
] | e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d | https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-rds/lib/aws-sdk-rds/event_subscription.rb#L394-L402 | train | Modify an existing event subscription | [
30522,
13366,
19933,
1006,
7047,
1027,
1063,
1065,
1007,
7047,
1027,
7047,
1012,
13590,
1006,
15002,
1035,
2171,
1024,
1030,
2171,
1007,
24501,
2361,
1027,
1030,
7396,
1012,
19933,
1035,
2724,
1035,
15002,
1006,
7047,
1007,
2824,
12083,
224... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/record_identifier.rb | ActionView.RecordIdentifier.dom_id | def dom_id(record, prefix = nil)
if record_id = record_key_for_dom_id(record)
"#{dom_class(record, prefix)}#{JOIN}#{record_id}"
else
dom_class(record, prefix || NEW)
end
end | ruby | def dom_id(record, prefix = nil)
if record_id = record_key_for_dom_id(record)
"#{dom_class(record, prefix)}#{JOIN}#{record_id}"
else
dom_class(record, prefix || NEW)
end
end | [
"def",
"dom_id",
"(",
"record",
",",
"prefix",
"=",
"nil",
")",
"if",
"record_id",
"=",
"record_key_for_dom_id",
"(",
"record",
")",
"\"#{dom_class(record, prefix)}#{JOIN}#{record_id}\"",
"else",
"dom_class",
"(",
"record",
",",
"prefix",
"||",
"NEW",
")",
"end",
... | The DOM id convention is to use the singular form of an object or class with the id following an underscore.
If no id is found, prefix with "new_" instead.
dom_id(Post.find(45)) # => "post_45"
dom_id(Post.new) # => "new_post"
If you need to address multiple instances of the same class in the ... | [
"The",
"DOM",
"id",
"convention",
"is",
"to",
"use",
"the",
"singular",
"form",
"of",
"an",
"object",
"or",
"class",
"with",
"the",
"id",
"following",
"an",
"underscore",
".",
"If",
"no",
"id",
"is",
"found",
"prefix",
"with",
"new_",
"instead",
"."
] | 85a8bc644be69908f05740a5886ec19cd3679df5 | https://github.com/rails/rails/blob/85a8bc644be69908f05740a5886ec19cd3679df5/actionview/lib/action_view/record_identifier.rb#L89-L95 | train | Returns the dom_id for the given record. | [
30522,
13366,
14383,
1035,
8909,
1006,
2501,
1010,
17576,
1027,
9152,
2140,
1007,
2065,
2501,
1035,
8909,
1027,
2501,
1035,
3145,
1035,
2005,
1035,
14383,
1035,
8909,
1006,
2501,
1007,
1000,
1001,
1063,
14383,
1035,
2465,
1006,
2501,
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... |
plataformatec/simple_form | lib/simple_form/form_builder.rb | SimpleForm.FormBuilder.hint | def hint(attribute_name, options = {})
options = options.dup
options[:hint_html] = options.except(:hint_tag, :hint)
if attribute_name.is_a?(String)
options[:hint] = attribute_name
attribute_name, column, input_type = nil, nil, nil
else
column = find_attribute_column... | ruby | def hint(attribute_name, options = {})
options = options.dup
options[:hint_html] = options.except(:hint_tag, :hint)
if attribute_name.is_a?(String)
options[:hint] = attribute_name
attribute_name, column, input_type = nil, nil, nil
else
column = find_attribute_column... | [
"def",
"hint",
"(",
"attribute_name",
",",
"options",
"=",
"{",
"}",
")",
"options",
"=",
"options",
".",
"dup",
"options",
"[",
":hint_html",
"]",
"=",
"options",
".",
"except",
"(",
":hint_tag",
",",
":hint",
")",
"if",
"attribute_name",
".",
"is_a?",
... | Creates a hint tag for the given attribute. Accepts a symbol indicating
an attribute for I18n lookup or a string. All the given options are sent
as :hint_html.
== Examples
f.hint :name # Do I18n lookup
f.hint :name, id: "cool_hint"
f.hint "Don't forget to accept this" | [
"Creates",
"a",
"hint",
"tag",
"for",
"the",
"given",
"attribute",
".",
"Accepts",
"a",
"symbol",
"indicating",
"an",
"attribute",
"for",
"I18n",
"lookup",
"or",
"a",
"string",
".",
"All",
"the",
"given",
"options",
"are",
"sent",
"as",
":",
"hint_html",
... | 4dd9261ebb392e46a9beeefe8d83081e7c6e56b5 | https://github.com/plataformatec/simple_form/blob/4dd9261ebb392e46a9beeefe8d83081e7c6e56b5/lib/simple_form/form_builder.rb#L294-L308 | train | Renders the hint for the given attribute. | [
30522,
13366,
9374,
1006,
17961,
1035,
2171,
1010,
7047,
1027,
1063,
1065,
1007,
7047,
1027,
7047,
1012,
4241,
2361,
7047,
1031,
1024,
9374,
1035,
16129,
1033,
1027,
7047,
1012,
3272,
1006,
1024,
9374,
1035,
6415,
1010,
1024,
9374,
1007,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
aws/aws-sdk-ruby | gems/aws-sdk-glacier/lib/aws-sdk-glacier/multipart_upload.rb | Aws::Glacier.MultipartUpload.abort | def abort(options = {})
options = options.merge(
account_id: @account_id,
vault_name: @vault_name,
upload_id: @id
)
resp = @client.abort_multipart_upload(options)
resp.data
end | ruby | def abort(options = {})
options = options.merge(
account_id: @account_id,
vault_name: @vault_name,
upload_id: @id
)
resp = @client.abort_multipart_upload(options)
resp.data
end | [
"def",
"abort",
"(",
"options",
"=",
"{",
"}",
")",
"options",
"=",
"options",
".",
"merge",
"(",
"account_id",
":",
"@account_id",
",",
"vault_name",
":",
"@vault_name",
",",
"upload_id",
":",
"@id",
")",
"resp",
"=",
"@client",
".",
"abort_multipart_uplo... | @!group Actions
@example Request syntax with placeholder values
multipart_upload.abort()
@param [Hash] options ({})
@return [EmptyStructure] | [
"@!group",
"Actions",
"@example",
"Request",
"syntax",
"with",
"placeholder",
"values"
] | e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d | https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-glacier/lib/aws-sdk-glacier/multipart_upload.rb#L209-L217 | train | Aborts the current upload | [
30522,
13366,
11113,
11589,
1006,
7047,
1027,
1063,
1065,
1007,
7047,
1027,
7047,
1012,
13590,
1006,
4070,
1035,
8909,
1024,
1030,
4070,
1035,
8909,
1010,
11632,
1035,
2171,
1024,
1030,
11632,
1035,
2171,
1010,
2039,
11066,
1035,
8909,
1024... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/property.rb | Azure::ApiManagement::Mgmt::V2018_01_01.Property.create_or_update_with_http_info | def create_or_update_with_http_info(resource_group_name, service_name, prop_id, parameters, if_match:nil, custom_headers:nil)
create_or_update_async(resource_group_name, service_name, prop_id, parameters, if_match:if_match, custom_headers:custom_headers).value!
end | ruby | def create_or_update_with_http_info(resource_group_name, service_name, prop_id, parameters, if_match:nil, custom_headers:nil)
create_or_update_async(resource_group_name, service_name, prop_id, parameters, if_match:if_match, custom_headers:custom_headers).value!
end | [
"def",
"create_or_update_with_http_info",
"(",
"resource_group_name",
",",
"service_name",
",",
"prop_id",
",",
"parameters",
",",
"if_match",
":",
"nil",
",",
"custom_headers",
":",
"nil",
")",
"create_or_update_async",
"(",
"resource_group_name",
",",
"service_name",
... | Creates or updates a property.
@param resource_group_name [String] The name of the resource group.
@param service_name [String] The name of the API Management service.
@param prop_id [String] Identifier of the property.
@param parameters [PropertyContract] Create parameters.
@param if_match [String] ETag of the E... | [
"Creates",
"or",
"updates",
"a",
"property",
"."
] | 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/property.rb#L375-L377 | train | Creates or updates a property in the specified service. | [
30522,
13366,
3443,
1035,
2030,
1035,
10651,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2326,
1035,
2171,
1010,
17678,
1035,
8909,
1010,
11709,
1010,
2065,
1035,
2674,
1024,
9152,
2140,
1010,
7661,
1035,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_compute/lib/2018-04-01/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb | Azure::Compute::Mgmt::V2018_04_01.VirtualMachineScaleSets.update_instances_async | def update_instances_async(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers:nil)
# Send request
promise = begin_update_instances_async(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers:custom_headers)
promise = promise.then do |response|
# Defining... | ruby | def update_instances_async(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers:nil)
# Send request
promise = begin_update_instances_async(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers:custom_headers)
promise = promise.then do |response|
# Defining... | [
"def",
"update_instances_async",
"(",
"resource_group_name",
",",
"vm_scale_set_name",
",",
"vm_instance_ids",
",",
"custom_headers",
":",
"nil",
")",
"# Send request",
"promise",
"=",
"begin_update_instances_async",
"(",
"resource_group_name",
",",
"vm_scale_set_name",
","... | @param resource_group_name [String] The name of the resource group.
@param vm_scale_set_name [String] The name of the VM scale set.
@param vm_instance_ids [VirtualMachineScaleSetVMInstanceRequiredIDs] A list
of virtual machine instance IDs from the VM scale set.
@param custom_headers [Hash{String => String}] A hash... | [
"@param",
"resource_group_name",
"[",
"String",
"]",
"The",
"name",
"of",
"the",
"resource",
"group",
".",
"@param",
"vm_scale_set_name",
"[",
"String",
"]",
"The",
"name",
"of",
"the",
"VM",
"scale",
"set",
".",
"@param",
"vm_instance_ids",
"[",
"VirtualMachi... | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_compute/lib/2018-04-01/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb#L1034-L1048 | train | Updates a set of virtual machines in a VM scale set. | [
30522,
13366,
10651,
1035,
12107,
1035,
2004,
6038,
2278,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
1058,
2213,
1035,
4094,
1035,
2275,
1035,
2171,
1010,
1058,
2213,
1035,
6013,
1035,
8909,
2015,
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... |
hashicorp/vagrant | lib/vagrant/machine.rb | Vagrant.Machine.communicate | def communicate
if !@communicator
requested = @config.vm.communicator
requested ||= :ssh
klass = Vagrant.plugin("2").manager.communicators[requested]
raise Errors::CommunicatorNotFound, comm: requested.to_s if !klass
@communicator = klass.new(self)
end
@commun... | ruby | def communicate
if !@communicator
requested = @config.vm.communicator
requested ||= :ssh
klass = Vagrant.plugin("2").manager.communicators[requested]
raise Errors::CommunicatorNotFound, comm: requested.to_s if !klass
@communicator = klass.new(self)
end
@commun... | [
"def",
"communicate",
"if",
"!",
"@communicator",
"requested",
"=",
"@config",
".",
"vm",
".",
"communicator",
"requested",
"||=",
":ssh",
"klass",
"=",
"Vagrant",
".",
"plugin",
"(",
"\"2\"",
")",
".",
"manager",
".",
"communicators",
"[",
"requested",
"]",... | Returns a communication object for executing commands on the remote
machine. Note that the _exact_ semantics of this are up to the
communication provider itself. Despite this, the semantics are expected
to be consistent across operating systems. For example, all linux-based
systems should have similar communication... | [
"Returns",
"a",
"communication",
"object",
"for",
"executing",
"commands",
"on",
"the",
"remote",
"machine",
".",
"Note",
"that",
"the",
"_exact_",
"semantics",
"of",
"this",
"are",
"up",
"to",
"the",
"communication",
"provider",
"itself",
".",
"Despite",
"thi... | c22a145c59790c098f95d50141d9afb48e1ef55f | https://github.com/hashicorp/vagrant/blob/c22a145c59790c098f95d50141d9afb48e1ef55f/lib/vagrant/machine.rb#L255-L265 | train | Returns the communicator object for this VM. | [
30522,
13366,
10639,
2065,
999,
1030,
4012,
23041,
5555,
4263,
7303,
1027,
1030,
9530,
8873,
2290,
1012,
1058,
2213,
1012,
4012,
23041,
5555,
4263,
7303,
1064,
1064,
1027,
1024,
7020,
2232,
1047,
27102,
1027,
12436,
18980,
1012,
13354,
2378... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/2019-03-01/generated/azure_mgmt_compute/galleries.rb | Azure::Compute::Mgmt::V2019_03_01.Galleries.create_or_update_async | def create_or_update_async(resource_group_name, gallery_name, gallery, custom_headers:nil)
# Send request
promise = begin_create_or_update_async(resource_group_name, gallery_name, gallery, custom_headers:custom_headers)
promise = promise.then do |response|
# Defining deserialization method.
... | ruby | def create_or_update_async(resource_group_name, gallery_name, gallery, custom_headers:nil)
# Send request
promise = begin_create_or_update_async(resource_group_name, gallery_name, gallery, custom_headers:custom_headers)
promise = promise.then do |response|
# Defining deserialization method.
... | [
"def",
"create_or_update_async",
"(",
"resource_group_name",
",",
"gallery_name",
",",
"gallery",
",",
"custom_headers",
":",
"nil",
")",
"# Send request",
"promise",
"=",
"begin_create_or_update_async",
"(",
"resource_group_name",
",",
"gallery_name",
",",
"gallery",
"... | @param resource_group_name [String] The name of the resource group.
@param gallery_name [String] The name of the Shared Image Gallery. The
allowed characters are alphabets and numbers with dots and periods allowed in
the middle. The maximum length is 80 characters.
@param gallery [Gallery] Parameters supplied to th... | [
"@param",
"resource_group_name",
"[",
"String",
"]",
"The",
"name",
"of",
"the",
"resource",
"group",
".",
"@param",
"gallery_name",
"[",
"String",
"]",
"The",
"name",
"of",
"the",
"Shared",
"Image",
"Gallery",
".",
"The",
"allowed",
"characters",
"are",
"al... | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_compute/lib/2019-03-01/generated/azure_mgmt_compute/galleries.rb#L56-L72 | train | Creates or updates a gallery. | [
30522,
13366,
3443,
1035,
2030,
1035,
10651,
1035,
2004,
6038,
2278,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
3916,
1035,
2171,
1010,
3916,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
1001,
4604,
5227,
4872,
1027,
4088,
1035,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_web/lib/2018-02-01/generated/azure_mgmt_web/recommendations.rb | Azure::Web::Mgmt::V2018_02_01.Recommendations.disable_recommendation_for_site_with_http_info | def disable_recommendation_for_site_with_http_info(resource_group_name, site_name, name, custom_headers:nil)
disable_recommendation_for_site_async(resource_group_name, site_name, name, custom_headers:custom_headers).value!
end | ruby | def disable_recommendation_for_site_with_http_info(resource_group_name, site_name, name, custom_headers:nil)
disable_recommendation_for_site_async(resource_group_name, site_name, name, custom_headers:custom_headers).value!
end | [
"def",
"disable_recommendation_for_site_with_http_info",
"(",
"resource_group_name",
",",
"site_name",
",",
"name",
",",
"custom_headers",
":",
"nil",
")",
"disable_recommendation_for_site_async",
"(",
"resource_group_name",
",",
"site_name",
",",
"name",
",",
"custom_heade... | Disables the specific rule for a web site permanently.
Disables the specific rule for a web site permanently.
@param resource_group_name [String] Name of the resource group to which the
resource belongs.
@param site_name [String] Site name
@param name [String] Rule name
@param custom_headers [Hash{String => Str... | [
"Disables",
"the",
"specific",
"rule",
"for",
"a",
"web",
"site",
"permanently",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_web/lib/2018-02-01/generated/azure_mgmt_web/recommendations.rb#L891-L893 | train | Disables the recommendations for a site. | [
30522,
13366,
4487,
19150,
1035,
12832,
1035,
2005,
1035,
2609,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2609,
1035,
2171,
1010,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
4487,
19150,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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_with_http_info | def classify_image_with_http_info(project_id, published_name, image_data, application:nil, custom_headers:nil)
classify_image_async(project_id, published_name, image_data, application:application, custom_headers:custom_headers).value!
end | ruby | def classify_image_with_http_info(project_id, published_name, image_data, application:nil, custom_headers:nil)
classify_image_async(project_id, published_name, image_data, application:application, custom_headers:custom_headers).value!
end | [
"def",
"classify_image_with_http_info",
"(",
"project_id",
",",
"published_name",
",",
"image_data",
",",
"application",
":",
"nil",
",",
"custom_headers",
":",
"nil",
")",
"classify_image_async",
"(",
"project_id",
",",
"published_name",
",",
"image_data",
",",
"ap... | Classify an image 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_data Binary image data. Supported formats are JPEG, GIF, PNG,
and BMP. Supports images up to 4MB.
@param application [String] Optional. Specif... | [
"Classify",
"an",
"image",
"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#L266-L268 | train | Classifies the image. | [
30522,
13366,
26268,
1035,
3746,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
2622,
1035,
8909,
1010,
2405,
1035,
2171,
1010,
3746,
1035,
2951,
1010,
4646,
1024,
9152,
2140,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
26268,
1035,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
samvera/hyrax | app/presenters/hyrax/admin_set_options_presenter.rb | Hyrax.AdminSetOptionsPresenter.data_attributes | def data_attributes(admin_set)
# Get permission template associated with this AdminSet (if any)
permission_template = PermissionTemplate.find_by(source_id: admin_set.id)
# Only add data attributes if permission template exists
return {} unless permission_template
attributes_for(... | ruby | def data_attributes(admin_set)
# Get permission template associated with this AdminSet (if any)
permission_template = PermissionTemplate.find_by(source_id: admin_set.id)
# Only add data attributes if permission template exists
return {} unless permission_template
attributes_for(... | [
"def",
"data_attributes",
"(",
"admin_set",
")",
"# Get permission template associated with this AdminSet (if any)",
"permission_template",
"=",
"PermissionTemplate",
".",
"find_by",
"(",
"source_id",
":",
"admin_set",
".",
"id",
")",
"# Only add data attributes if permission tem... | Create a hash of HTML5 'data' attributes. These attributes are added to select_options and
later utilized by Javascript to limit new Work options based on AdminSet selected | [
"Create",
"a",
"hash",
"of",
"HTML5",
"data",
"attributes",
".",
"These",
"attributes",
"are",
"added",
"to",
"select_options",
"and",
"later",
"utilized",
"by",
"Javascript",
"to",
"limit",
"new",
"Work",
"options",
"based",
"on",
"AdminSet",
"selected"
] | e2b4f56e829a53b1f11296324736e9d5b8c9ee5f | https://github.com/samvera/hyrax/blob/e2b4f56e829a53b1f11296324736e9d5b8c9ee5f/app/presenters/hyrax/admin_set_options_presenter.rb#L20-L27 | train | Get the data attributes for this AdminSet | [
30522,
13366,
2951,
1035,
12332,
1006,
4748,
10020,
1035,
2275,
1007,
1001,
2131,
6656,
23561,
3378,
2007,
2023,
4748,
21266,
3388,
1006,
2065,
2151,
1007,
6656,
1035,
23561,
1027,
6656,
18532,
15725,
1012,
2424,
1035,
2011,
1006,
3120,
103... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
decidim/decidim | decidim-core/app/helpers/decidim/scopes_helper.rb | Decidim.ScopesHelper.scopes_picker_tag | def scopes_picker_tag(name, value, options = {})
root = try(:current_participatory_space)&.scope
field = options[:field] || name
scopes_picker_field_tag name, value, id: options[:id] do |scope|
{ url: decidim.scopes_picker_path(root: root, current: scope&.id, field: field),
text: sc... | ruby | def scopes_picker_tag(name, value, options = {})
root = try(:current_participatory_space)&.scope
field = options[:field] || name
scopes_picker_field_tag name, value, id: options[:id] do |scope|
{ url: decidim.scopes_picker_path(root: root, current: scope&.id, field: field),
text: sc... | [
"def",
"scopes_picker_tag",
"(",
"name",
",",
"value",
",",
"options",
"=",
"{",
"}",
")",
"root",
"=",
"try",
"(",
":current_participatory_space",
")",
"&.",
"scope",
"field",
"=",
"options",
"[",
":field",
"]",
"||",
"name",
"scopes_picker_field_tag",
"nam... | Renders a scopes picker field in a form, not linked to a specific model.
name - name for the input
value - value for the input
Returns nothing. | [
"Renders",
"a",
"scopes",
"picker",
"field",
"in",
"a",
"form",
"not",
"linked",
"to",
"a",
"specific",
"model",
".",
"name",
"-",
"name",
"for",
"the",
"input",
"value",
"-",
"value",
"for",
"the",
"input"
] | 6e2b14e559a63088669904e3c5c49a5180700cf7 | https://github.com/decidim/decidim/blob/6e2b14e559a63088669904e3c5c49a5180700cf7/decidim-core/app/helpers/decidim/scopes_helper.rb#L54-L62 | train | Returns a scope picker tag | [
30522,
13366,
9531,
2015,
1035,
4060,
2121,
1035,
6415,
1006,
2171,
1010,
3643,
1010,
7047,
1027,
1063,
1065,
1007,
7117,
1027,
3046,
1006,
1024,
2783,
1035,
2112,
28775,
4502,
7062,
1035,
2686,
1007,
1004,
1012,
9531,
2492,
1027,
7047,
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... |
fastlane/fastlane | fastlane/lib/fastlane/swift_runner_upgrader.rb | Fastlane.SwiftRunnerUpgrader.add_missing_groups_and_files! | def add_missing_groups_and_files!(dry_run: false)
missing_groups = self.find_missing_groups.to_set
unless missing_groups.length > 0
UI.verbose("No missing groups found, so we don't need to worry about adding new groups")
return false
end
# well, we know we have some changes to m... | ruby | def add_missing_groups_and_files!(dry_run: false)
missing_groups = self.find_missing_groups.to_set
unless missing_groups.length > 0
UI.verbose("No missing groups found, so we don't need to worry about adding new groups")
return false
end
# well, we know we have some changes to m... | [
"def",
"add_missing_groups_and_files!",
"(",
"dry_run",
":",
"false",
")",
"missing_groups",
"=",
"self",
".",
"find_missing_groups",
".",
"to_set",
"unless",
"missing_groups",
".",
"length",
">",
"0",
"UI",
".",
"verbose",
"(",
"\"No missing groups found, so we don't... | adds new groups, and the files inside those groups
Note: this does not add new files to existing groups, that is in add_new_files_to_groups! | [
"adds",
"new",
"groups",
"and",
"the",
"files",
"inside",
"those",
"groups",
"Note",
":",
"this",
"does",
"not",
"add",
"new",
"files",
"to",
"existing",
"groups",
"that",
"is",
"in",
"add_new_files_to_groups!"
] | 457c5d647c77f0e078dafa5129da616914e002c5 | https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/fastlane/lib/fastlane/swift_runner_upgrader.rb#L178-L204 | train | Add missing files to the target | [
30522,
13366,
5587,
1035,
4394,
1035,
2967,
1035,
1998,
1035,
6764,
999,
1006,
4318,
1035,
2448,
1024,
6270,
1007,
4394,
1035,
2967,
1027,
2969,
1012,
2424,
1035,
4394,
1035,
2967,
1012,
2000,
1035,
2275,
4983,
4394,
1035,
2967,
1012,
309... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_compute/lib/2018-04-01/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb | Azure::Compute::Mgmt::V2018_04_01.VirtualMachineScaleSets.get_osupgrade_history_next | def get_osupgrade_history_next(next_page_link, custom_headers:nil)
response = get_osupgrade_history_next_async(next_page_link, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def get_osupgrade_history_next(next_page_link, custom_headers:nil)
response = get_osupgrade_history_next_async(next_page_link, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"get_osupgrade_history_next",
"(",
"next_page_link",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"get_osupgrade_history_next_async",
"(",
"next_page_link",
",",
"custom_headers",
":custom_headers",
")",
".",
"value!",
"response",
".",
"body",
"unless... | Gets list of OS upgrades on a VM scale set instance.
@param next_page_link [String] The NextLink from the previous successful call
to List operation.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request.
@return [VirtualMachineScaleSetListOSUpgradeHistory... | [
"Gets",
"list",
"of",
"OS",
"upgrades",
"on",
"a",
"VM",
"scale",
"set",
"instance",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_compute/lib/2018-04-01/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb#L2799-L2802 | train | Gets the current OS upgrade history. | [
30522,
13366,
2131,
1035,
9808,
6279,
24170,
1035,
2381,
1035,
2279,
1006,
2279,
1035,
3931,
1035,
4957,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
2131,
1035,
9808,
6279,
24170,
1035,
2381,
1035,
2279,
1035,
2004,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_logic/lib/2016-06-01/generated/azure_mgmt_logic/workflows.rb | Azure::Logic::Mgmt::V2016_06_01.Workflows.validate_workflow_with_http_info | def validate_workflow_with_http_info(resource_group_name, workflow_name, validate, custom_headers:nil)
validate_workflow_async(resource_group_name, workflow_name, validate, custom_headers:custom_headers).value!
end | ruby | def validate_workflow_with_http_info(resource_group_name, workflow_name, validate, custom_headers:nil)
validate_workflow_async(resource_group_name, workflow_name, validate, custom_headers:custom_headers).value!
end | [
"def",
"validate_workflow_with_http_info",
"(",
"resource_group_name",
",",
"workflow_name",
",",
"validate",
",",
"custom_headers",
":",
"nil",
")",
"validate_workflow_async",
"(",
"resource_group_name",
",",
"workflow_name",
",",
"validate",
",",
"custom_headers",
":cus... | Validates the workflow.
@param resource_group_name [String] The resource group name.
@param workflow_name [String] The workflow name.
@param validate [Workflow] The workflow.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request.
@return [MsRestAzure::Azu... | [
"Validates",
"the",
"workflow",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_logic/lib/2016-06-01/generated/azure_mgmt_logic/workflows.rb#L1259-L1261 | train | Validates the specified workflow. | [
30522,
13366,
9398,
3686,
1035,
2147,
12314,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2147,
12314,
1035,
2171,
1010,
9398,
3686,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
9398,
3686,
30524,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | data/azure_cognitiveservices_luisauthoring/lib/2.0/generated/azure_cognitiveservices_luisauthoring/features.rb | Azure::CognitiveServices::LuisAuthoring::V2_0.Features.add_phrase_list_with_http_info | def add_phrase_list_with_http_info(app_id, version_id, phraselist_create_object, custom_headers:nil)
add_phrase_list_async(app_id, version_id, phraselist_create_object, custom_headers:custom_headers).value!
end | ruby | def add_phrase_list_with_http_info(app_id, version_id, phraselist_create_object, custom_headers:nil)
add_phrase_list_async(app_id, version_id, phraselist_create_object, custom_headers:custom_headers).value!
end | [
"def",
"add_phrase_list_with_http_info",
"(",
"app_id",
",",
"version_id",
",",
"phraselist_create_object",
",",
"custom_headers",
":",
"nil",
")",
"add_phrase_list_async",
"(",
"app_id",
",",
"version_id",
",",
"phraselist_create_object",
",",
"custom_headers",
":custom_... | Creates a new phraselist feature in a version of the application.
@param app_id The application ID.
@param version_id [String] The version ID.
@param phraselist_create_object [PhraselistCreateObject] A Phraselist object
containing Name, comma-separated Phrases and the isExchangeable boolean.
Default value for isE... | [
"Creates",
"a",
"new",
"phraselist",
"feature",
"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/features.rb#L178-L180 | train | Adds a phrase list to the application version. | [
30522,
13366,
5587,
1035,
7655,
1035,
2862,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
10439,
1035,
8909,
1010,
2544,
1035,
8909,
1010,
7655,
9863,
1035,
3443,
1035,
4874,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
5587,
1035,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
hashicorp/vagrant | lib/vagrant/machine_index.rb | Vagrant.MachineIndex.find_by_prefix | def find_by_prefix(prefix)
@machines.each do |uuid, data|
return data.merge("id" => uuid) if uuid.start_with?(prefix)
end
nil
end | ruby | def find_by_prefix(prefix)
@machines.each do |uuid, data|
return data.merge("id" => uuid) if uuid.start_with?(prefix)
end
nil
end | [
"def",
"find_by_prefix",
"(",
"prefix",
")",
"@machines",
".",
"each",
"do",
"|",
"uuid",
",",
"data",
"|",
"return",
"data",
".",
"merge",
"(",
"\"id\"",
"=>",
"uuid",
")",
"if",
"uuid",
".",
"start_with?",
"(",
"prefix",
")",
"end",
"nil",
"end"
] | Finds a machine where the UUID is prefixed by the given string.
@return [Hash] | [
"Finds",
"a",
"machine",
"where",
"the",
"UUID",
"is",
"prefixed",
"by",
"the",
"given",
"string",
"."
] | c22a145c59790c098f95d50141d9afb48e1ef55f | https://github.com/hashicorp/vagrant/blob/c22a145c59790c098f95d50141d9afb48e1ef55f/lib/vagrant/machine_index.rb#L239-L245 | train | Find the first match for a given prefix | [
30522,
13366,
2424,
1035,
2011,
1035,
17576,
1006,
17576,
1007,
1030,
6681,
1012,
2169,
2079,
1064,
1057,
21272,
1010,
2951,
1064,
2709,
2951,
1012,
13590,
1006,
1000,
8909,
1000,
1027,
1028,
1057,
21272,
1007,
2065,
1057,
21272,
1012,
2707... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
aws/aws-sdk-ruby | gems/aws-sdk-ec2/lib/aws-sdk-ec2/vpc.rb | Aws::EC2.Vpc.disable_classic_link | def disable_classic_link(options = {})
options = options.merge(vpc_id: @id)
resp = @client.disable_vpc_classic_link(options)
resp.data
end | ruby | def disable_classic_link(options = {})
options = options.merge(vpc_id: @id)
resp = @client.disable_vpc_classic_link(options)
resp.data
end | [
"def",
"disable_classic_link",
"(",
"options",
"=",
"{",
"}",
")",
"options",
"=",
"options",
".",
"merge",
"(",
"vpc_id",
":",
"@id",
")",
"resp",
"=",
"@client",
".",
"disable_vpc_classic_link",
"(",
"options",
")",
"resp",
".",
"data",
"end"
] | @example Request syntax with placeholder values
vpc.disable_classic_link({
dry_run: false,
})
@param [Hash] options ({})
@option options [Boolean] :dry_run
Checks whether you have the required permissions for the action,
without actually making the request, and provides an error response.
If you ... | [
"@example",
"Request",
"syntax",
"with",
"placeholder",
"values"
] | e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d | https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-ec2/lib/aws-sdk-ec2/vpc.rb#L593-L597 | train | Disable a particular VPC classified link | [
30522,
13366,
4487,
19150,
1035,
4438,
1035,
4957,
1006,
7047,
1027,
1063,
1065,
1007,
7047,
1027,
7047,
1012,
13590,
1006,
21210,
2278,
1035,
8909,
1024,
1030,
8909,
1007,
24501,
2361,
1027,
1030,
7396,
1012,
4487,
19150,
1035,
21210,
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_customer_insights/lib/2017-01-01/generated/azure_mgmt_customer_insights/views.rb | Azure::CustomerInsights::Mgmt::V2017_01_01.Views.list_by_hub_as_lazy | def list_by_hub_as_lazy(resource_group_name, hub_name, user_id, custom_headers:nil)
response = list_by_hub_async(resource_group_name, hub_name, user_id, custom_headers:custom_headers).value!
unless response.nil?
page = response.body
page.next_method = Proc.new do |next_page_link|
l... | ruby | def list_by_hub_as_lazy(resource_group_name, hub_name, user_id, custom_headers:nil)
response = list_by_hub_async(resource_group_name, hub_name, user_id, custom_headers:custom_headers).value!
unless response.nil?
page = response.body
page.next_method = Proc.new do |next_page_link|
l... | [
"def",
"list_by_hub_as_lazy",
"(",
"resource_group_name",
",",
"hub_name",
",",
"user_id",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"list_by_hub_async",
"(",
"resource_group_name",
",",
"hub_name",
",",
"user_id",
",",
"custom_headers",
":custom_header... | Gets all available views for given user in the specified hub.
@param resource_group_name [String] The name of the resource group.
@param hub_name [String] The name of the hub.
@param user_id [String] The user ID. Use * to retreive hub level views.
@param custom_headers [Hash{String => String}] A hash of custom hea... | [
"Gets",
"all",
"available",
"views",
"for",
"given",
"user",
"in",
"the",
"specified",
"hub",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_customer_insights/lib/2017-01-01/generated/azure_mgmt_customer_insights/views.rb#L523-L532 | train | Gets the list of all the user s terms. | [
30522,
13366,
2862,
1035,
2011,
1035,
9594,
1035,
2004,
1035,
13971,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
9594,
1035,
2171,
1010,
5310,
1035,
8909,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
2862,
1035,
2011,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
sds/haml-lint | lib/haml_lint/tree/node.rb | HamlLint::Tree.Node.line_numbers | def line_numbers
return (line..line) unless @value && text
end_line = line + lines.count
end_line = nontrivial_end_line if line == end_line
(line..end_line)
end | ruby | def line_numbers
return (line..line) unless @value && text
end_line = line + lines.count
end_line = nontrivial_end_line if line == end_line
(line..end_line)
end | [
"def",
"line_numbers",
"return",
"(",
"line",
"..",
"line",
")",
"unless",
"@value",
"&&",
"text",
"end_line",
"=",
"line",
"+",
"lines",
".",
"count",
"end_line",
"=",
"nontrivial_end_line",
"if",
"line",
"==",
"end_line",
"(",
"line",
"..",
"end_line",
"... | The line numbers that are contained within the node.
@api public
@return [Range] | [
"The",
"line",
"numbers",
"that",
"are",
"contained",
"within",
"the",
"node",
"."
] | 024c773667e54cf88db938c2b368977005d70ee8 | https://github.com/sds/haml-lint/blob/024c773667e54cf88db938c2b368977005d70ee8/lib/haml_lint/tree/node.rb#L104-L111 | train | Returns the line numbers of the next line in the document. | [
30522,
13366,
2240,
1035,
3616,
2709,
1006,
2240,
1012,
1012,
2240,
1007,
4983,
1030,
3643,
1004,
1004,
3793,
2203,
1035,
2240,
1027,
2240,
1009,
3210,
1012,
4175,
2203,
1035,
2240,
1027,
2512,
18886,
18660,
1035,
2203,
1035,
2240,
2065,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
oauth-xx/oauth2 | lib/oauth2/access_token.rb | OAuth2.AccessToken.request | def request(verb, path, opts = {}, &block)
configure_authentication!(opts)
@client.request(verb, path, opts, &block)
end | ruby | def request(verb, path, opts = {}, &block)
configure_authentication!(opts)
@client.request(verb, path, opts, &block)
end | [
"def",
"request",
"(",
"verb",
",",
"path",
",",
"opts",
"=",
"{",
"}",
",",
"&",
"block",
")",
"configure_authentication!",
"(",
"opts",
")",
"@client",
".",
"request",
"(",
"verb",
",",
"path",
",",
"opts",
",",
"block",
")",
"end"
] | Make a request with the Access Token
@param [Symbol] verb the HTTP request method
@param [String] path the HTTP URL path of the request
@param [Hash] opts the options to make the request with
@see Client#request | [
"Make",
"a",
"request",
"with",
"the",
"Access",
"Token"
] | f08ff9da169136ab133aa2faab0d74a4407deffb | https://github.com/oauth-xx/oauth2/blob/f08ff9da169136ab133aa2faab0d74a4407deffb/lib/oauth2/access_token.rb#L111-L114 | train | Perform a request to the server. | [
30522,
13366,
5227,
1006,
12034,
1010,
4130,
1010,
23569,
2015,
1027,
1063,
1065,
1010,
1004,
3796,
1007,
9530,
8873,
27390,
2063,
1035,
27280,
999,
1006,
23569,
2015,
1007,
1030,
7396,
1012,
5227,
1006,
12034,
1010,
4130,
1010,
23569,
2015... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
aws/aws-sdk-ruby | build_tools/aws-sdk-code-generator/lib/aws-sdk-code-generator/code_builder.rb | AwsSdkCodeGenerator.CodeBuilder.source | def source
code = @gem_dependencies.map { |gem_name, _| "require '#{gem_name}'" }
source_files.each.with_index do |(file_name, src_code), n|
# skip the service module and customizations
next if file_name.include? '/customizations.rb'
next unless file_name.include? '/'
# skip ... | ruby | def source
code = @gem_dependencies.map { |gem_name, _| "require '#{gem_name}'" }
source_files.each.with_index do |(file_name, src_code), n|
# skip the service module and customizations
next if file_name.include? '/customizations.rb'
next unless file_name.include? '/'
# skip ... | [
"def",
"source",
"code",
"=",
"@gem_dependencies",
".",
"map",
"{",
"|",
"gem_name",
",",
"_",
"|",
"\"require '#{gem_name}'\"",
"}",
"source_files",
".",
"each",
".",
"with_index",
"do",
"|",
"(",
"file_name",
",",
"src_code",
")",
",",
"n",
"|",
"# skip ... | @option options [required, Service] :service
@option options [required, String] :aws_sdk_core_lib_path
Path to the lib directory for the source code of the
AWS SDK for Ruby. This is needed so that documentation
can be generated for default plugins and their options.
@option options [Hash<String, Array<Hash... | [
"@option",
"options",
"[",
"required",
"Service",
"]",
":",
"service"
] | e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d | https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/build_tools/aws-sdk-code-generator/lib/aws-sdk-code-generator/code_builder.rb#L37-L48 | train | Returns the source code for the gem. | [
30522,
13366,
3120,
3642,
1027,
1030,
17070,
1035,
12530,
15266,
1012,
4949,
1063,
1064,
17070,
1035,
2171,
1010,
1035,
1064,
1000,
5478,
1005,
1001,
1063,
17070,
1035,
2171,
1065,
1005,
1000,
1065,
3120,
1035,
6764,
1012,
2169,
1012,
2007,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/2017-12-01/generated/azure_mgmt_compute/virtual_machine_scale_set_vms.rb | Azure::Compute::Mgmt::V2017_12_01.VirtualMachineScaleSetVMs.restart | def restart(resource_group_name, vm_scale_set_name, instance_id, custom_headers:nil)
response = restart_async(resource_group_name, vm_scale_set_name, instance_id, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def restart(resource_group_name, vm_scale_set_name, instance_id, custom_headers:nil)
response = restart_async(resource_group_name, vm_scale_set_name, instance_id, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"restart",
"(",
"resource_group_name",
",",
"vm_scale_set_name",
",",
"instance_id",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"restart_async",
"(",
"resource_group_name",
",",
"vm_scale_set_name",
",",
"instance_id",
",",
"custom_headers",
":cus... | Restarts a virtual machine in a VM scale set.
@param resource_group_name [String] The name of the resource group.
@param vm_scale_set_name [String] The name of the VM scale set.
@param instance_id [String] The instance ID of the virtual machine.
@param custom_headers [Hash{String => String}] A hash of custom heade... | [
"Restarts",
"a",
"virtual",
"machine",
"in",
"a",
"VM",
"scale",
"set",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_compute/lib/2017-12-01/generated/azure_mgmt_compute/virtual_machine_scale_set_vms.rb#L605-L608 | train | Restarts a virtual machine in a VM scale set. | [
30522,
13366,
23818,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
1058,
2213,
1035,
4094,
1035,
2275,
1035,
2171,
1010,
6013,
1035,
8909,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
23818,
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... |
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 | def list_pattern_any_entity_roles(app_id, version_id, entity_id, custom_headers:nil)
response = list_pattern_any_entity_roles_async(app_id, version_id, entity_id, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def list_pattern_any_entity_roles(app_id, version_id, entity_id, custom_headers:nil)
response = list_pattern_any_entity_roles_async(app_id, version_id, entity_id, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"list_pattern_any_entity_roles",
"(",
"app_id",
",",
"version_id",
",",
"entity_id",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"list_pattern_any_entity_roles_async",
"(",
"app_id",
",",
"version_id",
",",
"entity_id",
",",
"custom_headers",
":cus... | 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 [Array] operation... | [
"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#L7265-L7268 | train | Gets the roles of any entity in a version of the application. | [
30522,
13366,
2862,
1035,
5418,
1035,
2151,
1035,
9178,
1035,
4395,
1006,
10439,
1035,
8909,
1010,
2544,
1035,
8909,
1010,
9178,
1035,
8909,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
2862,
1035,
5418,
1035,
2151,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/2016-06-27-preview/generated/azure_mgmt_container_registry/registries.rb | Azure::ContainerRegistry::Mgmt::V2016_06_27_preview.Registries.update_with_http_info | def update_with_http_info(resource_group_name, registry_name, registry_update_parameters, custom_headers:nil)
update_async(resource_group_name, registry_name, registry_update_parameters, custom_headers:custom_headers).value!
end | ruby | def update_with_http_info(resource_group_name, registry_name, registry_update_parameters, custom_headers:nil)
update_async(resource_group_name, registry_name, registry_update_parameters, custom_headers:custom_headers).value!
end | [
"def",
"update_with_http_info",
"(",
"resource_group_name",
",",
"registry_name",
",",
"registry_update_parameters",
",",
"custom_headers",
":",
"nil",
")",
"update_async",
"(",
"resource_group_name",
",",
"registry_name",
",",
"registry_update_parameters",
",",
"custom_hea... | Updates a container registry with the specified parameters.
@param resource_group_name [String] The name of the resource group to which
the container registry belongs.
@param registry_name [String] The name of the container registry.
@param registry_update_parameters [RegistryUpdateParameters] The parameters
for ... | [
"Updates",
"a",
"container",
"registry",
"with",
"the",
"specified",
"parameters",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_container_registry/lib/2016-06-27-preview/generated/azure_mgmt_container_registry/registries.rb#L447-L449 | train | Updates a container registry. | [
30522,
13366,
10651,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
15584,
1035,
2171,
1010,
15584,
1035,
10651,
1035,
11709,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
10651,
1035,
2004,
6038,
22... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
piotrmurach/github | lib/github_api/connection.rb | Github.Connection.stack | def stack(options = {})
@stack ||= begin
builder_class = if defined?(Faraday::RackBuilder)
Faraday::RackBuilder
else
Faraday::Builder
end
builder_class.new(&Github.default_middleware(options))
... | ruby | def stack(options = {})
@stack ||= begin
builder_class = if defined?(Faraday::RackBuilder)
Faraday::RackBuilder
else
Faraday::Builder
end
builder_class.new(&Github.default_middleware(options))
... | [
"def",
"stack",
"(",
"options",
"=",
"{",
"}",
")",
"@stack",
"||=",
"begin",
"builder_class",
"=",
"if",
"defined?",
"(",
"Faraday",
"::",
"RackBuilder",
")",
"Faraday",
"::",
"RackBuilder",
"else",
"Faraday",
"::",
"Builder",
"end",
"builder_class",
".",
... | Exposes middleware builder to facilitate custom stacks and easy
addition of new extensions such as cache adapter.
@api public | [
"Exposes",
"middleware",
"builder",
"to",
"facilitate",
"custom",
"stacks",
"and",
"easy",
"addition",
"of",
"new",
"extensions",
"such",
"as",
"cache",
"adapter",
"."
] | 8702452c66bea33c9388550aed9e9974f76aaef1 | https://github.com/piotrmurach/github/blob/8702452c66bea33c9388550aed9e9974f76aaef1/lib/github_api/connection.rb#L55-L64 | train | Returns the stack for the current request | [
30522,
13366,
9991,
1006,
7047,
1027,
1063,
1065,
1007,
1030,
9991,
1064,
1064,
1027,
4088,
12508,
1035,
2465,
1027,
2065,
4225,
1029,
1006,
2521,
28039,
1024,
1024,
14513,
8569,
23891,
2099,
1007,
2521,
28039,
1024,
1024,
14513,
8569,
2389... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | data/azure_service_fabric/lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb | Azure::ServiceFabric::V6_2_0_9.ServiceFabricClientAPIs.report_replica_health_with_http_info | def report_replica_health_with_http_info(partition_id, replica_id, replica_health_report_service_kind, health_information, immediate:false, timeout:60, custom_headers:nil)
report_replica_health_async(partition_id, replica_id, replica_health_report_service_kind, health_information, immediate:immediate, timeout:tim... | ruby | def report_replica_health_with_http_info(partition_id, replica_id, replica_health_report_service_kind, health_information, immediate:false, timeout:60, custom_headers:nil)
report_replica_health_async(partition_id, replica_id, replica_health_report_service_kind, health_information, immediate:immediate, timeout:tim... | [
"def",
"report_replica_health_with_http_info",
"(",
"partition_id",
",",
"replica_id",
",",
"replica_health_report_service_kind",
",",
"health_information",
",",
"immediate",
":",
"false",
",",
"timeout",
":",
"60",
",",
"custom_headers",
":",
"nil",
")",
"report_replic... | Sends a health report on the Service Fabric replica.
Reports health state of the specified Service Fabric replica. The report must
contain the information about the source of the health report and property on
which it is reported.
The report is sent to a Service Fabric gateway Replica, which forwards to the
healt... | [
"Sends",
"a",
"health",
"report",
"on",
"the",
"Service",
"Fabric",
"replica",
"."
] | 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#L15183-L15185 | train | Report health of a replica. | [
30522,
13366,
3189,
1035,
15059,
1035,
2740,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
13571,
1035,
8909,
1010,
15059,
1035,
8909,
1010,
15059,
1035,
2740,
1035,
3189,
1035,
2326,
1035,
2785,
1010,
2740,
1035,
2592,
1010,
6234,
30524,
8909... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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.basic_setup | def basic_setup
@status = attr_val('./*/cda:statusCode/@code')
@id_xpath = './*/cda:id/@extension'
@id = "#{attr_val('./*/cda:id/@extension')}_#{attr_val('./*/cda:id/@root')}"
@comments = @entry.xpath("./#{CRITERIA_GLOB}/cda:text/cda:xml/cda:qdmUserComments/cda:item/text()",
... | ruby | def basic_setup
@status = attr_val('./*/cda:statusCode/@code')
@id_xpath = './*/cda:id/@extension'
@id = "#{attr_val('./*/cda:id/@extension')}_#{attr_val('./*/cda:id/@root')}"
@comments = @entry.xpath("./#{CRITERIA_GLOB}/cda:text/cda:xml/cda:qdmUserComments/cda:item/text()",
... | [
"def",
"basic_setup",
"@status",
"=",
"attr_val",
"(",
"'./*/cda:statusCode/@code'",
")",
"@id_xpath",
"=",
"'./*/cda:id/@extension'",
"@id",
"=",
"\"#{attr_val('./*/cda:id/@extension')}_#{attr_val('./*/cda:id/@root')}\"",
"@comments",
"=",
"@entry",
".",
"xpath",
"(",
"\"./#... | Handles elments that can be extracted directly from the xml. Utilises the "BaseExtractions" class. | [
"Handles",
"elments",
"that",
"can",
"be",
"extracted",
"directly",
"from",
"the",
"xml",
".",
"Utilises",
"the",
"BaseExtractions",
"class",
"."
] | 252d4f0927c513eacde6b9ea41b76faa1423c34b | https://github.com/projectcypress/health-data-standards/blob/252d4f0927c513eacde6b9ea41b76faa1423c34b/lib/hqmf-parser/2.0/data_criteria.rb#L184-L201 | train | This method is called by the basic_setup method. | [
30522,
13366,
3937,
1035,
16437,
1030,
3570,
1027,
2012,
16344,
1035,
11748,
1006,
1005,
1012,
1013,
1008,
1013,
3729,
2050,
1024,
3570,
16044,
1013,
1030,
3642,
1005,
1007,
1030,
8909,
1035,
26726,
8988,
1027,
1005,
1012,
1013,
1008,
1013,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_media_services/lib/2018-07-01/generated/azure_mgmt_media_services/streaming_endpoints.rb | Azure::MediaServices::Mgmt::V2018_07_01.StreamingEndpoints.begin_update | def begin_update(resource_group_name, account_name, streaming_endpoint_name, parameters, custom_headers:nil)
response = begin_update_async(resource_group_name, account_name, streaming_endpoint_name, parameters, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def begin_update(resource_group_name, account_name, streaming_endpoint_name, parameters, custom_headers:nil)
response = begin_update_async(resource_group_name, account_name, streaming_endpoint_name, parameters, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"begin_update",
"(",
"resource_group_name",
",",
"account_name",
",",
"streaming_endpoint_name",
",",
"parameters",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"begin_update_async",
"(",
"resource_group_name",
",",
"account_name",
",",
"streaming_end... | Update StreamingEndpoint
Updates a existing StreamingEndpoint.
@param resource_group_name [String] The name of the resource group within the
Azure subscription.
@param account_name [String] The Media Services account name.
@param streaming_endpoint_name [String] The name of the StreamingEndpoint.
@param paramet... | [
"Update",
"StreamingEndpoint"
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_media_services/lib/2018-07-01/generated/azure_mgmt_media_services/streaming_endpoints.rb#L675-L678 | train | Updates an existing streaming endpoint. | [
30522,
13366,
4088,
1035,
10651,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
4070,
1035,
2171,
1010,
11058,
1035,
2203,
8400,
1035,
2171,
1010,
11709,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
4088,
1035,
10651,
1035,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
puppetlabs/puppet | lib/puppet/util.rb | Puppet.Util.benchmark | def benchmark(*args)
msg = args.pop
level = args.pop
object = if args.empty?
if respond_to?(level)
self
else
Puppet
end
else
args.pop
end
#TRANSLATORS 'benchmark' is a method name and... | ruby | def benchmark(*args)
msg = args.pop
level = args.pop
object = if args.empty?
if respond_to?(level)
self
else
Puppet
end
else
args.pop
end
#TRANSLATORS 'benchmark' is a method name and... | [
"def",
"benchmark",
"(",
"*",
"args",
")",
"msg",
"=",
"args",
".",
"pop",
"level",
"=",
"args",
".",
"pop",
"object",
"=",
"if",
"args",
".",
"empty?",
"if",
"respond_to?",
"(",
"level",
")",
"self",
"else",
"Puppet",
"end",
"else",
"args",
".",
"... | execute a block of work and based on the logging level provided, log the provided message with the seconds taken
The message 'msg' should include string ' in %{seconds} seconds' as part of the message and any content should escape
any percent signs '%' so that they are not interpreted as formatting commands
esca... | [
"execute",
"a",
"block",
"of",
"work",
"and",
"based",
"on",
"the",
"logging",
"level",
"provided",
"log",
"the",
"provided",
"message",
"with",
"the",
"seconds",
"taken",
"The",
"message",
"msg",
"should",
"include",
"string",
"in",
"%",
"{",
"seconds",
"... | 4baeed97cbb7571ddc6635f0a24debe2e8b22cd3 | https://github.com/puppetlabs/puppet/blob/4baeed97cbb7571ddc6635f0a24debe2e8b22cd3/lib/puppet/util.rb#L208-L238 | train | Benchmarks the given object. | [
30522,
13366,
6847,
10665,
1006,
1008,
12098,
5620,
1007,
5796,
2290,
1027,
12098,
5620,
1012,
3769,
2504,
1027,
12098,
5620,
1012,
3769,
4874,
1027,
2065,
12098,
5620,
1012,
4064,
1029,
2065,
6869,
1035,
2000,
1029,
1006,
2504,
1007,
2969,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_recovery_services_site_recovery/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/replication_recovery_plans.rb | Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10.ReplicationRecoveryPlans.reprotect | def reprotect(recovery_plan_name, custom_headers:nil)
response = reprotect_async(recovery_plan_name, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def reprotect(recovery_plan_name, custom_headers:nil)
response = reprotect_async(recovery_plan_name, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"reprotect",
"(",
"recovery_plan_name",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"reprotect_async",
"(",
"recovery_plan_name",
",",
"custom_headers",
":custom_headers",
")",
".",
"value!",
"response",
".",
"body",
"unless",
"response",
".",
... | Execute reprotect of the recovery plan.
The operation to reprotect(reverse replicate) a recovery plan.
@param recovery_plan_name [String] Recovery plan name.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request.
@return [RecoveryPlan] operation results. | [
"Execute",
"reprotect",
"of",
"the",
"recovery",
"plan",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_recovery_services_site_recovery/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/replication_recovery_plans.rb#L435-L438 | train | Reprotect the specified recovery plan. | [
30522,
13366,
16360,
21709,
22471,
1006,
7233,
1035,
2933,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
16360,
21709,
22471,
1035,
2004,
6038,
2278,
1006,
7233,
1035,
2933,
1035,
2171,
1010,
30524,
3643,
99... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/chef | lib/chef/shell/model_wrapper.rb | Shell.ModelWrapper.transform | def transform(what_to_transform)
if what_to_transform == :all
objects_to_transform = list_objects
else
objects_to_transform = search(what_to_transform)
end
objects_to_transform.each do |obj|
if result = yield(obj)
obj.save
end
end
end | ruby | def transform(what_to_transform)
if what_to_transform == :all
objects_to_transform = list_objects
else
objects_to_transform = search(what_to_transform)
end
objects_to_transform.each do |obj|
if result = yield(obj)
obj.save
end
end
end | [
"def",
"transform",
"(",
"what_to_transform",
")",
"if",
"what_to_transform",
"==",
":all",
"objects_to_transform",
"=",
"list_objects",
"else",
"objects_to_transform",
"=",
"search",
"(",
"what_to_transform",
")",
"end",
"objects_to_transform",
".",
"each",
"do",
"|"... | FIXME: yard with @yield | [
"FIXME",
":",
"yard",
"with"
] | 61f69e18e69e0dca6e8cffdcd7451181d874cdb3 | https://github.com/chef/chef/blob/61f69e18e69e0dca6e8cffdcd7451181d874cdb3/lib/chef/shell/model_wrapper.rb#L63-L74 | train | Transform the object to the desired type. | [
30522,
13366,
10938,
1006,
2054,
1035,
2000,
1035,
10938,
1007,
2065,
2054,
1035,
2000,
1035,
10938,
1027,
1027,
1024,
2035,
5200,
1035,
2000,
1035,
10938,
1027,
2862,
1035,
5200,
2842,
5200,
1035,
2000,
1035,
10938,
1027,
3945,
1006,
2054,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
sds/haml-lint | lib/haml_lint/utils.rb | HamlLint.Utils.count_consecutive | def count_consecutive(items, offset = 0)
count = 1
count += 1 while (offset + count < items.count) && yield(items[offset + count])
count
end | ruby | def count_consecutive(items, offset = 0)
count = 1
count += 1 while (offset + count < items.count) && yield(items[offset + count])
count
end | [
"def",
"count_consecutive",
"(",
"items",
",",
"offset",
"=",
"0",
")",
"count",
"=",
"1",
"count",
"+=",
"1",
"while",
"(",
"offset",
"+",
"count",
"<",
"items",
".",
"count",
")",
"&&",
"yield",
"(",
"items",
"[",
"offset",
"+",
"count",
"]",
")"... | Count the number of consecutive items satisfying the given {Proc}.
@param items [Array]
@param offset [Fixnum] index to start searching from
@yield [item] Passes item to the provided block.
@yieldparam item [Object] Item to evaluate as matching criteria for
inclusion
@yieldreturn [Boolean] whether to include t... | [
"Count",
"the",
"number",
"of",
"consecutive",
"items",
"satisfying",
"the",
"given",
"{",
"Proc",
"}",
"."
] | 024c773667e54cf88db938c2b368977005d70ee8 | https://github.com/sds/haml-lint/blob/024c773667e54cf88db938c2b368977005d70ee8/lib/haml_lint/utils.rb#L133-L137 | train | Count the number of consecutive items in the collection. | [
30522,
13366,
4175,
1035,
5486,
1006,
5167,
1010,
16396,
1027,
1014,
1007,
4175,
1027,
1015,
4175,
1009,
1027,
1015,
2096,
1006,
16396,
1009,
4175,
1026,
5167,
1012,
4175,
1007,
1004,
1004,
10750,
1006,
5167,
1031,
16396,
1009,
4175,
1033,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | data/azure_key_vault/lib/2016-10-01/generated/azure_key_vault/key_vault_client.rb | Azure::KeyVault::V2016_10_01.KeyVaultClient.get_deleted_secrets_as_lazy | def get_deleted_secrets_as_lazy(vault_base_url, maxresults:nil, custom_headers:nil)
first_page = get_deleted_secrets_as_lazy_as_lazy(vault_base_url, maxresults:maxresults, custom_headers:custom_headers)
first_page.get_all_items
end | ruby | def get_deleted_secrets_as_lazy(vault_base_url, maxresults:nil, custom_headers:nil)
first_page = get_deleted_secrets_as_lazy_as_lazy(vault_base_url, maxresults:maxresults, custom_headers:custom_headers)
first_page.get_all_items
end | [
"def",
"get_deleted_secrets_as_lazy",
"(",
"vault_base_url",
",",
"maxresults",
":",
"nil",
",",
"custom_headers",
":",
"nil",
")",
"first_page",
"=",
"get_deleted_secrets_as_lazy_as_lazy",
"(",
"vault_base_url",
",",
"maxresults",
":",
"maxresults",
",",
"custom_header... | Lists deleted secrets for the specified vault.
The Get Deleted Secrets operation returns the secrets that have been deleted
for a vault enabled for soft-delete. This operation requires the secrets/list
permission.
@param vault_base_url [String] The vault name, for example
https://myvault.vault.azure.net.
@param... | [
"Lists",
"deleted",
"secrets",
"for",
"the",
"specified",
"vault",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_key_vault/lib/2016-10-01/generated/azure_key_vault/key_vault_client.rb#L10017-L10020 | train | Gets the deleted secrets. | [
30522,
13366,
2131,
1035,
17159,
1035,
7800,
1035,
2004,
1035,
13971,
1006,
11632,
1035,
2918,
1035,
24471,
2140,
1010,
4098,
6072,
11314,
2015,
1024,
9152,
2140,
1010,
7661,
1035,
30524,
2140,
1007,
2034,
1035,
3931,
1027,
2131,
1035,
1715... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
stevegraham/slanger | lib/slanger/handler.rb | Slanger.Handler.onmessage | def onmessage(msg)
msg = Oj.strict_load(msg)
msg['data'] = Oj.strict_load(msg['data']) if msg['data'].is_a? String
event = msg['event'].gsub(/\Apusher:/, 'pusher_')
if event =~ /\Aclient-/
msg['socket_id'] = connection.socket_id
Channel.send_client_message msg
elsif resp... | ruby | def onmessage(msg)
msg = Oj.strict_load(msg)
msg['data'] = Oj.strict_load(msg['data']) if msg['data'].is_a? String
event = msg['event'].gsub(/\Apusher:/, 'pusher_')
if event =~ /\Aclient-/
msg['socket_id'] = connection.socket_id
Channel.send_client_message msg
elsif resp... | [
"def",
"onmessage",
"(",
"msg",
")",
"msg",
"=",
"Oj",
".",
"strict_load",
"(",
"msg",
")",
"msg",
"[",
"'data'",
"]",
"=",
"Oj",
".",
"strict_load",
"(",
"msg",
"[",
"'data'",
"]",
")",
"if",
"msg",
"[",
"'data'",
"]",
".",
"is_a?",
"String",
"e... | Dispatches message handling to method with same name as
the event name | [
"Dispatches",
"message",
"handling",
"to",
"method",
"with",
"same",
"name",
"as",
"the",
"event",
"name"
] | f26f80c675dc4d853bce401743779a6959981af1 | https://github.com/stevegraham/slanger/blob/f26f80c675dc4d853bce401743779a6959981af1/lib/slanger/handler.rb#L27-L45 | train | Send a message to the server | [
30522,
13366,
2006,
7834,
3736,
3351,
1006,
5796,
2290,
1007,
5796,
2290,
1027,
1051,
3501,
1012,
9384,
1035,
7170,
1006,
5796,
2290,
1007,
5796,
2290,
1031,
1005,
2951,
1005,
1033,
1027,
1051,
3501,
1012,
9384,
1035,
7170,
1006,
5796,
22... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
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.get_at_resource | def get_at_resource(resource_id, remediation_name, custom_headers:nil)
response = get_at_resource_async(resource_id, remediation_name, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def get_at_resource(resource_id, remediation_name, custom_headers:nil)
response = get_at_resource_async(resource_id, remediation_name, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"get_at_resource",
"(",
"resource_id",
",",
"remediation_name",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"get_at_resource_async",
"(",
"resource_id",
",",
"remediation_name",
",",
"custom_headers",
":custom_headers",
")",
".",
"value!",
"respons... | Gets an existing remediation at resource scope.
@param resource_id [String] Resource ID.
@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] operation results. | [
"Gets",
"an",
"existing",
"remediation",
"at",
"resource",
"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#L2173-L2176 | train | Gets the information about the remediation at resource scope. | [
30522,
13366,
2131,
1035,
2012,
1035,
7692,
1006,
7692,
1035,
8909,
1010,
2128,
16969,
3508,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
2131,
1035,
2012,
1035,
7692,
1035,
2004,
6038,
2278,
1006,
7692,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
square/connect-ruby-sdk | lib/square_connect/api/catalog_api.rb | SquareConnect.CatalogApi.update_item_taxes | def update_item_taxes(body, opts = {})
data, _status_code, _headers = update_item_taxes_with_http_info(body, opts)
return data
end | ruby | def update_item_taxes(body, opts = {})
data, _status_code, _headers = update_item_taxes_with_http_info(body, opts)
return data
end | [
"def",
"update_item_taxes",
"(",
"body",
",",
"opts",
"=",
"{",
"}",
")",
"data",
",",
"_status_code",
",",
"_headers",
"=",
"update_item_taxes_with_http_info",
"(",
"body",
",",
"opts",
")",
"return",
"data",
"end"
] | UpdateItemTaxes
Updates the [CatalogTax](#type-catalogtax) objects that apply to the targeted [CatalogItem](#type-catalogitem) without having to perform an upsert on the entire item.
@param body An object containing the fields to POST for the request. See the corresponding object definition for field details.
@para... | [
"UpdateItemTaxes",
"Updates",
"the",
"[",
"CatalogTax",
"]",
"(",
"#type",
"-",
"catalogtax",
")",
"objects",
"that",
"apply",
"to",
"the",
"targeted",
"[",
"CatalogItem",
"]",
"(",
"#type",
"-",
"catalogitem",
")",
"without",
"having",
"to",
"perform",
"an"... | 798eb9ded716f23b9f1518386f1c311a34bca8bf | https://github.com/square/connect-ruby-sdk/blob/798eb9ded716f23b9f1518386f1c311a34bca8bf/lib/square_connect/api/catalog_api.rb#L521-L524 | train | Updates item taxes | [
30522,
13366,
10651,
1035,
8875,
1035,
7773,
1006,
2303,
1010,
23569,
2015,
1027,
1063,
1065,
1007,
2951,
1010,
1035,
3570,
1035,
3642,
1010,
1035,
20346,
2015,
1027,
10651,
1035,
8875,
1035,
7773,
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... |
projectcypress/health-data-standards | lib/hqmf-parser/2.0/types.rb | HQMF2.Range.to_model | def to_model
lm = low.try(:to_model)
hm = high.try(:to_model)
wm = width.try(:to_model)
model_type = type
if @entry.at_xpath('./cda:uncertainRange', HQMF2::Document::NAMESPACES)
model_type = 'IVL_PQ'
end
if generate_any_value?(lm, hm)
# Generate AnyValue if the... | ruby | def to_model
lm = low.try(:to_model)
hm = high.try(:to_model)
wm = width.try(:to_model)
model_type = type
if @entry.at_xpath('./cda:uncertainRange', HQMF2::Document::NAMESPACES)
model_type = 'IVL_PQ'
end
if generate_any_value?(lm, hm)
# Generate AnyValue if the... | [
"def",
"to_model",
"lm",
"=",
"low",
".",
"try",
"(",
":to_model",
")",
"hm",
"=",
"high",
".",
"try",
"(",
":to_model",
")",
"wm",
"=",
"width",
".",
"try",
"(",
":to_model",
")",
"model_type",
"=",
"type",
"if",
"@entry",
".",
"at_xpath",
"(",
"'... | Generates this classes hqmf-model equivalent | [
"Generates",
"this",
"classes",
"hqmf",
"-",
"model",
"equivalent"
] | 252d4f0927c513eacde6b9ea41b76faa1423c34b | https://github.com/projectcypress/health-data-standards/blob/252d4f0927c513eacde6b9ea41b76faa1423c34b/lib/hqmf-parser/2.0/types.rb#L132-L150 | train | Returns a new HQMF object for this range. | [
30522,
13366,
2000,
1035,
2944,
1048,
2213,
1027,
2659,
1012,
3046,
1006,
1024,
2000,
1035,
2944,
1007,
20287,
1027,
2152,
1012,
3046,
1006,
1024,
2000,
1035,
2944,
1007,
1059,
2213,
1027,
9381,
1012,
3046,
1006,
1024,
2000,
1035,
2944,
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... |
palkan/logidze | lib/logidze/model.rb | Logidze.Model.association | def association(name)
association = super
return association unless Logidze.associations_versioning
should_apply_logidze =
logidze_past? &&
association.klass.respond_to?(:has_logidze?) &&
!association.singleton_class.include?(Logidze::VersionedAssociation)
return assoc... | ruby | def association(name)
association = super
return association unless Logidze.associations_versioning
should_apply_logidze =
logidze_past? &&
association.klass.respond_to?(:has_logidze?) &&
!association.singleton_class.include?(Logidze::VersionedAssociation)
return assoc... | [
"def",
"association",
"(",
"name",
")",
"association",
"=",
"super",
"return",
"association",
"unless",
"Logidze",
".",
"associations_versioning",
"should_apply_logidze",
"=",
"logidze_past?",
"&&",
"association",
".",
"klass",
".",
"respond_to?",
"(",
":has_logidze?"... | rubocop: disable Metrics/MethodLength | [
"rubocop",
":",
"disable",
"Metrics",
"/",
"MethodLength"
] | ffa0f793cb9c6fab96fa67a285341ca9aaa7ded8 | https://github.com/palkan/logidze/blob/ffa0f793cb9c6fab96fa67a285341ca9aaa7ded8/lib/logidze/model.rb#L179-L200 | train | Returns the association with the given name. | [
30522,
13366,
2523,
1006,
2171,
1007,
2523,
1027,
3565,
2709,
2523,
4983,
8833,
3593,
4371,
1012,
8924,
1035,
2544,
2075,
2323,
1035,
6611,
1035,
8833,
3593,
4371,
1027,
8833,
3593,
4371,
1035,
2627,
1029,
1004,
1004,
2523,
1012,
1047,
27... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/cache.rb | Discordrb.Cache.user | def user(id)
id = id.resolve_id
return @users[id] if @users[id]
LOGGER.out("Resolving user #{id}")
begin
response = API::User.resolve(token, id)
rescue RestClient::ResourceNotFound
return nil
end
user = User.new(JSON.parse(response), self)
@users[id] = us... | ruby | def user(id)
id = id.resolve_id
return @users[id] if @users[id]
LOGGER.out("Resolving user #{id}")
begin
response = API::User.resolve(token, id)
rescue RestClient::ResourceNotFound
return nil
end
user = User.new(JSON.parse(response), self)
@users[id] = us... | [
"def",
"user",
"(",
"id",
")",
"id",
"=",
"id",
".",
"resolve_id",
"return",
"@users",
"[",
"id",
"]",
"if",
"@users",
"[",
"id",
"]",
"LOGGER",
".",
"out",
"(",
"\"Resolving user #{id}\"",
")",
"begin",
"response",
"=",
"API",
"::",
"User",
".",
"re... | Gets a user by its ID.
@note This can only resolve users known by the bot (i.e. that share a server with the bot).
@param id [Integer] The user ID that should be resolved.
@return [User, nil] The user identified by the ID, or `nil` if it couldn't be found. | [
"Gets",
"a",
"user",
"by",
"its",
"ID",
"."
] | 764298a1ff0be69a1853b510d736f21c2b91a2fe | https://github.com/meew0/discordrb/blob/764298a1ff0be69a1853b510d736f21c2b91a2fe/lib/discordrb/cache.rb#L75-L87 | train | Returns a user object for the given user ID. | [
30522,
13366,
5310,
1006,
8909,
1007,
8909,
1027,
8909,
1012,
10663,
1035,
8909,
2709,
1030,
5198,
1031,
8909,
1033,
2065,
1030,
5198,
1031,
8909,
1033,
8833,
4590,
1012,
2041,
1006,
1000,
29304,
5310,
1001,
1063,
8909,
1065,
1000,
1007,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
puppetlabs/puppet | lib/puppet/functions.rb | Puppet::Functions.InternalFunction.call_function_with_scope | def call_function_with_scope(scope, function_name, *args, &block)
internal_call_function(scope, function_name, args, &block)
end | ruby | def call_function_with_scope(scope, function_name, *args, &block)
internal_call_function(scope, function_name, args, &block)
end | [
"def",
"call_function_with_scope",
"(",
"scope",
",",
"function_name",
",",
"*",
"args",
",",
"&",
"block",
")",
"internal_call_function",
"(",
"scope",
",",
"function_name",
",",
"args",
",",
"block",
")",
"end"
] | Allows the implementation of a function to call other functions by name and pass the caller
scope. The callable functions are those visible to the same loader that loaded this function
(the calling function).
@param scope [Puppet::Parser::Scope] The caller scope
@param function_name [String] The name of the functi... | [
"Allows",
"the",
"implementation",
"of",
"a",
"function",
"to",
"call",
"other",
"functions",
"by",
"name",
"and",
"pass",
"the",
"caller",
"scope",
".",
"The",
"callable",
"functions",
"are",
"those",
"visible",
"to",
"the",
"same",
"loader",
"that",
"loade... | 4baeed97cbb7571ddc6635f0a24debe2e8b22cd3 | https://github.com/puppetlabs/puppet/blob/4baeed97cbb7571ddc6635f0a24debe2e8b22cd3/lib/puppet/functions.rb#L678-L680 | train | Calls a function in the current scope. | [
30522,
13366,
2655,
1035,
3853,
1035,
2007,
1035,
9531,
1006,
9531,
1010,
3853,
1035,
2171,
1010,
1008,
12098,
5620,
1010,
1004,
3796,
1007,
4722,
1035,
2655,
1035,
3853,
1006,
9531,
1010,
3853,
1035,
2171,
1010,
12098,
5620,
1010,
1004,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
rails/rails | railties/lib/rails/engine.rb | Rails.Engine.routes | def routes(&block)
@routes ||= ActionDispatch::Routing::RouteSet.new_with_config(config)
@routes.append(&block) if block_given?
@routes
end | ruby | def routes(&block)
@routes ||= ActionDispatch::Routing::RouteSet.new_with_config(config)
@routes.append(&block) if block_given?
@routes
end | [
"def",
"routes",
"(",
"&",
"block",
")",
"@routes",
"||=",
"ActionDispatch",
"::",
"Routing",
"::",
"RouteSet",
".",
"new_with_config",
"(",
"config",
")",
"@routes",
".",
"append",
"(",
"block",
")",
"if",
"block_given?",
"@routes",
"end"
] | Defines the routes for this engine. If a block is given to
routes, it is appended to the engine. | [
"Defines",
"the",
"routes",
"for",
"this",
"engine",
".",
"If",
"a",
"block",
"is",
"given",
"to",
"routes",
"it",
"is",
"appended",
"to",
"the",
"engine",
"."
] | 85a8bc644be69908f05740a5886ec19cd3679df5 | https://github.com/rails/rails/blob/85a8bc644be69908f05740a5886ec19cd3679df5/railties/lib/rails/engine.rb#L536-L540 | train | Returns a new RouteSet with the routes defined in the config. | [
30522,
13366,
5847,
1006,
1004,
3796,
1007,
1030,
5847,
1064,
1064,
1027,
2895,
10521,
4502,
10649,
1024,
1024,
16972,
1024,
1024,
5847,
3388,
1012,
2047,
1035,
2007,
1035,
9530,
8873,
2290,
1006,
9530,
8873,
2290,
1007,
1030,
5847,
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... |
benbalter/word-to-markdown | lib/cliver/dependency_ext.rb | Cliver.Dependency.version | def version
return @detected_version if defined? @detected_version
return if Gem.win_platform?
version = installed_versions.find { |p, _v| p == path }
@detected_version = version.nil? ? nil : version[1]
end | ruby | def version
return @detected_version if defined? @detected_version
return if Gem.win_platform?
version = installed_versions.find { |p, _v| p == path }
@detected_version = version.nil? ? nil : version[1]
end | [
"def",
"version",
"return",
"@detected_version",
"if",
"defined?",
"@detected_version",
"return",
"if",
"Gem",
".",
"win_platform?",
"version",
"=",
"installed_versions",
".",
"find",
"{",
"|",
"p",
",",
"_v",
"|",
"p",
"==",
"path",
"}",
"@detected_version",
... | Returns the version of the resolved dependency | [
"Returns",
"the",
"version",
"of",
"the",
"resolved",
"dependency"
] | 48031ffd70c9a8caa9978fa576c6de24b736df20 | https://github.com/benbalter/word-to-markdown/blob/48031ffd70c9a8caa9978fa576c6de24b736df20/lib/cliver/dependency_ext.rb#L26-L32 | train | Returns the version number of the current version of the project. | [
30522,
13366,
2544,
2709,
1030,
11156,
1035,
2544,
2065,
4225,
1029,
1030,
11156,
1035,
2544,
2709,
2065,
17070,
1012,
2663,
1035,
4132,
1029,
2544,
1027,
5361,
1035,
4617,
1012,
2424,
1063,
1064,
1052,
1010,
1035,
1058,
1064,
1052,
1027,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
CanCanCommunity/cancancan | lib/cancan/ability.rb | CanCan.Ability.merge | def merge(ability)
ability.rules.each do |rule|
add_rule(rule.dup)
end
@aliased_actions = aliased_actions.merge(ability.aliased_actions)
self
end | ruby | def merge(ability)
ability.rules.each do |rule|
add_rule(rule.dup)
end
@aliased_actions = aliased_actions.merge(ability.aliased_actions)
self
end | [
"def",
"merge",
"(",
"ability",
")",
"ability",
".",
"rules",
".",
"each",
"do",
"|",
"rule",
"|",
"add_rule",
"(",
"rule",
".",
"dup",
")",
"end",
"@aliased_actions",
"=",
"aliased_actions",
".",
"merge",
"(",
"ability",
".",
"aliased_actions",
")",
"se... | Copies all rules and aliased actions of the given +CanCan::Ability+ and adds them to +self+.
class ReadAbility
include CanCan::Ability
def initialize
can :read, User
alias_action :show, :index, to: :see
end
end
class WritingAbility
include CanCan::Ability
def initializ... | [
"Copies",
"all",
"rules",
"and",
"aliased",
"actions",
"of",
"the",
"given",
"+",
"CanCan",
"::",
"Ability",
"+",
"and",
"adds",
"them",
"to",
"+",
"self",
"+",
".",
"class",
"ReadAbility",
"include",
"CanCan",
"::",
"Ability"
] | b2e5660c6b9b683fc45b8f425b90c4d06e2f24bf | https://github.com/CanCanCommunity/cancancan/blob/b2e5660c6b9b683fc45b8f425b90c4d06e2f24bf/lib/cancan/ability.rb#L248-L254 | train | Merge the rules of this rule with the ability. | [
30522,
13366,
13590,
1006,
3754,
1007,
3754,
1012,
3513,
1012,
2169,
2079,
1064,
3627,
1064,
5587,
1035,
3627,
1006,
3627,
1012,
4241,
2361,
1007,
2203,
1030,
14593,
2098,
1035,
4506,
1027,
14593,
2098,
1035,
4506,
1012,
13590,
1006,
3754,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
sensu/sensu | lib/sensu/utilities.rb | Sensu.Utilities.determine_check_cron_time | def determine_check_cron_time(check)
cron_parser = CronParser.new(check[:cron])
current_time = Time.now
next_cron_time = cron_parser.next(current_time)
next_cron_time - current_time
end | ruby | def determine_check_cron_time(check)
cron_parser = CronParser.new(check[:cron])
current_time = Time.now
next_cron_time = cron_parser.next(current_time)
next_cron_time - current_time
end | [
"def",
"determine_check_cron_time",
"(",
"check",
")",
"cron_parser",
"=",
"CronParser",
".",
"new",
"(",
"check",
"[",
":cron",
"]",
")",
"current_time",
"=",
"Time",
".",
"now",
"next_cron_time",
"=",
"cron_parser",
".",
"next",
"(",
"current_time",
")",
"... | Determine the next check cron time.
@param check [Hash] definition. | [
"Determine",
"the",
"next",
"check",
"cron",
"time",
"."
] | 51319e4b58c8d9986f101ad71ff729aa3e51e951 | https://github.com/sensu/sensu/blob/51319e4b58c8d9986f101ad71ff729aa3e51e951/lib/sensu/utilities.rb#L390-L395 | train | Determine the cron time for a check | [
30522,
13366,
5646,
1035,
4638,
1035,
13675,
2239,
1035,
2051,
1006,
4638,
1007,
13675,
2239,
1035,
11968,
8043,
1027,
13675,
2239,
19362,
8043,
1012,
2047,
1006,
4638,
1031,
1024,
13675,
2239,
1033,
1007,
2783,
1035,
2051,
1027,
2051,
1012... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | data/azure_key_vault/lib/2016-10-01/generated/azure_key_vault/key_vault_client.rb | Azure::KeyVault::V2016_10_01.KeyVaultClient.set_storage_account | def set_storage_account(vault_base_url, storage_account_name, resource_id, active_key_name, auto_regenerate_key, regeneration_period:nil, storage_account_attributes:nil, tags:nil, custom_headers:nil)
response = set_storage_account_async(vault_base_url, storage_account_name, resource_id, active_key_name, auto_rege... | ruby | def set_storage_account(vault_base_url, storage_account_name, resource_id, active_key_name, auto_regenerate_key, regeneration_period:nil, storage_account_attributes:nil, tags:nil, custom_headers:nil)
response = set_storage_account_async(vault_base_url, storage_account_name, resource_id, active_key_name, auto_rege... | [
"def",
"set_storage_account",
"(",
"vault_base_url",
",",
"storage_account_name",
",",
"resource_id",
",",
"active_key_name",
",",
"auto_regenerate_key",
",",
"regeneration_period",
":",
"nil",
",",
"storage_account_attributes",
":",
"nil",
",",
"tags",
":",
"nil",
",... | Creates or updates a new storage account. This operation requires the
storage/set permission.
@param vault_base_url [String] The vault name, for example
https://myvault.vault.azure.net.
@param storage_account_name [String] The name of the storage account.
@param resource_id [String] Storage account resource id.
... | [
"Creates",
"or",
"updates",
"a",
"new",
"storage",
"account",
".",
"This",
"operation",
"requires",
"the",
"storage",
"/",
"set",
"permission",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_key_vault/lib/2016-10-01/generated/azure_key_vault/key_vault_client.rb#L7278-L7281 | train | Sets the storage account. | [
30522,
13366,
2275,
1035,
5527,
1035,
4070,
1006,
11632,
1035,
2918,
1035,
24471,
2140,
1010,
5527,
1035,
4070,
1035,
2171,
1010,
7692,
1035,
8909,
1010,
3161,
1035,
3145,
1035,
2171,
1010,
8285,
1035,
19723,
24454,
3686,
1035,
3145,
1010,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
rails/sprockets | lib/sprockets/path_utils.rb | Sprockets.PathUtils.entries | def entries(path)
if File.directory?(path)
entries = Dir.entries(path, encoding: Encoding.default_internal)
entries.reject! { |entry|
entry.start_with?(".".freeze) ||
(entry.start_with?("#".freeze) && entry.end_with?("#".freeze)) ||
entry.end_with?("~".freeze)
... | ruby | def entries(path)
if File.directory?(path)
entries = Dir.entries(path, encoding: Encoding.default_internal)
entries.reject! { |entry|
entry.start_with?(".".freeze) ||
(entry.start_with?("#".freeze) && entry.end_with?("#".freeze)) ||
entry.end_with?("~".freeze)
... | [
"def",
"entries",
"(",
"path",
")",
"if",
"File",
".",
"directory?",
"(",
"path",
")",
"entries",
"=",
"Dir",
".",
"entries",
"(",
"path",
",",
"encoding",
":",
"Encoding",
".",
"default_internal",
")",
"entries",
".",
"reject!",
"{",
"|",
"entry",
"|"... | Public: A version of `Dir.entries` that filters out `.` files and `~`
swap files.
path - String directory path
Returns an empty `Array` if the directory does not exist. | [
"Public",
":",
"A",
"version",
"of",
"Dir",
".",
"entries",
"that",
"filters",
"out",
".",
"files",
"and",
"~",
"swap",
"files",
"."
] | 9e3f0d8e98c44f57e67bc138db87bb8469bf5ddd | https://github.com/rails/sprockets/blob/9e3f0d8e98c44f57e67bc138db87bb8469bf5ddd/lib/sprockets/path_utils.rb#L56-L69 | train | Returns an array of the directory entries in the given path. | [
30522,
13366,
10445,
1006,
4130,
1007,
2065,
5371,
1012,
14176,
1029,
1006,
4130,
1007,
10445,
1027,
16101,
1012,
10445,
1006,
4130,
1010,
17181,
1024,
17181,
1012,
12398,
1035,
4722,
1007,
10445,
1012,
15454,
999,
1063,
1064,
4443,
1064,
4... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
aws/aws-sdk-ruby | gems/aws-sdk-s3/lib/aws-sdk-s3/bucket.rb | Aws::S3.Bucket.delete_objects | def delete_objects(options = {})
options = options.merge(bucket: @name)
resp = @client.delete_objects(options)
resp.data
end | ruby | def delete_objects(options = {})
options = options.merge(bucket: @name)
resp = @client.delete_objects(options)
resp.data
end | [
"def",
"delete_objects",
"(",
"options",
"=",
"{",
"}",
")",
"options",
"=",
"options",
".",
"merge",
"(",
"bucket",
":",
"@name",
")",
"resp",
"=",
"@client",
".",
"delete_objects",
"(",
"options",
")",
"resp",
".",
"data",
"end"
] | @example Request syntax with placeholder values
bucket.delete_objects({
delete: { # required
objects: [ # required
{
key: "ObjectKey", # required
version_id: "ObjectVersionId",
},
],
quiet: false,
},
mfa: "MFA",
request_payer: "request... | [
"@example",
"Request",
"syntax",
"with",
"placeholder",
"values"
] | e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d | https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-s3/lib/aws-sdk-s3/bucket.rb#L297-L301 | train | Delete all objects in the bucket. | [
30522,
13366,
3972,
12870,
1035,
5200,
1006,
7047,
1027,
1063,
1065,
1007,
7047,
1027,
7047,
1012,
13590,
1006,
13610,
1024,
1030,
2171,
1007,
24501,
2361,
1027,
1030,
7396,
1012,
3972,
12870,
1035,
5200,
1006,
30524,
0,
0,
0,
0,
0,
0,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
meew0/discordrb | lib/discordrb/bot.rb | Discordrb.Bot.send_message | def send_message(channel, content, tts = false, embed = nil)
channel = channel.resolve_id
debug("Sending message to #{channel} with content '#{content}'")
response = API::Channel.create_message(token, channel, content, tts, embed ? embed.to_hash : nil)
Message.new(JSON.parse(response), self)
... | ruby | def send_message(channel, content, tts = false, embed = nil)
channel = channel.resolve_id
debug("Sending message to #{channel} with content '#{content}'")
response = API::Channel.create_message(token, channel, content, tts, embed ? embed.to_hash : nil)
Message.new(JSON.parse(response), self)
... | [
"def",
"send_message",
"(",
"channel",
",",
"content",
",",
"tts",
"=",
"false",
",",
"embed",
"=",
"nil",
")",
"channel",
"=",
"channel",
".",
"resolve_id",
"debug",
"(",
"\"Sending message to #{channel} with content '#{content}'\"",
")",
"response",
"=",
"API",
... | Sends a text message to a channel given its ID and the message's content.
@param channel [Channel, Integer, #resolve_id] The channel to send something to.
@param content [String] The text that should be sent as a message. It is limited to 2000 characters (Discord imposed).
@param tts [true, false] Whether or not thi... | [
"Sends",
"a",
"text",
"message",
"to",
"a",
"channel",
"given",
"its",
"ID",
"and",
"the",
"message",
"s",
"content",
"."
] | 764298a1ff0be69a1853b510d736f21c2b91a2fe | https://github.com/meew0/discordrb/blob/764298a1ff0be69a1853b510d736f21c2b91a2fe/lib/discordrb/bot.rb#L366-L372 | train | Send a message to a channel | [
30522,
13366,
4604,
1035,
4471,
1006,
3149,
1010,
4180,
1010,
23746,
2015,
1027,
6270,
1010,
7861,
8270,
1027,
9152,
2140,
1007,
3149,
1027,
3149,
1012,
10663,
1035,
8909,
2139,
8569,
2290,
1006,
1000,
6016,
4471,
2000,
1001,
1063,
3149,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
piotrmurach/github | lib/github_api/client/authorizations/app.rb | Github.Client::Authorizations::App.create | def create(*args)
raise_authentication_error unless authenticated?
arguments(args, required: [:client_id])
if arguments.client_id
put_request("/authorizations/clients/#{arguments.client_id}", arguments.params)
else
raise raise_app_authentication_error
end
end | ruby | def create(*args)
raise_authentication_error unless authenticated?
arguments(args, required: [:client_id])
if arguments.client_id
put_request("/authorizations/clients/#{arguments.client_id}", arguments.params)
else
raise raise_app_authentication_error
end
end | [
"def",
"create",
"(",
"*",
"args",
")",
"raise_authentication_error",
"unless",
"authenticated?",
"arguments",
"(",
"args",
",",
"required",
":",
"[",
":client_id",
"]",
")",
"if",
"arguments",
".",
"client_id",
"put_request",
"(",
"\"/authorizations/clients/#{argum... | Get-or-create an authorization for a specific app
@see https://developer.github.com/v3/oauth_authorizations/#get-or-create-an-authorization-for-a-specific-app
@param [Hash] params
@option params [String] client_secret
The 40 character OAuth app client secret associated with the client
ID specified in the URL.
... | [
"Get",
"-",
"or",
"-",
"create",
"an",
"authorization",
"for",
"a",
"specific",
"app"
] | 8702452c66bea33c9388550aed9e9974f76aaef1 | https://github.com/piotrmurach/github/blob/8702452c66bea33c9388550aed9e9974f76aaef1/lib/github_api/client/authorizations/app.rb#L27-L36 | train | Create a new client | [
30522,
13366,
3443,
1006,
1008,
12098,
5620,
1007,
5333,
1035,
27280,
1035,
7561,
4983,
14469,
4383,
1029,
9918,
1006,
12098,
5620,
1010,
3223,
1024,
1031,
1024,
7396,
1035,
8909,
1033,
1007,
2065,
9918,
1012,
7396,
1035,
8909,
2404,
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_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/sync_groups.rb | Azure::SQL::Mgmt::V2015_05_01_preview.SyncGroups.list_sync_database_ids_next | def list_sync_database_ids_next(next_page_link, custom_headers:nil)
response = list_sync_database_ids_next_async(next_page_link, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def list_sync_database_ids_next(next_page_link, custom_headers:nil)
response = list_sync_database_ids_next_async(next_page_link, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"list_sync_database_ids_next",
"(",
"next_page_link",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"list_sync_database_ids_next_async",
"(",
"next_page_link",
",",
"custom_headers",
":custom_headers",
")",
".",
"value!",
"response",
".",
"body",
"unle... | Gets a collection of sync database ids.
@param next_page_link [String] The NextLink from the previous successful call
to List operation.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request.
@return [SyncDatabaseIdListResult] operation results. | [
"Gets",
"a",
"collection",
"of",
"sync",
"database",
"ids",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_sql/lib/2015-05-01-preview/generated/azure_mgmt_sql/sync_groups.rb#L1424-L1427 | train | Gets the list of sync database IDs. | [
30522,
13366,
2862,
1035,
26351,
1035,
7809,
1035,
8909,
2015,
1035,
2279,
1006,
2279,
1035,
3931,
1035,
4957,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
2862,
1035,
26351,
1035,
7809,
1035,
8909,
2015,
1035,
2279,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
rollbar/rollbar-gem | lib/rollbar/logger.rb | Rollbar.Logger.rollbar | def rollbar
notifier = Rollbar.scope
notifier.configuration.logger = ::Logger.new('/dev/null')
notifier
end | ruby | def rollbar
notifier = Rollbar.scope
notifier.configuration.logger = ::Logger.new('/dev/null')
notifier
end | [
"def",
"rollbar",
"notifier",
"=",
"Rollbar",
".",
"scope",
"notifier",
".",
"configuration",
".",
"logger",
"=",
"::",
"Logger",
".",
"new",
"(",
"'/dev/null'",
")",
"notifier",
"end"
] | Returns a Rollbar::Notifier instance with the current global scope and
with a logger writing to /dev/null so we don't have a infinite loop
when Rollbar.configuration.logger is Rails.logger. | [
"Returns",
"a",
"Rollbar",
"::",
"Notifier",
"instance",
"with",
"the",
"current",
"global",
"scope",
"and",
"with",
"a",
"logger",
"writing",
"to",
"/",
"dev",
"/",
"null",
"so",
"we",
"don",
"t",
"have",
"a",
"infinite",
"loop",
"when",
"Rollbar",
".",... | 83ef1acca2b0b1d1b74ff8ef29435ca82e8ca1d6 | https://github.com/rollbar/rollbar-gem/blob/83ef1acca2b0b1d1b74ff8ef29435ca82e8ca1d6/lib/rollbar/logger.rb#L59-L64 | train | Returns the index of the current object in the rollbar. | [
30522,
13366,
4897,
8237,
2025,
18095,
1027,
4897,
8237,
1012,
9531,
2025,
18095,
1012,
9563,
1012,
8833,
4590,
1027,
1024,
1024,
8833,
4590,
1012,
2047,
1006,
1005,
1013,
16475,
1013,
19701,
1005,
1007,
2025,
18095,
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... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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_backup_list | def get_application_backup_list(application_id, timeout:60, latest:false, start_date_time_filter:nil, end_date_time_filter:nil, continuation_token:nil, max_results:0, custom_headers:nil)
response = get_application_backup_list_async(application_id, timeout:timeout, latest:latest, start_date_time_filter:start_date_... | ruby | def get_application_backup_list(application_id, timeout:60, latest:false, start_date_time_filter:nil, end_date_time_filter:nil, continuation_token:nil, max_results:0, custom_headers:nil)
response = get_application_backup_list_async(application_id, timeout:timeout, latest:latest, start_date_time_filter:start_date_... | [
"def",
"get_application_backup_list",
"(",
"application_id",
",",
"timeout",
":",
"60",
",",
"latest",
":",
"false",
",",
"start_date_time_filter",
":",
"nil",
",",
"end_date_time_filter",
":",
"nil",
",",
"continuation_token",
":",
"nil",
",",
"max_results",
":",... | Gets the list of backups available for every partition in this application.
Returns a list of backups available for every partition in this Service
Fabric application. The server enumerates all the backups available at the
backup location configured in the backup policy. It also allows filtering of
the result base... | [
"Gets",
"the",
"list",
"of",
"backups",
"available",
"for",
"every",
"partition",
"in",
"this",
"application",
"."
] | 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#L23404-L23407 | train | Gets the backup list of the applications. | [
30522,
13366,
2131,
1035,
4646,
1035,
10200,
1035,
2862,
1006,
4646,
1035,
8909,
1010,
2051,
5833,
1024,
3438,
1010,
6745,
1024,
6270,
1010,
2707,
1035,
3058,
1035,
2051,
1035,
11307,
1024,
9152,
2140,
1010,
2203,
1035,
3058,
1035,
2051,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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.begin_update_tags_with_http_info | def begin_update_tags_with_http_info(resource_group_name, application_gateway_name, parameters, custom_headers:nil)
begin_update_tags_async(resource_group_name, application_gateway_name, parameters, custom_headers:custom_headers).value!
end | ruby | def begin_update_tags_with_http_info(resource_group_name, application_gateway_name, parameters, custom_headers:nil)
begin_update_tags_async(resource_group_name, application_gateway_name, parameters, custom_headers:custom_headers).value!
end | [
"def",
"begin_update_tags_with_http_info",
"(",
"resource_group_name",
",",
"application_gateway_name",
",",
"parameters",
",",
"custom_headers",
":",
"nil",
")",
"begin_update_tags_async",
"(",
"resource_group_name",
",",
"application_gateway_name",
",",
"parameters",
",",
... | Updates the specified application gateway tags.
@param resource_group_name [String] The name of the resource group.
@param application_gateway_name [String] The name of the application gateway.
@param parameters [TagsObject] Parameters supplied to update application
gateway tags.
@param custom_headers [Hash{Strin... | [
"Updates",
"the",
"specified",
"application",
"gateway",
"tags",
"."
] | 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#L1455-L1457 | train | Updates a resource group tags on an application gateway. | [
30522,
13366,
4088,
1035,
10651,
1035,
22073,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
4646,
1035,
11909,
1035,
2171,
1010,
11709,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
4088,
1035,
1065... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
cerebris/jsonapi-resources | lib/jsonapi/resource_id_tree.rb | JSONAPI.RelatedResourceIdTree.add_resource_fragment | def add_resource_fragment(fragment, include_related)
init_included_relationships(fragment, include_related)
fragment.related_from.each do |rid|
@source_resource_id_tree.fragments[rid].add_related_identity(parent_relationship.name, fragment.identity)
end
@fragments[fragment.identity] = ... | ruby | def add_resource_fragment(fragment, include_related)
init_included_relationships(fragment, include_related)
fragment.related_from.each do |rid|
@source_resource_id_tree.fragments[rid].add_related_identity(parent_relationship.name, fragment.identity)
end
@fragments[fragment.identity] = ... | [
"def",
"add_resource_fragment",
"(",
"fragment",
",",
"include_related",
")",
"init_included_relationships",
"(",
"fragment",
",",
"include_related",
")",
"fragment",
".",
"related_from",
".",
"each",
"do",
"|",
"rid",
"|",
"@source_resource_id_tree",
".",
"fragments"... | Adds a Resource Fragment to the fragments hash
@param fragment [JSONAPI::ResourceFragment]
@param include_related [Hash]
@return [null] | [
"Adds",
"a",
"Resource",
"Fragment",
"to",
"the",
"fragments",
"hash"
] | 1ac6bba777e364eaa36706f888792b99b63d8d1a | https://github.com/cerebris/jsonapi-resources/blob/1ac6bba777e364eaa36706f888792b99b63d8d1a/lib/jsonapi/resource_id_tree.rb#L102-L110 | train | Add a fragment to the resource id tree | [
30522,
13366,
5587,
1035,
7692,
1035,
15778,
1006,
15778,
1010,
2421,
1035,
3141,
1007,
1999,
4183,
1035,
2443,
1035,
6550,
1006,
15778,
1010,
2421,
1035,
3141,
1007,
15778,
1012,
3141,
1035,
2013,
1012,
2169,
2079,
1064,
9436,
1064,
1030,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | data/azure_key_vault/lib/2016-10-01/generated/azure_key_vault/key_vault_client.rb | Azure::KeyVault::V2016_10_01.KeyVaultClient.get_certificates_with_http_info | def get_certificates_with_http_info(vault_base_url, maxresults:nil, custom_headers:nil)
get_certificates_async(vault_base_url, maxresults:maxresults, custom_headers:custom_headers).value!
end | ruby | def get_certificates_with_http_info(vault_base_url, maxresults:nil, custom_headers:nil)
get_certificates_async(vault_base_url, maxresults:maxresults, custom_headers:custom_headers).value!
end | [
"def",
"get_certificates_with_http_info",
"(",
"vault_base_url",
",",
"maxresults",
":",
"nil",
",",
"custom_headers",
":",
"nil",
")",
"get_certificates_async",
"(",
"vault_base_url",
",",
"maxresults",
":",
"maxresults",
",",
"custom_headers",
":custom_headers",
")",
... | List certificates in a specified key vault
The GetCertificates operation returns the set of certificates resources in
the specified key vault. This operation requires the certificates/list
permission.
@param vault_base_url [String] The vault name, for example
https://myvault.vault.azure.net.
@param maxresults [... | [
"List",
"certificates",
"in",
"a",
"specified",
"key",
"vault"
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_key_vault/lib/2016-10-01/generated/azure_key_vault/key_vault_client.rb#L4046-L4048 | train | Gets the certificates associated with the specified vault. | [
30522,
13366,
2131,
1035,
17987,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
11632,
1035,
2918,
1035,
24471,
2140,
1010,
4098,
6072,
11314,
2015,
1024,
9152,
2140,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
2131,
1035,
17987,
103... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
aws/aws-sdk-ruby | gems/aws-sdk-dynamodb/lib/aws-sdk-dynamodb/table.rb | Aws::DynamoDB.Table.delete_item | def delete_item(options = {})
options = options.merge(table_name: @name)
resp = @client.delete_item(options)
resp.data
end | ruby | def delete_item(options = {})
options = options.merge(table_name: @name)
resp = @client.delete_item(options)
resp.data
end | [
"def",
"delete_item",
"(",
"options",
"=",
"{",
"}",
")",
"options",
"=",
"options",
".",
"merge",
"(",
"table_name",
":",
"@name",
")",
"resp",
"=",
"@client",
".",
"delete_item",
"(",
"options",
")",
"resp",
".",
"data",
"end"
] | @example Request syntax with placeholder values
table.delete_item({
key: { # required
"AttributeName" => "value", # value <Hash,Array,String,Numeric,Boolean,IO,Set,nil>
},
expected: {
"AttributeName" => {
value: "value", # value <Hash,Array,String,Numeric,Boolean,IO,Set,nil>
... | [
"@example",
"Request",
"syntax",
"with",
"placeholder",
"values"
] | e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d | https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-dynamodb/lib/aws-sdk-dynamodb/table.rb#L641-L645 | train | Delete an item from the table | [
30522,
13366,
3972,
12870,
1035,
8875,
1006,
7047,
1027,
1063,
1065,
1007,
7047,
1027,
7047,
1012,
13590,
1006,
2795,
1035,
2171,
1024,
1030,
2171,
1007,
24501,
2361,
1027,
1030,
7396,
1012,
3972,
12870,
1035,
8875,
1006,
7047,
1007,
24501,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
rails/sprockets | lib/sprockets/dependencies.rb | Sprockets.Dependencies.add_dependency | def add_dependency(uri)
self.config = hash_reassoc(config, :dependencies) do |set|
set + Set.new([uri])
end
end | ruby | def add_dependency(uri)
self.config = hash_reassoc(config, :dependencies) do |set|
set + Set.new([uri])
end
end | [
"def",
"add_dependency",
"(",
"uri",
")",
"self",
".",
"config",
"=",
"hash_reassoc",
"(",
"config",
",",
":dependencies",
")",
"do",
"|",
"set",
"|",
"set",
"+",
"Set",
".",
"new",
"(",
"[",
"uri",
"]",
")",
"end",
"end"
] | Public: Add environmental dependency inheirted by all assets.
uri - String dependency URI
Returns nothing. | [
"Public",
":",
"Add",
"environmental",
"dependency",
"inheirted",
"by",
"all",
"assets",
"."
] | 9e3f0d8e98c44f57e67bc138db87bb8469bf5ddd | https://github.com/rails/sprockets/blob/9e3f0d8e98c44f57e67bc138db87bb8469bf5ddd/lib/sprockets/dependencies.rb#L48-L52 | train | Add a dependency to the current configuration | [
30522,
13366,
5587,
1035,
24394,
1006,
24471,
2072,
1007,
2969,
1012,
9530,
8873,
2290,
1027,
23325,
1035,
2128,
12054,
10085,
1006,
9530,
8873,
2290,
1010,
1024,
12530,
15266,
1007,
2079,
1064,
2275,
1064,
2275,
1009,
2275,
1012,
2047,
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... |
rmagick/rmagick | lib/rmagick_internal.rb | Magick.ImageList.reject | def reject(&block)
current = get_current
ilist = self.class.new
a = @images.reject(&block)
a.each { |image| ilist << image }
ilist.set_current current
ilist
end | ruby | def reject(&block)
current = get_current
ilist = self.class.new
a = @images.reject(&block)
a.each { |image| ilist << image }
ilist.set_current current
ilist
end | [
"def",
"reject",
"(",
"&",
"block",
")",
"current",
"=",
"get_current",
"ilist",
"=",
"self",
".",
"class",
".",
"new",
"a",
"=",
"@images",
".",
"reject",
"(",
"block",
")",
"a",
".",
"each",
"{",
"|",
"image",
"|",
"ilist",
"<<",
"image",
"}",
... | override Enumerable's reject | [
"override",
"Enumerable",
"s",
"reject"
] | ef6688ed9d76bf123c2ea1a483eff8635051adb7 | https://github.com/rmagick/rmagick/blob/ef6688ed9d76bf123c2ea1a483eff8635051adb7/lib/rmagick_internal.rb#L1669-L1676 | train | rejects all images that match the block. | [
30522,
13366,
15454,
1006,
1004,
3796,
1007,
2783,
1027,
2131,
1035,
2783,
6335,
2923,
1027,
2969,
1012,
2465,
1012,
2047,
1037,
1027,
1030,
4871,
1012,
15454,
1006,
1004,
3796,
1007,
1037,
1012,
2169,
1063,
1064,
3746,
1064,
6335,
2923,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
ruby2d/ruby2d | lib/ruby2d/window.rb | Ruby2D.Window.controller_callback | def controller_callback(which, type, axis, value, button)
# All controller events
@events[:controller].each do |id, e|
e.call(ControllerEvent.new(which, type, axis, value, button))
end
case type
# When controller axis motion, like analog sticks
when :axis
@events[:co... | ruby | def controller_callback(which, type, axis, value, button)
# All controller events
@events[:controller].each do |id, e|
e.call(ControllerEvent.new(which, type, axis, value, button))
end
case type
# When controller axis motion, like analog sticks
when :axis
@events[:co... | [
"def",
"controller_callback",
"(",
"which",
",",
"type",
",",
"axis",
",",
"value",
",",
"button",
")",
"# All controller events",
"@events",
"[",
":controller",
"]",
".",
"each",
"do",
"|",
"id",
",",
"e",
"|",
"e",
".",
"call",
"(",
"ControllerEvent",
... | Controller callback method, called by the native and web extentions | [
"Controller",
"callback",
"method",
"called",
"by",
"the",
"native",
"and",
"web",
"extentions"
] | 43ce9805a7ae8b82b7ab8c50bf6d4c845d395dc4 | https://github.com/ruby2d/ruby2d/blob/43ce9805a7ae8b82b7ab8c50bf6d4c845d395dc4/lib/ruby2d/window.rb#L341-L364 | train | This method is called by the controller event handler. | [
30522,
13366,
11486,
1035,
2655,
5963,
1006,
2029,
1010,
30524,
1012,
2169,
2079,
1064,
8909,
1010,
1041,
1064,
1041,
1012,
2655,
1006,
11486,
18697,
3372,
1012,
2047,
1006,
2029,
1010,
2828,
1010,
8123,
1010,
3643,
1010,
6462,
1007,
1007,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Anthony-Gaudino/jekyll-multiple-languages-plugin | lib/jekyll-multiple-languages-plugin.rb | Jekyll.LocalizeLink.render | def render(context)
if "#{context[@key]}" != "" # Check for page variable
key = "#{context[@key]}"
else
key = @key
end
key = Liquid::Template.parse(key).render(context) # Parses and renders some Liquid syntax on arguments (allows expansions)
site = conte... | ruby | def render(context)
if "#{context[@key]}" != "" # Check for page variable
key = "#{context[@key]}"
else
key = @key
end
key = Liquid::Template.parse(key).render(context) # Parses and renders some Liquid syntax on arguments (allows expansions)
site = conte... | [
"def",
"render",
"(",
"context",
")",
"if",
"\"#{context[@key]}\"",
"!=",
"\"\"",
"# Check for page variable",
"key",
"=",
"\"#{context[@key]}\"",
"else",
"key",
"=",
"@key",
"end",
"key",
"=",
"Liquid",
"::",
"Template",
".",
"parse",
"(",
"key",
")",
".",
... | ======================================
initialize
======================================
======================================
render
====================================== | [
"======================================",
"initialize",
"======================================",
"======================================",
"render",
"======================================"
] | 85e0e7972e6a4f94d5e7ab470ff0360905e11e4a | https://github.com/Anthony-Gaudino/jekyll-multiple-languages-plugin/blob/85e0e7972e6a4f94d5e7ab470ff0360905e11e4a/lib/jekyll-multiple-languages-plugin.rb#L425-L460 | train | Renders the template | [
30522,
13366,
17552,
1006,
6123,
1007,
2065,
1000,
1001,
1063,
6123,
1031,
1030,
3145,
1033,
1065,
1000,
999,
1027,
1000,
1000,
1001,
4638,
2005,
3931,
8023,
3145,
1027,
1000,
1001,
1063,
6123,
1031,
1030,
3145,
1033,
1065,
1000,
2842,
31... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Shopify/liquid | lib/liquid/standardfilters.rb | Liquid.StandardFilters.replace | def replace(input, string, replacement = ''.freeze)
input.to_s.gsub(string.to_s, replacement.to_s)
end | ruby | def replace(input, string, replacement = ''.freeze)
input.to_s.gsub(string.to_s, replacement.to_s)
end | [
"def",
"replace",
"(",
"input",
",",
"string",
",",
"replacement",
"=",
"''",
".",
"freeze",
")",
"input",
".",
"to_s",
".",
"gsub",
"(",
"string",
".",
"to_s",
",",
"replacement",
".",
"to_s",
")",
"end"
] | Replace occurrences of a string with another | [
"Replace",
"occurrences",
"of",
"a",
"string",
"with",
"another"
] | b3b63a683f6daaea7e70f1602ee829abdf970ef3 | https://github.com/Shopify/liquid/blob/b3b63a683f6daaea7e70f1602ee829abdf970ef3/lib/liquid/standardfilters.rb#L253-L255 | train | Replace the string with the replacement | [
30522,
13366,
5672,
1006,
7953,
1010,
5164,
1010,
6110,
1027,
1005,
1005,
1012,
13184,
1007,
7953,
1012,
2000,
1035,
1055,
1012,
28177,
12083,
1006,
5164,
1012,
2000,
1035,
1055,
1010,
6110,
1012,
2000,
1035,
1055,
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... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Katello/katello | app/models/katello/repository.rb | Katello.Repository.build_clone | def build_clone(options)
to_env = options[:environment]
version = options[:version]
content_view = options[:content_view] || to_env.default_content_view
to_version = version || content_view.version(to_env)
fail _("Cannot clone into the Default Content View") if content_view.d... | ruby | def build_clone(options)
to_env = options[:environment]
version = options[:version]
content_view = options[:content_view] || to_env.default_content_view
to_version = version || content_view.version(to_env)
fail _("Cannot clone into the Default Content View") if content_view.d... | [
"def",
"build_clone",
"(",
"options",
")",
"to_env",
"=",
"options",
"[",
":environment",
"]",
"version",
"=",
"options",
"[",
":version",
"]",
"content_view",
"=",
"options",
"[",
":content_view",
"]",
"||",
"to_env",
".",
"default_content_view",
"to_version",
... | TODO: break up method | [
"TODO",
":",
"break",
"up",
"method"
] | a1c9280067607999cae43bab89b53ba870856b76 | https://github.com/Katello/katello/blob/a1c9280067607999cae43bab89b53ba870856b76/app/models/katello/repository.rb#L392-L429 | train | Creates a new repository object | [
30522,
13366,
3857,
1035,
17598,
1006,
7047,
1007,
2000,
1035,
4372,
2615,
1027,
7047,
1031,
1024,
4044,
1033,
2544,
1027,
7047,
1031,
1024,
2544,
1033,
4180,
1035,
3193,
1027,
7047,
1031,
1024,
4180,
1035,
3193,
1033,
1064,
1064,
2000,
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_container_registry/lib/2017-06-01-preview/generated/azure_mgmt_container_registry/registries.rb | Azure::ContainerRegistry::Mgmt::V2017_06_01_preview.Registries.list_credentials | def list_credentials(resource_group_name, registry_name, custom_headers:nil)
response = list_credentials_async(resource_group_name, registry_name, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def list_credentials(resource_group_name, registry_name, custom_headers:nil)
response = list_credentials_async(resource_group_name, registry_name, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"list_credentials",
"(",
"resource_group_name",
",",
"registry_name",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"list_credentials_async",
"(",
"resource_group_name",
",",
"registry_name",
",",
"custom_headers",
":custom_headers",
")",
".",
"value!"... | Lists the login credentials for the specified container registry.
@param resource_group_name [String] The name of the resource group to which
the container registry belongs.
@param registry_name [String] The name of the container registry.
@param custom_headers [Hash{String => String}] A hash of custom headers tha... | [
"Lists",
"the",
"login",
"credentials",
"for",
"the",
"specified",
"container",
"registry",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_container_registry/lib/2017-06-01-preview/generated/azure_mgmt_container_registry/registries.rb#L546-L549 | train | Gets the credentials for the specified container registry. | [
30522,
13366,
2862,
1035,
22496,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
15584,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
2862,
1035,
22496,
1035,
2004,
6038,
2278,
1006,
7692,
1035,
2177,
1035,
2171,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.