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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
chaps-io/public_activity | lib/public_activity/common.rb | PublicActivity.Common.prepare_parameters | def prepare_parameters(options)
params = {}
params.merge!(self.class.activity_params_global)
params.merge!(self.activity_params) if self.activity_params
params.merge!([options.delete(:parameters), options.delete(:params), {}].compact.first)
params.each { |k, v| params[k] = PublicActivity.r... | ruby | def prepare_parameters(options)
params = {}
params.merge!(self.class.activity_params_global)
params.merge!(self.activity_params) if self.activity_params
params.merge!([options.delete(:parameters), options.delete(:params), {}].compact.first)
params.each { |k, v| params[k] = PublicActivity.r... | [
"def",
"prepare_parameters",
"(",
"options",
")",
"params",
"=",
"{",
"}",
"params",
".",
"merge!",
"(",
"self",
".",
"class",
".",
"activity_params_global",
")",
"params",
".",
"merge!",
"(",
"self",
".",
"activity_params",
")",
"if",
"self",
".",
"activi... | Prepares i18n parameters that will
be serialized into the Activity#parameters column
@private | [
"Prepares",
"i18n",
"parameters",
"that",
"will",
"be",
"serialized",
"into",
"the",
"Activity#parameters",
"column"
] | e4357cd14db67299e0cbbd656300f51b7069ea9b | https://github.com/chaps-io/public_activity/blob/e4357cd14db67299e0cbbd656300f51b7069ea9b/lib/public_activity/common.rb#L319-L325 | train | Prepare parameters for the activity | [
30522,
13366,
7374,
1035,
11709,
1006,
7047,
1007,
11498,
5244,
1027,
1063,
1065,
11498,
5244,
1012,
13590,
999,
1006,
2969,
1012,
2465,
1012,
4023,
1035,
11498,
5244,
1035,
3795,
1007,
11498,
5244,
1012,
13590,
999,
1006,
2969,
1012,
4023,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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.merge_certificate_with_http_info | def merge_certificate_with_http_info(vault_base_url, certificate_name, x509certificates, certificate_attributes:nil, tags:nil, custom_headers:nil)
merge_certificate_async(vault_base_url, certificate_name, x509certificates, certificate_attributes:certificate_attributes, tags:tags, custom_headers:custom_headers).va... | ruby | def merge_certificate_with_http_info(vault_base_url, certificate_name, x509certificates, certificate_attributes:nil, tags:nil, custom_headers:nil)
merge_certificate_async(vault_base_url, certificate_name, x509certificates, certificate_attributes:certificate_attributes, tags:tags, custom_headers:custom_headers).va... | [
"def",
"merge_certificate_with_http_info",
"(",
"vault_base_url",
",",
"certificate_name",
",",
"x509certificates",
",",
"certificate_attributes",
":",
"nil",
",",
"tags",
":",
"nil",
",",
"custom_headers",
":",
"nil",
")",
"merge_certificate_async",
"(",
"vault_base_ur... | Merges a certificate or a certificate chain with a key pair existing on the
server.
The MergeCertificate operation performs the merging of a certificate or
certificate chain with a key pair currently available in the service. This
operation requires the certificates/create permission.
@param vault_base_url [Stri... | [
"Merges",
"a",
"certificate",
"or",
"a",
"certificate",
"chain",
"with",
"a",
"key",
"pair",
"existing",
"on",
"the",
"server",
"."
] | 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#L6420-L6422 | train | Merge a certificate into a single resource group. | [
30522,
13366,
13590,
1035,
8196,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
11632,
1035,
2918,
1035,
24471,
2140,
1010,
8196,
1035,
2171,
1010,
1060,
12376,
2683,
17119,
3775,
8873,
16280,
2015,
1010,
8196,
1035,
12332,
1024,
9152,
2140,
10... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
etewiah/property_web_builder | spec/mailers/previews/pwb/enquiry_mailer_preview.rb | Pwb.EnquiryMailerPreview.general_enquiry_targeting_agency | def general_enquiry_targeting_agency
@message = Message.new(origin_email: "jd@propertywebbuilder.com", delivery_email: "test@test.com")
@client = Client.new(first_names: "John Doe", phone_number_primary: "22 44", email: "jd@propertywebbuilder.com")
EnquiryMailer.general_enquiry_targeting_agency(@clien... | ruby | def general_enquiry_targeting_agency
@message = Message.new(origin_email: "jd@propertywebbuilder.com", delivery_email: "test@test.com")
@client = Client.new(first_names: "John Doe", phone_number_primary: "22 44", email: "jd@propertywebbuilder.com")
EnquiryMailer.general_enquiry_targeting_agency(@clien... | [
"def",
"general_enquiry_targeting_agency",
"@message",
"=",
"Message",
".",
"new",
"(",
"origin_email",
":",
"\"jd@propertywebbuilder.com\"",
",",
"delivery_email",
":",
"\"test@test.com\"",
")",
"@client",
"=",
"Client",
".",
"new",
"(",
"first_names",
":",
"\"John D... | def general_enquiry_targeting_enquirer
@message = Message.new(email: "jd@propertywebbuilder.com")
EnquiryMailer.general_enquiry_targeting_enquirer(Tenant.first, @message)
end | [
"def",
"general_enquiry_targeting_enquirer"
] | fba4e6d4ffa7bc1f4d3b50dfa5a6a9fbfee23f21 | https://github.com/etewiah/property_web_builder/blob/fba4e6d4ffa7bc1f4d3b50dfa5a6a9fbfee23f21/spec/mailers/previews/pwb/enquiry_mailer_preview.rb#L12-L16 | train | Returns the correct enquiry targeting agency | [
30522,
13366,
2236,
1035,
4372,
15549,
2854,
1035,
14126,
1035,
4034,
1030,
4471,
1027,
4471,
1012,
2047,
1006,
4761,
1035,
10373,
1024,
1000,
26219,
1030,
3200,
8545,
10322,
19231,
4063,
1012,
4012,
1000,
1010,
6959,
1035,
10373,
1024,
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... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_consumption/lib/2018-06-30/generated/azure_mgmt_consumption/usage_details.rb | Azure::Consumption::Mgmt::V2018_06_30.UsageDetails.list_for_billing_period_by_enrollment_account_next | def list_for_billing_period_by_enrollment_account_next(next_page_link, custom_headers:nil)
response = list_for_billing_period_by_enrollment_account_next_async(next_page_link, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def list_for_billing_period_by_enrollment_account_next(next_page_link, custom_headers:nil)
response = list_for_billing_period_by_enrollment_account_next_async(next_page_link, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"list_for_billing_period_by_enrollment_account_next",
"(",
"next_page_link",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"list_for_billing_period_by_enrollment_account_next_async",
"(",
"next_page_link",
",",
"custom_headers",
":custom_headers",
")",
".",
"v... | Lists the usage details based on enrollmentAccountId for a scope by billing
period. Usage details are available via this API only for May 1, 2014 or
later.
@param next_page_link [String] The NextLink from the previous successful call
to List operation.
@param custom_headers [Hash{String => String}] A hash of cust... | [
"Lists",
"the",
"usage",
"details",
"based",
"on",
"enrollmentAccountId",
"for",
"a",
"scope",
"by",
"billing",
"period",
".",
"Usage",
"details",
"are",
"available",
"via",
"this",
"API",
"only",
"for",
"May",
"1",
"2014",
"or",
"later",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_consumption/lib/2018-06-30/generated/azure_mgmt_consumption/usage_details.rb#L1887-L1890 | train | Gets the list of all the enrollment accounts for a subscription. | [
30522,
13366,
2862,
1035,
2005,
1035,
25640,
1035,
2558,
1035,
2011,
1035,
10316,
1035,
4070,
1035,
2279,
1006,
2279,
1035,
3931,
1035,
4957,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
2862,
1035,
2005,
1035,
25640,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_network/lib/2018-07-01/generated/azure_mgmt_network/connection_monitors.rb | Azure::Network::Mgmt::V2018_07_01.ConnectionMonitors.create_or_update_async | def create_or_update_async(resource_group_name, network_watcher_name, connection_monitor_name, parameters, custom_headers:nil)
# Send request
promise = begin_create_or_update_async(resource_group_name, network_watcher_name, connection_monitor_name, parameters, custom_headers:custom_headers)
promise =... | ruby | def create_or_update_async(resource_group_name, network_watcher_name, connection_monitor_name, parameters, custom_headers:nil)
# Send request
promise = begin_create_or_update_async(resource_group_name, network_watcher_name, connection_monitor_name, parameters, custom_headers:custom_headers)
promise =... | [
"def",
"create_or_update_async",
"(",
"resource_group_name",
",",
"network_watcher_name",
",",
"connection_monitor_name",
",",
"parameters",
",",
"custom_headers",
":",
"nil",
")",
"# Send request",
"promise",
"=",
"begin_create_or_update_async",
"(",
"resource_group_name",
... | @param resource_group_name [String] The name of the resource group containing
Network Watcher.
@param network_watcher_name [String] The name of the Network Watcher
resource.
@param connection_monitor_name [String] The name of the connection monitor.
@param parameters [ConnectionMonitor] Parameters that define the ... | [
"@param",
"resource_group_name",
"[",
"String",
"]",
"The",
"name",
"of",
"the",
"resource",
"group",
"containing",
"Network",
"Watcher",
".",
"@param",
"network_watcher_name",
"[",
"String",
"]",
"The",
"name",
"of",
"the",
"Network",
"Watcher",
"resource",
"."... | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_network/lib/2018-07-01/generated/azure_mgmt_network/connection_monitors.rb#L58-L74 | train | Creates or updates a connection monitor. | [
30522,
13366,
3443,
1035,
2030,
1035,
10651,
1035,
2004,
6038,
2278,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2897,
30524,
1035,
2171,
1010,
4434,
1035,
8080,
1035,
2171,
1010,
11709,
1010,
7661,
1035,
20346,
2015,
1024,
7661,
1035,
20346,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_network/lib/2018-10-01/generated/azure_mgmt_network/connection_monitors.rb | Azure::Network::Mgmt::V2018_10_01.ConnectionMonitors.begin_stop | def begin_stop(resource_group_name, network_watcher_name, connection_monitor_name, custom_headers:nil)
response = begin_stop_async(resource_group_name, network_watcher_name, connection_monitor_name, custom_headers:custom_headers).value!
nil
end | ruby | def begin_stop(resource_group_name, network_watcher_name, connection_monitor_name, custom_headers:nil)
response = begin_stop_async(resource_group_name, network_watcher_name, connection_monitor_name, custom_headers:custom_headers).value!
nil
end | [
"def",
"begin_stop",
"(",
"resource_group_name",
",",
"network_watcher_name",
",",
"connection_monitor_name",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"begin_stop_async",
"(",
"resource_group_name",
",",
"network_watcher_name",
",",
"connection_monitor_name"... | Stops the specified connection monitor.
@param resource_group_name [String] The name of the resource group containing
Network Watcher.
@param network_watcher_name [String] The name of the Network Watcher
resource.
@param connection_monitor_name [String] The name of the connection monitor.
@param custom_headers [... | [
"Stops",
"the",
"specified",
"connection",
"monitor",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_network/lib/2018-10-01/generated/azure_mgmt_network/connection_monitors.rb#L687-L690 | train | Stops the specified connection monitor. | [
30522,
13366,
4088,
1035,
2644,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2897,
1035,
3422,
2121,
1035,
2171,
1010,
4434,
1035,
8080,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
4088,
1035,
2644,
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... |
aws/aws-sdk-ruby | gems/aws-sdk-autoscaling/lib/aws-sdk-autoscaling/launch_configuration.rb | Aws::AutoScaling.LaunchConfiguration.delete | def delete(options = {})
options = options.merge(launch_configuration_name: @name)
resp = @client.delete_launch_configuration(options)
resp.data
end | ruby | def delete(options = {})
options = options.merge(launch_configuration_name: @name)
resp = @client.delete_launch_configuration(options)
resp.data
end | [
"def",
"delete",
"(",
"options",
"=",
"{",
"}",
")",
"options",
"=",
"options",
".",
"merge",
"(",
"launch_configuration_name",
":",
"@name",
")",
"resp",
"=",
"@client",
".",
"delete_launch_configuration",
"(",
"options",
")",
"resp",
".",
"data",
"end"
] | @!group Actions
@example Request syntax with placeholder values
launch_configuration.delete()
@param [Hash] options ({})
@return [EmptyStructure] | [
"@!group",
"Actions",
"@example",
"Request",
"syntax",
"with",
"placeholder",
"values"
] | e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d | https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-autoscaling/lib/aws-sdk-autoscaling/launch_configuration.rb#L306-L310 | train | Delete the launch configuration | [
30522,
13366,
3972,
12870,
1006,
7047,
1027,
1063,
1065,
1007,
7047,
1027,
7047,
1012,
13590,
1006,
4888,
1035,
9563,
1035,
2171,
1024,
1030,
2171,
1007,
24501,
2361,
1027,
1030,
7396,
1012,
3972,
12870,
1035,
4888,
1035,
9563,
1006,
7047,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | data/azure_service_fabric/lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb | Azure::ServiceFabric::V6_2_0_9.ServiceFabricClientAPIs.delete_service_with_http_info | def delete_service_with_http_info(service_id, force_remove:nil, timeout:60, custom_headers:nil)
delete_service_async(service_id, force_remove:force_remove, timeout:timeout, custom_headers:custom_headers).value!
end | ruby | def delete_service_with_http_info(service_id, force_remove:nil, timeout:60, custom_headers:nil)
delete_service_async(service_id, force_remove:force_remove, timeout:timeout, custom_headers:custom_headers).value!
end | [
"def",
"delete_service_with_http_info",
"(",
"service_id",
",",
"force_remove",
":",
"nil",
",",
"timeout",
":",
"60",
",",
"custom_headers",
":",
"nil",
")",
"delete_service_async",
"(",
"service_id",
",",
"force_remove",
":force_remove",
",",
"timeout",
":",
"ti... | Deletes an existing Service Fabric service.
Deletes an existing Service Fabric service. A service must be created before
it can be deleted. By default, Service Fabric will try to close service
replicas in a graceful manner and then delete the service. However, if the
service is having issues closing the replica gr... | [
"Deletes",
"an",
"existing",
"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#L10440-L10442 | train | Deletes the specified service. | [
30522,
13366,
3972,
12870,
1035,
2326,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
2326,
1035,
8909,
1010,
2486,
1035,
6366,
1024,
9152,
2140,
1010,
2051,
5833,
1024,
3438,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3972,
12870,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
geokit/geokit | lib/geokit/bounds.rb | Geokit.Bounds.to_span | def to_span
lat_span = @ne.lat - @sw.lat
lng_span = crosses_meridian? ? 360 + @ne.lng - @sw.lng : @ne.lng - @sw.lng
Geokit::LatLng.new(lat_span.abs, lng_span.abs)
end | ruby | def to_span
lat_span = @ne.lat - @sw.lat
lng_span = crosses_meridian? ? 360 + @ne.lng - @sw.lng : @ne.lng - @sw.lng
Geokit::LatLng.new(lat_span.abs, lng_span.abs)
end | [
"def",
"to_span",
"lat_span",
"=",
"@ne",
".",
"lat",
"-",
"@sw",
".",
"lat",
"lng_span",
"=",
"crosses_meridian?",
"?",
"360",
"+",
"@ne",
".",
"lng",
"-",
"@sw",
".",
"lng",
":",
"@ne",
".",
"lng",
"-",
"@sw",
".",
"lng",
"Geokit",
"::",
"LatLng"... | Returns true if the candidate object is logically equal. Logical
equivalence is true if the lat and lng attributes are the same for both
objects.
Equivalent to Google Maps API's .toSpan() method on GLatLng's.
Returns a LatLng object, whose coordinates represent the size of a
rectangle defined by these bounds. | [
"Returns",
"true",
"if",
"the",
"candidate",
"object",
"is",
"logically",
"equal",
".",
"Logical",
"equivalence",
"is",
"true",
"if",
"the",
"lat",
"and",
"lng",
"attributes",
"are",
"the",
"same",
"for",
"both",
"objects",
".",
"Equivalent",
"to",
"Google",... | b7c13376bd85bf14f9534228ea466d09ac0afbf4 | https://github.com/geokit/geokit/blob/b7c13376bd85bf14f9534228ea466d09ac0afbf4/lib/geokit/bounds.rb#L60-L64 | train | Returns a new array of the coordinates of the segment in the segment. | [
30522,
13366,
2000,
1035,
8487,
2474,
2102,
1035,
8487,
1027,
1030,
11265,
1012,
2474,
2102,
1011,
1030,
25430,
1012,
2474,
2102,
1048,
3070,
1035,
8487,
1027,
7821,
1035,
17984,
1029,
1029,
9475,
1009,
1030,
11265,
1012,
1048,
3070,
1011,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
puppetlabs/puppet | lib/puppet/util/windows/sid.rb | Puppet::Util::Windows.SID.name_to_principal | def name_to_principal(name)
# Apparently, we accept a symbol..
name = name.to_s.strip if name
# if name is a SID string, convert it to raw bytes for use with lookup_account_sid
raw_sid_bytes = nil
begin
string_to_sid_ptr(name) do |sid_ptr|
raw_sid_bytes = sid_ptr.read_ar... | ruby | def name_to_principal(name)
# Apparently, we accept a symbol..
name = name.to_s.strip if name
# if name is a SID string, convert it to raw bytes for use with lookup_account_sid
raw_sid_bytes = nil
begin
string_to_sid_ptr(name) do |sid_ptr|
raw_sid_bytes = sid_ptr.read_ar... | [
"def",
"name_to_principal",
"(",
"name",
")",
"# Apparently, we accept a symbol..",
"name",
"=",
"name",
".",
"to_s",
".",
"strip",
"if",
"name",
"# if name is a SID string, convert it to raw bytes for use with lookup_account_sid",
"raw_sid_bytes",
"=",
"nil",
"begin",
"strin... | Convert an account name, e.g. 'Administrators' into a Principal::SID object,
e.g. 'S-1-5-32-544'. The name can be specified as 'Administrators',
'BUILTIN\Administrators', or 'S-1-5-32-544', and will return the
SID object. Returns nil if the account doesn't exist.
This method returns a SID::Principal with the accoun... | [
"Convert",
"an",
"account",
"name",
"e",
".",
"g",
".",
"Administrators",
"into",
"a",
"Principal",
"::",
"SID",
"object",
"e",
".",
"g",
".",
"S",
"-",
"1",
"-",
"5",
"-",
"32",
"-",
"544",
".",
"The",
"name",
"can",
"be",
"specified",
"as",
"Ad... | 4baeed97cbb7571ddc6635f0a24debe2e8b22cd3 | https://github.com/puppetlabs/puppet/blob/4baeed97cbb7571ddc6635f0a24debe2e8b22cd3/lib/puppet/util/windows/sid.rb#L66-L82 | train | Returns the principal for the given name. | [
30522,
13366,
2171,
1035,
2000,
1035,
4054,
1006,
2171,
1007,
1001,
4593,
1010,
2057,
5138,
1037,
6454,
1012,
1012,
2171,
1027,
2171,
1012,
2000,
1035,
1055,
1012,
6167,
2065,
2171,
1001,
2065,
2171,
2003,
1037,
15765,
5164,
1010,
10463,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/route_table.rb | Aws::EC2.RouteTable.delete | def delete(options = {})
options = options.merge(route_table_id: @id)
resp = @client.delete_route_table(options)
resp.data
end | ruby | def delete(options = {})
options = options.merge(route_table_id: @id)
resp = @client.delete_route_table(options)
resp.data
end | [
"def",
"delete",
"(",
"options",
"=",
"{",
"}",
")",
"options",
"=",
"options",
".",
"merge",
"(",
"route_table_id",
":",
"@id",
")",
"resp",
"=",
"@client",
".",
"delete_route_table",
"(",
"options",
")",
"resp",
".",
"data",
"end"
] | @example Request syntax with placeholder values
route_table.delete({
dry_run: false,
})
@param [Hash] options ({})
@option options [Boolean] :dry_run
Checks whether you have the required permissions for the action,
without actually making the request, and provides an error response.
If you have t... | [
"@example",
"Request",
"syntax",
"with",
"placeholder",
"values"
] | e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d | https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-ec2/lib/aws-sdk-ec2/route_table.rb#L317-L321 | train | Delete a route table | [
30522,
13366,
3972,
12870,
1006,
7047,
1027,
1063,
1065,
1007,
7047,
1027,
7047,
1012,
13590,
1006,
2799,
1035,
2795,
1035,
8909,
1024,
1030,
8909,
1007,
24501,
2361,
1027,
1030,
7396,
1012,
3972,
12870,
1035,
2799,
1035,
2795,
1006,
7047,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_web/lib/2018-02-01/generated/azure_mgmt_web/diagnostics.rb | Azure::Web::Mgmt::V2018_02_01.Diagnostics.list_site_detector_responses_slot_as_lazy | def list_site_detector_responses_slot_as_lazy(resource_group_name, site_name, slot, custom_headers:nil)
response = list_site_detector_responses_slot_async(resource_group_name, site_name, slot, custom_headers:custom_headers).value!
unless response.nil?
page = response.body
page.next_method = ... | ruby | def list_site_detector_responses_slot_as_lazy(resource_group_name, site_name, slot, custom_headers:nil)
response = list_site_detector_responses_slot_async(resource_group_name, site_name, slot, custom_headers:custom_headers).value!
unless response.nil?
page = response.body
page.next_method = ... | [
"def",
"list_site_detector_responses_slot_as_lazy",
"(",
"resource_group_name",
",",
"site_name",
",",
"slot",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"list_site_detector_responses_slot_async",
"(",
"resource_group_name",
",",
"site_name",
",",
"slot",
",... | List Site Detector Responses
List Site Detector Responses
@param resource_group_name [String] Name of the resource group to which the
resource belongs.
@param site_name [String] Site Name
@param slot [String] Slot Name
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added t... | [
"List",
"Site",
"Detector",
"Responses"
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_web/lib/2018-02-01/generated/azure_mgmt_web/diagnostics.rb#L3725-L3734 | train | Gets the list of detector responses for a site. | [
30522,
30524,
1027,
2862,
1035,
2609,
1035,
19034,
1035,
10960,
1035,
10453,
1035,
2004,
6038,
2278,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2609,
1035,
2171,
1010,
10453,
1010,
7661,
1035,
20346,
2015,
1024,
7661,
1035,
20346,
2015,
1007... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_web/lib/2018-02-01/generated/azure_mgmt_web/app_service_environments.rb | Azure::Web::Mgmt::V2018_02_01.AppServiceEnvironments.list_worker_pool_skus | def list_worker_pool_skus(resource_group_name, name, worker_pool_name, custom_headers:nil)
first_page = list_worker_pool_skus_as_lazy(resource_group_name, name, worker_pool_name, custom_headers:custom_headers)
first_page.get_all_items
end | ruby | def list_worker_pool_skus(resource_group_name, name, worker_pool_name, custom_headers:nil)
first_page = list_worker_pool_skus_as_lazy(resource_group_name, name, worker_pool_name, custom_headers:custom_headers)
first_page.get_all_items
end | [
"def",
"list_worker_pool_skus",
"(",
"resource_group_name",
",",
"name",
",",
"worker_pool_name",
",",
"custom_headers",
":",
"nil",
")",
"first_page",
"=",
"list_worker_pool_skus_as_lazy",
"(",
"resource_group_name",
",",
"name",
",",
"worker_pool_name",
",",
"custom_h... | Get available SKUs for scaling a worker pool.
Get available SKUs for scaling a worker pool.
@param resource_group_name [String] Name of the resource group to which the
resource belongs.
@param name [String] Name of the App Service Environment.
@param worker_pool_name [String] Name of the worker pool.
@param cus... | [
"Get",
"available",
"SKUs",
"for",
"scaling",
"a",
"worker",
"pool",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_web/lib/2018-02-01/generated/azure_mgmt_web/app_service_environments.rb#L3937-L3940 | train | Gets all the skus of a worker pool. | [
30522,
13366,
2862,
1035,
7309,
1035,
4770,
1035,
15315,
2271,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2171,
1010,
7309,
1035,
4770,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
2034,
1035,
3931,
1027,
2862,
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_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/group_users.rb | Azure::ApiManagement::Mgmt::V2016_10_10.GroupUsers.create_with_http_info | def create_with_http_info(resource_group_name, service_name, group_id, uid, custom_headers:nil)
create_async(resource_group_name, service_name, group_id, uid, custom_headers:custom_headers).value!
end | ruby | def create_with_http_info(resource_group_name, service_name, group_id, uid, custom_headers:nil)
create_async(resource_group_name, service_name, group_id, uid, custom_headers:custom_headers).value!
end | [
"def",
"create_with_http_info",
"(",
"resource_group_name",
",",
"service_name",
",",
"group_id",
",",
"uid",
",",
"custom_headers",
":",
"nil",
")",
"create_async",
"(",
"resource_group_name",
",",
"service_name",
",",
"group_id",
",",
"uid",
",",
"custom_headers",... | Adds a user to the specified group.
@param resource_group_name [String] The name of the resource group.
@param service_name [String] The name of the API Management service.
@param group_id [String] Group identifier. Must be unique in the current API
Management service instance.
@param uid [String] User identifier... | [
"Adds",
"a",
"user",
"to",
"the",
"specified",
"group",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/group_users.rb#L221-L223 | train | Creates a new chunk of a chunk of a chunk of a chunk of data. | [
30522,
13366,
3443,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2326,
1035,
2171,
1010,
2177,
1035,
8909,
1010,
21318,
2094,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3443,
1035,
2004,
6038,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
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_repair_task_list | def get_repair_task_list(task_id_filter:nil, state_filter:nil, executor_filter:nil, custom_headers:nil)
response = get_repair_task_list_async(task_id_filter:task_id_filter, state_filter:state_filter, executor_filter:executor_filter, custom_headers:custom_headers).value!
response.body unless response.nil?
... | ruby | def get_repair_task_list(task_id_filter:nil, state_filter:nil, executor_filter:nil, custom_headers:nil)
response = get_repair_task_list_async(task_id_filter:task_id_filter, state_filter:state_filter, executor_filter:executor_filter, custom_headers:custom_headers).value!
response.body unless response.nil?
... | [
"def",
"get_repair_task_list",
"(",
"task_id_filter",
":",
"nil",
",",
"state_filter",
":",
"nil",
",",
"executor_filter",
":",
"nil",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"get_repair_task_list_async",
"(",
"task_id_filter",
":task_id_filter",
",... | Gets a list of repair tasks matching the given filters.
This API supports the Service Fabric platform; it is not meant to be used
directly from your code.
@param task_id_filter [String] The repair task ID prefix to be matched.
@param state_filter [Integer] A bitwise-OR of the following values,
specifying which t... | [
"Gets",
"a",
"list",
"of",
"repair",
"tasks",
"matching",
"the",
"given",
"filters",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_service_fabric/lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb#L13985-L13988 | train | Gets the list of tasks that are currently in the current task list. | [
30522,
13366,
2131,
1035,
7192,
1035,
4708,
1035,
2862,
1006,
4708,
1035,
8909,
1035,
11307,
1024,
9152,
2140,
1010,
2110,
1035,
11307,
1024,
9152,
2140,
1010,
4654,
8586,
16161,
2099,
1035,
11307,
1024,
9152,
2140,
1010,
7661,
1035,
20346,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
hashicorp/vault-ruby | lib/vault/api/sys/audit.rb | Vault.Sys.enable_audit | def enable_audit(path, type, description, options = {})
client.put("/v1/sys/audit/#{encode_path(path)}", JSON.fast_generate(
type: type,
description: description,
options: options,
))
return true
end | ruby | def enable_audit(path, type, description, options = {})
client.put("/v1/sys/audit/#{encode_path(path)}", JSON.fast_generate(
type: type,
description: description,
options: options,
))
return true
end | [
"def",
"enable_audit",
"(",
"path",
",",
"type",
",",
"description",
",",
"options",
"=",
"{",
"}",
")",
"client",
".",
"put",
"(",
"\"/v1/sys/audit/#{encode_path(path)}\"",
",",
"JSON",
".",
"fast_generate",
"(",
"type",
":",
"type",
",",
"description",
":"... | Enable a particular audit. Note: the +options+ depend heavily on the
type of audit being enabled. Please refer to audit-specific documentation
for which need to be enabled.
@example
Vault.sys.enable_audit("/file-audit", "file", "File audit", path: "/path/on/disk") #=> true
@param [String] path
the path to m... | [
"Enable",
"a",
"particular",
"audit",
".",
"Note",
":",
"the",
"+",
"options",
"+",
"depend",
"heavily",
"on",
"the",
"type",
"of",
"audit",
"being",
"enabled",
".",
"Please",
"refer",
"to",
"audit",
"-",
"specific",
"documentation",
"for",
"which",
"need"... | 02f0532a802ba1a2a0d8703a4585dab76eb9d864 | https://github.com/hashicorp/vault-ruby/blob/02f0532a802ba1a2a0d8703a4585dab76eb9d864/lib/vault/api/sys/audit.rb#L53-L60 | train | Enable auditing for a given path | [
30522,
13366,
9585,
1035,
15727,
1006,
4130,
1010,
2828,
1010,
6412,
1010,
7047,
1027,
1063,
1065,
1007,
7396,
1012,
2404,
1006,
1000,
1013,
1058,
2487,
1013,
25353,
2015,
1013,
15727,
1013,
1001,
1063,
4372,
16044,
1035,
4130,
1006,
4130,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/editor.rb | Frameit.Editor.put_title_into_background_stacked | def put_title_into_background_stacked(background, title, keyword)
resize_text(title)
resize_text(keyword)
vertical_padding = vertical_frame_padding # assign padding to variable
spacing_between_title_and_keyword = (actual_font_size / 2)
title_left_space = (background.width / 2.0 - title.wi... | ruby | def put_title_into_background_stacked(background, title, keyword)
resize_text(title)
resize_text(keyword)
vertical_padding = vertical_frame_padding # assign padding to variable
spacing_between_title_and_keyword = (actual_font_size / 2)
title_left_space = (background.width / 2.0 - title.wi... | [
"def",
"put_title_into_background_stacked",
"(",
"background",
",",
"title",
",",
"keyword",
")",
"resize_text",
"(",
"title",
")",
"resize_text",
"(",
"keyword",
")",
"vertical_padding",
"=",
"vertical_frame_padding",
"# assign padding to variable",
"spacing_between_title_... | Add the title above or below the device | [
"Add",
"the",
"title",
"above",
"or",
"below",
"the",
"device"
] | 457c5d647c77f0e078dafa5129da616914e002c5 | https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/frameit/lib/frameit/editor.rb#L292-L321 | train | This method is used to put the title into the background image | [
30522,
13366,
2404,
1035,
2516,
1035,
2046,
1035,
4281,
1035,
16934,
1006,
4281,
1010,
2516,
1010,
3145,
18351,
1007,
24501,
4697,
1035,
3793,
1006,
2516,
1007,
24501,
4697,
1035,
3793,
1006,
3145,
18351,
1007,
7471,
1035,
11687,
4667,
1027... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/databases.rb | Azure::SQL::Mgmt::V2014_04_01.Databases.begin_export_with_http_info | def begin_export_with_http_info(resource_group_name, server_name, database_name, parameters, custom_headers:nil)
begin_export_async(resource_group_name, server_name, database_name, parameters, custom_headers:custom_headers).value!
end | ruby | def begin_export_with_http_info(resource_group_name, server_name, database_name, parameters, custom_headers:nil)
begin_export_async(resource_group_name, server_name, database_name, parameters, custom_headers:custom_headers).value!
end | [
"def",
"begin_export_with_http_info",
"(",
"resource_group_name",
",",
"server_name",
",",
"database_name",
",",
"parameters",
",",
"custom_headers",
":",
"nil",
")",
"begin_export_async",
"(",
"resource_group_name",
",",
"server_name",
",",
"database_name",
",",
"param... | Exports a database to a bacpac.
@param resource_group_name [String] The name of the resource group that
contains the resource. You can obtain this value from the Azure Resource
Manager API or the portal.
@param server_name [String] The name of the server.
@param database_name [String] The name of the database to ... | [
"Exports",
"a",
"database",
"to",
"a",
"bacpac",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql/databases.rb#L2024-L2026 | train | Export a database to a JSON blob. | [
30522,
13366,
4088,
1035,
9167,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
8241,
1035,
2171,
1010,
7809,
1035,
2171,
1010,
11709,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
4088,
1035,
9167,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
square/connect-ruby-sdk | lib/square_connect/models/order_fulfillment_recipient.rb | SquareConnect.OrderFulfillmentRecipient.phone_number= | def phone_number=(phone_number)
if !phone_number.nil? && phone_number.to_s.length > 16
fail ArgumentError, "invalid value for 'phone_number', the character length must be smaller than or equal to 16."
end
@phone_number = phone_number
end | ruby | def phone_number=(phone_number)
if !phone_number.nil? && phone_number.to_s.length > 16
fail ArgumentError, "invalid value for 'phone_number', the character length must be smaller than or equal to 16."
end
@phone_number = phone_number
end | [
"def",
"phone_number",
"=",
"(",
"phone_number",
")",
"if",
"!",
"phone_number",
".",
"nil?",
"&&",
"phone_number",
".",
"to_s",
".",
"length",
">",
"16",
"fail",
"ArgumentError",
",",
"\"invalid value for 'phone_number', the character length must be smaller than or equal... | Custom attribute writer method with validation
@param [Object] phone_number Value to be assigned | [
"Custom",
"attribute",
"writer",
"method",
"with",
"validation"
] | 798eb9ded716f23b9f1518386f1c311a34bca8bf | https://github.com/square/connect-ruby-sdk/blob/798eb9ded716f23b9f1518386f1c311a34bca8bf/lib/square_connect/models/order_fulfillment_recipient.rb#L126-L133 | train | Set the phone number of the phone. | [
30522,
30524,
1996,
2839,
3091,
2442,
2022,
3760,
2084,
2030,
5020,
2000,
2385,
1012,
1000,
2203,
1030,
3042,
1035,
2193,
1027,
3042,
1035,
2193,
2203,
102,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_iot_hub/lib/2017-01-19/generated/azure_mgmt_iot_hub/iot_hub_resource.rb | Azure::IotHub::Mgmt::V2017_01_19.IotHubResource.delete_async | def delete_async(resource_group_name, resource_name, custom_headers:nil)
# Send request
promise = begin_delete_async(resource_group_name, resource_name, custom_headers:custom_headers)
promise = promise.then do |response|
# Defining deserialization method.
deserialize_method = lambda d... | ruby | def delete_async(resource_group_name, resource_name, custom_headers:nil)
# Send request
promise = begin_delete_async(resource_group_name, resource_name, custom_headers:custom_headers)
promise = promise.then do |response|
# Defining deserialization method.
deserialize_method = lambda d... | [
"def",
"delete_async",
"(",
"resource_group_name",
",",
"resource_name",
",",
"custom_headers",
":",
"nil",
")",
"# Send request",
"promise",
"=",
"begin_delete_async",
"(",
"resource_group_name",
",",
"resource_name",
",",
"custom_headers",
":custom_headers",
")",
"pro... | @param resource_group_name [String] The name of the resource group that
contains the IoT hub.
@param resource_name [String] The name of the IoT hub to delete.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request.
@return [Concurrent::Promise] promise which... | [
"@param",
"resource_group_name",
"[",
"String",
"]",
"The",
"name",
"of",
"the",
"resource",
"group",
"that",
"contains",
"the",
"IoT",
"hub",
".",
"@param",
"resource_name",
"[",
"String",
"]",
"The",
"name",
"of",
"the",
"IoT",
"hub",
"to",
"delete",
"."... | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_iot_hub/lib/2017-01-19/generated/azure_mgmt_iot_hub/iot_hub_resource.rb#L205-L228 | train | Deletes a resource. | [
30522,
13366,
3972,
12870,
1035,
2004,
6038,
2278,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
7692,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
1001,
4604,
5227,
4872,
1027,
4088,
1035,
3972,
12870,
1035,
2004,
6038,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_batch/lib/2017-09-01/generated/azure_mgmt_batch/pool_operations.rb | Azure::Batch::Mgmt::V2017_09_01.PoolOperations.stop_resize_with_http_info | def stop_resize_with_http_info(resource_group_name, account_name, pool_name, custom_headers:nil)
stop_resize_async(resource_group_name, account_name, pool_name, custom_headers:custom_headers).value!
end | ruby | def stop_resize_with_http_info(resource_group_name, account_name, pool_name, custom_headers:nil)
stop_resize_async(resource_group_name, account_name, pool_name, custom_headers:custom_headers).value!
end | [
"def",
"stop_resize_with_http_info",
"(",
"resource_group_name",
",",
"account_name",
",",
"pool_name",
",",
"custom_headers",
":",
"nil",
")",
"stop_resize_async",
"(",
"resource_group_name",
",",
"account_name",
",",
"pool_name",
",",
"custom_headers",
":custom_headers"... | Stops an ongoing resize operation on the pool.
This does not restore the pool to its previous state before the resize
operation: it only stops any further changes being made, and the pool
maintains its current state. After stopping, the pool stabilizes at the
number of nodes it was at when the stop operation was d... | [
"Stops",
"an",
"ongoing",
"resize",
"operation",
"on",
"the",
"pool",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_batch/lib/2017-09-01/generated/azure_mgmt_batch/pool_operations.rb#L683-L685 | train | Stops resize of the specified pool. | [
30522,
13366,
2644,
1035,
24501,
4697,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
4070,
1035,
2171,
1010,
4770,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
2644,
1035,
24501,
4697,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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.begin_update_with_http_info | def begin_update_with_http_info(resource_group_name, server_name, server_update_parameters, custom_headers:nil)
begin_update_async(resource_group_name, server_name, server_update_parameters, custom_headers:custom_headers).value!
end | ruby | def begin_update_with_http_info(resource_group_name, server_name, server_update_parameters, custom_headers:nil)
begin_update_async(resource_group_name, server_name, server_update_parameters, custom_headers:custom_headers).value!
end | [
"def",
"begin_update_with_http_info",
"(",
"resource_group_name",
",",
"server_name",
",",
"server_update_parameters",
",",
"custom_headers",
":",
"nil",
")",
"begin_update_async",
"(",
"resource_group_name",
",",
"server_name",
",",
"server_update_parameters",
",",
"custom... | Updates the current state of the specified Analysis Services server.
@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 Analysi... | [
"Updates",
"the",
"current",
"state",
"of",
"the",
"specified",
"Analysis",
"Services",
"server",
"."
] | 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#L1501-L1503 | train | Updates a server s index. | [
30522,
13366,
4088,
1035,
10651,
1035,
2007,
30524,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
8241,
1035,
2171,
1010,
8241,
1035,
10651,
1035,
11709,
1010,
7661,
1035,
20346,
2015,
1024,
7661,
1035,
20346,
2015,
1007,
1012,
3643,
999,
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... |
aws/aws-sdk-ruby | gems/aws-sdk-rds/lib/aws-sdk-rds/db_instance.rb | Aws::RDS.DBInstance.modify | def modify(options = {})
options = options.merge(db_instance_identifier: @id)
resp = @client.modify_db_instance(options)
DBInstance.new(
id: resp.data.db_instance.db_instance_identifier,
data: resp.data.db_instance,
client: @client
)
end | ruby | def modify(options = {})
options = options.merge(db_instance_identifier: @id)
resp = @client.modify_db_instance(options)
DBInstance.new(
id: resp.data.db_instance.db_instance_identifier,
data: resp.data.db_instance,
client: @client
)
end | [
"def",
"modify",
"(",
"options",
"=",
"{",
"}",
")",
"options",
"=",
"options",
".",
"merge",
"(",
"db_instance_identifier",
":",
"@id",
")",
"resp",
"=",
"@client",
".",
"modify_db_instance",
"(",
"options",
")",
"DBInstance",
".",
"new",
"(",
"id",
":"... | @example Request syntax with placeholder values
dbinstance = db_instance.modify({
allocated_storage: 1,
db_instance_class: "String",
db_subnet_group_name: "String",
db_security_groups: ["String"],
vpc_security_group_ids: ["String"],
apply_immediately: false,
master_user_password: ... | [
"@example",
"Request",
"syntax",
"with",
"placeholder",
"values"
] | e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d | https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-rds/lib/aws-sdk-rds/db_instance.rb#L2410-L2418 | train | Modify the DB Instance | [
30522,
13366,
19933,
1006,
7047,
1027,
1063,
1065,
1007,
7047,
1027,
7047,
1012,
13590,
1006,
16962,
1035,
6013,
1035,
8909,
4765,
18095,
1024,
1030,
8909,
1007,
24501,
2361,
1027,
1030,
7396,
1012,
19933,
1035,
16962,
1035,
6013,
1006,
704... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/controllers/pwb/import/properties_controller.rb | Pwb.Import::PropertiesController.retrieve_from_pwb | def retrieve_from_pwb
imported_properties = Pwb::ImportProperties.new(params[:file]).import_csv
render json: {
retrieved_items: imported_properties
}
# return render json: { "success": true }, status: :ok, head: :no_content
end | ruby | def retrieve_from_pwb
imported_properties = Pwb::ImportProperties.new(params[:file]).import_csv
render json: {
retrieved_items: imported_properties
}
# return render json: { "success": true }, status: :ok, head: :no_content
end | [
"def",
"retrieve_from_pwb",
"imported_properties",
"=",
"Pwb",
"::",
"ImportProperties",
".",
"new",
"(",
"params",
"[",
":file",
"]",
")",
".",
"import_csv",
"render",
"json",
":",
"{",
"retrieved_items",
":",
"imported_properties",
"}",
"# return render json: { \"... | http://localhost:3000/import/Properties/retrieve_from_pwb | [
"http",
":",
"//",
"localhost",
":",
"3000",
"/",
"import",
"/",
"Properties",
"/",
"retrieve_from_pwb"
] | fba4e6d4ffa7bc1f4d3b50dfa5a6a9fbfee23f21 | https://github.com/etewiah/property_web_builder/blob/fba4e6d4ffa7bc1f4d3b50dfa5a6a9fbfee23f21/app/controllers/pwb/import/properties_controller.rb#L4-L10 | train | retrieve from pwb
| [
30522,
13366,
12850,
1035,
2013,
1035,
1052,
2860,
2497,
10964,
1035,
5144,
1027,
1052,
2860,
2497,
1024,
1024,
12324,
21572,
4842,
7368,
1012,
2047,
1006,
11498,
5244,
1031,
1024,
5371,
1033,
1007,
1012,
12324,
1035,
20116,
2615,
17552,
10... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
decidim/decidim | decidim-core/app/models/decidim/scope.rb | Decidim.Scope.part_of_scopes | def part_of_scopes(root = nil)
scope_ids = part_of
scope_ids.select! { |id| id == root.id || !root.part_of.member?(id) } if root
organization.scopes.where(id: scope_ids).sort { |s1, s2| part_of.index(s2.id) <=> part_of.index(s1.id) }
end | ruby | def part_of_scopes(root = nil)
scope_ids = part_of
scope_ids.select! { |id| id == root.id || !root.part_of.member?(id) } if root
organization.scopes.where(id: scope_ids).sort { |s1, s2| part_of.index(s2.id) <=> part_of.index(s1.id) }
end | [
"def",
"part_of_scopes",
"(",
"root",
"=",
"nil",
")",
"scope_ids",
"=",
"part_of",
"scope_ids",
".",
"select!",
"{",
"|",
"id",
"|",
"id",
"==",
"root",
".",
"id",
"||",
"!",
"root",
".",
"part_of",
".",
"member?",
"(",
"id",
")",
"}",
"if",
"root... | Gets the scopes from the part_of list in descending order (first the top level scope, last itself)
root - The root scope to start retrieval. If present, ignores top level scopes until reaching the root scope.
Returns an array of Scope objects | [
"Gets",
"the",
"scopes",
"from",
"the",
"part_of",
"list",
"in",
"descending",
"order",
"(",
"first",
"the",
"top",
"level",
"scope",
"last",
"itself",
")"
] | 6e2b14e559a63088669904e3c5c49a5180700cf7 | https://github.com/decidim/decidim/blob/6e2b14e559a63088669904e3c5c49a5180700cf7/decidim-core/app/models/decidim/scope.rb#L66-L70 | train | Returns the part_of scopes for the current organization | [
30522,
13366,
2112,
1035,
1997,
1035,
9531,
2015,
1006,
7117,
1027,
9152,
2140,
1007,
9531,
1035,
8909,
2015,
1027,
2112,
1035,
1997,
9531,
1035,
8909,
2015,
1012,
7276,
999,
1063,
1064,
8909,
1064,
8909,
1027,
1027,
7117,
1012,
8909,
106... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
meew0/discordrb | lib/discordrb/await.rb | Discordrb.Await.match | def match(event)
dummy_handler = EventContainer.handler_class(@type).new(@attributes, @bot)
return [nil, nil] unless event.instance_of?(@type) && dummy_handler.matches?(event)
should_delete = nil
should_delete = true if (@block && @block.call(event) != false) || !@block
[@key, should_del... | ruby | def match(event)
dummy_handler = EventContainer.handler_class(@type).new(@attributes, @bot)
return [nil, nil] unless event.instance_of?(@type) && dummy_handler.matches?(event)
should_delete = nil
should_delete = true if (@block && @block.call(event) != false) || !@block
[@key, should_del... | [
"def",
"match",
"(",
"event",
")",
"dummy_handler",
"=",
"EventContainer",
".",
"handler_class",
"(",
"@type",
")",
".",
"new",
"(",
"@attributes",
",",
"@bot",
")",
"return",
"[",
"nil",
",",
"nil",
"]",
"unless",
"event",
".",
"instance_of?",
"(",
"@ty... | Makes a new await. For internal use only.
@!visibility private
Checks whether the await can be triggered by the given event, and if it can, execute the block
and return its result along with this await's key.
@param event [Event] An event to check for.
@return [Array] This await's key and whether or not it should ... | [
"Makes",
"a",
"new",
"await",
".",
"For",
"internal",
"use",
"only",
"."
] | 764298a1ff0be69a1853b510d736f21c2b91a2fe | https://github.com/meew0/discordrb/blob/764298a1ff0be69a1853b510d736f21c2b91a2fe/lib/discordrb/await.rb#L42-L50 | train | Returns the key and value for the event. | [
30522,
13366,
2674,
1006,
2724,
1007,
24369,
1035,
28213,
1027,
2724,
8663,
18249,
2121,
1012,
28213,
1035,
2465,
1006,
1030,
2828,
1007,
1012,
2047,
1006,
1030,
12332,
1010,
1030,
28516,
1007,
2709,
1031,
9152,
2140,
1010,
9152,
2140,
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 | management/azure_mgmt_batch/lib/2017-09-01/generated/azure_mgmt_batch/pool_operations.rb | Azure::Batch::Mgmt::V2017_09_01.PoolOperations.create_async | def create_async(resource_group_name, account_name, pool_name, parameters, if_match:nil, if_none_match:nil, custom_headers:nil)
# Send request
promise = begin_create_async(resource_group_name, account_name, pool_name, parameters, if_match:if_match, if_none_match:if_none_match, custom_headers:custom_headers)... | ruby | def create_async(resource_group_name, account_name, pool_name, parameters, if_match:nil, if_none_match:nil, custom_headers:nil)
# Send request
promise = begin_create_async(resource_group_name, account_name, pool_name, parameters, if_match:if_match, if_none_match:if_none_match, custom_headers:custom_headers)... | [
"def",
"create_async",
"(",
"resource_group_name",
",",
"account_name",
",",
"pool_name",
",",
"parameters",
",",
"if_match",
":",
"nil",
",",
"if_none_match",
":",
"nil",
",",
"custom_headers",
":",
"nil",
")",
"# Send request",
"promise",
"=",
"begin_create_asyn... | @param resource_group_name [String] The name of the resource group that
contains the Batch account.
@param account_name [String] The name of the Batch account.
@param pool_name [String] The pool name. This must be unique within the
account.
@param parameters [Pool] Additional parameters for pool creation.
@param ... | [
"@param",
"resource_group_name",
"[",
"String",
"]",
"The",
"name",
"of",
"the",
"resource",
"group",
"that",
"contains",
"the",
"Batch",
"account",
".",
"@param",
"account_name",
"[",
"String",
"]",
"The",
"name",
"of",
"the",
"Batch",
"account",
".",
"@par... | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_batch/lib/2017-09-01/generated/azure_mgmt_batch/pool_operations.rb#L221-L237 | train | Creates a pool. | [
30522,
13366,
3443,
1035,
2004,
6038,
2278,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
4070,
1035,
2171,
1010,
4770,
1035,
2171,
1010,
11709,
1010,
2065,
1035,
2674,
1024,
9152,
2140,
1010,
2065,
1035,
3904,
1035,
2674,
1024,
9152,
2140,
1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
refinery/refinerycms | pages/app/models/refinery/page.rb | Refinery.Page.reposition_parts! | def reposition_parts!
reload.parts.each_with_index do |part, index|
part.update_columns position: index
end
end | ruby | def reposition_parts!
reload.parts.each_with_index do |part, index|
part.update_columns position: index
end
end | [
"def",
"reposition_parts!",
"reload",
".",
"parts",
".",
"each_with_index",
"do",
"|",
"part",
",",
"index",
"|",
"part",
".",
"update_columns",
"position",
":",
"index",
"end",
"end"
] | Repositions the child page_parts that belong to this page.
This ensures that they are in the correct 0,1,2,3,4... etc order. | [
"Repositions",
"the",
"child",
"page_parts",
"that",
"belong",
"to",
"this",
"page",
".",
"This",
"ensures",
"that",
"they",
"are",
"in",
"the",
"correct",
"0",
"1",
"2",
"3",
"4",
"...",
"etc",
"order",
"."
] | 67f117f937c5264ec0aeabe8e7eac1d562c5bc7b | https://github.com/refinery/refinerycms/blob/67f117f937c5264ec0aeabe8e7eac1d562c5bc7b/pages/app/models/refinery/page.rb#L190-L194 | train | reposition the parts | [
30522,
13366,
16360,
19234,
1035,
3033,
999,
2128,
11066,
1012,
3033,
1012,
2169,
1035,
2007,
1035,
5950,
2079,
1064,
2112,
1010,
5950,
1064,
2112,
1012,
10651,
1035,
7753,
2597,
1024,
5950,
2203,
2203,
102,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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.tag_image_in_stream_with_http_info | def tag_image_in_stream_with_http_info(image, language:nil, custom_headers:nil)
tag_image_in_stream_async(image, language:language, custom_headers:custom_headers).value!
end | ruby | def tag_image_in_stream_with_http_info(image, language:nil, custom_headers:nil)
tag_image_in_stream_async(image, language:language, custom_headers:custom_headers).value!
end | [
"def",
"tag_image_in_stream_with_http_info",
"(",
"image",
",",
"language",
":",
"nil",
",",
"custom_headers",
":",
"nil",
")",
"tag_image_in_stream_async",
"(",
"image",
",",
"language",
":",
"language",
",",
"custom_headers",
":custom_headers",
")",
".",
"value!",... | This operation generates a list of words, or tags, that are relevant to the
content of the supplied image. The Computer Vision API can return tags based
on objects, living beings, scenery or actions found in images. Unlike
categories, tags are not organized according to a hierarchical classification
system, but cor... | [
"This",
"operation",
"generates",
"a",
"list",
"of",
"words",
"or",
"tags",
"that",
"are",
"relevant",
"to",
"the",
"content",
"of",
"the",
"supplied",
"image",
".",
"The",
"Computer",
"Vision",
"API",
"can",
"return",
"tags",
"based",
"on",
"objects",
"li... | 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#L2867-L2869 | train | Tags an image in an image stream. | [
30522,
13366,
6415,
1035,
3746,
1035,
30524,
2653,
1010,
7661,
1035,
20346,
2015,
1024,
7661,
1035,
20346,
2015,
1007,
1012,
3643,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
twitter/secure_headers | lib/secure_headers/headers/content_security_policy.rb | SecureHeaders.ContentSecurityPolicy.build_value | def build_value
directives.map do |directive_name|
case DIRECTIVE_VALUE_TYPES[directive_name]
when :source_list, :require_sri_for_list # require_sri is a simple set of strings that don't need to deal with symbol casing
build_source_list_directive(directive_name)
when :boolean
... | ruby | def build_value
directives.map do |directive_name|
case DIRECTIVE_VALUE_TYPES[directive_name]
when :source_list, :require_sri_for_list # require_sri is a simple set of strings that don't need to deal with symbol casing
build_source_list_directive(directive_name)
when :boolean
... | [
"def",
"build_value",
"directives",
".",
"map",
"do",
"|",
"directive_name",
"|",
"case",
"DIRECTIVE_VALUE_TYPES",
"[",
"directive_name",
"]",
"when",
":source_list",
",",
":require_sri_for_list",
"# require_sri is a simple set of strings that don't need to deal with symbol casin... | Private: converts the config object into a string representing a policy.
Places default-src at the first directive and report-uri as the last. All
others are presented in alphabetical order.
Returns a content security policy header value. | [
"Private",
":",
"converts",
"the",
"config",
"object",
"into",
"a",
"string",
"representing",
"a",
"policy",
".",
"Places",
"default",
"-",
"src",
"at",
"the",
"first",
"directive",
"and",
"report",
"-",
"uri",
"as",
"the",
"last",
".",
"All",
"others",
... | 543e6712aadae08f1653ed973e6b6204f7eac26a | https://github.com/twitter/secure_headers/blob/543e6712aadae08f1653ed973e6b6204f7eac26a/lib/secure_headers/headers/content_security_policy.rb#L51-L64 | train | Build the value of the directive | [
30522,
13366,
3857,
1035,
3643,
16449,
2015,
1012,
4949,
2079,
1064,
16449,
1035,
2171,
1064,
2553,
16449,
1035,
3643,
1035,
4127,
1031,
16449,
1035,
2171,
1033,
2043,
1024,
3120,
1035,
2862,
1010,
1024,
5478,
1035,
5185,
1035,
2005,
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... |
tongueroo/ufo | lib/ufo/stack.rb | Ufo.Stack.template_body | def template_body
custom_template = "#{Ufo.root}/.ufo/settings/cfn/stack.yml"
path = if File.exist?(custom_template)
custom_template
else
# built-in default
File.expand_path("../cfn/stack.yml", File.dirname(__FILE__))
end
RenderMeP... | ruby | def template_body
custom_template = "#{Ufo.root}/.ufo/settings/cfn/stack.yml"
path = if File.exist?(custom_template)
custom_template
else
# built-in default
File.expand_path("../cfn/stack.yml", File.dirname(__FILE__))
end
RenderMeP... | [
"def",
"template_body",
"custom_template",
"=",
"\"#{Ufo.root}/.ufo/settings/cfn/stack.yml\"",
"path",
"=",
"if",
"File",
".",
"exist?",
"(",
"custom_template",
")",
"custom_template",
"else",
"# built-in default",
"File",
".",
"expand_path",
"(",
"\"../cfn/stack.yml\"",
... | do not memoize template_body it can change for a rename retry | [
"do",
"not",
"memoize",
"template_body",
"it",
"can",
"change",
"for",
"a",
"rename",
"retry"
] | 16ac3dad28edcab2693c0e7d89a1971aca65b8f9 | https://github.com/tongueroo/ufo/blob/16ac3dad28edcab2693c0e7d89a1971aca65b8f9/lib/ufo/stack.rb#L73-L82 | train | Returns the body of the template | [
30522,
13366,
23561,
1035,
2303,
7661,
1035,
23561,
1027,
1000,
1001,
1063,
24321,
1012,
7117,
1065,
1013,
1012,
24321,
1013,
10906,
1013,
12935,
2078,
1013,
9991,
1012,
1061,
19968,
1000,
4130,
1027,
2065,
5371,
1012,
4839,
1029,
1006,
766... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/virtual_machine_scale_sets.rb | Azure::Compute::Mgmt::V2019_03_01.VirtualMachineScaleSets.begin_reimage_with_http_info | def begin_reimage_with_http_info(resource_group_name, vm_scale_set_name, vm_scale_set_reimage_input:nil, custom_headers:nil)
begin_reimage_async(resource_group_name, vm_scale_set_name, vm_scale_set_reimage_input:vm_scale_set_reimage_input, custom_headers:custom_headers).value!
end | ruby | def begin_reimage_with_http_info(resource_group_name, vm_scale_set_name, vm_scale_set_reimage_input:nil, custom_headers:nil)
begin_reimage_async(resource_group_name, vm_scale_set_name, vm_scale_set_reimage_input:vm_scale_set_reimage_input, custom_headers:custom_headers).value!
end | [
"def",
"begin_reimage_with_http_info",
"(",
"resource_group_name",
",",
"vm_scale_set_name",
",",
"vm_scale_set_reimage_input",
":",
"nil",
",",
"custom_headers",
":",
"nil",
")",
"begin_reimage_async",
"(",
"resource_group_name",
",",
"vm_scale_set_name",
",",
"vm_scale_se... | Reimages (upgrade the operating system) one or more virtual machines in a VM
scale set which don't have a ephemeral OS disk, for virtual machines who have
a ephemeral OS disk the virtual machine is reset to initial state.
@param resource_group_name [String] The name of the resource group.
@param vm_scale_set_name ... | [
"Reimages",
"(",
"upgrade",
"the",
"operating",
"system",
")",
"one",
"or",
"more",
"virtual",
"machines",
"in",
"a",
"VM",
"scale",
"set",
"which",
"don",
"t",
"have",
"a",
"ephemeral",
"OS",
"disk",
"for",
"virtual",
"machines",
"who",
"have",
"a",
"ep... | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_compute/lib/2019-03-01/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb#L2471-L2473 | train | Reimage a virtual machine in a VM scale set. | [
30522,
13366,
4088,
1035,
24964,
26860,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
1058,
2213,
1035,
4094,
1035,
2275,
1035,
2171,
1010,
1058,
2213,
1035,
4094,
1035,
2275,
1035,
30524,
2015,
1024,
9152,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_stor_simple8000_series/lib/2017-06-01/generated/azure_mgmt_stor_simple8000_series/managers.rb | Azure::StorSimple8000Series::Mgmt::V2017_06_01.Managers.delete_extended_info | def delete_extended_info(resource_group_name, manager_name, custom_headers:nil)
response = delete_extended_info_async(resource_group_name, manager_name, custom_headers:custom_headers).value!
nil
end | ruby | def delete_extended_info(resource_group_name, manager_name, custom_headers:nil)
response = delete_extended_info_async(resource_group_name, manager_name, custom_headers:custom_headers).value!
nil
end | [
"def",
"delete_extended_info",
"(",
"resource_group_name",
",",
"manager_name",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"delete_extended_info_async",
"(",
"resource_group_name",
",",
"manager_name",
",",
"custom_headers",
":custom_headers",
")",
".",
"v... | Deletes the extended info of the manager.
@param resource_group_name [String] The resource group name
@param manager_name [String] The manager name
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request. | [
"Deletes",
"the",
"extended",
"info",
"of",
"the",
"manager",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_stor_simple8000_series/lib/2017-06-01/generated/azure_mgmt_stor_simple8000_series/managers.rb#L993-L996 | train | Deletes the extended information of the specified managed volume. | [
30522,
13366,
3972,
12870,
1035,
3668,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
3208,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
3972,
12870,
1035,
3668,
1035,
18558,
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... |
jekyll/jekyll | lib/jekyll/filters.rb | Jekyll.Filters.parse_condition | def parse_condition(exp)
parser = Liquid::Parser.new(exp)
condition = parse_binary_comparison(parser)
parser.consume(:end_of_string)
condition
end | ruby | def parse_condition(exp)
parser = Liquid::Parser.new(exp)
condition = parse_binary_comparison(parser)
parser.consume(:end_of_string)
condition
end | [
"def",
"parse_condition",
"(",
"exp",
")",
"parser",
"=",
"Liquid",
"::",
"Parser",
".",
"new",
"(",
"exp",
")",
"condition",
"=",
"parse_binary_comparison",
"(",
"parser",
")",
"parser",
".",
"consume",
"(",
":end_of_string",
")",
"condition",
"end"
] | ----------- The following set of code was *adapted* from Liquid::If
----------- ref: https://git.io/vp6K6
Parse a string to a Liquid Condition | [
"-----------",
"The",
"following",
"set",
"of",
"code",
"was",
"*",
"adapted",
"*",
"from",
"Liquid",
"::",
"If",
"-----------",
"ref",
":",
"https",
":",
"//",
"git",
".",
"io",
"/",
"vp6K6",
"Parse",
"a",
"string",
"to",
"a",
"Liquid",
"Condition"
] | fd74fe3e93a1fb506fa6621a2e271d7b9c5c3e3b | https://github.com/jekyll/jekyll/blob/fd74fe3e93a1fb506fa6621a2e271d7b9c5c3e3b/lib/jekyll/filters.rb#L394-L400 | train | Parse the condition | [
30522,
13366,
11968,
3366,
1035,
4650,
1006,
4654,
2361,
1007,
11968,
8043,
1027,
6381,
1024,
1024,
11968,
8043,
1012,
2047,
1006,
4654,
2361,
1007,
4650,
1027,
11968,
3366,
1035,
12441,
1035,
7831,
1006,
11968,
8043,
1007,
11968,
8043,
101... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | data/azure_cognitiveservices_luisauthoring/lib/2.0/generated/azure_cognitiveservices_luisauthoring/model.rb | Azure::CognitiveServices::LuisAuthoring::V2_0.Model.add_composite_entity | def add_composite_entity(app_id, version_id, composite_model_create_object, custom_headers:nil)
response = add_composite_entity_async(app_id, version_id, composite_model_create_object, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def add_composite_entity(app_id, version_id, composite_model_create_object, custom_headers:nil)
response = add_composite_entity_async(app_id, version_id, composite_model_create_object, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"add_composite_entity",
"(",
"app_id",
",",
"version_id",
",",
"composite_model_create_object",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"add_composite_entity_async",
"(",
"app_id",
",",
"version_id",
",",
"composite_model_create_object",
",",
"cu... | Adds a composite entity extractor to a version of the application.
@param app_id The application ID.
@param version_id [String] The version ID.
@param composite_model_create_object [CompositeEntityModel] A model
containing the name and children of the new entity extractor.
@param custom_headers [Hash{String => St... | [
"Adds",
"a",
"composite",
"entity",
"extractor",
"to",
"a",
"version",
"of",
"the",
"application",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_cognitiveservices_luisauthoring/lib/2.0/generated/azure_cognitiveservices_luisauthoring/model.rb#L738-L741 | train | Adds a composite entity to a version of the application. | [
30522,
13366,
5587,
1035,
12490,
1035,
9178,
1006,
10439,
1035,
8909,
1010,
2544,
1035,
8909,
1010,
12490,
1035,
2944,
1035,
3443,
1035,
4874,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
5587,
1035,
12490,
1035,
9178,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | data/azure_cognitiveservices_luisauthoring/lib/2.0/generated/azure_cognitiveservices_luisauthoring/model.rb | Azure::CognitiveServices::LuisAuthoring::V2_0.Model.delete_regex_entity_role | def delete_regex_entity_role(app_id, version_id, entity_id, role_id, custom_headers:nil)
response = delete_regex_entity_role_async(app_id, version_id, entity_id, role_id, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def delete_regex_entity_role(app_id, version_id, entity_id, role_id, custom_headers:nil)
response = delete_regex_entity_role_async(app_id, version_id, entity_id, role_id, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"delete_regex_entity_role",
"(",
"app_id",
",",
"version_id",
",",
"entity_id",
",",
"role_id",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"delete_regex_entity_role_async",
"(",
"app_id",
",",
"version_id",
",",
"entity_id",
",",
"role_id",
",... | Delete a role for a given regular expression in a version of the application.
@param app_id The application ID.
@param version_id [String] The version ID.
@param entity_id The entity ID.
@param role_id The entity role Id.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added ... | [
"Delete",
"a",
"role",
"for",
"a",
"given",
"regular",
"expression",
"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#L9932-L9935 | train | Deletes a regex entity role. | [
30522,
13366,
3972,
12870,
1035,
19723,
10288,
1035,
9178,
1035,
2535,
1006,
10439,
1035,
8909,
1010,
2544,
1035,
8909,
1010,
9178,
1035,
8909,
1010,
2535,
1035,
8909,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
3972,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_network/lib/2018-08-01/generated/azure_mgmt_network/network_watchers.rb | Azure::Network::Mgmt::V2018_08_01.NetworkWatchers.begin_check_connectivity_with_http_info | def begin_check_connectivity_with_http_info(resource_group_name, network_watcher_name, parameters, custom_headers:nil)
begin_check_connectivity_async(resource_group_name, network_watcher_name, parameters, custom_headers:custom_headers).value!
end | ruby | def begin_check_connectivity_with_http_info(resource_group_name, network_watcher_name, parameters, custom_headers:nil)
begin_check_connectivity_async(resource_group_name, network_watcher_name, parameters, custom_headers:custom_headers).value!
end | [
"def",
"begin_check_connectivity_with_http_info",
"(",
"resource_group_name",
",",
"network_watcher_name",
",",
"parameters",
",",
"custom_headers",
":",
"nil",
")",
"begin_check_connectivity_async",
"(",
"resource_group_name",
",",
"network_watcher_name",
",",
"parameters",
... | Verifies the possibility of establishing a direct TCP connection from a
virtual machine to a given endpoint including another VM or an arbitrary
remote server.
@param resource_group_name [String] The name of the network watcher resource
group.
@param network_watcher_name [String] The name of the network watcher
... | [
"Verifies",
"the",
"possibility",
"of",
"establishing",
"a",
"direct",
"TCP",
"connection",
"from",
"a",
"virtual",
"machine",
"to",
"a",
"given",
"endpoint",
"including",
"another",
"VM",
"or",
"an",
"arbitrary",
"remote",
"server",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_network/lib/2018-08-01/generated/azure_mgmt_network/network_watchers.rb#L2147-L2149 | train | Checks connectivity of the specified virtual network. | [
30522,
13366,
4088,
1035,
4638,
1035,
20831,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2897,
1035,
3422,
2121,
1035,
2171,
1010,
11709,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
4088,
1035,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/notification_recipient_user.rb | Azure::ApiManagement::Mgmt::V2018_01_01.NotificationRecipientUser.create_or_update_with_http_info | def create_or_update_with_http_info(resource_group_name, service_name, notification_name, uid, custom_headers:nil)
create_or_update_async(resource_group_name, service_name, notification_name, uid, custom_headers:custom_headers).value!
end | ruby | def create_or_update_with_http_info(resource_group_name, service_name, notification_name, uid, custom_headers:nil)
create_or_update_async(resource_group_name, service_name, notification_name, uid, custom_headers:custom_headers).value!
end | [
"def",
"create_or_update_with_http_info",
"(",
"resource_group_name",
",",
"service_name",
",",
"notification_name",
",",
"uid",
",",
"custom_headers",
":",
"nil",
")",
"create_or_update_async",
"(",
"resource_group_name",
",",
"service_name",
",",
"notification_name",
",... | Adds the API Management User to the list of Recipients for the Notification.
@param resource_group_name [String] The name of the resource group.
@param service_name [String] The name of the API Management service.
@param notification_name [NotificationName] Notification Name Identifier.
Possible values include: 'R... | [
"Adds",
"the",
"API",
"Management",
"User",
"to",
"the",
"list",
"of",
"Recipients",
"for",
"the",
"Notification",
"."
] | 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/notification_recipient_user.rb#L292-L294 | train | Creates or updates a notification. | [
30522,
13366,
3443,
1035,
2030,
1035,
10651,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2326,
1035,
2171,
1010,
26828,
1035,
2171,
1010,
21318,
2094,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
aws/aws-sdk-ruby | gems/aws-sdk-ec2/lib/aws-sdk-ec2/security_group.rb | Aws::EC2.SecurityGroup.authorize_ingress | def authorize_ingress(options = {})
options = options.merge(group_id: @id)
resp = @client.authorize_security_group_ingress(options)
resp.data
end | ruby | def authorize_ingress(options = {})
options = options.merge(group_id: @id)
resp = @client.authorize_security_group_ingress(options)
resp.data
end | [
"def",
"authorize_ingress",
"(",
"options",
"=",
"{",
"}",
")",
"options",
"=",
"options",
".",
"merge",
"(",
"group_id",
":",
"@id",
")",
"resp",
"=",
"@client",
".",
"authorize_security_group_ingress",
"(",
"options",
")",
"resp",
".",
"data",
"end"
] | @example Request syntax with placeholder values
security_group.authorize_ingress({
cidr_ip: "String",
from_port: 1,
group_name: "String",
ip_permissions: [
{
from_port: 1,
ip_protocol: "String",
ip_ranges: [
{
cidr_ip: "String",
... | [
"@example",
"Request",
"syntax",
"with",
"placeholder",
"values"
] | e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d | https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-ec2/lib/aws-sdk-ec2/security_group.rb#L398-L402 | train | Authorize ingress for security group | [
30522,
13366,
3166,
4697,
1035,
13749,
8303,
1006,
7047,
1027,
1063,
1065,
1007,
7047,
1027,
7047,
1012,
13590,
1006,
2177,
1035,
8909,
1024,
1030,
8909,
1007,
24501,
2361,
1027,
1030,
7396,
1012,
3166,
4697,
1035,
3036,
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... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_iot_central/lib/2017-07-01-privatepreview/generated/azure_mgmt_iot_central/apps.rb | Azure::IotCentral::Mgmt::V2017_07_01_privatepreview.Apps.check_name_availability | def check_name_availability(operation_inputs, custom_headers:nil)
response = check_name_availability_async(operation_inputs, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def check_name_availability(operation_inputs, custom_headers:nil)
response = check_name_availability_async(operation_inputs, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"check_name_availability",
"(",
"operation_inputs",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"check_name_availability_async",
"(",
"operation_inputs",
",",
"custom_headers",
":custom_headers",
")",
".",
"value!",
"response",
".",
"body",
"unless",... | Check if an IoT Central application name is available.
@param operation_inputs [OperationInputs] Set the name parameter in the
OperationInputs structure to the name of the IoT Central application to
check.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP reque... | [
"Check",
"if",
"an",
"IoT",
"Central",
"application",
"name",
"is",
"available",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_iot_central/lib/2017-07-01-privatepreview/generated/azure_mgmt_iot_central/apps.rb#L451-L454 | train | Check the name availability of the specified managed managed | [
30522,
13366,
4638,
1035,
2171,
1035,
11343,
1006,
3169,
1035,
20407,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
4638,
1035,
2171,
1035,
11343,
1035,
2004,
6038,
2278,
1006,
3169,
1035,
20407,
1010,
7661,
1035,
20346... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
grpc/grpc | src/ruby/lib/grpc/generic/client_stub.rb | GRPC.ClientStub.request_response | def request_response(method, req, marshal, unmarshal,
deadline: nil,
return_op: false,
parent: nil,
credentials: nil,
metadata: {})
c = new_active_call(method, marshal, unmarshal,
... | ruby | def request_response(method, req, marshal, unmarshal,
deadline: nil,
return_op: false,
parent: nil,
credentials: nil,
metadata: {})
c = new_active_call(method, marshal, unmarshal,
... | [
"def",
"request_response",
"(",
"method",
",",
"req",
",",
"marshal",
",",
"unmarshal",
",",
"deadline",
":",
"nil",
",",
"return_op",
":",
"false",
",",
"parent",
":",
"nil",
",",
"credentials",
":",
"nil",
",",
"metadata",
":",
"{",
"}",
")",
"c",
... | Creates a new ClientStub.
Minimally, a stub is created with the just the host of the gRPC service
it wishes to access, e.g.,
my_stub = ClientStub.new(example.host.com:50505,
:this_channel_is_insecure)
If a channel_override argument is passed, it will be used as the
underlying chann... | [
"Creates",
"a",
"new",
"ClientStub",
"."
] | f3937f0e55227a4ef3a23f895d3b204a947610f8 | https://github.com/grpc/grpc/blob/f3937f0e55227a4ef3a23f895d3b204a947610f8/src/ruby/lib/grpc/generic/client_stub.rb#L148-L181 | train | Creates a new active_call and returns a new active_call object. | [
30522,
13366,
5227,
1035,
3433,
1006,
4118,
1010,
2128,
4160,
1010,
8610,
1010,
4895,
7849,
7377,
2140,
1010,
15117,
1024,
9152,
2140,
1010,
2709,
1035,
6728,
1024,
6270,
1010,
6687,
1024,
9152,
2140,
1010,
22496,
1024,
9152,
2140,
1010,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
square/connect-ruby-sdk | lib/square_connect/api/v1_employees_api.rb | SquareConnect.V1EmployeesApi.retrieve_employee | def retrieve_employee(employee_id, opts = {})
data, _status_code, _headers = retrieve_employee_with_http_info(employee_id, opts)
return data
end | ruby | def retrieve_employee(employee_id, opts = {})
data, _status_code, _headers = retrieve_employee_with_http_info(employee_id, opts)
return data
end | [
"def",
"retrieve_employee",
"(",
"employee_id",
",",
"opts",
"=",
"{",
"}",
")",
"data",
",",
"_status_code",
",",
"_headers",
"=",
"retrieve_employee_with_http_info",
"(",
"employee_id",
",",
"opts",
")",
"return",
"data",
"end"
] | RetrieveEmployee
Provides the details for a single employee.
@param employee_id The employee's ID.
@param [Hash] opts the optional parameters
@return [V1Employee] | [
"RetrieveEmployee",
"Provides",
"the",
"details",
"for",
"a",
"single",
"employee",
"."
] | 798eb9ded716f23b9f1518386f1c311a34bca8bf | https://github.com/square/connect-ruby-sdk/blob/798eb9ded716f23b9f1518386f1c311a34bca8bf/lib/square_connect/api/v1_employees_api.rb#L660-L663 | train | Retrieve a specific employee | [
30522,
13366,
12850,
1035,
7904,
1006,
7904,
1035,
8909,
1010,
23569,
2015,
1027,
30524,
7904,
1035,
8909,
1010,
23569,
2015,
1007,
2709,
2951,
2203,
102,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
aws/aws-sdk-ruby | gems/aws-sdk-iam/lib/aws-sdk-iam/user.rb | Aws::IAM.User.create_policy | def create_policy(options = {})
options = options.merge(user_name: @name)
resp = @client.put_user_policy(options)
UserPolicy.new(
user_name: @name,
name: options[:policy_name],
client: @client
)
end | ruby | def create_policy(options = {})
options = options.merge(user_name: @name)
resp = @client.put_user_policy(options)
UserPolicy.new(
user_name: @name,
name: options[:policy_name],
client: @client
)
end | [
"def",
"create_policy",
"(",
"options",
"=",
"{",
"}",
")",
"options",
"=",
"options",
".",
"merge",
"(",
"user_name",
":",
"@name",
")",
"resp",
"=",
"@client",
".",
"put_user_policy",
"(",
"options",
")",
"UserPolicy",
".",
"new",
"(",
"user_name",
":"... | @example Request syntax with placeholder values
userpolicy = user.create_policy({
policy_name: "policyNameType", # required
policy_document: "policyDocumentType", # required
})
@param [Hash] options ({})
@option options [required, String] :policy_name
The name of the policy document.
This para... | [
"@example",
"Request",
"syntax",
"with",
"placeholder",
"values"
] | e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d | https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-iam/lib/aws-sdk-iam/user.rb#L494-L502 | train | Create a policy | [
30522,
13366,
3443,
1035,
3343,
1006,
7047,
1027,
1063,
1065,
1007,
7047,
1027,
7047,
1012,
13590,
1006,
5310,
1035,
2171,
1024,
1030,
2171,
1007,
24501,
2361,
1027,
1030,
7396,
1012,
2404,
1035,
5310,
1035,
3343,
1006,
7047,
1007,
5310,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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_batch/lib/2017-09-01/generated/azure_mgmt_batch/pool_operations.rb | Azure::Batch::Mgmt::V2017_09_01.PoolOperations.begin_create | def begin_create(resource_group_name, account_name, pool_name, parameters, if_match:nil, if_none_match:nil, custom_headers:nil)
response = begin_create_async(resource_group_name, account_name, pool_name, parameters, if_match:if_match, if_none_match:if_none_match, custom_headers:custom_headers).value!
respon... | ruby | def begin_create(resource_group_name, account_name, pool_name, parameters, if_match:nil, if_none_match:nil, custom_headers:nil)
response = begin_create_async(resource_group_name, account_name, pool_name, parameters, if_match:if_match, if_none_match:if_none_match, custom_headers:custom_headers).value!
respon... | [
"def",
"begin_create",
"(",
"resource_group_name",
",",
"account_name",
",",
"pool_name",
",",
"parameters",
",",
"if_match",
":",
"nil",
",",
"if_none_match",
":",
"nil",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"begin_create_async",
"(",
"resou... | Creates a new pool inside the specified account.
@param resource_group_name [String] The name of the resource group that
contains the Batch account.
@param account_name [String] The name of the Batch account.
@param pool_name [String] The pool name. This must be unique within the
account.
@param parameters [Pool... | [
"Creates",
"a",
"new",
"pool",
"inside",
"the",
"specified",
"account",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_batch/lib/2017-09-01/generated/azure_mgmt_batch/pool_operations.rb#L788-L791 | train | Creates a new virtual network pool. | [
30522,
13366,
4088,
1035,
3443,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
4070,
1035,
2171,
1010,
4770,
1035,
2171,
1010,
11709,
1010,
2065,
1035,
2674,
1024,
9152,
2140,
1010,
2065,
1035,
3904,
1035,
2674,
1024,
9152,
2140,
1010,
7661,
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_web/lib/2018-02-01/generated/azure_mgmt_web/recommendations.rb | Azure::Web::Mgmt::V2018_02_01.Recommendations.list_recommended_rules_for_web_app | def list_recommended_rules_for_web_app(resource_group_name, site_name, featured:nil, filter:nil, custom_headers:nil)
first_page = list_recommended_rules_for_web_app_as_lazy(resource_group_name, site_name, featured:featured, filter:filter, custom_headers:custom_headers)
first_page.get_all_items
end | ruby | def list_recommended_rules_for_web_app(resource_group_name, site_name, featured:nil, filter:nil, custom_headers:nil)
first_page = list_recommended_rules_for_web_app_as_lazy(resource_group_name, site_name, featured:featured, filter:filter, custom_headers:custom_headers)
first_page.get_all_items
end | [
"def",
"list_recommended_rules_for_web_app",
"(",
"resource_group_name",
",",
"site_name",
",",
"featured",
":",
"nil",
",",
"filter",
":",
"nil",
",",
"custom_headers",
":",
"nil",
")",
"first_page",
"=",
"list_recommended_rules_for_web_app_as_lazy",
"(",
"resource_gro... | Get all recommendations for an app.
Get all recommendations for an app.
@param resource_group_name [String] Name of the resource group to which the
resource belongs.
@param site_name [String] Name of the app.
@param featured [Boolean] Specify <code>true</code> to return only the most
critical recommendations. T... | [
"Get",
"all",
"recommendations",
"for",
"an",
"app",
"."
] | 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#L449-L452 | train | Gets the recommendations for the specified Web App. | [
30522,
13366,
2862,
1035,
6749,
1035,
3513,
1035,
2005,
1035,
4773,
1035,
10439,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2609,
1035,
2171,
1010,
2956,
1024,
9152,
2140,
1010,
11307,
1024,
9152,
2140,
1010,
7661,
1035,
20346,
2015,
1024,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/subscription.rb | Azure::ApiManagement::Mgmt::V2018_01_01.Subscription.regenerate_primary_key_with_http_info | def regenerate_primary_key_with_http_info(resource_group_name, service_name, sid, custom_headers:nil)
regenerate_primary_key_async(resource_group_name, service_name, sid, custom_headers:custom_headers).value!
end | ruby | def regenerate_primary_key_with_http_info(resource_group_name, service_name, sid, custom_headers:nil)
regenerate_primary_key_async(resource_group_name, service_name, sid, custom_headers:custom_headers).value!
end | [
"def",
"regenerate_primary_key_with_http_info",
"(",
"resource_group_name",
",",
"service_name",
",",
"sid",
",",
"custom_headers",
":",
"nil",
")",
"regenerate_primary_key_async",
"(",
"resource_group_name",
",",
"service_name",
",",
"sid",
",",
"custom_headers",
":custo... | Regenerates primary key of existing subscription of the API Management
service instance.
@param resource_group_name [String] The name of the resource group.
@param service_name [String] The name of the API Management service.
@param sid [String] Subscription entity Identifier. The entity represents the
associatio... | [
"Regenerates",
"primary",
"key",
"of",
"existing",
"subscription",
"of",
"the",
"API",
"Management",
"service",
"instance",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_api_management/lib/2018-01-01/generated/azure_mgmt_api_management/subscription.rb#L780-L782 | train | Regenerate the primary key of the specified managed product. | [
30522,
13366,
19723,
24454,
3686,
1035,
3078,
1035,
3145,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2326,
1035,
2171,
1010,
15765,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
19723,
24454,
368... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
castwide/solargraph | lib/solargraph/range.rb | Solargraph.Range.contain? | def contain? position
position = Position.normalize(position)
return false if position.line < start.line || position.line > ending.line
return false if position.line == start.line && position.character < start.character
return false if position.line == ending.line && position.character > ending.... | ruby | def contain? position
position = Position.normalize(position)
return false if position.line < start.line || position.line > ending.line
return false if position.line == start.line && position.character < start.character
return false if position.line == ending.line && position.character > ending.... | [
"def",
"contain?",
"position",
"position",
"=",
"Position",
".",
"normalize",
"(",
"position",
")",
"return",
"false",
"if",
"position",
".",
"line",
"<",
"start",
".",
"line",
"||",
"position",
".",
"line",
">",
"ending",
".",
"line",
"return",
"false",
... | True if the specified position is inside the range.
@param position [Position, Array(Integer, Integer)]
@return [Boolean] | [
"True",
"if",
"the",
"specified",
"position",
"is",
"inside",
"the",
"range",
"."
] | 47badb5d151aca775ccbe6c470236089eae7839d | https://github.com/castwide/solargraph/blob/47badb5d151aca775ccbe6c470236089eae7839d/lib/solargraph/range.rb#L33-L39 | train | Returns true if the position is in the current position sequence | [
30522,
13366,
5383,
1029,
2597,
2597,
1027,
2597,
1012,
3671,
4697,
1006,
2597,
1007,
2709,
6270,
2065,
2597,
1012,
2240,
1026,
2707,
1012,
2240,
1064,
1064,
2597,
1012,
2240,
1028,
4566,
1012,
2240,
2709,
6270,
2065,
2597,
1012,
2240,
10... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_locks/lib/2015-01-01/generated/azure_mgmt_locks/management_locks.rb | Azure::Locks::Mgmt::V2015_01_01.ManagementLocks.create_or_update_at_subscription_level | def create_or_update_at_subscription_level(lock_name, parameters, custom_headers:nil)
response = create_or_update_at_subscription_level_async(lock_name, parameters, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def create_or_update_at_subscription_level(lock_name, parameters, custom_headers:nil)
response = create_or_update_at_subscription_level_async(lock_name, parameters, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"create_or_update_at_subscription_level",
"(",
"lock_name",
",",
"parameters",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"create_or_update_at_subscription_level_async",
"(",
"lock_name",
",",
"parameters",
",",
"custom_headers",
":custom_headers",
")",... | Create or update a management lock at the subscription level.
@param lock_name [String] The name of lock.
@param parameters [ManagementLockObject] The management lock parameters.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request.
@return [ManagementLoc... | [
"Create",
"or",
"update",
"a",
"management",
"lock",
"at",
"the",
"subscription",
"level",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_locks/lib/2015-01-01/generated/azure_mgmt_locks/management_locks.rb#L569-L572 | train | Creates or updates a lock at subscription level. | [
30522,
13366,
3443,
1035,
2030,
1035,
10651,
1035,
2012,
1035,
15002,
1035,
2504,
1006,
5843,
1035,
2171,
1010,
11709,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
3443,
1035,
2030,
1035,
10651,
1035,
2012,
1035,
15002... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_web/lib/2018-02-01/generated/azure_mgmt_web/recommendations.rb | Azure::Web::Mgmt::V2018_02_01.Recommendations.get_rule_details_by_web_app | def get_rule_details_by_web_app(resource_group_name, site_name, name, update_seen:nil, recommendation_id:nil, custom_headers:nil)
response = get_rule_details_by_web_app_async(resource_group_name, site_name, name, update_seen:update_seen, recommendation_id:recommendation_id, custom_headers:custom_headers).value!
... | ruby | def get_rule_details_by_web_app(resource_group_name, site_name, name, update_seen:nil, recommendation_id:nil, custom_headers:nil)
response = get_rule_details_by_web_app_async(resource_group_name, site_name, name, update_seen:update_seen, recommendation_id:recommendation_id, custom_headers:custom_headers).value!
... | [
"def",
"get_rule_details_by_web_app",
"(",
"resource_group_name",
",",
"site_name",
",",
"name",
",",
"update_seen",
":",
"nil",
",",
"recommendation_id",
":",
"nil",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"get_rule_details_by_web_app_async",
"(",
... | Get a recommendation rule for an app.
Get a recommendation rule for an app.
@param resource_group_name [String] Name of the resource group to which the
resource belongs.
@param site_name [String] Name of the app.
@param name [String] Name of the recommendation.
@param update_seen [Boolean] Specify <code>true</c... | [
"Get",
"a",
"recommendation",
"rule",
"for",
"an",
"app",
"."
] | 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#L757-L760 | train | Gets the rule details for a given App Service Environment. | [
30522,
13366,
2131,
1035,
3627,
1035,
4751,
1035,
2011,
1035,
4773,
1035,
10439,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2609,
1035,
2171,
1010,
2171,
1010,
10651,
1035,
2464,
1024,
9152,
2140,
1010,
12832,
1035,
8909,
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_cognitiveservices_luisauthoring/lib/2.0/generated/azure_cognitiveservices_luisauthoring/model.rb | Azure::CognitiveServices::LuisAuthoring::V2_0.Model.add_explicit_list_item_with_http_info | def add_explicit_list_item_with_http_info(app_id, version_id, entity_id, item, custom_headers:nil)
add_explicit_list_item_async(app_id, version_id, entity_id, item, custom_headers:custom_headers).value!
end | ruby | def add_explicit_list_item_with_http_info(app_id, version_id, entity_id, item, custom_headers:nil)
add_explicit_list_item_async(app_id, version_id, entity_id, item, custom_headers:custom_headers).value!
end | [
"def",
"add_explicit_list_item_with_http_info",
"(",
"app_id",
",",
"version_id",
",",
"entity_id",
",",
"item",
",",
"custom_headers",
":",
"nil",
")",
"add_explicit_list_item_async",
"(",
"app_id",
",",
"version_id",
",",
"entity_id",
",",
"item",
",",
"custom_hea... | Add a new exception to the explicit list for the 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 The Pattern.Any entity extractor ID.
@param item [ExplicitListItemCreateObject] The new explicit list item.
@param cus... | [
"Add",
"a",
"new",
"exception",
"to",
"the",
"explicit",
"list",
"for",
"the",
"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#L8080-L8082 | train | Adds an explicit list item to the application version. | [
30522,
13366,
5587,
1035,
13216,
1035,
2862,
1035,
8875,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
10439,
1035,
8909,
1010,
2544,
1035,
8909,
1010,
9178,
1035,
8909,
1010,
8875,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
5587,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_scheduler/lib/2016-03-01/generated/azure_mgmt_scheduler/job_collections.rb | Azure::Scheduler::Mgmt::V2016_03_01.JobCollections.disable_async | def disable_async(resource_group_name, job_collection_name, custom_headers:nil)
# Send request
promise = begin_disable_async(resource_group_name, job_collection_name, custom_headers:custom_headers)
promise = promise.then do |response|
# Defining deserialization method.
deserialize_met... | ruby | def disable_async(resource_group_name, job_collection_name, custom_headers:nil)
# Send request
promise = begin_disable_async(resource_group_name, job_collection_name, custom_headers:custom_headers)
promise = promise.then do |response|
# Defining deserialization method.
deserialize_met... | [
"def",
"disable_async",
"(",
"resource_group_name",
",",
"job_collection_name",
",",
"custom_headers",
":",
"nil",
")",
"# Send request",
"promise",
"=",
"begin_disable_async",
"(",
"resource_group_name",
",",
"job_collection_name",
",",
"custom_headers",
":custom_headers",... | @param resource_group_name [String] The resource group name.
@param job_collection_name [String] The job collection name.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request.
@return [Concurrent::Promise] promise which provides async access to http
respon... | [
"@param",
"resource_group_name",
"[",
"String",
"]",
"The",
"resource",
"group",
"name",
".",
"@param",
"job_collection_name",
"[",
"String",
"]",
"The",
"job",
"collection",
"name",
".",
"@param",
"custom_headers",
"[",
"Hash",
"{",
"String",
"=",
">",
"Strin... | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_scheduler/lib/2016-03-01/generated/azure_mgmt_scheduler/job_collections.rb#L608-L622 | train | Disables a job collection. | [
30522,
13366,
4487,
19150,
1035,
2004,
6038,
2278,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
3105,
1035,
3074,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
1001,
4604,
5227,
4872,
1027,
4088,
1035,
4487,
19150,
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... |
boazsegev/combine_pdf | lib/combine_pdf/pdf_public.rb | CombinePDF.PDF.fonts | def fonts(limit_to_type0 = false)
fonts_array = []
pages.each do |pg|
if pg[:Resources][:Font]
pg[:Resources][:Font].values.each do |f|
f = f[:referenced_object] if f[:referenced_object]
if (limit_to_type0 || f[:Subtype] == :Type0) && f[:Type] == :Font && !fonts_arr... | ruby | def fonts(limit_to_type0 = false)
fonts_array = []
pages.each do |pg|
if pg[:Resources][:Font]
pg[:Resources][:Font].values.each do |f|
f = f[:referenced_object] if f[:referenced_object]
if (limit_to_type0 || f[:Subtype] == :Type0) && f[:Type] == :Font && !fonts_arr... | [
"def",
"fonts",
"(",
"limit_to_type0",
"=",
"false",
")",
"fonts_array",
"=",
"[",
"]",
"pages",
".",
"each",
"do",
"|",
"pg",
"|",
"if",
"pg",
"[",
":Resources",
"]",
"[",
":Font",
"]",
"pg",
"[",
":Resources",
"]",
"[",
":Font",
"]",
".",
"values... | returns an array with the different fonts used in the file.
Type0 font objects ( "font[:Subtype] == :Type0" ) can be registered with the font library
for use in PDFWriter objects (font numbering / table creation etc').
@param limit_to_type0 [true,false] limits the list to type0 fonts. | [
"returns",
"an",
"array",
"with",
"the",
"different",
"fonts",
"used",
"in",
"the",
"file",
"."
] | 09054051019c069f551f3e60be789577c0f93900 | https://github.com/boazsegev/combine_pdf/blob/09054051019c069f551f3e60be789577c0f93900/lib/combine_pdf/pdf_public.rb#L257-L270 | train | Returns an array of all the fonts in the page | [
30522,
13366,
15489,
2015,
1006,
5787,
1035,
2000,
1035,
2828,
2692,
1027,
6270,
1007,
15489,
2015,
1035,
9140,
1027,
1031,
1033,
5530,
1012,
2169,
2079,
1064,
18720,
1064,
2065,
18720,
1031,
1024,
4219,
1033,
1031,
1024,
15489,
1033,
18720... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
randym/axlsx | lib/axlsx/package.rb | Axlsx.Package.content_types | def content_types
c_types = base_content_types
workbook.drawings.each do |drawing|
c_types << Axlsx::Override.new(:PartName => "/xl/#{drawing.pn}",
:ContentType => DRAWING_CT)
end
workbook.charts.each do |chart|
c_types << Axlsx::Override.n... | ruby | def content_types
c_types = base_content_types
workbook.drawings.each do |drawing|
c_types << Axlsx::Override.new(:PartName => "/xl/#{drawing.pn}",
:ContentType => DRAWING_CT)
end
workbook.charts.each do |chart|
c_types << Axlsx::Override.n... | [
"def",
"content_types",
"c_types",
"=",
"base_content_types",
"workbook",
".",
"drawings",
".",
"each",
"do",
"|",
"drawing",
"|",
"c_types",
"<<",
"Axlsx",
"::",
"Override",
".",
"new",
"(",
":PartName",
"=>",
"\"/xl/#{drawing.pn}\"",
",",
":ContentType",
"=>",... | Appends override objects for drawings, charts, and sheets as they exist in your workbook to the default content types.
@return [ContentType]
@private | [
"Appends",
"override",
"objects",
"for",
"drawings",
"charts",
"and",
"sheets",
"as",
"they",
"exist",
"in",
"your",
"workbook",
"to",
"the",
"default",
"content",
"types",
"."
] | c593a08b2a929dac7aa8dc418b55e26b4c49dc34 | https://github.com/randym/axlsx/blob/c593a08b2a929dac7aa8dc418b55e26b4c49dc34/lib/axlsx/package.rb#L269-L324 | train | Returns an array of content types for this workbook | [
30522,
13366,
4180,
1035,
4127,
1039,
1035,
4127,
1027,
2918,
1035,
4180,
1035,
4127,
2147,
8654,
1012,
9254,
1012,
2169,
2079,
1064,
5059,
1064,
1039,
1035,
4127,
1026,
1026,
22260,
4877,
2595,
1024,
1024,
2058,
15637,
1012,
2047,
1006,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_consumption/lib/2018-01-31/generated/azure_mgmt_consumption/price_sheet.rb | Azure::Consumption::Mgmt::V2018_01_31.PriceSheet.get_by_billing_period | def get_by_billing_period(billing_period_name, expand:nil, skiptoken:nil, top:nil, custom_headers:nil)
response = get_by_billing_period_async(billing_period_name, expand:expand, skiptoken:skiptoken, top:top, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def get_by_billing_period(billing_period_name, expand:nil, skiptoken:nil, top:nil, custom_headers:nil)
response = get_by_billing_period_async(billing_period_name, expand:expand, skiptoken:skiptoken, top:top, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"get_by_billing_period",
"(",
"billing_period_name",
",",
"expand",
":",
"nil",
",",
"skiptoken",
":",
"nil",
",",
"top",
":",
"nil",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"get_by_billing_period_async",
"(",
"billing_period_name",
",",
... | Get the price sheet for a scope by subscriptionId and billing period. Price
sheet is available via this API only for May 1, 2014 or later.
@param billing_period_name [String] Billing Period Name.
@param expand [String] May be used to expand the properties/meterDetails
within a price sheet. By default, these fields... | [
"Get",
"the",
"price",
"sheet",
"for",
"a",
"scope",
"by",
"subscriptionId",
"and",
"billing",
"period",
".",
"Price",
"sheet",
"is",
"available",
"via",
"this",
"API",
"only",
"for",
"May",
"1",
"2014",
"or",
"later",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_consumption/lib/2018-01-31/generated/azure_mgmt_consumption/price_sheet.rb#L160-L163 | train | Gets the list of all the applications in a billing period. | [
30522,
13366,
2131,
1035,
2011,
1035,
25640,
1035,
2558,
1006,
25640,
1035,
2558,
1035,
2171,
1010,
7818,
1024,
9152,
2140,
1010,
13558,
18715,
2368,
1024,
9152,
2140,
1010,
2327,
1024,
9152,
2140,
1010,
7661,
1035,
20346,
2015,
1024,
9152,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
github/linguist | lib/linguist/blob_helper.rb | Linguist.BlobHelper._mime_type | def _mime_type
if defined? @_mime_type
@_mime_type
else
guesses = ::MIME::Types.type_for(extname.to_s)
# Prefer text mime types over binary
@_mime_type = guesses.detect { |type| type.ascii? } ||
# Otherwise use the first guess
guesses.first
end
... | ruby | def _mime_type
if defined? @_mime_type
@_mime_type
else
guesses = ::MIME::Types.type_for(extname.to_s)
# Prefer text mime types over binary
@_mime_type = guesses.detect { |type| type.ascii? } ||
# Otherwise use the first guess
guesses.first
end
... | [
"def",
"_mime_type",
"if",
"defined?",
"@_mime_type",
"@_mime_type",
"else",
"guesses",
"=",
"::",
"MIME",
"::",
"Types",
".",
"type_for",
"(",
"extname",
".",
"to_s",
")",
"# Prefer text mime types over binary",
"@_mime_type",
"=",
"guesses",
".",
"detect",
"{",
... | Internal: Lookup mime type for extension.
Returns a MIME::Type | [
"Internal",
":",
"Lookup",
"mime",
"type",
"for",
"extension",
"."
] | 9116c90fcbb82ac03b4b33c58cfbde1fcf745e99 | https://github.com/github/linguist/blob/9116c90fcbb82ac03b4b33c58cfbde1fcf745e99/lib/linguist/blob_helper.rb#L32-L43 | train | Returns the mime type of the file. | [
30522,
13366,
1035,
2771,
4168,
1035,
2828,
2065,
4225,
1029,
1030,
1035,
2771,
4168,
1035,
2828,
1030,
1035,
2771,
4168,
1035,
2828,
2842,
3984,
2229,
1027,
1024,
1024,
2771,
4168,
1024,
1024,
4127,
1012,
2828,
1035,
2005,
1006,
4654,
21... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
hashicorp/vault-ruby | lib/vault/api/approle.rb | Vault.AppRole.create_secret_id | def create_secret_id(role_name, options = {})
headers = extract_headers!(options)
if options[:secret_id]
json = client.post("/v1/auth/approle/role/#{encode_path(role_name)}/custom-secret-id", JSON.fast_generate(options), headers)
else
json = client.post("/v1/auth/approle/role/#{encode_... | ruby | def create_secret_id(role_name, options = {})
headers = extract_headers!(options)
if options[:secret_id]
json = client.post("/v1/auth/approle/role/#{encode_path(role_name)}/custom-secret-id", JSON.fast_generate(options), headers)
else
json = client.post("/v1/auth/approle/role/#{encode_... | [
"def",
"create_secret_id",
"(",
"role_name",
",",
"options",
"=",
"{",
"}",
")",
"headers",
"=",
"extract_headers!",
"(",
"options",
")",
"if",
"options",
"[",
":secret_id",
"]",
"json",
"=",
"client",
".",
"post",
"(",
"\"/v1/auth/approle/role/#{encode_path(rol... | Generates and issues a new SecretID on an existing AppRole.
@example Generate a new SecretID
result = Vault.approle.create_secret_id("testrole") #=> #<Vault::Secret lease_id="...">
result.data[:secret_id] #=> "841771dc-11c9-bbc7-bcac-6a3945a69cd9"
@example Assign a custom SecretID
result = Vault.approle.cr... | [
"Generates",
"and",
"issues",
"a",
"new",
"SecretID",
"on",
"an",
"existing",
"AppRole",
"."
] | 02f0532a802ba1a2a0d8703a4585dab76eb9d864 | https://github.com/hashicorp/vault-ruby/blob/02f0532a802ba1a2a0d8703a4585dab76eb9d864/lib/vault/api/approle.rb#L160-L168 | train | Create a secret id for a role | [
30522,
13366,
3443,
1035,
3595,
1035,
8909,
1006,
2535,
1035,
2171,
1010,
7047,
1027,
1063,
1065,
1007,
20346,
2015,
1027,
14817,
1035,
20346,
2015,
999,
1006,
7047,
1007,
2065,
7047,
1031,
1024,
3595,
1035,
8909,
1033,
1046,
3385,
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... |
hashicorp/vault-ruby | lib/vault/api/auth.rb | Vault.Authenticate.aws_ec2 | def aws_ec2(role, pkcs7, nonce = nil, route = nil)
route ||= '/v1/auth/aws-ec2/login'
payload = { role: role, pkcs7: pkcs7 }
# Set a custom nonce if client is providing one
payload[:nonce] = nonce if nonce
json = client.post(route, JSON.fast_generate(payload))
secret = Secret.decode(... | ruby | def aws_ec2(role, pkcs7, nonce = nil, route = nil)
route ||= '/v1/auth/aws-ec2/login'
payload = { role: role, pkcs7: pkcs7 }
# Set a custom nonce if client is providing one
payload[:nonce] = nonce if nonce
json = client.post(route, JSON.fast_generate(payload))
secret = Secret.decode(... | [
"def",
"aws_ec2",
"(",
"role",
",",
"pkcs7",
",",
"nonce",
"=",
"nil",
",",
"route",
"=",
"nil",
")",
"route",
"||=",
"'/v1/auth/aws-ec2/login'",
"payload",
"=",
"{",
"role",
":",
"role",
",",
"pkcs7",
":",
"pkcs7",
"}",
"# Set a custom nonce if client is pr... | Authenticate via the AWS EC2 authentication method. If authentication is
successful, the resulting token will be stored on the client and used
for future requests.
@example
Vault.auth.aws_ec2("read-only", "pkcs7", "vault-nonce") #=> #<Vault::Secret lease_id="">
@param [String] role
@param [String] pkcs7
pk... | [
"Authenticate",
"via",
"the",
"AWS",
"EC2",
"authentication",
"method",
".",
"If",
"authentication",
"is",
"successful",
"the",
"resulting",
"token",
"will",
"be",
"stored",
"on",
"the",
"client",
"and",
"used",
"for",
"future",
"requests",
"."
] | 02f0532a802ba1a2a0d8703a4585dab76eb9d864 | https://github.com/hashicorp/vault-ruby/blob/02f0532a802ba1a2a0d8703a4585dab76eb9d864/lib/vault/api/auth.rb#L180-L189 | train | Create a new instance of AWS EC2 | [
30522,
13366,
22091,
2015,
1035,
14925,
2475,
1006,
2535,
1010,
1052,
2243,
6169,
2581,
1010,
2512,
3401,
1027,
9152,
2140,
1010,
2799,
1027,
9152,
2140,
1007,
2799,
1064,
1064,
1027,
1005,
1013,
1058,
2487,
1013,
8740,
2705,
1013,
22091,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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.can? | def can?(action, subject, attribute = nil, *extra_args)
match = extract_subjects(subject).lazy.map do |a_subject|
relevant_rules_for_match(action, a_subject).detect do |rule|
rule.matches_conditions?(action, a_subject, attribute, *extra_args) && rule.matches_attributes?(attribute)
end
... | ruby | def can?(action, subject, attribute = nil, *extra_args)
match = extract_subjects(subject).lazy.map do |a_subject|
relevant_rules_for_match(action, a_subject).detect do |rule|
rule.matches_conditions?(action, a_subject, attribute, *extra_args) && rule.matches_attributes?(attribute)
end
... | [
"def",
"can?",
"(",
"action",
",",
"subject",
",",
"attribute",
"=",
"nil",
",",
"*",
"extra_args",
")",
"match",
"=",
"extract_subjects",
"(",
"subject",
")",
".",
"lazy",
".",
"map",
"do",
"|",
"a_subject",
"|",
"relevant_rules_for_match",
"(",
"action",... | Check if the user has permission to perform a given action on an object.
can? :destroy, @project
You can also pass the class instead of an instance (if you don't have one handy).
can? :create, Project
Nested resources can be passed through a hash, this way conditions which are
dependent upon the associatio... | [
"Check",
"if",
"the",
"user",
"has",
"permission",
"to",
"perform",
"a",
"given",
"action",
"on",
"an",
"object",
"."
] | b2e5660c6b9b683fc45b8f425b90c4d06e2f24bf | https://github.com/CanCanCommunity/cancancan/blob/b2e5660c6b9b683fc45b8f425b90c4d06e2f24bf/lib/cancan/ability.rb#L74-L81 | train | Returns the base behavior for the given action and subject. | [
30522,
13366,
2064,
1029,
1006,
2895,
1010,
3395,
1010,
17961,
1027,
9152,
2140,
1010,
1008,
4469,
1035,
12098,
5620,
1007,
2674,
1027,
14817,
1035,
5739,
1006,
3395,
1007,
1012,
13971,
1012,
4949,
2079,
1064,
1037,
1035,
3395,
1064,
7882,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
activeadmin/activeadmin | lib/active_admin/namespace.rb | ActiveAdmin.Namespace.register | def register(resource_class, options = {}, &block)
config = find_or_build_resource(resource_class, options)
# Register the resource
register_resource_controller(config)
parse_registration_block(config, &block) if block_given?
reset_menu!
# Dispatch a registration event
Active... | ruby | def register(resource_class, options = {}, &block)
config = find_or_build_resource(resource_class, options)
# Register the resource
register_resource_controller(config)
parse_registration_block(config, &block) if block_given?
reset_menu!
# Dispatch a registration event
Active... | [
"def",
"register",
"(",
"resource_class",
",",
"options",
"=",
"{",
"}",
",",
"&",
"block",
")",
"config",
"=",
"find_or_build_resource",
"(",
"resource_class",
",",
"options",
")",
"# Register the resource",
"register_resource_controller",
"(",
"config",
")",
"pa... | Register a resource into this namespace. The preffered method to access this is to
use the global registration ActiveAdmin.register which delegates to the proper
namespace instance. | [
"Register",
"a",
"resource",
"into",
"this",
"namespace",
".",
"The",
"preffered",
"method",
"to",
"access",
"this",
"is",
"to",
"use",
"the",
"global",
"registration",
"ActiveAdmin",
".",
"register",
"which",
"delegates",
"to",
"the",
"proper",
"namespace",
"... | 0759c8dcf97865748c9344459162ac3c7e65a6cd | https://github.com/activeadmin/activeadmin/blob/0759c8dcf97865748c9344459162ac3c7e65a6cd/lib/active_admin/namespace.rb#L65-L78 | train | Register a resource | [
30522,
13366,
4236,
1006,
7692,
1035,
2465,
1010,
7047,
1027,
1063,
1065,
1010,
1004,
3796,
1007,
9530,
8873,
2290,
1027,
2424,
1035,
2030,
1035,
3857,
1035,
7692,
1006,
7692,
1035,
2465,
1010,
7047,
1007,
1001,
4236,
1996,
7692,
4236,
10... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
fastlane/fastlane | credentials_manager/lib/credentials_manager/cli.rb | CredentialsManager.CLI.add | def add(username, password)
CredentialsManager::AccountManager.new(
user: username,
password: password
).add_to_keychain
end | ruby | def add(username, password)
CredentialsManager::AccountManager.new(
user: username,
password: password
).add_to_keychain
end | [
"def",
"add",
"(",
"username",
",",
"password",
")",
"CredentialsManager",
"::",
"AccountManager",
".",
"new",
"(",
"user",
":",
"username",
",",
"password",
":",
"password",
")",
".",
"add_to_keychain",
"end"
] | Add entry to Apple Keychain using AccountManager | [
"Add",
"entry",
"to",
"Apple",
"Keychain",
"using",
"AccountManager"
] | 457c5d647c77f0e078dafa5129da616914e002c5 | https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/credentials_manager/lib/credentials_manager/cli.rb#L53-L58 | train | Add a user to the keychain | [
30522,
13366,
5587,
1006,
5310,
18442,
1010,
20786,
1007,
22496,
24805,
4590,
1024,
1024,
4070,
24805,
4590,
1012,
2047,
1006,
5310,
1024,
5310,
18442,
1010,
20786,
1024,
20786,
1007,
1012,
5587,
1035,
2000,
1035,
3145,
24925,
2078,
2203,
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... |
RailsEventStore/rails_event_store | ruby_event_store/lib/ruby_event_store/event.rb | RubyEventStore.Event.correlate_with | def correlate_with(other_message)
self.correlation_id = other_message.correlation_id || other_message.message_id
self.causation_id = other_message.message_id
end | ruby | def correlate_with(other_message)
self.correlation_id = other_message.correlation_id || other_message.message_id
self.causation_id = other_message.message_id
end | [
"def",
"correlate_with",
"(",
"other_message",
")",
"self",
".",
"correlation_id",
"=",
"other_message",
".",
"correlation_id",
"||",
"other_message",
".",
"message_id",
"self",
".",
"causation_id",
"=",
"other_message",
".",
"message_id",
"end"
] | Sets correlation_id and causation_id in metadata based
on correlation_id and message_id of the provided message.
{http://railseventstore.org/docs/correlation_causation/ Find out more}
@param other_message [Event, Proto, command] message to correlate with. Most likely an event or a command. Must respond to correlati... | [
"Sets",
"correlation_id",
"and",
"causation_id",
"in",
"metadata",
"based",
"on",
"correlation_id",
"and",
"message_id",
"of",
"the",
"provided",
"message",
".",
"{",
"http",
":",
"//",
"railseventstore",
".",
"org",
"/",
"docs",
"/",
"correlation_causation",
"/... | 3ee4f3148499794154ee6fec74ccf6d4670d85ac | https://github.com/RailsEventStore/rails_event_store/blob/3ee4f3148499794154ee6fec74ccf6d4670d85ac/ruby_event_store/lib/ruby_event_store/event.rb#L133-L136 | train | This method is used to correlate the message with another message | [
30522,
13366,
2522,
14343,
13806,
1035,
2007,
1006,
2060,
1035,
4471,
1007,
2969,
1012,
16902,
1035,
8909,
1027,
2060,
1035,
4471,
1012,
16902,
1035,
8909,
1064,
1064,
2060,
1035,
4471,
1012,
4471,
1035,
8909,
2969,
1012,
6187,
10383,
3508,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
hexgnu/linkedin | lib/linked_in/mash.rb | LinkedIn.Mash.timestamp | def timestamp
value = self['timestamp']
if value.kind_of? Integer
value = value / 1000 if value > 9999999999
Time.at(value)
else
value
end
end | ruby | def timestamp
value = self['timestamp']
if value.kind_of? Integer
value = value / 1000 if value > 9999999999
Time.at(value)
else
value
end
end | [
"def",
"timestamp",
"value",
"=",
"self",
"[",
"'timestamp'",
"]",
"if",
"value",
".",
"kind_of?",
"Integer",
"value",
"=",
"value",
"/",
"1000",
"if",
"value",
">",
"9999999999",
"Time",
".",
"at",
"(",
"value",
")",
"else",
"value",
"end",
"end"
] | Convert the 'timestamp' field from a string to a Time object
@return [Time] | [
"Convert",
"the",
"timestamp",
"field",
"from",
"a",
"string",
"to",
"a",
"Time",
"object"
] | a56f5381e7d84b934c53e891b1f0421fe8a6caf9 | https://github.com/hexgnu/linkedin/blob/a56f5381e7d84b934c53e891b1f0421fe8a6caf9/lib/linked_in/mash.rb#L44-L52 | train | Get the current timestamp | [
30522,
13366,
2335,
15464,
2361,
3643,
1027,
2969,
1031,
1005,
2335,
15464,
2361,
1005,
1033,
2065,
3643,
1012,
2785,
1035,
1997,
1029,
16109,
3643,
1027,
3643,
1013,
6694,
2065,
3643,
1028,
25897,
2683,
2683,
2683,
2683,
2683,
2683,
2683,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_web/lib/2018-02-01/generated/azure_mgmt_web/app_service_environments.rb | Azure::Web::Mgmt::V2018_02_01.AppServiceEnvironments.list_worker_pool_instance_metric_definitions_with_http_info | def list_worker_pool_instance_metric_definitions_with_http_info(resource_group_name, name, worker_pool_name, instance, custom_headers:nil)
list_worker_pool_instance_metric_definitions_async(resource_group_name, name, worker_pool_name, instance, custom_headers:custom_headers).value!
end | ruby | def list_worker_pool_instance_metric_definitions_with_http_info(resource_group_name, name, worker_pool_name, instance, custom_headers:nil)
list_worker_pool_instance_metric_definitions_async(resource_group_name, name, worker_pool_name, instance, custom_headers:custom_headers).value!
end | [
"def",
"list_worker_pool_instance_metric_definitions_with_http_info",
"(",
"resource_group_name",
",",
"name",
",",
"worker_pool_name",
",",
"instance",
",",
"custom_headers",
":",
"nil",
")",
"list_worker_pool_instance_metric_definitions_async",
"(",
"resource_group_name",
",",
... | Get metric definitions for a specific instance of a worker pool of an App
Service Environment.
Get metric definitions for a specific instance of a worker pool of an App
Service Environment.
@param resource_group_name [String] Name of the resource group to which the
resource belongs.
@param name [String] Name of... | [
"Get",
"metric",
"definitions",
"for",
"a",
"specific",
"instance",
"of",
"a",
"worker",
"pool",
"of",
"an",
"App",
"Service",
"Environment",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_web/lib/2018-02-01/generated/azure_mgmt_web/app_service_environments.rb#L3466-L3468 | train | Gets metric definitions for the specified instance. | [
30522,
13366,
2862,
1035,
7309,
1035,
4770,
1035,
6013,
1035,
12046,
1035,
15182,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2171,
1010,
7309,
1035,
4770,
1035,
2171,
1010,
6013,
1010,
7661,
1035,
20346,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
octokit/octokit.rb | lib/octokit/connection.rb | Octokit.Connection.boolean_from_response | def boolean_from_response(method, path, options = {})
request(method, path, options)
@last_response.status == 204
rescue Octokit::NotFound
false
end | ruby | def boolean_from_response(method, path, options = {})
request(method, path, options)
@last_response.status == 204
rescue Octokit::NotFound
false
end | [
"def",
"boolean_from_response",
"(",
"method",
",",
"path",
",",
"options",
"=",
"{",
"}",
")",
"request",
"(",
"method",
",",
"path",
",",
"options",
")",
"@last_response",
".",
"status",
"==",
"204",
"rescue",
"Octokit",
"::",
"NotFound",
"false",
"end"
... | Executes the request, checking if it was successful
@return [Boolean] True on success, false otherwise | [
"Executes",
"the",
"request",
"checking",
"if",
"it",
"was",
"successful"
] | ddf750601529a6a7da5fe5293d10031709b8605d | https://github.com/octokit/octokit.rb/blob/ddf750601529a6a7da5fe5293d10031709b8605d/lib/octokit/connection.rb#L163-L168 | train | Returns a boolean from the last response | [
30522,
13366,
22017,
20898,
1035,
2013,
1035,
3433,
1006,
4118,
1010,
4130,
1010,
7047,
1027,
1063,
1065,
1007,
5227,
1006,
4118,
1010,
4130,
1010,
7047,
1007,
1030,
2197,
1035,
3433,
1012,
3570,
1027,
1027,
19627,
5343,
13323,
23212,
2102,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
floere/phony | lib/phony/country_codes.rb | Phony.CountryCodes.partial_split | def partial_split number
cc = ''
1.upto(3) do |i|
cc << number.slice!(0..0)
country = countries[i][cc]
return [country, cc, number] if country
end
# This line is never reached as CCs are in prefix code.
end | ruby | def partial_split number
cc = ''
1.upto(3) do |i|
cc << number.slice!(0..0)
country = countries[i][cc]
return [country, cc, number] if country
end
# This line is never reached as CCs are in prefix code.
end | [
"def",
"partial_split",
"number",
"cc",
"=",
"''",
"1",
".",
"upto",
"(",
"3",
")",
"do",
"|",
"i",
"|",
"cc",
"<<",
"number",
".",
"slice!",
"(",
"0",
"..",
"0",
")",
"country",
"=",
"countries",
"[",
"i",
"]",
"[",
"cc",
"]",
"return",
"[",
... | Split off the country and the cc, and also return the national number part. | [
"Split",
"off",
"the",
"country",
"and",
"the",
"cc",
"and",
"also",
"return",
"the",
"national",
"number",
"part",
"."
] | 9ca50743499cf478a25fdb927bcdacd29d2c90c7 | https://github.com/floere/phony/blob/9ca50743499cf478a25fdb927bcdacd29d2c90c7/lib/phony/country_codes.rb#L140-L148 | train | Split the number into two parts | [
30522,
13366,
7704,
1035,
3975,
2193,
10507,
1027,
1005,
1005,
1015,
1012,
2039,
3406,
1006,
1017,
1007,
2079,
1064,
1045,
1064,
10507,
1026,
1026,
2193,
1012,
14704,
999,
1006,
1014,
1012,
1012,
1014,
1007,
2406,
1027,
3032,
1031,
1045,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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.get_entity_tag_with_http_info | def get_entity_tag_with_http_info(resource_group_name, service_name, prop_id, custom_headers:nil)
get_entity_tag_async(resource_group_name, service_name, prop_id, custom_headers:custom_headers).value!
end | ruby | def get_entity_tag_with_http_info(resource_group_name, service_name, prop_id, custom_headers:nil)
get_entity_tag_async(resource_group_name, service_name, prop_id, custom_headers:custom_headers).value!
end | [
"def",
"get_entity_tag_with_http_info",
"(",
"resource_group_name",
",",
"service_name",
",",
"prop_id",
",",
"custom_headers",
":",
"nil",
")",
"get_entity_tag_async",
"(",
"resource_group_name",
",",
"service_name",
",",
"prop_id",
",",
"custom_headers",
":custom_header... | Gets the entity state (Etag) version of the property specified by its
identifier.
@param resource_group_name [String] The name of the resource group.
@param service_name [String] The name of the API Management service.
@param prop_id [String] Identifier of the property.
@param custom_headers [Hash{String => Strin... | [
"Gets",
"the",
"entity",
"state",
"(",
"Etag",
")",
"version",
"of",
"the",
"property",
"specified",
"by",
"its",
"identifier",
"."
] | 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#L176-L178 | train | Gets the entity tag for the specified resource group. | [
30522,
13366,
2131,
1035,
9178,
1035,
6415,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2326,
1035,
2171,
1010,
17678,
1035,
8909,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
2131,
1035,
9178,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/blob_containers.rb | Azure::Storage::Mgmt::V2018_07_01.BlobContainers.clear_legal_hold | def clear_legal_hold(resource_group_name, account_name, container_name, legal_hold, custom_headers:nil)
response = clear_legal_hold_async(resource_group_name, account_name, container_name, legal_hold, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def clear_legal_hold(resource_group_name, account_name, container_name, legal_hold, custom_headers:nil)
response = clear_legal_hold_async(resource_group_name, account_name, container_name, legal_hold, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"clear_legal_hold",
"(",
"resource_group_name",
",",
"account_name",
",",
"container_name",
",",
"legal_hold",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"clear_legal_hold_async",
"(",
"resource_group_name",
",",
"account_name",
",",
"container_name... | Clears legal hold tags. Clearing the same or non-existent tag results in an
idempotent operation. ClearLegalHold clears out only the specified tags in
the request.
@param resource_group_name [String] The name of the resource group within the
user's subscription. The name is case insensitive.
@param account_name [... | [
"Clears",
"legal",
"hold",
"tags",
".",
"Clearing",
"the",
"same",
"or",
"non",
"-",
"existent",
"tag",
"results",
"in",
"an",
"idempotent",
"operation",
".",
"ClearLegalHold",
"clears",
"out",
"only",
"the",
"specified",
"tags",
"in",
"the",
"request",
"."
... | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/blob_containers.rb#L839-L842 | train | Clear the legal hold of a container. | [
30522,
13366,
3154,
1035,
3423,
1035,
2907,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
4070,
1035,
2171,
1010,
11661,
1035,
2171,
1010,
3423,
1035,
2907,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
3154,
1035,
3423,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
randym/axlsx | lib/axlsx/util/serialized_attributes.rb | Axlsx.SerializedAttributes.serialized_tag | def serialized_tag(tagname, str, additional_attributes = {}, &block)
str << "<#{tagname} "
serialized_attributes(str, additional_attributes)
if block_given?
str << '>'
yield
str << "</#{tagname}>"
else
str << '/>'
end
end | ruby | def serialized_tag(tagname, str, additional_attributes = {}, &block)
str << "<#{tagname} "
serialized_attributes(str, additional_attributes)
if block_given?
str << '>'
yield
str << "</#{tagname}>"
else
str << '/>'
end
end | [
"def",
"serialized_tag",
"(",
"tagname",
",",
"str",
",",
"additional_attributes",
"=",
"{",
"}",
",",
"&",
"block",
")",
"str",
"<<",
"\"<#{tagname} \"",
"serialized_attributes",
"(",
"str",
",",
"additional_attributes",
")",
"if",
"block_given?",
"str",
"<<",
... | creates a XML tag with serialized attributes
@see SerializedAttributes#serialized_attributes | [
"creates",
"a",
"XML",
"tag",
"with",
"serialized",
"attributes"
] | c593a08b2a929dac7aa8dc418b55e26b4c49dc34 | https://github.com/randym/axlsx/blob/c593a08b2a929dac7aa8dc418b55e26b4c49dc34/lib/axlsx/util/serialized_attributes.rb#L34-L44 | train | Serialize a tag | [
30522,
13366,
27289,
1035,
6415,
1006,
6415,
18442,
1010,
2358,
2099,
1010,
3176,
1035,
12332,
1027,
1063,
1065,
1010,
1004,
3796,
1007,
2358,
2099,
1026,
1026,
1000,
1026,
1001,
1063,
6415,
18442,
1065,
1000,
27289,
1035,
12332,
1006,
2358... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_network/lib/2018-07-01/generated/azure_mgmt_network/local_network_gateways.rb | Azure::Network::Mgmt::V2018_07_01.LocalNetworkGateways.begin_create_or_update_with_http_info | def begin_create_or_update_with_http_info(resource_group_name, local_network_gateway_name, parameters, custom_headers:nil)
begin_create_or_update_async(resource_group_name, local_network_gateway_name, parameters, custom_headers:custom_headers).value!
end | ruby | def begin_create_or_update_with_http_info(resource_group_name, local_network_gateway_name, parameters, custom_headers:nil)
begin_create_or_update_async(resource_group_name, local_network_gateway_name, parameters, custom_headers:custom_headers).value!
end | [
"def",
"begin_create_or_update_with_http_info",
"(",
"resource_group_name",
",",
"local_network_gateway_name",
",",
"parameters",
",",
"custom_headers",
":",
"nil",
")",
"begin_create_or_update_async",
"(",
"resource_group_name",
",",
"local_network_gateway_name",
",",
"paramet... | Creates or updates a local network gateway in the specified resource group.
@param resource_group_name [String] The name of the resource group.
@param local_network_gateway_name [String] The name of the local network
gateway.
@param parameters [LocalNetworkGateway] Parameters supplied to the create or
update loca... | [
"Creates",
"or",
"updates",
"a",
"local",
"network",
"gateway",
"in",
"the",
"specified",
"resource",
"group",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_network/lib/2018-07-01/generated/azure_mgmt_network/local_network_gateways.rb#L375-L377 | train | Creates or updates a local network gateway. | [
30522,
13366,
4088,
1035,
3443,
1035,
2030,
1035,
10651,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2334,
1035,
2897,
1035,
11909,
1035,
2171,
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... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_marketplace_ordering/lib/2015-06-01/generated/azure_mgmt_marketplace_ordering/marketplace_agreements.rb | Azure::MarketplaceOrdering::Mgmt::V2015_06_01.MarketplaceAgreements.sign | def sign(publisher_id, offer_id, plan_id, custom_headers:nil)
response = sign_async(publisher_id, offer_id, plan_id, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def sign(publisher_id, offer_id, plan_id, custom_headers:nil)
response = sign_async(publisher_id, offer_id, plan_id, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"sign",
"(",
"publisher_id",
",",
"offer_id",
",",
"plan_id",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"sign_async",
"(",
"publisher_id",
",",
"offer_id",
",",
"plan_id",
",",
"custom_headers",
":custom_headers",
")",
".",
"value!",
"res... | Sign marketplace terms.
@param publisher_id [String] Publisher identifier string of image being
deployed.
@param offer_id [String] Offer identifier string of image being deployed.
@param plan_id [String] Plan identifier string of image being deployed.
@param custom_headers [Hash{String => String}] A hash of custo... | [
"Sign",
"marketplace",
"terms",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_marketplace_ordering/lib/2015-06-01/generated/azure_mgmt_marketplace_ordering/marketplace_agreements.rb#L250-L253 | train | Signs an offer to a plan. | [
30522,
13366,
3696,
1006,
6674,
1035,
8909,
1010,
3749,
1035,
8909,
1010,
2933,
1035,
8909,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
3696,
1035,
2004,
6038,
2278,
1006,
6674,
1035,
8909,
1010,
3749,
1035,
8909,
1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
rails/sprockets | lib/sprockets/processing.rb | Sprockets.Processing.register_bundle_metadata_reducer | def register_bundle_metadata_reducer(mime_type, key, *args, &block)
case args.size
when 0
reducer = block
when 1
if block_given?
initial = args[0]
reducer = block
else
initial = nil
reducer = args[0].to_proc
end
when 2
... | ruby | def register_bundle_metadata_reducer(mime_type, key, *args, &block)
case args.size
when 0
reducer = block
when 1
if block_given?
initial = args[0]
reducer = block
else
initial = nil
reducer = args[0].to_proc
end
when 2
... | [
"def",
"register_bundle_metadata_reducer",
"(",
"mime_type",
",",
"key",
",",
"*",
"args",
",",
"&",
"block",
")",
"case",
"args",
".",
"size",
"when",
"0",
"reducer",
"=",
"block",
"when",
"1",
"if",
"block_given?",
"initial",
"=",
"args",
"[",
"0",
"]"... | Public: Register bundle metadata reducer function.
Examples
Sprockets.register_bundle_metadata_reducer 'application/javascript', :jshint_errors, [], :+
Sprockets.register_bundle_metadata_reducer 'text/css', :selector_count, 0 { |total, count|
total + count
}
mime_type - String MIME Type. Use '*/*' a... | [
"Public",
":",
"Register",
"bundle",
"metadata",
"reducer",
"function",
"."
] | 9e3f0d8e98c44f57e67bc138db87bb8469bf5ddd | https://github.com/rails/sprockets/blob/9e3f0d8e98c44f57e67bc138db87bb8469bf5ddd/lib/sprockets/processing.rb#L137-L159 | train | Register a bundle metadata reducer. | [
30522,
13366,
4236,
1035,
14012,
1035,
27425,
1035,
5547,
2099,
1006,
2771,
4168,
1035,
2828,
1010,
3145,
1010,
1008,
12098,
5620,
1010,
1004,
3796,
1007,
2553,
12098,
5620,
1012,
2946,
2043,
1014,
5547,
2099,
1027,
3796,
2043,
1015,
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... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_locks/lib/2015-01-01/generated/azure_mgmt_locks/management_locks.rb | Azure::Locks::Mgmt::V2015_01_01.ManagementLocks.delete_at_resource_level_with_http_info | def delete_at_resource_level_with_http_info(resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, lock_name, custom_headers:nil)
delete_at_resource_level_async(resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, lock... | ruby | def delete_at_resource_level_with_http_info(resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, lock_name, custom_headers:nil)
delete_at_resource_level_async(resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, lock... | [
"def",
"delete_at_resource_level_with_http_info",
"(",
"resource_group_name",
",",
"resource_provider_namespace",
",",
"parent_resource_path",
",",
"resource_type",
",",
"resource_name",
",",
"lock_name",
",",
"custom_headers",
":",
"nil",
")",
"delete_at_resource_level_async",... | Deletes the management lock of a resource or any level below resource.
@param resource_group_name [String] The name of the resource group.
@param resource_provider_namespace [String] Resource identity.
@param parent_resource_path [String] Resource identity.
@param resource_type [String] Resource identity.
@param ... | [
"Deletes",
"the",
"management",
"lock",
"of",
"a",
"resource",
"or",
"any",
"level",
"below",
"resource",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_locks/lib/2015-01-01/generated/azure_mgmt_locks/management_locks.rb#L490-L492 | train | Deletes a resource at resource level. | [
30522,
13366,
3972,
12870,
1035,
2012,
1035,
7692,
1035,
2504,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
7692,
1035,
10802,
1035,
3415,
15327,
1010,
6687,
1035,
7692,
1035,
4130,
1010,
7692,
1035,
2828,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_cdn/lib/2016-10-02/generated/azure_mgmt_cdn/profiles.rb | Azure::CDN::Mgmt::V2016_10_02.Profiles.create_async | def create_async(resource_group_name, profile_name, profile, custom_headers:nil)
# Send request
promise = begin_create_async(resource_group_name, profile_name, profile, custom_headers:custom_headers)
promise = promise.then do |response|
# Defining deserialization method.
deserialize_m... | ruby | def create_async(resource_group_name, profile_name, profile, custom_headers:nil)
# Send request
promise = begin_create_async(resource_group_name, profile_name, profile, custom_headers:custom_headers)
promise = promise.then do |response|
# Defining deserialization method.
deserialize_m... | [
"def",
"create_async",
"(",
"resource_group_name",
",",
"profile_name",
",",
"profile",
",",
"custom_headers",
":",
"nil",
")",
"# Send request",
"promise",
"=",
"begin_create_async",
"(",
"resource_group_name",
",",
"profile_name",
",",
"profile",
",",
"custom_header... | @param resource_group_name [String] Name of the Resource group within the
Azure subscription.
@param profile_name [String] Name of the CDN profile which is unique within
the resource group.
@param profile [Profile] Profile properties needed to create a new profile.
@param custom_headers [Hash{String => String}] A ... | [
"@param",
"resource_group_name",
"[",
"String",
"]",
"Name",
"of",
"the",
"Resource",
"group",
"within",
"the",
"Azure",
"subscription",
".",
"@param",
"profile_name",
"[",
"String",
"]",
"Name",
"of",
"the",
"CDN",
"profile",
"which",
"is",
"unique",
"within"... | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_cdn/lib/2016-10-02/generated/azure_mgmt_cdn/profiles.rb#L339-L355 | train | Creates a new CDN profile. | [
30522,
13366,
3443,
1035,
2004,
6038,
2278,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
6337,
1035,
2171,
1010,
6337,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
1001,
4604,
5227,
4872,
1027,
4088,
1035,
3443,
1035,
2004,
6038,
2... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
tongueroo/jets | lib/jets/controller/rendering/rack_renderer.rb | Jets::Controller::Rendering.RackRenderer.render | def render
# we do some normalization here
status = normalize_status_code(@options[:status])
base64 = normalized_base64_option(@options)
headers = @options[:headers] || {}
set_content_type!(status, headers)
# x-jets-base64 to convert this Rack triplet to a API Gateway hash structur... | ruby | def render
# we do some normalization here
status = normalize_status_code(@options[:status])
base64 = normalized_base64_option(@options)
headers = @options[:headers] || {}
set_content_type!(status, headers)
# x-jets-base64 to convert this Rack triplet to a API Gateway hash structur... | [
"def",
"render",
"# we do some normalization here",
"status",
"=",
"normalize_status_code",
"(",
"@options",
"[",
":status",
"]",
")",
"base64",
"=",
"normalized_base64_option",
"(",
"@options",
")",
"headers",
"=",
"@options",
"[",
":headers",
"]",
"||",
"{",
"}"... | Example response:
[200, {"my-header" = > "value" }, "my body" ]
Returns rack triplet | [
"Example",
"response",
":"
] | 46943a519224067e58aa3e2d5656e3ca083150f9 | https://github.com/tongueroo/jets/blob/46943a519224067e58aa3e2d5656e3ca083150f9/lib/jets/controller/rendering/rack_renderer.rb#L18-L40 | train | render the response | [
30522,
13366,
17552,
1001,
2057,
2079,
2070,
3671,
3989,
2182,
3570,
1027,
3671,
4697,
1035,
3570,
1035,
3642,
1006,
1030,
7047,
1031,
1024,
3570,
1033,
1007,
2918,
21084,
1027,
3671,
3550,
1035,
2918,
21084,
1035,
5724,
1006,
1030,
7047,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
mongodb/mongo-ruby-driver | lib/mongo/monitoring.rb | Mongo.Monitoring.failed | def failed(topic, event)
subscribers_for(topic).each{ |subscriber| subscriber.failed(event) }
end | ruby | def failed(topic, event)
subscribers_for(topic).each{ |subscriber| subscriber.failed(event) }
end | [
"def",
"failed",
"(",
"topic",
",",
"event",
")",
"subscribers_for",
"(",
"topic",
")",
".",
"each",
"{",
"|",
"subscriber",
"|",
"subscriber",
".",
"failed",
"(",
"event",
")",
"}",
"end"
] | Publish a failed event.
@example Publish a failed event.
monitoring.failed(COMMAND, event)
@param [ String ] topic The event topic.
@param [ Event ] event The event to publish.
@since 2.1.0 | [
"Publish",
"a",
"failed",
"event",
"."
] | dca26d0870cb3386fad9ccc1d17228097c1fe1c8 | https://github.com/mongodb/mongo-ruby-driver/blob/dca26d0870cb3386fad9ccc1d17228097c1fe1c8/lib/mongo/monitoring.rb#L278-L280 | train | Called when a topic has failed. | [
30522,
13366,
3478,
1006,
8476,
1010,
2724,
1007,
17073,
1035,
2005,
1006,
8476,
1007,
1012,
2169,
1063,
1064,
4942,
29234,
2099,
1064,
4942,
29234,
2099,
1012,
3478,
1006,
2724,
1007,
1065,
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... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
tongueroo/jets | lib/jets/router.rb | Jets.Router.root | def root(to, options={})
default = {path: '', to: to, method: :get, root: true}
options = default.merge(options)
@routes << Route.new(options)
end | ruby | def root(to, options={})
default = {path: '', to: to, method: :get, root: true}
options = default.merge(options)
@routes << Route.new(options)
end | [
"def",
"root",
"(",
"to",
",",
"options",
"=",
"{",
"}",
")",
"default",
"=",
"{",
"path",
":",
"''",
",",
"to",
":",
"to",
",",
"method",
":",
":get",
",",
"root",
":",
"true",
"}",
"options",
"=",
"default",
".",
"merge",
"(",
"options",
")",... | root "posts#index" | [
"root",
"posts#index"
] | 46943a519224067e58aa3e2d5656e3ca083150f9 | https://github.com/tongueroo/jets/blob/46943a519224067e58aa3e2d5656e3ca083150f9/lib/jets/router.rb#L87-L91 | train | Add a root route to the routes list | [
30522,
13366,
7117,
1006,
2000,
1010,
7047,
1027,
1063,
1065,
1007,
12398,
1027,
1063,
4130,
1024,
1005,
1005,
1010,
2000,
1024,
2000,
1010,
4118,
1024,
1024,
2131,
1010,
7117,
1024,
2995,
1065,
7047,
1027,
12398,
1012,
13590,
1006,
7047,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
mongodb/mongoid | lib/mongoid/touchable.rb | Mongoid.Touchable.define_relation_touch_method | def define_relation_touch_method(name, association)
relation_classes = if association.polymorphic?
association.send(:inverse_association_classes)
else
[ association.relation_class ]
end
relation_classes.... | ruby | def define_relation_touch_method(name, association)
relation_classes = if association.polymorphic?
association.send(:inverse_association_classes)
else
[ association.relation_class ]
end
relation_classes.... | [
"def",
"define_relation_touch_method",
"(",
"name",
",",
"association",
")",
"relation_classes",
"=",
"if",
"association",
".",
"polymorphic?",
"association",
".",
"send",
"(",
":inverse_association_classes",
")",
"else",
"[",
"association",
".",
"relation_class",
"]"... | Define the method that will get called for touching belongs_to
associations.
@api private
@example Define the touch association.
Model.define_relation_touch_method(:band)
Model.define_relation_touch_method(:band, :band_updated_at)
@param [ Symbol ] name The name of the association.
@param [ Association ] ... | [
"Define",
"the",
"method",
"that",
"will",
"get",
"called",
"for",
"touching",
"belongs_to",
"associations",
"."
] | 56976e32610f4c2450882b0bfe14da099f0703f4 | https://github.com/mongodb/mongoid/blob/56976e32610f4c2450882b0bfe14da099f0703f4/lib/mongoid/touchable.rb#L82-L100 | train | Defines a touch method for the given association. | [
30522,
13366,
9375,
1035,
7189,
1035,
3543,
1035,
4118,
1006,
2171,
1010,
2523,
1007,
7189,
1035,
4280,
1027,
2065,
2523,
1012,
26572,
18078,
1029,
2523,
1012,
4604,
1006,
1024,
19262,
1035,
2523,
1035,
4280,
1007,
2842,
1031,
2523,
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... |
mongodb/mongo-ruby-driver | lib/mongo/session.rb | Mongo.Session.add_txn_num! | def add_txn_num!(command)
command.tap do |c|
c[:txnNumber] = BSON::Int64.new(@server_session.txn_num) if in_transaction?
end
end | ruby | def add_txn_num!(command)
command.tap do |c|
c[:txnNumber] = BSON::Int64.new(@server_session.txn_num) if in_transaction?
end
end | [
"def",
"add_txn_num!",
"(",
"command",
")",
"command",
".",
"tap",
"do",
"|",
"c",
"|",
"c",
"[",
":txnNumber",
"]",
"=",
"BSON",
"::",
"Int64",
".",
"new",
"(",
"@server_session",
".",
"txn_num",
")",
"if",
"in_transaction?",
"end",
"end"
] | Add the transaction number to a command document if applicable.
@example
session.add_txn_num!(cmd)
@return [ Hash, BSON::Document ] The command document.
@since 2.6.0
@api private | [
"Add",
"the",
"transaction",
"number",
"to",
"a",
"command",
"document",
"if",
"applicable",
"."
] | dca26d0870cb3386fad9ccc1d17228097c1fe1c8 | https://github.com/mongodb/mongo-ruby-driver/blob/dca26d0870cb3386fad9ccc1d17228097c1fe1c8/lib/mongo/session.rb#L248-L252 | train | Add the txn number to the command | [
30522,
13366,
5587,
1035,
19067,
2078,
1035,
16371,
2213,
999,
1006,
3094,
1007,
3094,
1012,
11112,
2079,
1064,
1039,
1064,
1039,
1031,
1024,
19067,
10695,
29440,
1033,
1027,
18667,
2239,
1024,
1024,
20014,
21084,
1012,
2047,
1006,
1030,
82... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/reporting_api.rb | SquareConnect.ReportingApi.list_additional_recipient_receivables | def list_additional_recipient_receivables(location_id, opts = {})
data, _status_code, _headers = list_additional_recipient_receivables_with_http_info(location_id, opts)
return data
end | ruby | def list_additional_recipient_receivables(location_id, opts = {})
data, _status_code, _headers = list_additional_recipient_receivables_with_http_info(location_id, opts)
return data
end | [
"def",
"list_additional_recipient_receivables",
"(",
"location_id",
",",
"opts",
"=",
"{",
"}",
")",
"data",
",",
"_status_code",
",",
"_headers",
"=",
"list_additional_recipient_receivables_with_http_info",
"(",
"location_id",
",",
"opts",
")",
"return",
"data",
"end... | ListAdditionalRecipientReceivables
Returns a list of receivables (across all possible sending locations) representing monies credited to the provided location ID by another Square account using the `additional_recipients` field in a transaction. Max results per [page](#paginatingresults): 50
@param location_id The I... | [
"ListAdditionalRecipientReceivables",
"Returns",
"a",
"list",
"of",
"receivables",
"(",
"across",
"all",
"possible",
"sending",
"locations",
")",
"representing",
"monies",
"credited",
"to",
"the",
"provided",
"location",
"ID",
"by",
"another",
"Square",
"account",
"... | 798eb9ded716f23b9f1518386f1c311a34bca8bf | https://github.com/square/connect-ruby-sdk/blob/798eb9ded716f23b9f1518386f1c311a34bca8bf/lib/square_connect/api/reporting_api.rb#L99-L102 | train | Returns the additional recipient receivables for a location | [
30522,
13366,
2862,
1035,
3176,
1035,
7799,
1035,
28667,
7416,
12423,
2015,
1006,
3295,
1035,
30524,
20346,
2015,
1027,
2862,
1035,
3176,
1035,
7799,
1035,
28667,
7416,
12423,
2015,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
3295,
1035,
890... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
decidim/decidim | decidim-core/lib/decidim/data_portability_file_reader.rb | Decidim.DataPortabilityFileReader.file_path | def file_path
directory_name = Rails.root.join(Decidim::DataPortabilityUploader.new.store_dir)
FileUtils.mkdir_p(directory_name) unless File.exist?(directory_name)
directory_name + file_name
end | ruby | def file_path
directory_name = Rails.root.join(Decidim::DataPortabilityUploader.new.store_dir)
FileUtils.mkdir_p(directory_name) unless File.exist?(directory_name)
directory_name + file_name
end | [
"def",
"file_path",
"directory_name",
"=",
"Rails",
".",
"root",
".",
"join",
"(",
"Decidim",
"::",
"DataPortabilityUploader",
".",
"new",
".",
"store_dir",
")",
"FileUtils",
".",
"mkdir_p",
"(",
"directory_name",
")",
"unless",
"File",
".",
"exist?",
"(",
"... | Returns a String with the absolute file_path to be read or generate. | [
"Returns",
"a",
"String",
"with",
"the",
"absolute",
"file_path",
"to",
"be",
"read",
"or",
"generate",
"."
] | 6e2b14e559a63088669904e3c5c49a5180700cf7 | https://github.com/decidim/decidim/blob/6e2b14e559a63088669904e3c5c49a5180700cf7/decidim-core/lib/decidim/data_portability_file_reader.rb#L30-L34 | train | Returns the path to the file with the highest priority. | [
30522,
13366,
5371,
30524,
1012,
12395,
4305,
2099,
1035,
1052,
1006,
14176,
1035,
2171,
1007,
4983,
5371,
1012,
4839,
1029,
1006,
14176,
1035,
2171,
1007,
14176,
1035,
2171,
1009,
5371,
1035,
2171,
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... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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.delete_modifier_list | def delete_modifier_list(location_id, modifier_list_id, opts = {})
data, _status_code, _headers = delete_modifier_list_with_http_info(location_id, modifier_list_id, opts)
return data
end | ruby | def delete_modifier_list(location_id, modifier_list_id, opts = {})
data, _status_code, _headers = delete_modifier_list_with_http_info(location_id, modifier_list_id, opts)
return data
end | [
"def",
"delete_modifier_list",
"(",
"location_id",
",",
"modifier_list_id",
",",
"opts",
"=",
"{",
"}",
")",
"data",
",",
"_status_code",
",",
"_headers",
"=",
"delete_modifier_list_with_http_info",
"(",
"location_id",
",",
"modifier_list_id",
",",
"opts",
")",
"r... | DeleteModifierList
Deletes an existing item modifier list and all modifier options associated with it. *Note**: DeleteModifierList returns nothing on success but Connect SDKs map the empty response to an empty `V1DeleteModifierListRequest` object as documented below.
@param location_id The ID of the item's associ... | [
"DeleteModifierList",
"Deletes",
"an",
"existing",
"item",
"modifier",
"list",
"and",
"all",
"modifier",
"options",
"associated",
"with",
"it",
".",
"*",
"Note",
"**",
":",
"DeleteModifierList",
"returns",
"nothing",
"on",
"success",
"but",
"Connect",
"SDKs",
"m... | 798eb9ded716f23b9f1518386f1c311a34bca8bf | https://github.com/square/connect-ruby-sdk/blob/798eb9ded716f23b9f1518386f1c311a34bca8bf/lib/square_connect/api/v1_items_api.rb#L931-L934 | train | Delete a modifier list | [
30522,
13366,
3972,
12870,
1035,
16913,
18095,
1035,
2862,
1006,
3295,
1035,
8909,
1010,
16913,
18095,
1035,
2862,
1035,
8909,
1010,
23569,
2015,
1027,
1063,
1065,
1007,
2951,
1010,
1035,
3570,
1035,
3642,
1010,
1035,
20346,
2015,
1027,
397... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
mongodb/mongoid | lib/mongoid/reloadable.rb | Mongoid.Reloadable.extract_embedded_attributes | def extract_embedded_attributes(attributes)
atomic_position.split(".").inject(attributes) do |attrs, part|
attrs = attrs[part =~ /\d/ ? part.to_i : part]
attrs
end
end | ruby | def extract_embedded_attributes(attributes)
atomic_position.split(".").inject(attributes) do |attrs, part|
attrs = attrs[part =~ /\d/ ? part.to_i : part]
attrs
end
end | [
"def",
"extract_embedded_attributes",
"(",
"attributes",
")",
"atomic_position",
".",
"split",
"(",
"\".\"",
")",
".",
"inject",
"(",
"attributes",
")",
"do",
"|",
"attrs",
",",
"part",
"|",
"attrs",
"=",
"attrs",
"[",
"part",
"=~",
"/",
"\\d",
"/",
"?",... | Extract only the desired embedded document from the attributes.
@example Extract the embedded document.
document.extract_embedded_attributes(attributes)
@param [ Hash ] attributes The document in the db.
@return [ Hash ] The document's extracted attributes.
@since 2.3.2 | [
"Extract",
"only",
"the",
"desired",
"embedded",
"document",
"from",
"the",
"attributes",
"."
] | 56976e32610f4c2450882b0bfe14da099f0703f4 | https://github.com/mongodb/mongoid/blob/56976e32610f4c2450882b0bfe14da099f0703f4/lib/mongoid/reloadable.rb#L89-L94 | train | Extract the attributes from the atomic_position | [
30522,
13366,
14817,
1035,
11157,
1035,
12332,
1006,
12332,
1007,
9593,
1035,
2597,
1012,
3975,
1006,
1000,
1012,
1000,
1007,
1012,
1999,
20614,
1006,
12332,
1007,
2079,
1064,
2012,
16344,
2015,
1010,
2112,
1064,
2012,
16344,
2015,
1027,
20... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_compute/lib/2019-03-01/generated/azure_mgmt_compute/galleries.rb | Azure::Compute::Mgmt::V2019_03_01.Galleries.create_or_update | def create_or_update(resource_group_name, gallery_name, gallery, custom_headers:nil)
response = create_or_update_async(resource_group_name, gallery_name, gallery, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def create_or_update(resource_group_name, gallery_name, gallery, custom_headers:nil)
response = create_or_update_async(resource_group_name, gallery_name, gallery, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"create_or_update",
"(",
"resource_group_name",
",",
"gallery_name",
",",
"gallery",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"create_or_update_async",
"(",
"resource_group_name",
",",
"gallery_name",
",",
"gallery",
",",
"custom_headers",
":cus... | Create or update a Shared Image 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 ... | [
"Create",
"or",
"update",
"a",
"Shared",
"Image",
"Gallery",
"."
] | 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#L38-L41 | train | Creates or updates a gallery. | [
30522,
13366,
3443,
1035,
2030,
1035,
10651,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
3916,
1035,
2171,
1010,
3916,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
3443,
1035,
2030,
1035,
10651,
1035,
2004,
6038,
2278,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
rails/rails | activesupport/lib/active_support/lazy_load_hooks.rb | ActiveSupport.LazyLoadHooks.on_load | def on_load(name, options = {}, &block)
@loaded[name].each do |base|
execute_hook(name, base, options, block)
end
@load_hooks[name] << [block, options]
end | ruby | def on_load(name, options = {}, &block)
@loaded[name].each do |base|
execute_hook(name, base, options, block)
end
@load_hooks[name] << [block, options]
end | [
"def",
"on_load",
"(",
"name",
",",
"options",
"=",
"{",
"}",
",",
"&",
"block",
")",
"@loaded",
"[",
"name",
"]",
".",
"each",
"do",
"|",
"base",
"|",
"execute_hook",
"(",
"name",
",",
"base",
",",
"options",
",",
"block",
")",
"end",
"@load_hooks... | Declares a block that will be executed when a Rails component is fully
loaded.
Options:
* <tt>:yield</tt> - Yields the object that run_load_hooks to +block+.
* <tt>:run_once</tt> - Given +block+ will run only once. | [
"Declares",
"a",
"block",
"that",
"will",
"be",
"executed",
"when",
"a",
"Rails",
"component",
"is",
"fully",
"loaded",
"."
] | 85a8bc644be69908f05740a5886ec19cd3679df5 | https://github.com/rails/rails/blob/85a8bc644be69908f05740a5886ec19cd3679df5/activesupport/lib/active_support/lazy_load_hooks.rb#L41-L47 | train | Execute the load hook for the given name. | [
30522,
13366,
2006,
1035,
7170,
1006,
2171,
1010,
7047,
1027,
1063,
1065,
1010,
1004,
3796,
1007,
1030,
8209,
1031,
2171,
1033,
1012,
2169,
2079,
1064,
2918,
1064,
15389,
1035,
8103,
1006,
2171,
1010,
2918,
1010,
7047,
1010,
3796,
1007,
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... |
hashicorp/vagrant | lib/vagrant/alias.rb | Vagrant.Alias.register | def register(keyword, command)
@aliases.register(keyword.to_sym) do
lambda do |args|
# directly execute shell commands
if command.start_with?("!")
return Util::SafeExec.exec "#{command[1..-1]} #{args.join(" ")}".strip
end
return CLI.new(command.split.co... | ruby | def register(keyword, command)
@aliases.register(keyword.to_sym) do
lambda do |args|
# directly execute shell commands
if command.start_with?("!")
return Util::SafeExec.exec "#{command[1..-1]} #{args.join(" ")}".strip
end
return CLI.new(command.split.co... | [
"def",
"register",
"(",
"keyword",
",",
"command",
")",
"@aliases",
".",
"register",
"(",
"keyword",
".",
"to_sym",
")",
"do",
"lambda",
"do",
"|",
"args",
"|",
"# directly execute shell commands",
"if",
"command",
".",
"start_with?",
"(",
"\"!\"",
")",
"ret... | This registers an alias. | [
"This",
"registers",
"an",
"alias",
"."
] | c22a145c59790c098f95d50141d9afb48e1ef55f | https://github.com/hashicorp/vagrant/blob/c22a145c59790c098f95d50141d9afb48e1ef55f/lib/vagrant/alias.rb#L43-L54 | train | register a command to the command list | [
30522,
13366,
4236,
1006,
3145,
18351,
1010,
3094,
1007,
1030,
14593,
2229,
1012,
4236,
1006,
3145,
18351,
1012,
2000,
1035,
25353,
2213,
1007,
2079,
23375,
2079,
1064,
12098,
5620,
1064,
1001,
3495,
15389,
5806,
10954,
2065,
3094,
1012,
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... |
sds/haml-lint | lib/haml_lint/runner.rb | HamlLint.Runner.process_files | def process_files(report)
files.each do |file|
process_file(file, report)
break if report.failed? && fail_fast?
end
end | ruby | def process_files(report)
files.each do |file|
process_file(file, report)
break if report.failed? && fail_fast?
end
end | [
"def",
"process_files",
"(",
"report",
")",
"files",
".",
"each",
"do",
"|",
"file",
"|",
"process_file",
"(",
"file",
",",
"report",
")",
"break",
"if",
"report",
".",
"failed?",
"&&",
"fail_fast?",
"end",
"end"
] | Process the files and add them to the given report.
@param report [HamlLint::Report]
@return [void] | [
"Process",
"the",
"files",
"and",
"add",
"them",
"to",
"the",
"given",
"report",
"."
] | 024c773667e54cf88db938c2b368977005d70ee8 | https://github.com/sds/haml-lint/blob/024c773667e54cf88db938c2b368977005d70ee8/lib/haml_lint/runner.rb#L111-L116 | train | Process the files | [
30522,
13366,
2832,
1035,
6764,
1006,
3189,
1007,
6764,
1012,
2169,
2079,
1064,
5371,
1064,
2832,
1035,
5371,
1006,
5371,
1010,
3189,
1007,
3338,
2065,
3189,
1012,
3478,
1029,
1004,
1004,
8246,
1035,
3435,
1029,
2203,
2203,
102,
0,
0,
0... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
kpumuk/meta-tags | lib/meta_tags/text_normalizer.rb | MetaTags.TextNormalizer.truncate_array | def truncate_array(string_array, limit = nil, separator = '', natural_separator = ' ')
return string_array if limit.nil? || limit <= 0
length = 0
result = []
string_array.each do |string|
limit_left = calculate_limit_left(limit, length, result, separator)
if string.length > li... | ruby | def truncate_array(string_array, limit = nil, separator = '', natural_separator = ' ')
return string_array if limit.nil? || limit <= 0
length = 0
result = []
string_array.each do |string|
limit_left = calculate_limit_left(limit, length, result, separator)
if string.length > li... | [
"def",
"truncate_array",
"(",
"string_array",
",",
"limit",
"=",
"nil",
",",
"separator",
"=",
"''",
",",
"natural_separator",
"=",
"' '",
")",
"return",
"string_array",
"if",
"limit",
".",
"nil?",
"||",
"limit",
"<=",
"0",
"length",
"=",
"0",
"result",
... | Truncates a string to a specific limit.
@param [Array<String>] string_array input strings.
@param [Integer,nil] limit characters number to truncate to.
@param [String] separator separator that will be used to join array later.
@param [String] natural_separator natural separator to truncate at.
@return [String] tr... | [
"Truncates",
"a",
"string",
"to",
"a",
"specific",
"limit",
"."
] | 03585f95edf96cd17024c5c155ce46ec8bc47232 | https://github.com/kpumuk/meta-tags/blob/03585f95edf96cd17024c5c155ce46ec8bc47232/lib/meta_tags/text_normalizer.rb#L158-L180 | train | Truncate a string array to a limit of length | [
30522,
13366,
19817,
4609,
16280,
1035,
9140,
1006,
5164,
1035,
9140,
1010,
5787,
1027,
9152,
2140,
1010,
19802,
25879,
2953,
1027,
1005,
1005,
1010,
3019,
1035,
19802,
25879,
2953,
1027,
1005,
1005,
1007,
2709,
5164,
1035,
9140,
2065,
5787... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
onelogin/ruby-saml | lib/xml_security.rb | XMLSecurity.Document.sign_document | def sign_document(private_key, certificate, signature_method = RSA_SHA1, digest_method = SHA1)
noko = Nokogiri::XML(self.to_s) do |config|
config.options = XMLSecurity::BaseDocument::NOKOGIRI_OPTIONS
end
signature_element = REXML::Element.new("ds:Signature").add_namespace('ds', DSIG)
si... | ruby | def sign_document(private_key, certificate, signature_method = RSA_SHA1, digest_method = SHA1)
noko = Nokogiri::XML(self.to_s) do |config|
config.options = XMLSecurity::BaseDocument::NOKOGIRI_OPTIONS
end
signature_element = REXML::Element.new("ds:Signature").add_namespace('ds', DSIG)
si... | [
"def",
"sign_document",
"(",
"private_key",
",",
"certificate",
",",
"signature_method",
"=",
"RSA_SHA1",
",",
"digest_method",
"=",
"SHA1",
")",
"noko",
"=",
"Nokogiri",
"::",
"XML",
"(",
"self",
".",
"to_s",
")",
"do",
"|",
"config",
"|",
"config",
".",
... | <Signature>
<SignedInfo>
<CanonicalizationMethod />
<SignatureMethod />
<Reference>
<Transforms>
<DigestMethod>
<DigestValue>
</Reference>
<Reference /> etc.
</SignedInfo>
<SignatureValue />
<KeyInfo />
<Object />
</Signature> | [
"<Signature",
">",
"<SignedInfo",
">",
"<CanonicalizationMethod",
"/",
">",
"<SignatureMethod",
"/",
">",
"<Reference",
">",
"<Transforms",
">",
"<DigestMethod",
">",
"<DigestValue",
">",
"<",
"/",
"Reference",
">",
"<Reference",
"/",
">",
"etc",
".",
"<",
"/"... | 688d9e927d8b2d22a8b4daa870740d234b7b76c8 | https://github.com/onelogin/ruby-saml/blob/688d9e927d8b2d22a8b4daa870740d234b7b76c8/lib/xml_security.rb#L117-L172 | train | Sign the document using the given private key and certificate | [
30522,
13366,
3696,
1035,
6254,
1006,
2797,
1035,
3145,
1010,
8196,
1010,
8085,
1035,
4118,
1027,
12667,
2050,
1035,
21146,
2487,
1010,
17886,
1035,
4118,
1027,
21146,
2487,
1007,
2053,
3683,
1027,
2053,
3683,
23243,
1024,
1024,
20950,
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... |
square/connect-ruby-sdk | lib/square_connect/models/create_order_request_tax.rb | SquareConnect.CreateOrderRequestTax.valid? | def valid?
return false if !@catalog_object_id.nil? && @catalog_object_id.to_s.length > 192
return false if !@name.nil? && @name.to_s.length > 255
type_validator = EnumAttributeValidator.new('String', ["UNKNOWN_TAX", "ADDITIVE", "INCLUSIVE"])
return false unless type_validator.valid?(@type)
... | ruby | def valid?
return false if !@catalog_object_id.nil? && @catalog_object_id.to_s.length > 192
return false if !@name.nil? && @name.to_s.length > 255
type_validator = EnumAttributeValidator.new('String', ["UNKNOWN_TAX", "ADDITIVE", "INCLUSIVE"])
return false unless type_validator.valid?(@type)
... | [
"def",
"valid?",
"return",
"false",
"if",
"!",
"@catalog_object_id",
".",
"nil?",
"&&",
"@catalog_object_id",
".",
"to_s",
".",
"length",
">",
"192",
"return",
"false",
"if",
"!",
"@name",
".",
"nil?",
"&&",
"@name",
".",
"to_s",
".",
"length",
">",
"255... | Check to see if the all the properties in the model are valid
@return true if the model is valid | [
"Check",
"to",
"see",
"if",
"the",
"all",
"the",
"properties",
"in",
"the",
"model",
"are",
"valid"
] | 798eb9ded716f23b9f1518386f1c311a34bca8bf | https://github.com/square/connect-ruby-sdk/blob/798eb9ded716f23b9f1518386f1c311a34bca8bf/lib/square_connect/models/create_order_request_tax.rb#L116-L123 | train | Returns true if the object is valid for the given object ID. | [
30522,
13366,
9398,
1029,
2709,
6270,
2065,
999,
1030,
12105,
1035,
4874,
1035,
8909,
1012,
9152,
2140,
1029,
1004,
1004,
1030,
12105,
1035,
4874,
1035,
8909,
1012,
2000,
1035,
1055,
1012,
3091,
1028,
17613,
2709,
6270,
2065,
999,
1030,
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... |
sds/overcommit | lib/overcommit/configuration_validator.rb | Overcommit.ConfigurationValidator.ensure_hook_type_sections_exist | def ensure_hook_type_sections_exist(hash)
Overcommit::Utils.supported_hook_type_classes.each do |hook_type|
hash[hook_type] ||= {}
hash[hook_type]['ALL'] ||= {}
end
end | ruby | def ensure_hook_type_sections_exist(hash)
Overcommit::Utils.supported_hook_type_classes.each do |hook_type|
hash[hook_type] ||= {}
hash[hook_type]['ALL'] ||= {}
end
end | [
"def",
"ensure_hook_type_sections_exist",
"(",
"hash",
")",
"Overcommit",
"::",
"Utils",
".",
"supported_hook_type_classes",
".",
"each",
"do",
"|",
"hook_type",
"|",
"hash",
"[",
"hook_type",
"]",
"||=",
"{",
"}",
"hash",
"[",
"hook_type",
"]",
"[",
"'ALL'",
... | Ensures that keys for all supported hook types exist (PreCommit,
CommitMsg, etc.) | [
"Ensures",
"that",
"keys",
"for",
"all",
"supported",
"hook",
"types",
"exist",
"(",
"PreCommit",
"CommitMsg",
"etc",
".",
")"
] | 35d60adb41da942178b789560968e3ad030b0ac7 | https://github.com/sds/overcommit/blob/35d60adb41da942178b789560968e3ad030b0ac7/lib/overcommit/configuration_validator.rb#L34-L39 | train | Ensure that the hook type sections exist in the given hash. | [
30522,
13366,
5676,
1035,
8103,
1035,
2828,
1035,
5433,
1035,
4839,
1006,
23325,
1007,
2058,
9006,
22930,
1024,
1024,
21183,
12146,
1012,
3569,
1035,
8103,
1035,
2828,
1035,
4280,
1012,
2169,
2079,
1064,
8103,
1035,
2828,
1064,
23325,
1031,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_policy_insights/lib/2018-07-01-preview/generated/azure_mgmt_policy_insights/remediations.rb | Azure::PolicyInsights::Mgmt::V2018_07_01_preview.Remediations.list_deployments_at_resource_group_with_http_info | def list_deployments_at_resource_group_with_http_info(resource_group_name, remediation_name, query_options:nil, custom_headers:nil)
list_deployments_at_resource_group_async(resource_group_name, remediation_name, query_options:query_options, custom_headers:custom_headers).value!
end | ruby | def list_deployments_at_resource_group_with_http_info(resource_group_name, remediation_name, query_options:nil, custom_headers:nil)
list_deployments_at_resource_group_async(resource_group_name, remediation_name, query_options:query_options, custom_headers:custom_headers).value!
end | [
"def",
"list_deployments_at_resource_group_with_http_info",
"(",
"resource_group_name",
",",
"remediation_name",
",",
"query_options",
":",
"nil",
",",
"custom_headers",
":",
"nil",
")",
"list_deployments_at_resource_group_async",
"(",
"resource_group_name",
",",
"remediation_n... | Gets all deployments for a remediation at resource group scope.
@param resource_group_name [String] Resource group name.
@param remediation_name [String] The name of the remediation.
@param query_options [QueryOptions] Additional parameters for the operation
@param custom_headers [Hash{String => String}] A hash of... | [
"Gets",
"all",
"deployments",
"for",
"a",
"remediation",
"at",
"resource",
"group",
"scope",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_policy_insights/lib/2018-07-01-preview/generated/azure_mgmt_policy_insights/remediations.rb#L1201-L1203 | train | Gets the list of deployments at resource group scope. | [
30522,
13366,
2862,
1035,
10813,
2015,
1035,
2012,
1035,
7692,
1035,
2177,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2128,
16969,
3508,
1035,
2171,
1010,
23032,
1035,
7047,
1024,
30524,
1035,
2171,
1010,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
randym/axlsx | lib/axlsx/stylesheet/pattern_fill.rb | Axlsx.PatternFill.to_xml_string | def to_xml_string(str = '')
str << ('<patternFill patternType="' << patternType.to_s << '">')
if fgColor.is_a?(Color)
fgColor.to_xml_string str, "fgColor"
end
if bgColor.is_a?(Color)
bgColor.to_xml_string str, "bgColor"
end
str << '</patternFill>'
end | ruby | def to_xml_string(str = '')
str << ('<patternFill patternType="' << patternType.to_s << '">')
if fgColor.is_a?(Color)
fgColor.to_xml_string str, "fgColor"
end
if bgColor.is_a?(Color)
bgColor.to_xml_string str, "bgColor"
end
str << '</patternFill>'
end | [
"def",
"to_xml_string",
"(",
"str",
"=",
"''",
")",
"str",
"<<",
"(",
"'<patternFill patternType=\"'",
"<<",
"patternType",
".",
"to_s",
"<<",
"'\">'",
")",
"if",
"fgColor",
".",
"is_a?",
"(",
"Color",
")",
"fgColor",
".",
"to_xml_string",
"str",
",",
"\"f... | Serializes the object
@param [String] str
@return [String] | [
"Serializes",
"the",
"object"
] | c593a08b2a929dac7aa8dc418b55e26b4c49dc34 | https://github.com/randym/axlsx/blob/c593a08b2a929dac7aa8dc418b55e26b4c49dc34/lib/axlsx/stylesheet/pattern_fill.rb#L61-L71 | train | Convert the pattern to XML string. | [
30522,
13366,
2000,
1035,
20950,
1035,
5164,
1006,
2358,
2099,
1027,
1005,
1005,
1007,
2358,
2099,
1026,
1026,
1006,
1005,
1026,
5418,
8873,
3363,
5418,
13874,
1027,
1000,
1005,
1026,
1026,
5418,
13874,
1012,
2000,
1035,
1055,
1026,
1026,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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.verify_with_http_info | def verify_with_http_info(vault_base_url, key_name, key_version, algorithm, digest, signature, custom_headers:nil)
verify_async(vault_base_url, key_name, key_version, algorithm, digest, signature, custom_headers:custom_headers).value!
end | ruby | def verify_with_http_info(vault_base_url, key_name, key_version, algorithm, digest, signature, custom_headers:nil)
verify_async(vault_base_url, key_name, key_version, algorithm, digest, signature, custom_headers:custom_headers).value!
end | [
"def",
"verify_with_http_info",
"(",
"vault_base_url",
",",
"key_name",
",",
"key_version",
",",
"algorithm",
",",
"digest",
",",
"signature",
",",
"custom_headers",
":",
"nil",
")",
"verify_async",
"(",
"vault_base_url",
",",
"key_name",
",",
"key_version",
",",
... | Verifies a signature using a specified key.
The VERIFY operation is applicable to symmetric keys stored in Azure Key
Vault. VERIFY is not strictly necessary for asymmetric keys stored in Azure
Key Vault since signature verification can be performed using the public
portion of the key but this operation is supporte... | [
"Verifies",
"a",
"signature",
"using",
"a",
"specified",
"key",
"."
] | 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#L1812-L1814 | train | Verify the specified key. | [
30522,
13366,
20410,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
11632,
1035,
2918,
1035,
24471,
2140,
1010,
3145,
1035,
2171,
1010,
3145,
1035,
2544,
1010,
9896,
1010,
17886,
1010,
8085,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/product_apis.rb | Azure::ApiManagement::Mgmt::V2016_10_10.ProductApis.create_with_http_info | def create_with_http_info(resource_group_name, service_name, product_id, api_id, custom_headers:nil)
create_async(resource_group_name, service_name, product_id, api_id, custom_headers:custom_headers).value!
end | ruby | def create_with_http_info(resource_group_name, service_name, product_id, api_id, custom_headers:nil)
create_async(resource_group_name, service_name, product_id, api_id, custom_headers:custom_headers).value!
end | [
"def",
"create_with_http_info",
"(",
"resource_group_name",
",",
"service_name",
",",
"product_id",
",",
"api_id",
",",
"custom_headers",
":",
"nil",
")",
"create_async",
"(",
"resource_group_name",
",",
"service_name",
",",
"product_id",
",",
"api_id",
",",
"custom... | Adds an API to the specified product.
@param resource_group_name [String] The name of the resource group.
@param service_name [String] The name of the API Management service.
@param product_id [String] Product identifier. Must be unique in the current
API Management service instance.
@param api_id [String] API id... | [
"Adds",
"an",
"API",
"to",
"the",
"specified",
"product",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_api_management/lib/2016-10-10/generated/azure_mgmt_api_management/product_apis.rb#L211-L213 | train | Creates a new product specification. | [
30522,
13366,
3443,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2326,
1035,
2171,
1010,
4031,
1035,
8909,
1010,
17928,
1035,
8909,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3443,
1035,
2004,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
puppetlabs/bolt | lib/bolt/pal.rb | Bolt.PAL.list_modules | def list_modules
internal_module_groups = { BOLTLIB_PATH => 'Plan Language Modules',
MODULES_PATH => 'Packaged Modules' }
in_bolt_compiler do
# NOTE: Can replace map+to_h with transform_values when Ruby 2.4
# is the minimum supported version.
P... | ruby | def list_modules
internal_module_groups = { BOLTLIB_PATH => 'Plan Language Modules',
MODULES_PATH => 'Packaged Modules' }
in_bolt_compiler do
# NOTE: Can replace map+to_h with transform_values when Ruby 2.4
# is the minimum supported version.
P... | [
"def",
"list_modules",
"internal_module_groups",
"=",
"{",
"BOLTLIB_PATH",
"=>",
"'Plan Language Modules'",
",",
"MODULES_PATH",
"=>",
"'Packaged Modules'",
"}",
"in_bolt_compiler",
"do",
"# NOTE: Can replace map+to_h with transform_values when Ruby 2.4",
"# is the minimum supp... | Returns a mapping of all modules available to the Bolt compiler
@return [Hash{String => Array<Hash{Symbol => String,nil}>}]
A hash that associates each directory on the module path with an array
containing a hash of information for each module in that directory.
The information hash provides the name, versio... | [
"Returns",
"a",
"mapping",
"of",
"all",
"modules",
"available",
"to",
"the",
"Bolt",
"compiler"
] | 50689a33699939d262ea7c822a4b24fd8c4f8d8a | https://github.com/puppetlabs/bolt/blob/50689a33699939d262ea7c822a4b24fd8c4f8d8a/lib/bolt/pal.rb#L313-L334 | train | Returns a hash of all the modules that are in the current environment. | [
30522,
13366,
2862,
1035,
14184,
4722,
1035,
11336,
1035,
2967,
1027,
1063,
10053,
29521,
1035,
4130,
1027,
1028,
1005,
2933,
2653,
14184,
1005,
1010,
14184,
1035,
4130,
1027,
1028,
1005,
21972,
14184,
1005,
1065,
1999,
1035,
10053,
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 | management/azure_mgmt_redis/lib/2017-02-01/generated/azure_mgmt_redis/redis.rb | Azure::Redis::Mgmt::V2017_02_01.Redis.export_data | def export_data(resource_group_name, name, parameters, custom_headers:nil)
response = export_data_async(resource_group_name, name, parameters, custom_headers:custom_headers).value!
nil
end | ruby | def export_data(resource_group_name, name, parameters, custom_headers:nil)
response = export_data_async(resource_group_name, name, parameters, custom_headers:custom_headers).value!
nil
end | [
"def",
"export_data",
"(",
"resource_group_name",
",",
"name",
",",
"parameters",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"export_data_async",
"(",
"resource_group_name",
",",
"name",
",",
"parameters",
",",
"custom_headers",
":custom_headers",
")",... | Export data from the redis cache to blobs in a container.
@param resource_group_name [String] The name of the resource group.
@param name [String] The name of the Redis cache.
@param parameters [ExportRDBParameters] Parameters for Redis export
operation.
@param custom_headers [Hash{String => String}] A hash of cu... | [
"Export",
"data",
"from",
"the",
"redis",
"cache",
"to",
"blobs",
"in",
"a",
"container",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_redis/lib/2017-02-01/generated/azure_mgmt_redis/redis.rb#L844-L847 | train | Export a list of data structures. | [
30522,
13366,
9167,
1035,
2951,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2171,
1010,
11709,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
9167,
1035,
2951,
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... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_network/lib/2019-02-01/generated/azure_mgmt_network/p2s_vpn_server_configurations.rb | Azure::Network::Mgmt::V2019_02_01.P2sVpnServerConfigurations.create_or_update | def create_or_update(resource_group_name, virtual_wan_name, p2svpn_server_configuration_name, p2svpn_server_configuration_parameters, custom_headers:nil)
response = create_or_update_async(resource_group_name, virtual_wan_name, p2svpn_server_configuration_name, p2svpn_server_configuration_parameters, custom_header... | ruby | def create_or_update(resource_group_name, virtual_wan_name, p2svpn_server_configuration_name, p2svpn_server_configuration_parameters, custom_headers:nil)
response = create_or_update_async(resource_group_name, virtual_wan_name, p2svpn_server_configuration_name, p2svpn_server_configuration_parameters, custom_header... | [
"def",
"create_or_update",
"(",
"resource_group_name",
",",
"virtual_wan_name",
",",
"p2svpn_server_configuration_name",
",",
"p2svpn_server_configuration_parameters",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"create_or_update_async",
"(",
"resource_group_name",... | Creates a P2SVpnServerConfiguration to associate with a VirtualWan if it
doesn't exist else updates the existing P2SVpnServerConfiguration.
@param resource_group_name [String] The resource group name of the
VirtualWan.
@param virtual_wan_name [String] The name of the VirtualWan.
@param p2svpn_server_configuration... | [
"Creates",
"a",
"P2SVpnServerConfiguration",
"to",
"associate",
"with",
"a",
"VirtualWan",
"if",
"it",
"doesn",
"t",
"exist",
"else",
"updates",
"the",
"existing",
"P2SVpnServerConfiguration",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_network/lib/2019-02-01/generated/azure_mgmt_network/p2s_vpn_server_configurations.rb#L142-L145 | train | Creates or updates a virtual wan server configuration. | [
30522,
13366,
3443,
1035,
2030,
1035,
10651,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
7484,
1035,
14071,
1035,
2171,
1010,
1052,
2475,
2015,
2615,
2361,
2078,
1035,
8241,
1035,
9563,
1035,
2171,
1010,
1052,
2475,
2015,
2615,
2361,
2078,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
jeremytregunna/ruby-trello | lib/trello/card.rb | Trello.Card.move_to_board | def move_to_board(new_board, new_list = nil)
unless board_id == new_board.id
payload = { value: new_board.id }
payload[:idList] = new_list.id if new_list
client.put("/cards/#{id}/idBoard", payload)
end
end | ruby | def move_to_board(new_board, new_list = nil)
unless board_id == new_board.id
payload = { value: new_board.id }
payload[:idList] = new_list.id if new_list
client.put("/cards/#{id}/idBoard", payload)
end
end | [
"def",
"move_to_board",
"(",
"new_board",
",",
"new_list",
"=",
"nil",
")",
"unless",
"board_id",
"==",
"new_board",
".",
"id",
"payload",
"=",
"{",
"value",
":",
"new_board",
".",
"id",
"}",
"payload",
"[",
":idList",
"]",
"=",
"new_list",
".",
"id",
... | Move this card to the given board (and optional list on this board) | [
"Move",
"this",
"card",
"to",
"the",
"given",
"board",
"(",
"and",
"optional",
"list",
"on",
"this",
"board",
")"
] | ad79c9d8152ad5395b3b61c43170908f1912bfb2 | https://github.com/jeremytregunna/ruby-trello/blob/ad79c9d8152ad5395b3b61c43170908f1912bfb2/lib/trello/card.rb#L358-L364 | train | Move the card to the board | [
30522,
13366,
2693,
1035,
2000,
1035,
2604,
1006,
2047,
1035,
2604,
1010,
2047,
1035,
2862,
1027,
9152,
2140,
1007,
4983,
2604,
1035,
8909,
1027,
1027,
2047,
1035,
2604,
1012,
8909,
18093,
1027,
1063,
3643,
1024,
2047,
1035,
2604,
1012,
8... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
chaps-io/public_activity | lib/public_activity/utility/view_helpers.rb | PublicActivity.ViewHelpers.render_activity | def render_activity activities, options = {}
if activities.is_a? PublicActivity::Activity
activities.render self, options
elsif activities.respond_to?(:map)
# depend on ORMs to fetch as needed
# maybe we can support Postgres streaming with this?
activities.map {|activity| act... | ruby | def render_activity activities, options = {}
if activities.is_a? PublicActivity::Activity
activities.render self, options
elsif activities.respond_to?(:map)
# depend on ORMs to fetch as needed
# maybe we can support Postgres streaming with this?
activities.map {|activity| act... | [
"def",
"render_activity",
"activities",
",",
"options",
"=",
"{",
"}",
"if",
"activities",
".",
"is_a?",
"PublicActivity",
"::",
"Activity",
"activities",
".",
"render",
"self",
",",
"options",
"elsif",
"activities",
".",
"respond_to?",
"(",
":map",
")",
"# de... | View helper for rendering an activity, calls {PublicActivity::Activity#render} internally. | [
"View",
"helper",
"for",
"rendering",
"an",
"activity",
"calls",
"{",
"PublicActivity",
"::",
"Activity#render",
"}",
"internally",
"."
] | e4357cd14db67299e0cbbd656300f51b7069ea9b | https://github.com/chaps-io/public_activity/blob/e4357cd14db67299e0cbbd656300f51b7069ea9b/lib/public_activity/utility/view_helpers.rb#L8-L16 | train | render an activity | [
30522,
13366,
17552,
1035,
4023,
3450,
1010,
7047,
1027,
1063,
1065,
2065,
3450,
1012,
2003,
1035,
1037,
1029,
2270,
18908,
7730,
1024,
1024,
4023,
3450,
1012,
17552,
2969,
1010,
7047,
3449,
5332,
2546,
3450,
1012,
6869,
1035,
2000,
1029,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
aws/aws-sdk-ruby | gems/aws-sdk-rds/lib/aws-sdk-rds/resource.rb | Aws::RDS.Resource.certificates | def certificates(options = {})
batches = Enumerator.new do |y|
batch = []
resp = @client.describe_certificates(options)
resp.data.certificates.each do |c|
batch << Certificate.new(
id: c.certificate_identifier,
data: c,
client: @client
... | ruby | def certificates(options = {})
batches = Enumerator.new do |y|
batch = []
resp = @client.describe_certificates(options)
resp.data.certificates.each do |c|
batch << Certificate.new(
id: c.certificate_identifier,
data: c,
client: @client
... | [
"def",
"certificates",
"(",
"options",
"=",
"{",
"}",
")",
"batches",
"=",
"Enumerator",
".",
"new",
"do",
"|",
"y",
"|",
"batch",
"=",
"[",
"]",
"resp",
"=",
"@client",
".",
"describe_certificates",
"(",
"options",
")",
"resp",
".",
"data",
".",
"ce... | @example Request syntax with placeholder values
certificates = rds.certificates({
certificate_identifier: "String",
filters: [
{
name: "String", # required
values: ["String"], # required
},
],
max_records: 1,
marker: "String",
})
@param [Hash] options ({}... | [
"@example",
"Request",
"syntax",
"with",
"placeholder",
"values"
] | e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d | https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-rds/lib/aws-sdk-rds/resource.rb#L1596-L1610 | train | Returns a collection of certificates | [
30522,
13366,
17987,
1006,
7047,
1027,
1063,
1065,
1007,
14108,
2229,
1027,
4372,
17897,
16259,
1012,
2047,
2079,
1064,
1061,
1064,
14108,
1027,
1031,
1033,
24501,
2361,
1027,
1030,
7396,
1012,
6235,
1035,
17987,
1006,
7047,
1007,
24501,
23... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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.