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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
awesome-print/awesome_print | lib/awesome_print/ext/nobrainer.rb | AwesomePrint.NoBrainer.awesome_nobrainer_document | def awesome_nobrainer_document(object)
data = object.inspectable_attributes.symbolize_keys
data = { errors: object.errors, attributes: data } if object.errors.present?
"#{object} #{awesome_hash(data)}"
end | ruby | def awesome_nobrainer_document(object)
data = object.inspectable_attributes.symbolize_keys
data = { errors: object.errors, attributes: data } if object.errors.present?
"#{object} #{awesome_hash(data)}"
end | [
"def",
"awesome_nobrainer_document",
"(",
"object",
")",
"data",
"=",
"object",
".",
"inspectable_attributes",
".",
"symbolize_keys",
"data",
"=",
"{",
"errors",
":",
"object",
".",
"errors",
",",
"attributes",
":",
"data",
"}",
"if",
"object",
".",
"errors",
... | Format NoBrainer Document object.
------------------------------------------------------------------------------ | [
"Format",
"NoBrainer",
"Document",
"object",
".",
"------------------------------------------------------------------------------"
] | 4564fd74721562cbef2443f7d97109bf9192343d | https://github.com/awesome-print/awesome_print/blob/4564fd74721562cbef2443f7d97109bf9192343d/lib/awesome_print/ext/nobrainer.rb#L44-L48 | train | Returns a string that is a nobrainer document. | [
30522,
13366,
12476,
1035,
2053,
10024,
26455,
1035,
6254,
1006,
4874,
1007,
2951,
1027,
4874,
1012,
22459,
3085,
1035,
12332,
1012,
6454,
4697,
1035,
6309,
2951,
1027,
1063,
10697,
1024,
4874,
1012,
10697,
1010,
12332,
1024,
2951,
1065,
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... |
TrestleAdmin/trestle | lib/trestle/model_name.rb | Trestle.ModelName.human | def human(default, options={})
@name.human(options.merge(default: default))
rescue I18n::InvalidPluralizationData
default
end | ruby | def human(default, options={})
@name.human(options.merge(default: default))
rescue I18n::InvalidPluralizationData
default
end | [
"def",
"human",
"(",
"default",
",",
"options",
"=",
"{",
"}",
")",
"@name",
".",
"human",
"(",
"options",
".",
"merge",
"(",
"default",
":",
"default",
")",
")",
"rescue",
"I18n",
"::",
"InvalidPluralizationData",
"default",
"end"
] | Safely delegates to ActiveModel::Name#human, catching exceptions caused by missing pluralizations | [
"Safely",
"delegates",
"to",
"ActiveModel",
"::",
"Name#human",
"catching",
"exceptions",
"caused",
"by",
"missing",
"pluralizations"
] | fd5b8aeb5077e13d539cb5ddd99db1dd279f19ca | https://github.com/TrestleAdmin/trestle/blob/fd5b8aeb5077e13d539cb5ddd99db1dd279f19ca/lib/trestle/model_name.rb#L48-L52 | train | Returns the name of the pluralization. | [
30522,
13366,
2529,
1006,
30524,
1024,
12398,
1007,
1007,
5343,
1045,
15136,
2078,
1024,
1024,
19528,
24759,
11137,
3989,
2850,
2696,
12398,
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... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
aws/aws-sdk-ruby | gems/aws-sdk-ec2/lib/aws-sdk-ec2/vpc.rb | Aws::EC2.Vpc.enable_classic_link | def enable_classic_link(options = {})
options = options.merge(vpc_id: @id)
resp = @client.enable_vpc_classic_link(options)
resp.data
end | ruby | def enable_classic_link(options = {})
options = options.merge(vpc_id: @id)
resp = @client.enable_vpc_classic_link(options)
resp.data
end | [
"def",
"enable_classic_link",
"(",
"options",
"=",
"{",
"}",
")",
"options",
"=",
"options",
".",
"merge",
"(",
"vpc_id",
":",
"@id",
")",
"resp",
"=",
"@client",
".",
"enable_vpc_classic_link",
"(",
"options",
")",
"resp",
".",
"data",
"end"
] | @example Request syntax with placeholder values
vpc.enable_classic_link({
dry_run: false,
})
@param [Hash] options ({})
@option options [Boolean] :dry_run
Checks whether you have the required permissions for the action,
without actually making the request, and provides an error response.
If you h... | [
"@example",
"Request",
"syntax",
"with",
"placeholder",
"values"
] | e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d | https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-ec2/lib/aws-sdk-ec2/vpc.rb#L611-L615 | train | Enable a classic link on this vpc | [
30522,
13366,
9585,
1035,
4438,
1035,
4957,
1006,
7047,
1027,
1063,
1065,
1007,
7047,
1027,
7047,
1012,
13590,
1006,
21210,
2278,
1035,
8909,
1024,
1030,
8909,
1007,
24501,
2361,
1027,
1030,
7396,
1012,
9585,
1035,
21210,
2278,
1035,
4438,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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_reservations/lib/2017-11-01/generated/azure_mgmt_reservations/reservation.rb | Azure::Reservations::Mgmt::V2017_11_01.Reservation.list_revisions_as_lazy | def list_revisions_as_lazy(reservation_id, reservation_order_id, custom_headers:nil)
response = list_revisions_async(reservation_id, reservation_order_id, custom_headers:custom_headers).value!
unless response.nil?
page = response.body
page.next_method = Proc.new do |next_page_link|
... | ruby | def list_revisions_as_lazy(reservation_id, reservation_order_id, custom_headers:nil)
response = list_revisions_async(reservation_id, reservation_order_id, custom_headers:custom_headers).value!
unless response.nil?
page = response.body
page.next_method = Proc.new do |next_page_link|
... | [
"def",
"list_revisions_as_lazy",
"(",
"reservation_id",
",",
"reservation_order_id",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"list_revisions_async",
"(",
"reservation_id",
",",
"reservation_order_id",
",",
"custom_headers",
":custom_headers",
")",
".",
... | Get `Reservation` revisions.
List of all the revisions for the `Reservation`.
@param reservation_id [String] Id of the Reservation Item
@param reservation_order_id [String] Order Id of the reservation
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request... | [
"Get",
"Reservation",
"revisions",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_reservations/lib/2017-11-01/generated/azure_mgmt_reservations/reservation.rb#L1097-L1106 | train | Gets the list of all the revisions for a reservation order. | [
30522,
13366,
2862,
1035,
24699,
1035,
2004,
1035,
13971,
1006,
11079,
1035,
8909,
1010,
11079,
1035,
2344,
1035,
8909,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
2862,
1035,
24699,
1035,
2004,
6038,
2278,
1006,
1107... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
alexreisner/geocoder | lib/geocoder/calculations.rb | Geocoder.Calculations.random_point_near | def random_point_near(center, radius, options = {})
random = Random.new(options[:seed] || Random.new_seed)
# convert to coordinate arrays
center = extract_coordinates(center)
earth_circumference = 2 * Math::PI * earth_radius(options[:units])
max_degree_delta = 360.0 * (radius / earth_ci... | ruby | def random_point_near(center, radius, options = {})
random = Random.new(options[:seed] || Random.new_seed)
# convert to coordinate arrays
center = extract_coordinates(center)
earth_circumference = 2 * Math::PI * earth_radius(options[:units])
max_degree_delta = 360.0 * (radius / earth_ci... | [
"def",
"random_point_near",
"(",
"center",
",",
"radius",
",",
"options",
"=",
"{",
"}",
")",
"random",
"=",
"Random",
".",
"new",
"(",
"options",
"[",
":seed",
"]",
"||",
"Random",
".",
"new_seed",
")",
"# convert to coordinate arrays",
"center",
"=",
"ex... | Random point within a circle of provided radius centered
around the provided point
Takes one point, one radius, and an options hash.
The points are given in the same way that points are given to all
Geocoder methods that accept points as arguments. They can be:
* an array of coordinates ([lat,lon])
* a geocodabl... | [
"Random",
"point",
"within",
"a",
"circle",
"of",
"provided",
"radius",
"centered",
"around",
"the",
"provided",
"point",
"Takes",
"one",
"point",
"one",
"radius",
"and",
"an",
"options",
"hash",
".",
"The",
"points",
"are",
"given",
"in",
"the",
"same",
"... | e087dc2759264ee6f307b926bb2de4ec2406859e | https://github.com/alexreisner/geocoder/blob/e087dc2759264ee6f307b926bb2de4ec2406859e/lib/geocoder/calculations.rb#L238-L256 | train | random point near the given center | [
30522,
13366,
6721,
1035,
2391,
1035,
2379,
1006,
2415,
1010,
12177,
1010,
7047,
1027,
1063,
1065,
1007,
6721,
1027,
6721,
1012,
2047,
1006,
7047,
1031,
1024,
6534,
1033,
1064,
1064,
6721,
1012,
2047,
1035,
6534,
1007,
1001,
10463,
2000,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | data/azure_service_fabric/lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb | Azure::ServiceFabric::V6_2_0_9.ServiceFabricClientAPIs.get_service_type_info_list_with_http_info | def get_service_type_info_list_with_http_info(application_type_name, application_type_version, timeout:60, custom_headers:nil)
get_service_type_info_list_async(application_type_name, application_type_version, timeout:timeout, custom_headers:custom_headers).value!
end | ruby | def get_service_type_info_list_with_http_info(application_type_name, application_type_version, timeout:60, custom_headers:nil)
get_service_type_info_list_async(application_type_name, application_type_version, timeout:timeout, custom_headers:custom_headers).value!
end | [
"def",
"get_service_type_info_list_with_http_info",
"(",
"application_type_name",
",",
"application_type_version",
",",
"timeout",
":",
"60",
",",
"custom_headers",
":",
"nil",
")",
"get_service_type_info_list_async",
"(",
"application_type_name",
",",
"application_type_version... | Gets the list containing the information about service types that are
supported by a provisioned application type in a Service Fabric cluster.
Gets the list containing the information about service types that are
supported by a provisioned application type in a Service Fabric cluster. The
provided application type... | [
"Gets",
"the",
"list",
"containing",
"the",
"information",
"about",
"service",
"types",
"that",
"are",
"supported",
"by",
"a",
"provisioned",
"application",
"type",
"in",
"a",
"Service",
"Fabric",
"cluster",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_service_fabric/lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb#L5353-L5355 | train | Gets the service type information list for the specified application type. | [
30522,
13366,
2131,
1035,
2326,
1035,
2828,
1035,
18558,
1035,
2862,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
4646,
1035,
2828,
1035,
2171,
1010,
4646,
1035,
2828,
1035,
2544,
1010,
2051,
5833,
1024,
3438,
1010,
7661,
1035,
20346,
2015,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_machine_learning/lib/2017-01-01/generated/azure_mgmt_machine_learning/web_services.rb | Azure::MachineLearning::Mgmt::V2017_01_01.WebServices.begin_create_or_update | def begin_create_or_update(resource_group_name, web_service_name, create_or_update_payload, custom_headers:nil)
response = begin_create_or_update_async(resource_group_name, web_service_name, create_or_update_payload, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def begin_create_or_update(resource_group_name, web_service_name, create_or_update_payload, custom_headers:nil)
response = begin_create_or_update_async(resource_group_name, web_service_name, create_or_update_payload, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"begin_create_or_update",
"(",
"resource_group_name",
",",
"web_service_name",
",",
"create_or_update_payload",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"begin_create_or_update_async",
"(",
"resource_group_name",
",",
"web_service_name",
",",
"create_... | Create or update a web service. This call will overwrite an existing web
service. Note that there is no warning or confirmation. This is a
nonrecoverable operation. If your intent is to create a new web service, call
the Get operation first to verify that it does not exist.
@param resource_group_name [String] Name... | [
"Create",
"or",
"update",
"a",
"web",
"service",
".",
"This",
"call",
"will",
"overwrite",
"an",
"existing",
"web",
"service",
".",
"Note",
"that",
"there",
"is",
"no",
"warning",
"or",
"confirmation",
".",
"This",
"is",
"a",
"nonrecoverable",
"operation",
... | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_machine_learning/lib/2017-01-01/generated/azure_mgmt_machine_learning/web_services.rb#L625-L628 | train | Creates or updates a Web Services resource. | [
30522,
13366,
4088,
1035,
3443,
1035,
2030,
1035,
10651,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
4773,
1035,
2326,
1035,
2171,
1010,
3443,
1035,
2030,
1035,
10651,
1035,
18093,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
norman/friendly_id | lib/friendly_id/slugged.rb | FriendlyId.Slugged.apply_slug_limit | def apply_slug_limit(candidate, uuid)
return candidate unless candidate && friendly_id_config.slug_limit
candidate[0...candidate_limit(uuid)]
end | ruby | def apply_slug_limit(candidate, uuid)
return candidate unless candidate && friendly_id_config.slug_limit
candidate[0...candidate_limit(uuid)]
end | [
"def",
"apply_slug_limit",
"(",
"candidate",
",",
"uuid",
")",
"return",
"candidate",
"unless",
"candidate",
"&&",
"friendly_id_config",
".",
"slug_limit",
"candidate",
"[",
"0",
"...",
"candidate_limit",
"(",
"uuid",
")",
"]",
"end"
] | Private: Apply slug limit to candidate.
candidate - the String with candidate.
uuid - the String with UUID.
Return the String with truncated candidate. | [
"Private",
":",
"Apply",
"slug",
"limit",
"to",
"candidate",
"."
] | 67422c04e1bfed4207b2a04826bc67ec0e231ce7 | https://github.com/norman/friendly_id/blob/67422c04e1bfed4207b2a04826bc67ec0e231ce7/lib/friendly_id/slugged.rb#L334-L338 | train | Apply slug limit to candidate | [
30522,
13366,
6611,
1035,
23667,
1035,
5787,
1006,
4018,
1010,
1057,
21272,
1007,
2709,
4018,
4983,
4018,
1004,
1004,
5379,
1035,
8909,
1035,
9530,
8873,
2290,
1012,
23667,
1035,
5787,
4018,
1031,
1014,
1012,
1012,
1012,
4018,
1035,
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... |
zendesk/ruby-kafka | lib/kafka/offset_manager.rb | Kafka.OffsetManager.commit_offsets | def commit_offsets(recommit = false)
offsets = offsets_to_commit(recommit)
unless offsets.empty?
@logger.debug "Committing offsets#{recommit ? ' with recommit' : ''}: #{prettify_offsets(offsets)}"
@group.commit_offsets(offsets)
@last_commit = Time.now
@last_recommit = Time.... | ruby | def commit_offsets(recommit = false)
offsets = offsets_to_commit(recommit)
unless offsets.empty?
@logger.debug "Committing offsets#{recommit ? ' with recommit' : ''}: #{prettify_offsets(offsets)}"
@group.commit_offsets(offsets)
@last_commit = Time.now
@last_recommit = Time.... | [
"def",
"commit_offsets",
"(",
"recommit",
"=",
"false",
")",
"offsets",
"=",
"offsets_to_commit",
"(",
"recommit",
")",
"unless",
"offsets",
".",
"empty?",
"@logger",
".",
"debug",
"\"Committing offsets#{recommit ? ' with recommit' : ''}: #{prettify_offsets(offsets)}\"",
"@... | Commit offsets of messages that have been marked as processed.
If `recommit` is set to true, we will also commit the existing positions
even if no messages have been processed on a partition. This is done
in order to avoid the offset information expiring in cases where messages
are very rare -- it's essentially a ... | [
"Commit",
"offsets",
"of",
"messages",
"that",
"have",
"been",
"marked",
"as",
"processed",
"."
] | 2a73471b6a607a52dc85c79301ba522acb4566b5 | https://github.com/zendesk/ruby-kafka/blob/2a73471b6a607a52dc85c79301ba522acb4566b5/lib/kafka/offset_manager.rb#L120-L133 | train | Commit the offsets to the database. | [
30522,
13366,
10797,
1035,
16396,
2015,
1006,
28667,
5358,
22930,
1027,
6270,
1007,
16396,
2015,
1027,
16396,
2015,
1035,
2000,
1035,
10797,
1006,
28667,
5358,
22930,
1007,
4983,
16396,
2015,
1012,
4064,
1029,
1030,
8833,
4590,
1012,
2139,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_recovery_services_site_recovery/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/replication_recovery_plans.rb | Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10.ReplicationRecoveryPlans.planned_failover | def planned_failover(recovery_plan_name, input, custom_headers:nil)
response = planned_failover_async(recovery_plan_name, input, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def planned_failover(recovery_plan_name, input, custom_headers:nil)
response = planned_failover_async(recovery_plan_name, input, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"planned_failover",
"(",
"recovery_plan_name",
",",
"input",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"planned_failover_async",
"(",
"recovery_plan_name",
",",
"input",
",",
"custom_headers",
":custom_headers",
")",
".",
"value!",
"response",
... | Execute planned failover of the recovery plan.
The operation to start the planned failover of a recovery plan.
@param recovery_plan_name [String] Recovery plan name.
@param input [RecoveryPlanPlannedFailoverInput] Failover input.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will b... | [
"Execute",
"planned",
"failover",
"of",
"the",
"recovery",
"plan",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_recovery_services_site_recovery/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/replication_recovery_plans.rb#L392-L395 | train | Executes the planned failover on the specified recovery plan. | [
30522,
13366,
3740,
1035,
8246,
7840,
1006,
7233,
1035,
2933,
1035,
2171,
1010,
7953,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
3740,
1035,
8246,
7840,
1035,
2004,
6038,
2278,
1006,
7233,
1035,
2933,
30524,
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... |
meew0/discordrb | lib/discordrb/data/server.rb | Discordrb.Server.verification_level= | def verification_level=(level)
level = VERIFICATION_LEVELS[level] if level.is_a?(Symbol)
update_server_data(verification_level: level)
end | ruby | def verification_level=(level)
level = VERIFICATION_LEVELS[level] if level.is_a?(Symbol)
update_server_data(verification_level: level)
end | [
"def",
"verification_level",
"=",
"(",
"level",
")",
"level",
"=",
"VERIFICATION_LEVELS",
"[",
"level",
"]",
"if",
"level",
".",
"is_a?",
"(",
"Symbol",
")",
"update_server_data",
"(",
"verification_level",
":",
"level",
")",
"end"
] | Sets the verification level of the server
@param level [Integer, Symbol] The verification level from 0-4 or Symbol (see {VERIFICATION_LEVELS}) | [
"Sets",
"the",
"verification",
"level",
"of",
"the",
"server"
] | 764298a1ff0be69a1853b510d736f21c2b91a2fe | https://github.com/meew0/discordrb/blob/764298a1ff0be69a1853b510d736f21c2b91a2fe/lib/discordrb/data/server.rb#L667-L671 | train | Update the server data with the verification level. | [
30522,
13366,
22616,
1035,
2504,
1027,
1006,
2504,
1007,
2504,
1027,
22616,
1035,
3798,
1031,
2504,
1033,
2065,
2504,
1012,
2003,
1035,
1037,
1029,
1006,
6454,
1007,
10651,
1035,
8241,
1035,
2951,
1006,
22616,
1035,
2504,
1024,
2504,
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... |
jekyll/jekyll | lib/jekyll/document.rb | Jekyll.Document.categories_from_path | def categories_from_path(special_dir)
superdirs = relative_path.sub(%r!#{special_dir}(.*)!, "")
.split(File::SEPARATOR)
.reject do |c|
c.empty? || c == special_dir || c == basename
end
merge_data!({ "categories" => superdirs }, :source => "file path")
end | ruby | def categories_from_path(special_dir)
superdirs = relative_path.sub(%r!#{special_dir}(.*)!, "")
.split(File::SEPARATOR)
.reject do |c|
c.empty? || c == special_dir || c == basename
end
merge_data!({ "categories" => superdirs }, :source => "file path")
end | [
"def",
"categories_from_path",
"(",
"special_dir",
")",
"superdirs",
"=",
"relative_path",
".",
"sub",
"(",
"%r!",
"#{",
"special_dir",
"}",
"!",
",",
"\"\"",
")",
".",
"split",
"(",
"File",
"::",
"SEPARATOR",
")",
".",
"reject",
"do",
"|",
"c",
"|",
"... | Add superdirectories of the special_dir to categories.
In the case of es/_posts, 'es' is added as a category.
In the case of _posts/es, 'es' is NOT added as a category.
Returns nothing. | [
"Add",
"superdirectories",
"of",
"the",
"special_dir",
"to",
"categories",
".",
"In",
"the",
"case",
"of",
"es",
"/",
"_posts",
"es",
"is",
"added",
"as",
"a",
"category",
".",
"In",
"the",
"case",
"of",
"_posts",
"/",
"es",
"es",
"is",
"NOT",
"added",... | fd74fe3e93a1fb506fa6621a2e271d7b9c5c3e3b | https://github.com/jekyll/jekyll/blob/fd74fe3e93a1fb506fa6621a2e271d7b9c5c3e3b/lib/jekyll/document.rb#L406-L413 | train | Returns the categories from the given path | [
30522,
13366,
7236,
1035,
2013,
1035,
4130,
1006,
2569,
1035,
16101,
1007,
3565,
4305,
2869,
1027,
5816,
1035,
4130,
1012,
4942,
1006,
1003,
1054,
999,
1001,
1063,
2569,
1035,
16101,
1065,
1006,
1012,
1008,
1007,
999,
1010,
1000,
1000,
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... |
cheezy/page-object | lib/page-object/accessors.rb | PageObject.Accessors.button | def button(name, identifier={:index => 0}, &block)
standard_methods(name, identifier, 'button_for', &block)
define_method(name) do
return platform.click_button_for identifier.clone unless block_given?
self.send("#{name}_element").click
end
end | ruby | def button(name, identifier={:index => 0}, &block)
standard_methods(name, identifier, 'button_for', &block)
define_method(name) do
return platform.click_button_for identifier.clone unless block_given?
self.send("#{name}_element").click
end
end | [
"def",
"button",
"(",
"name",
",",
"identifier",
"=",
"{",
":index",
"=>",
"0",
"}",
",",
"&",
"block",
")",
"standard_methods",
"(",
"name",
",",
"identifier",
",",
"'button_for'",
",",
"block",
")",
"define_method",
"(",
"name",
")",
"do",
"return",
... | adds three methods - one to click a button, another to
return the button element, and another to check the button's existence.
@example
button(:purchase, :id => 'purchase')
# will generate 'purchase', 'purchase_element', and 'purchase?' methods
@param [Symbol] the name used for the generated methods
@param ... | [
"adds",
"three",
"methods",
"-",
"one",
"to",
"click",
"a",
"button",
"another",
"to",
"return",
"the",
"button",
"element",
"and",
"another",
"to",
"check",
"the",
"button",
"s",
"existence",
"."
] | 850d775bf63768fbb1551a34480195785fe8e193 | https://github.com/cheezy/page-object/blob/850d775bf63768fbb1551a34480195785fe8e193/lib/page-object/accessors.rb#L432-L438 | train | Creates a button method. | [
30522,
13366,
6462,
1006,
2171,
1010,
8909,
4765,
18095,
1027,
1063,
1024,
5950,
1027,
1028,
1014,
1065,
1010,
1004,
3796,
1007,
3115,
1035,
4725,
1006,
2171,
1010,
8909,
4765,
18095,
1010,
1005,
6462,
1035,
2005,
1005,
1010,
1004,
3796,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | data/azure_service_fabric/lib/6.2.0.9/generated/azure_service_fabric/service_fabric_client_apis.rb | Azure::ServiceFabric::V6_2_0_9.ServiceFabricClientAPIs.get_service_description_with_http_info | def get_service_description_with_http_info(service_id, timeout:60, custom_headers:nil)
get_service_description_async(service_id, timeout:timeout, custom_headers:custom_headers).value!
end | ruby | def get_service_description_with_http_info(service_id, timeout:60, custom_headers:nil)
get_service_description_async(service_id, timeout:timeout, custom_headers:custom_headers).value!
end | [
"def",
"get_service_description_with_http_info",
"(",
"service_id",
",",
"timeout",
":",
"60",
",",
"custom_headers",
":",
"nil",
")",
"get_service_description_async",
"(",
"service_id",
",",
"timeout",
":",
"timeout",
",",
"custom_headers",
":custom_headers",
")",
".... | Gets the description of an existing Service Fabric service.
Gets the description of an existing Service Fabric service. A service must be
created before its description can be obtained.
@param service_id [String] The identity of the service. This is typically the
full name of the service without the 'fabric:' URI... | [
"Gets",
"the",
"description",
"of",
"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#L10719-L10721 | train | Gets the description of the specified service. | [
30522,
13366,
2131,
1035,
2326,
1035,
6412,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
2326,
1035,
8909,
1010,
2051,
5833,
1024,
3438,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
2131,
1035,
2326,
1035,
6412,
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_key_vault/lib/2016-10-01/generated/azure_key_vault/key_vault_client.rb | Azure::KeyVault::V2016_10_01.KeyVaultClient.get_certificate_issuers_next | def get_certificate_issuers_next(next_page_link, custom_headers:nil)
response = get_certificate_issuers_next_async(next_page_link, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def get_certificate_issuers_next(next_page_link, custom_headers:nil)
response = get_certificate_issuers_next_async(next_page_link, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"get_certificate_issuers_next",
"(",
"next_page_link",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"get_certificate_issuers_next_async",
"(",
"next_page_link",
",",
"custom_headers",
":custom_headers",
")",
".",
"value!",
"response",
".",
"body",
"un... | List certificate issuers for a specified key vault.
The GetCertificateIssuers operation returns the set of certificate issuer
resources in the specified key vault. This operation requires the
certificates/manageissuers/getissuers permission.
@param next_page_link [String] The NextLink from the previous successful... | [
"List",
"certificate",
"issuers",
"for",
"a",
"specified",
"key",
"vault",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_key_vault/lib/2016-10-01/generated/azure_key_vault/key_vault_client.rb#L8974-L8977 | train | Gets the certificate issuers for a given certificate. | [
30522,
13366,
2131,
1035,
8196,
1035,
3277,
2869,
1035,
2279,
1006,
2279,
1035,
3931,
1035,
4957,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
2131,
1035,
8196,
1035,
3277,
2869,
1035,
2279,
1035,
2004,
6038,
2278,
1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_network/lib/2019-02-01/generated/azure_mgmt_network/express_route_circuits.rb | Azure::Network::Mgmt::V2019_02_01.ExpressRouteCircuits.list_arp_table | def list_arp_table(resource_group_name, circuit_name, peering_name, device_path, custom_headers:nil)
response = list_arp_table_async(resource_group_name, circuit_name, peering_name, device_path, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def list_arp_table(resource_group_name, circuit_name, peering_name, device_path, custom_headers:nil)
response = list_arp_table_async(resource_group_name, circuit_name, peering_name, device_path, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"list_arp_table",
"(",
"resource_group_name",
",",
"circuit_name",
",",
"peering_name",
",",
"device_path",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"list_arp_table_async",
"(",
"resource_group_name",
",",
"circuit_name",
",",
"peering_name",
",... | Gets the currently advertised ARP table associated with the express route
circuit in a resource group.
@param resource_group_name [String] The name of the resource group.
@param circuit_name [String] The name of the express route circuit.
@param peering_name [String] The name of the peering.
@param device_path [S... | [
"Gets",
"the",
"currently",
"advertised",
"ARP",
"table",
"associated",
"with",
"the",
"express",
"route",
"circuit",
"in",
"a",
"resource",
"group",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_network/lib/2019-02-01/generated/azure_mgmt_network/express_route_circuits.rb#L259-L262 | train | Gets the ARP table associated with the express route circuit. | [
30522,
13366,
2862,
1035,
12098,
2361,
1035,
2795,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
4984,
1035,
2171,
1010,
16740,
1035,
2171,
1010,
5080,
1035,
4130,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
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... |
github-changelog-generator/github-changelog-generator | lib/github_changelog_generator/generator/entry.rb | GitHubChangelogGenerator.Entry.generate_entry_for_tag | def generate_entry_for_tag(pull_requests, issues, newer_tag_name, newer_tag_link, newer_tag_time, older_tag_name) # rubocop:disable Metrics/ParameterLists
github_site = @options[:github_site] || "https://github.com"
project_url = "#{github_site}/#{@options[:user]}/#{@options[:project]}"
create_sectio... | ruby | def generate_entry_for_tag(pull_requests, issues, newer_tag_name, newer_tag_link, newer_tag_time, older_tag_name) # rubocop:disable Metrics/ParameterLists
github_site = @options[:github_site] || "https://github.com"
project_url = "#{github_site}/#{@options[:user]}/#{@options[:project]}"
create_sectio... | [
"def",
"generate_entry_for_tag",
"(",
"pull_requests",
",",
"issues",
",",
"newer_tag_name",
",",
"newer_tag_link",
",",
"newer_tag_time",
",",
"older_tag_name",
")",
"# rubocop:disable Metrics/ParameterLists",
"github_site",
"=",
"@options",
"[",
":github_site",
"]",
"||... | Generates log entry with header and body
@param [Array] pull_requests List or PR's in new section
@param [Array] issues List of issues in new section
@param [String] newer_tag_name Name of the newer tag. Could be nil for `Unreleased` section.
@param [String] newer_tag_link Name of the newer tag. Could be "HEAD" fo... | [
"Generates",
"log",
"entry",
"with",
"header",
"and",
"body"
] | f18c64b5cc0d7473b059275b88385ac11ca8b564 | https://github.com/github-changelog-generator/github-changelog-generator/blob/f18c64b5cc0d7473b059275b88385ac11ca8b564/lib/github_changelog_generator/generator/entry.rb#L32-L41 | train | Generate an entry for a tag | [
30522,
13366,
9699,
1035,
4443,
1035,
2005,
1035,
6415,
1006,
4139,
1035,
11186,
1010,
3314,
1010,
10947,
1035,
6415,
1035,
2171,
1010,
10947,
1035,
6415,
1035,
4957,
1010,
10947,
1035,
6415,
1035,
2051,
1010,
3080,
1035,
6415,
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 | data/azure_cognitiveservices_contentmoderator/lib/1.0/generated/azure_cognitiveservices_contentmoderator/reviews.rb | Azure::CognitiveServices::ContentModerator::V1_0.Reviews.get_video_frames_with_http_info | def get_video_frames_with_http_info(team_name, review_id, start_seed:nil, no_of_records:nil, filter:nil, custom_headers:nil)
get_video_frames_async(team_name, review_id, start_seed:start_seed, no_of_records:no_of_records, filter:filter, custom_headers:custom_headers).value!
end | ruby | def get_video_frames_with_http_info(team_name, review_id, start_seed:nil, no_of_records:nil, filter:nil, custom_headers:nil)
get_video_frames_async(team_name, review_id, start_seed:start_seed, no_of_records:no_of_records, filter:filter, custom_headers:custom_headers).value!
end | [
"def",
"get_video_frames_with_http_info",
"(",
"team_name",
",",
"review_id",
",",
"start_seed",
":",
"nil",
",",
"no_of_records",
":",
"nil",
",",
"filter",
":",
"nil",
",",
"custom_headers",
":",
"nil",
")",
"get_video_frames_async",
"(",
"team_name",
",",
"re... | The reviews created would show up for Reviewers on your team. As Reviewers
complete reviewing, results of the Review would be POSTED (i.e. HTTP POST) on
the specified CallBackEndpoint.
<h3>CallBack Schemas </h3>
<h4>Review Completion CallBack Sample</h4>
<p>
{<br/>
"ReviewId": "<Review Id>",<br/>
"ModifiedOn":... | [
"The",
"reviews",
"created",
"would",
"show",
"up",
"for",
"Reviewers",
"on",
"your",
"team",
".",
"As",
"Reviewers",
"complete",
"reviewing",
"results",
"of",
"the",
"Review",
"would",
"be",
"POSTED",
"(",
"i",
".",
"e",
".",
"HTTP",
"POST",
")",
"on",
... | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_cognitiveservices_contentmoderator/lib/1.0/generated/azure_cognitiveservices_contentmoderator/reviews.rb#L952-L954 | train | Gets the video frames for a review. | [
30522,
13366,
2131,
1035,
2678,
1035,
11048,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
2136,
1035,
2171,
1010,
3319,
1035,
8909,
1010,
2707,
1035,
6534,
1024,
9152,
2140,
1010,
2053,
1035,
1997,
1035,
2636,
1024,
9152,
2140,
1010,
11307,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
rails/sprockets | lib/sprockets/path_utils.rb | Sprockets.PathUtils.stat_tree | def stat_tree(dir, &block)
return to_enum(__method__, dir) unless block_given?
self.stat_directory(dir) do |path, stat|
yield path, stat
if stat.directory?
stat_tree(path, &block)
end
end
nil
end | ruby | def stat_tree(dir, &block)
return to_enum(__method__, dir) unless block_given?
self.stat_directory(dir) do |path, stat|
yield path, stat
if stat.directory?
stat_tree(path, &block)
end
end
nil
end | [
"def",
"stat_tree",
"(",
"dir",
",",
"&",
"block",
")",
"return",
"to_enum",
"(",
"__method__",
",",
"dir",
")",
"unless",
"block_given?",
"self",
".",
"stat_directory",
"(",
"dir",
")",
"do",
"|",
"path",
",",
"stat",
"|",
"yield",
"path",
",",
"stat"... | Public: Recursive stat all the files under a directory.
dir - A String directory
Returns an Enumerator of [path, stat]. | [
"Public",
":",
"Recursive",
"stat",
"all",
"the",
"files",
"under",
"a",
"directory",
"."
] | 9e3f0d8e98c44f57e67bc138db87bb8469bf5ddd | https://github.com/rails/sprockets/blob/9e3f0d8e98c44f57e67bc138db87bb8469bf5ddd/lib/sprockets/path_utils.rb#L304-L316 | train | Return the stat tree of a directory. | [
30522,
13366,
28093,
1035,
3392,
1006,
16101,
1010,
1004,
3796,
1007,
2709,
2000,
1035,
4372,
2819,
1006,
1035,
1035,
4118,
1035,
1035,
1010,
16101,
1007,
4983,
3796,
1035,
2445,
1029,
2969,
1012,
28093,
1035,
14176,
1006,
16101,
1007,
2079... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
sporkmonger/addressable | lib/addressable/template.rb | Addressable.Template.extract | def extract(uri, processor=nil)
match_data = self.match(uri, processor)
return (match_data ? match_data.mapping : nil)
end | ruby | def extract(uri, processor=nil)
match_data = self.match(uri, processor)
return (match_data ? match_data.mapping : nil)
end | [
"def",
"extract",
"(",
"uri",
",",
"processor",
"=",
"nil",
")",
"match_data",
"=",
"self",
".",
"match",
"(",
"uri",
",",
"processor",
")",
"return",
"(",
"match_data",
"?",
"match_data",
".",
"mapping",
":",
"nil",
")",
"end"
] | Extracts a mapping from the URI using a URI Template pattern.
@param [Addressable::URI, #to_str] uri
The URI to extract from.
@param [#restore, #match] processor
A template processor object may optionally be supplied.
The object should respond to either the <tt>restore</tt> or
<tt>match</tt> messages o... | [
"Extracts",
"a",
"mapping",
"from",
"the",
"URI",
"using",
"a",
"URI",
"Template",
"pattern",
"."
] | 5894c95a7768435cb46d1355954611dbd194832e | https://github.com/sporkmonger/addressable/blob/5894c95a7768435cb46d1355954611dbd194832e/lib/addressable/template.rb#L343-L346 | train | Extract the mapping from a URI | [
30522,
13366,
14817,
1006,
24471,
2072,
1010,
13151,
1027,
9152,
2140,
1007,
2674,
1035,
2951,
1027,
2969,
1012,
2674,
1006,
24471,
2072,
1010,
13151,
1007,
2709,
1006,
2674,
1035,
2951,
1029,
2674,
1035,
2951,
1012,
12375,
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... |
randym/axlsx | lib/axlsx/workbook/worksheet/auto_filter/auto_filter.rb | Axlsx.AutoFilter.apply | def apply
first_cell, last_cell = range.split(':')
start_point = Axlsx::name_to_indices(first_cell)
end_point = Axlsx::name_to_indices(last_cell)
# The +1 is so we skip the header row with the filter drop downs
rows = worksheet.rows[(start_point.last+1)..end_point.last] || []
column... | ruby | def apply
first_cell, last_cell = range.split(':')
start_point = Axlsx::name_to_indices(first_cell)
end_point = Axlsx::name_to_indices(last_cell)
# The +1 is so we skip the header row with the filter drop downs
rows = worksheet.rows[(start_point.last+1)..end_point.last] || []
column... | [
"def",
"apply",
"first_cell",
",",
"last_cell",
"=",
"range",
".",
"split",
"(",
"':'",
")",
"start_point",
"=",
"Axlsx",
"::",
"name_to_indices",
"(",
"first_cell",
")",
"end_point",
"=",
"Axlsx",
"::",
"name_to_indices",
"(",
"last_cell",
")",
"# The +1 is s... | actually performs the filtering of rows who's cells do not
match the filter. | [
"actually",
"performs",
"the",
"filtering",
"of",
"rows",
"who",
"s",
"cells",
"do",
"not",
"match",
"the",
"filter",
"."
] | c593a08b2a929dac7aa8dc418b55e26b4c49dc34 | https://github.com/randym/axlsx/blob/c593a08b2a929dac7aa8dc418b55e26b4c49dc34/lib/axlsx/workbook/worksheet/auto_filter/auto_filter.rb#L52-L66 | train | Apply the filter to the cell | [
30522,
13366,
6611,
2034,
1035,
3526,
1010,
2197,
1035,
3526,
1027,
2846,
1012,
3975,
1006,
1005,
1024,
1005,
1007,
2707,
1035,
2391,
1027,
22260,
4877,
2595,
1024,
1024,
2171,
1035,
2000,
1035,
29299,
1006,
2034,
1035,
3526,
1007,
2203,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
aws/aws-sdk-ruby | gems/aws-sdk-opsworks/lib/aws-sdk-opsworks/resource.rb | Aws::OpsWorks.Resource.create_stack | def create_stack(options = {})
resp = @client.create_stack(options)
Stack.new(
id: resp.data.stack_id,
client: @client
)
end | ruby | def create_stack(options = {})
resp = @client.create_stack(options)
Stack.new(
id: resp.data.stack_id,
client: @client
)
end | [
"def",
"create_stack",
"(",
"options",
"=",
"{",
"}",
")",
"resp",
"=",
"@client",
".",
"create_stack",
"(",
"options",
")",
"Stack",
".",
"new",
"(",
"id",
":",
"resp",
".",
"data",
".",
"stack_id",
",",
"client",
":",
"@client",
")",
"end"
] | @!group Actions
@example Request syntax with placeholder values
stack = ops_works.create_stack({
name: "String", # required
region: "String", # required
vpc_id: "String",
attributes: {
"Color" => "String",
},
service_role_arn: "String", # required
default_instance_profile_... | [
"@!group",
"Actions",
"@example",
"Request",
"syntax",
"with",
"placeholder",
"values"
] | e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d | https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-opsworks/lib/aws-sdk-opsworks/resource.rb#L342-L348 | train | Create a new stack | [
30522,
13366,
3443,
1035,
9991,
1006,
7047,
1027,
1063,
1065,
1007,
24501,
2361,
1027,
1030,
7396,
1012,
3443,
1035,
9991,
1006,
7047,
1007,
9991,
1012,
2047,
1006,
8909,
1024,
24501,
2361,
1012,
2951,
1012,
9991,
1035,
8909,
1010,
7396,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_labservices/lib/2018-10-15/generated/azure_mgmt_labservices/users.rb | Azure::Labservices::Mgmt::V2018_10_15.Users.update_with_http_info | def update_with_http_info(resource_group_name, lab_account_name, lab_name, user_name, user, custom_headers:nil)
update_async(resource_group_name, lab_account_name, lab_name, user_name, user, custom_headers:custom_headers).value!
end | ruby | def update_with_http_info(resource_group_name, lab_account_name, lab_name, user_name, user, custom_headers:nil)
update_async(resource_group_name, lab_account_name, lab_name, user_name, user, custom_headers:custom_headers).value!
end | [
"def",
"update_with_http_info",
"(",
"resource_group_name",
",",
"lab_account_name",
",",
"lab_name",
",",
"user_name",
",",
"user",
",",
"custom_headers",
":",
"nil",
")",
"update_async",
"(",
"resource_group_name",
",",
"lab_account_name",
",",
"lab_name",
",",
"u... | Modify properties of users.
@param resource_group_name [String] The name of the resource group.
@param lab_account_name [String] The name of the lab Account.
@param lab_name [String] The name of the lab.
@param user_name [String] The name of the user.
@param user [UserFragment] The User registered to a lab
@para... | [
"Modify",
"properties",
"of",
"users",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_labservices/lib/2018-10-15/generated/azure_mgmt_labservices/users.rb#L441-L443 | train | Updates a user s index. | [
30522,
13366,
10651,
1035,
30524,
2171,
1010,
5310,
1035,
2171,
1010,
5310,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
10651,
1035,
2004,
6038,
2278,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
6845,
1035,
4070,
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... |
aws/aws-sdk-ruby | gems/aws-sdk-s3/lib/aws-sdk-s3/bucket_acl.rb | Aws::S3.BucketAcl.put | def put(options = {})
options = options.merge(bucket: @bucket_name)
resp = @client.put_bucket_acl(options)
resp.data
end | ruby | def put(options = {})
options = options.merge(bucket: @bucket_name)
resp = @client.put_bucket_acl(options)
resp.data
end | [
"def",
"put",
"(",
"options",
"=",
"{",
"}",
")",
"options",
"=",
"options",
".",
"merge",
"(",
"bucket",
":",
"@bucket_name",
")",
"resp",
"=",
"@client",
".",
"put_bucket_acl",
"(",
"options",
")",
"resp",
".",
"data",
"end"
] | @!group Actions
@example Request syntax with placeholder values
bucket_acl.put({
acl: "private", # accepts private, public-read, public-read-write, authenticated-read
access_control_policy: {
grants: [
{
grantee: {
display_name: "DisplayName",
email_ad... | [
"@!group",
"Actions",
"@example",
"Request",
"syntax",
"with",
"placeholder",
"values"
] | e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d | https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-s3/lib/aws-sdk-s3/bucket_acl.rb#L224-L228 | train | Put ACLs to a bucket | [
30522,
13366,
2404,
1006,
7047,
1027,
1063,
1065,
1007,
7047,
1027,
7047,
1012,
13590,
1006,
13610,
1024,
1030,
13610,
1035,
2171,
1007,
24501,
2361,
1027,
1030,
7396,
1012,
2404,
1035,
13610,
1035,
9353,
2140,
1006,
7047,
1007,
24501,
2361... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
apache/thrift | lib/rb/benchmark/server.rb | Server.BenchmarkHandler.fibonacci | def fibonacci(n)
seq = [1, 1]
3.upto(n) do
seq << seq[-1] + seq[-2]
end
seq[n-1] # n is 1-based
end | ruby | def fibonacci(n)
seq = [1, 1]
3.upto(n) do
seq << seq[-1] + seq[-2]
end
seq[n-1] # n is 1-based
end | [
"def",
"fibonacci",
"(",
"n",
")",
"seq",
"=",
"[",
"1",
",",
"1",
"]",
"3",
".",
"upto",
"(",
"n",
")",
"do",
"seq",
"<<",
"seq",
"[",
"-",
"1",
"]",
"+",
"seq",
"[",
"-",
"2",
"]",
"end",
"seq",
"[",
"n",
"-",
"1",
"]",
"# n is 1-based"... | 1-based index into the fibonacci sequence | [
"1",
"-",
"based",
"index",
"into",
"the",
"fibonacci",
"sequence"
] | 27d8387c49a49fcf193893f834e9766ae0b051c1 | https://github.com/apache/thrift/blob/27d8387c49a49fcf193893f834e9766ae0b051c1/lib/rb/benchmark/server.rb#L30-L36 | train | Returns the fibonacci of the given number of times | [
30522,
13366,
10882,
11735,
6305,
6895,
1006,
1050,
1007,
7367,
4160,
1027,
1031,
1015,
1010,
1015,
1033,
1017,
1012,
2039,
3406,
1006,
1050,
1007,
2079,
7367,
4160,
1026,
1026,
7367,
4160,
1031,
1011,
1015,
1033,
1009,
7367,
4160,
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... |
puppetlabs/puppet | lib/puppet/type.rb | Puppet.Type.property | def property(name)
(obj = @parameters[name.intern] and obj.is_a?(Puppet::Property)) ? obj : nil
end | ruby | def property(name)
(obj = @parameters[name.intern] and obj.is_a?(Puppet::Property)) ? obj : nil
end | [
"def",
"property",
"(",
"name",
")",
"(",
"obj",
"=",
"@parameters",
"[",
"name",
".",
"intern",
"]",
"and",
"obj",
".",
"is_a?",
"(",
"Puppet",
"::",
"Property",
")",
")",
"?",
"obj",
":",
"nil",
"end"
] | Returns a {Puppet::Property} instance by name.
To return the value, use 'resource[param]'
@todo LAK:NOTE(20081028) Since the 'parameter' method is now a superset of this method,
this one should probably go away at some point. - Does this mean it should be deprecated ?
@return [Puppet::Property] the property with ... | [
"Returns",
"a",
"{",
"Puppet",
"::",
"Property",
"}",
"instance",
"by",
"name",
".",
"To",
"return",
"the",
"value",
"use",
"resource",
"[",
"param",
"]"
] | 4baeed97cbb7571ddc6635f0a24debe2e8b22cd3 | https://github.com/puppetlabs/puppet/blob/4baeed97cbb7571ddc6635f0a24debe2e8b22cd3/lib/puppet/type.rb#L821-L823 | train | Returns the property object for the given parameter name. | [
30522,
13366,
3200,
1006,
2171,
1007,
1006,
27885,
3501,
1027,
1030,
11709,
1031,
2171,
1012,
25204,
1033,
1998,
27885,
3501,
1012,
2003,
1035,
1037,
1029,
1006,
13997,
1024,
1024,
3200,
1007,
1007,
1029,
27885,
3501,
1024,
9152,
2140,
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... |
hashicorp/vagrant | lib/vagrant/environment.rb | Vagrant.Environment.lock | def lock(name="global", **opts)
f = nil
# If we don't have a block, then locking is useless, so ignore it
return if !block_given?
# This allows multiple locks in the same process to be nested
return yield if @locks[name] || opts[:noop]
# The path to this lock
lock_path = dat... | ruby | def lock(name="global", **opts)
f = nil
# If we don't have a block, then locking is useless, so ignore it
return if !block_given?
# This allows multiple locks in the same process to be nested
return yield if @locks[name] || opts[:noop]
# The path to this lock
lock_path = dat... | [
"def",
"lock",
"(",
"name",
"=",
"\"global\"",
",",
"**",
"opts",
")",
"f",
"=",
"nil",
"# If we don't have a block, then locking is useless, so ignore it",
"return",
"if",
"!",
"block_given?",
"# This allows multiple locks in the same process to be nested",
"return",
"yield"... | This acquires a process-level lock with the given name.
The lock file is held within the data directory of this environment,
so make sure that all environments that are locking are sharing
the same data directory.
This will raise Errors::EnvironmentLockedError if the lock can't
be obtained.
@param [String] nam... | [
"This",
"acquires",
"a",
"process",
"-",
"level",
"lock",
"with",
"the",
"given",
"name",
"."
] | c22a145c59790c098f95d50141d9afb48e1ef55f | https://github.com/hashicorp/vagrant/blob/c22a145c59790c098f95d50141d9afb48e1ef55f/lib/vagrant/environment.rb#L577-L645 | train | Acquire a lock on the process. | [
30522,
13366,
5843,
1006,
2171,
1027,
1000,
3795,
1000,
1010,
1008,
1008,
23569,
2015,
1007,
1042,
1027,
9152,
2140,
1001,
2065,
2057,
2123,
1005,
1056,
2031,
1037,
3796,
1010,
2059,
14889,
2003,
11809,
1010,
2061,
8568,
2009,
2709,
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_network/lib/2018-07-01/generated/azure_mgmt_network/routes.rb | Azure::Network::Mgmt::V2018_07_01.Routes.create_or_update | def create_or_update(resource_group_name, route_table_name, route_name, route_parameters, custom_headers:nil)
response = create_or_update_async(resource_group_name, route_table_name, route_name, route_parameters, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def create_or_update(resource_group_name, route_table_name, route_name, route_parameters, custom_headers:nil)
response = create_or_update_async(resource_group_name, route_table_name, route_name, route_parameters, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"create_or_update",
"(",
"resource_group_name",
",",
"route_table_name",
",",
"route_name",
",",
"route_parameters",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"create_or_update_async",
"(",
"resource_group_name",
",",
"route_table_name",
",",
"rout... | Creates or updates a route in the specified route table.
@param resource_group_name [String] The name of the resource group.
@param route_table_name [String] The name of the route table.
@param route_name [String] The name of the route.
@param route_parameters [Route] Parameters supplied to the create or update
r... | [
"Creates",
"or",
"updates",
"a",
"route",
"in",
"the",
"specified",
"route",
"table",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_network/lib/2018-07-01/generated/azure_mgmt_network/routes.rb#L173-L176 | train | Creates or updates a route in the specified route table. | [
30522,
13366,
3443,
1035,
2030,
1035,
10651,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2799,
1035,
2795,
1035,
2171,
1010,
2799,
1035,
2171,
1010,
2799,
1035,
11709,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
3443,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
sds/haml-lint | lib/haml_lint/linter.rb | HamlLint.Linter.record_lint | def record_lint(node, message)
@lints << HamlLint::Lint.new(self, @document.file, node.line, message,
config.fetch('severity', :warning).to_sym)
end | ruby | def record_lint(node, message)
@lints << HamlLint::Lint.new(self, @document.file, node.line, message,
config.fetch('severity', :warning).to_sym)
end | [
"def",
"record_lint",
"(",
"node",
",",
"message",
")",
"@lints",
"<<",
"HamlLint",
"::",
"Lint",
".",
"new",
"(",
"self",
",",
"@document",
".",
"file",
",",
"node",
".",
"line",
",",
"message",
",",
"config",
".",
"fetch",
"(",
"'severity'",
",",
"... | Record a lint for reporting back to the user.
@param node [#line] node to extract the line number from
@param message [String] error/warning to display to the user | [
"Record",
"a",
"lint",
"for",
"reporting",
"back",
"to",
"the",
"user",
"."
] | 024c773667e54cf88db938c2b368977005d70ee8 | https://github.com/sds/haml-lint/blob/024c773667e54cf88db938c2b368977005d70ee8/lib/haml_lint/linter.rb#L59-L62 | train | Record a lint for a given node. | [
30522,
13366,
2501,
1035,
11409,
2102,
1006,
13045,
1010,
4471,
1007,
1030,
11409,
3215,
1026,
1026,
10654,
21202,
2102,
1024,
1024,
11409,
2102,
1012,
2047,
1006,
2969,
1010,
1030,
6254,
1012,
5371,
1010,
13045,
1012,
2240,
1010,
4471,
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... |
Shopify/liquid | lib/liquid/context.rb | Liquid.Context.push | def push(new_scope = {})
@scopes.unshift(new_scope)
raise StackLevelError, "Nesting too deep".freeze if @scopes.length > Block::MAX_DEPTH
end | ruby | def push(new_scope = {})
@scopes.unshift(new_scope)
raise StackLevelError, "Nesting too deep".freeze if @scopes.length > Block::MAX_DEPTH
end | [
"def",
"push",
"(",
"new_scope",
"=",
"{",
"}",
")",
"@scopes",
".",
"unshift",
"(",
"new_scope",
")",
"raise",
"StackLevelError",
",",
"\"Nesting too deep\"",
".",
"freeze",
"if",
"@scopes",
".",
"length",
">",
"Block",
"::",
"MAX_DEPTH",
"end"
] | Push new local scope on the stack. use <tt>Context#stack</tt> instead | [
"Push",
"new",
"local",
"scope",
"on",
"the",
"stack",
".",
"use",
"<tt",
">",
"Context#stack<",
"/",
"tt",
">",
"instead"
] | b3b63a683f6daaea7e70f1602ee829abdf970ef3 | https://github.com/Shopify/liquid/blob/b3b63a683f6daaea7e70f1602ee829abdf970ef3/lib/liquid/context.rb#L90-L93 | train | Push a new scope to the stack. | [
30522,
13366,
5245,
1006,
2047,
1035,
9531,
1027,
1063,
1065,
1007,
1030,
9531,
2015,
1012,
4895,
6182,
6199,
1006,
2047,
1035,
9531,
1007,
5333,
9991,
20414,
12260,
18933,
2099,
1010,
1000,
21016,
2205,
2784,
1000,
1012,
13184,
2065,
1030,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_edgegateway/lib/2019-03-01/generated/azure_mgmt_edgegateway/triggers.rb | Azure::EdgeGateway::Mgmt::V2019_03_01.Triggers.list_by_data_box_edge_device_next | def list_by_data_box_edge_device_next(next_page_link, custom_headers:nil)
response = list_by_data_box_edge_device_next_async(next_page_link, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def list_by_data_box_edge_device_next(next_page_link, custom_headers:nil)
response = list_by_data_box_edge_device_next_async(next_page_link, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"list_by_data_box_edge_device_next",
"(",
"next_page_link",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"list_by_data_box_edge_device_next_async",
"(",
"next_page_link",
",",
"custom_headers",
":custom_headers",
")",
".",
"value!",
"response",
".",
"bo... | Lists all the triggers configured in the device.
@param next_page_link [String] The NextLink from the previous successful call
to List operation.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request.
@return [TriggerList] operation results. | [
"Lists",
"all",
"the",
"triggers",
"configured",
"in",
"the",
"device",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_edgegateway/lib/2019-03-01/generated/azure_mgmt_edgegateway/triggers.rb#L506-L509 | train | Gets the list of all the advisors in an edge / gateway device. | [
30522,
13366,
2862,
1035,
2011,
1035,
2951,
1035,
3482,
1035,
3341,
1035,
5080,
1035,
2279,
1006,
2279,
1035,
3931,
1035,
4957,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
2862,
1035,
2011,
1035,
2951,
1035,
3482,
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... |
samvera/hyrax | app/controllers/concerns/hyrax/local_file_downloads_controller_behavior.rb | Hyrax.LocalFileDownloadsControllerBehavior.send_local_content | def send_local_content
response.headers['Accept-Ranges'] = 'bytes'
if request.head?
local_content_head
elsif request.headers['Range']
send_range_for_local_file
else
send_local_file_contents
end
end | ruby | def send_local_content
response.headers['Accept-Ranges'] = 'bytes'
if request.head?
local_content_head
elsif request.headers['Range']
send_range_for_local_file
else
send_local_file_contents
end
end | [
"def",
"send_local_content",
"response",
".",
"headers",
"[",
"'Accept-Ranges'",
"]",
"=",
"'bytes'",
"if",
"request",
".",
"head?",
"local_content_head",
"elsif",
"request",
".",
"headers",
"[",
"'Range'",
"]",
"send_range_for_local_file",
"else",
"send_local_file_co... | Handle the HTTP show request | [
"Handle",
"the",
"HTTP",
"show",
"request"
] | e2b4f56e829a53b1f11296324736e9d5b8c9ee5f | https://github.com/samvera/hyrax/blob/e2b4f56e829a53b1f11296324736e9d5b8c9ee5f/app/controllers/concerns/hyrax/local_file_downloads_controller_behavior.rb#L6-L15 | train | Send the local file contents as a single chunk of bytes. | [
30522,
13366,
4604,
1035,
2334,
1035,
4180,
3433,
1012,
20346,
2015,
1031,
1005,
5138,
1011,
8483,
1005,
1033,
1027,
1005,
27507,
1005,
2065,
5227,
1012,
2132,
1029,
2334,
1035,
4180,
1035,
2132,
3449,
5332,
2546,
5227,
1012,
20346,
2015,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_network/lib/2018-07-01/generated/azure_mgmt_network/route_filter_rules.rb | Azure::Network::Mgmt::V2018_07_01.RouteFilterRules.begin_update_with_http_info | def begin_update_with_http_info(resource_group_name, route_filter_name, rule_name, route_filter_rule_parameters, custom_headers:nil)
begin_update_async(resource_group_name, route_filter_name, rule_name, route_filter_rule_parameters, custom_headers:custom_headers).value!
end | ruby | def begin_update_with_http_info(resource_group_name, route_filter_name, rule_name, route_filter_rule_parameters, custom_headers:nil)
begin_update_async(resource_group_name, route_filter_name, rule_name, route_filter_rule_parameters, custom_headers:custom_headers).value!
end | [
"def",
"begin_update_with_http_info",
"(",
"resource_group_name",
",",
"route_filter_name",
",",
"rule_name",
",",
"route_filter_rule_parameters",
",",
"custom_headers",
":",
"nil",
")",
"begin_update_async",
"(",
"resource_group_name",
",",
"route_filter_name",
",",
"rule_... | Updates a route in the specified route filter.
@param resource_group_name [String] The name of the resource group.
@param route_filter_name [String] The name of the route filter.
@param rule_name [String] The name of the route filter rule.
@param route_filter_rule_parameters [PatchRouteFilterRule] Parameters
supp... | [
"Updates",
"a",
"route",
"in",
"the",
"specified",
"route",
"filter",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_network/lib/2018-07-01/generated/azure_mgmt_network/route_filter_rules.rb#L584-L586 | train | Updates a route filter rule. | [
30522,
13366,
4088,
1035,
10651,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2799,
1035,
11307,
1035,
2171,
1010,
3627,
1035,
2171,
1010,
2799,
1035,
11307,
1035,
3627,
1035,
11709,
1010,
7661,
1035,
20346... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
heroku/legacy-cli | lib/heroku/command/plugins.rb | Heroku::Command.Plugins.update | def update
Heroku::JSPlugin.update
plugins = if plugin = shift_argument
[plugin]
else
::Heroku::Plugin.list
end
validate_arguments!
plugins.each do |plugin|
begin
action("Updating #{plugin}") do
begin
Heroku::Plugin.new(plu... | ruby | def update
Heroku::JSPlugin.update
plugins = if plugin = shift_argument
[plugin]
else
::Heroku::Plugin.list
end
validate_arguments!
plugins.each do |plugin|
begin
action("Updating #{plugin}") do
begin
Heroku::Plugin.new(plu... | [
"def",
"update",
"Heroku",
"::",
"JSPlugin",
".",
"update",
"plugins",
"=",
"if",
"plugin",
"=",
"shift_argument",
"[",
"plugin",
"]",
"else",
"::",
"Heroku",
"::",
"Plugin",
".",
"list",
"end",
"validate_arguments!",
"plugins",
".",
"each",
"do",
"|",
"pl... | plugins:update [PLUGIN]
updates all plugins or a single plugin by name
Example:
$ heroku plugins:update
Updating heroku-production-check... done
$ heroku plugins:update heroku-production-check
Updating heroku-production-check... done | [
"plugins",
":",
"update",
"[",
"PLUGIN",
"]"
] | 6f18521a258394bfb79e6b36f7160ad8559a8e16 | https://github.com/heroku/legacy-cli/blob/6f18521a258394bfb79e6b36f7160ad8559a8e16/lib/heroku/command/plugins.rb#L86-L108 | train | Update the
ology | [
30522,
13366,
10651,
5394,
5283,
1024,
1024,
1046,
13102,
7630,
11528,
1012,
10651,
13354,
7076,
1027,
2065,
13354,
2378,
1027,
5670,
1035,
6685,
1031,
13354,
2378,
1033,
2842,
1024,
1024,
5394,
5283,
1024,
1024,
13354,
2378,
1012,
2862,
22... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
aws/aws-sdk-ruby | gems/aws-sdk-autoscaling/lib/aws-sdk-autoscaling/lifecycle_hook.rb | Aws::AutoScaling.LifecycleHook.delete | def delete(options = {})
options = options.merge(
auto_scaling_group_name: @group_name,
lifecycle_hook_name: @name
)
resp = @client.delete_lifecycle_hook(options)
resp.data
end | ruby | def delete(options = {})
options = options.merge(
auto_scaling_group_name: @group_name,
lifecycle_hook_name: @name
)
resp = @client.delete_lifecycle_hook(options)
resp.data
end | [
"def",
"delete",
"(",
"options",
"=",
"{",
"}",
")",
"options",
"=",
"options",
".",
"merge",
"(",
"auto_scaling_group_name",
":",
"@group_name",
",",
"lifecycle_hook_name",
":",
"@name",
")",
"resp",
"=",
"@client",
".",
"delete_lifecycle_hook",
"(",
"options... | @example Request syntax with placeholder values
lifecycle_hook.delete()
@param [Hash] options ({})
@return [Types::DeleteLifecycleHookAnswer] | [
"@example",
"Request",
"syntax",
"with",
"placeholder",
"values"
] | e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d | https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-autoscaling/lib/aws-sdk-autoscaling/lifecycle_hook.rb#L270-L277 | train | Delete a lifecycle hook | [
30522,
13366,
3972,
12870,
1006,
7047,
1027,
1063,
1065,
1007,
7047,
1027,
7047,
1012,
13590,
1006,
8285,
1035,
25169,
1035,
2177,
1035,
2171,
1024,
1030,
2177,
1035,
2171,
1010,
2166,
23490,
1035,
8103,
1035,
2171,
1024,
1030,
2171,
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-dynamodb/lib/aws-sdk-dynamodb/table.rb | Aws::DynamoDB.Table.get_item | def get_item(options = {})
options = options.merge(table_name: @name)
resp = @client.get_item(options)
resp.data
end | ruby | def get_item(options = {})
options = options.merge(table_name: @name)
resp = @client.get_item(options)
resp.data
end | [
"def",
"get_item",
"(",
"options",
"=",
"{",
"}",
")",
"options",
"=",
"options",
".",
"merge",
"(",
"table_name",
":",
"@name",
")",
"resp",
"=",
"@client",
".",
"get_item",
"(",
"options",
")",
"resp",
".",
"data",
"end"
] | @example Request syntax with placeholder values
table.get_item({
key: { # required
"AttributeName" => "value", # value <Hash,Array,String,Numeric,Boolean,IO,Set,nil>
},
attributes_to_get: ["AttributeName"],
consistent_read: false,
return_consumed_capacity: "INDEXES", # accepts INDEXE... | [
"@example",
"Request",
"syntax",
"with",
"placeholder",
"values"
] | e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d | https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-dynamodb/lib/aws-sdk-dynamodb/table.rb#L765-L769 | train | Get the data for the current item | [
30522,
13366,
2131,
1035,
8875,
1006,
7047,
1027,
1063,
1065,
1007,
7047,
1027,
7047,
1012,
13590,
1006,
2795,
1035,
2171,
1024,
1030,
2171,
1007,
24501,
2361,
1027,
1030,
7396,
1012,
2131,
1035,
8875,
1006,
7047,
1007,
24501,
2361,
1012,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_network/lib/2018-07-01/generated/azure_mgmt_network/vpn_gateways.rb | Azure::Network::Mgmt::V2018_07_01.VpnGateways.begin_create_or_update_with_http_info | def begin_create_or_update_with_http_info(resource_group_name, gateway_name, vpn_gateway_parameters, custom_headers:nil)
begin_create_or_update_async(resource_group_name, gateway_name, vpn_gateway_parameters, custom_headers:custom_headers).value!
end | ruby | def begin_create_or_update_with_http_info(resource_group_name, gateway_name, vpn_gateway_parameters, custom_headers:nil)
begin_create_or_update_async(resource_group_name, gateway_name, vpn_gateway_parameters, custom_headers:custom_headers).value!
end | [
"def",
"begin_create_or_update_with_http_info",
"(",
"resource_group_name",
",",
"gateway_name",
",",
"vpn_gateway_parameters",
",",
"custom_headers",
":",
"nil",
")",
"begin_create_or_update_async",
"(",
"resource_group_name",
",",
"gateway_name",
",",
"vpn_gateway_parameters"... | Creates a virtual wan vpn gateway if it doesn't exist else updates the
existing gateway.
@param resource_group_name [String] The resource group name of the
VpnGateway.
@param gateway_name [String] The name of the gateway.
@param vpn_gateway_parameters [VpnGateway] Parameters supplied to create or
Update a virtua... | [
"Creates",
"a",
"virtual",
"wan",
"vpn",
"gateway",
"if",
"it",
"doesn",
"t",
"exist",
"else",
"updates",
"the",
"existing",
"gateway",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_network/lib/2018-07-01/generated/azure_mgmt_network/vpn_gateways.rb#L464-L466 | train | Creates or updates a virtual wan vpn gateway. | [
30522,
13366,
4088,
1035,
3443,
1035,
2030,
1035,
10651,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
11909,
1035,
2171,
1010,
21210,
2078,
1035,
11909,
1035,
11709,
1010,
7661,
1035,
20346,
2015,
1024,
915... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_datalake_analytics/lib/2016-11-01/generated/azure_mgmt_datalake_analytics/accounts.rb | Azure::DataLakeAnalytics::Mgmt::V2016_11_01.Accounts.list_with_http_info | def list_with_http_info(filter:nil, top:nil, skip:nil, select:nil, orderby:nil, count:nil, custom_headers:nil)
list_async(filter:filter, top:top, skip:skip, select:select, orderby:orderby, count:count, custom_headers:custom_headers).value!
end | ruby | def list_with_http_info(filter:nil, top:nil, skip:nil, select:nil, orderby:nil, count:nil, custom_headers:nil)
list_async(filter:filter, top:top, skip:skip, select:select, orderby:orderby, count:count, custom_headers:custom_headers).value!
end | [
"def",
"list_with_http_info",
"(",
"filter",
":",
"nil",
",",
"top",
":",
"nil",
",",
"skip",
":",
"nil",
",",
"select",
":",
"nil",
",",
"orderby",
":",
"nil",
",",
"count",
":",
"nil",
",",
"custom_headers",
":",
"nil",
")",
"list_async",
"(",
"fil... | Gets the first page of Data Lake Analytics accounts, if any, within the
current subscription. This includes a link to the next page, if any.
@param filter [String] OData filter. Optional.
@param top [Integer] The number of items to return. Optional.
@param skip [Integer] The number of items to skip over before ret... | [
"Gets",
"the",
"first",
"page",
"of",
"Data",
"Lake",
"Analytics",
"accounts",
"if",
"any",
"within",
"the",
"current",
"subscription",
".",
"This",
"includes",
"a",
"link",
"to",
"the",
"next",
"page",
"if",
"any",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_datalake_analytics/lib/2016-11-01/generated/azure_mgmt_datalake_analytics/accounts.rb#L75-L77 | train | Gets a list of all the image objects in a collection of image objects. | [
30522,
13366,
2862,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
11307,
1024,
9152,
2140,
1010,
2327,
1024,
9152,
2140,
1010,
13558,
1024,
9152,
2140,
1010,
7276,
1024,
9152,
2140,
1010,
2344,
3762,
1024,
9152,
2140,
1010,
4175,
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_resources/lib/2016-02-01/generated/azure_mgmt_resources/tags.rb | Azure::Resources::Mgmt::V2016_02_01.Tags.create_or_update_value | def create_or_update_value(tag_name, tag_value, custom_headers:nil)
response = create_or_update_value_async(tag_name, tag_value, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def create_or_update_value(tag_name, tag_value, custom_headers:nil)
response = create_or_update_value_async(tag_name, tag_value, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"create_or_update_value",
"(",
"tag_name",
",",
"tag_value",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"create_or_update_value_async",
"(",
"tag_name",
",",
"tag_value",
",",
"custom_headers",
":custom_headers",
")",
".",
"value!",
"response",
... | Create a subscription resource tag value.
@param tag_name [String] The name of the tag.
@param tag_value [String] The value of the tag.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request.
@return [TagValue] operation results. | [
"Create",
"a",
"subscription",
"resource",
"tag",
"value",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_resources/lib/2016-02-01/generated/azure_mgmt_resources/tags.rb#L115-L118 | train | Creates or updates a tag value. | [
30522,
13366,
3443,
1035,
2030,
1035,
10651,
1035,
3643,
1006,
6415,
1035,
2171,
1010,
6415,
1035,
3643,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
3443,
1035,
2030,
1035,
10651,
1035,
3643,
1035,
2004,
6038,
2278,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
hashicorp/vagrant | lib/vagrant/vagrantfile.rb | Vagrant.Vagrantfile.machine | def machine(name, provider, boxes, data_path, env)
# Load the configuration for the machine
results = machine_config(name, provider, boxes, data_path)
box = results[:box]
config = results[:config]
config_errors = results[:config_errors]
config_warnings = result... | ruby | def machine(name, provider, boxes, data_path, env)
# Load the configuration for the machine
results = machine_config(name, provider, boxes, data_path)
box = results[:box]
config = results[:config]
config_errors = results[:config_errors]
config_warnings = result... | [
"def",
"machine",
"(",
"name",
",",
"provider",
",",
"boxes",
",",
"data_path",
",",
"env",
")",
"# Load the configuration for the machine",
"results",
"=",
"machine_config",
"(",
"name",
",",
"provider",
",",
"boxes",
",",
"data_path",
")",
"box",
"=",
"resul... | Initializes by loading a Vagrantfile.
@param [Config::Loader] loader Configuration loader that should
already be configured with the proper Vagrantfile locations.
This usually comes from {Vagrant::Environment}
@param [Array<Symbol>] keys The Vagrantfiles to load and the
order to load them in (keys within th... | [
"Initializes",
"by",
"loading",
"a",
"Vagrantfile",
"."
] | c22a145c59790c098f95d50141d9afb48e1ef55f | https://github.com/hashicorp/vagrant/blob/c22a145c59790c098f95d50141d9afb48e1ef55f/lib/vagrant/vagrantfile.rb#L45-L83 | train | Load the machine configuration | [
30522,
13366,
3698,
1006,
2171,
1010,
10802,
1010,
8378,
1010,
2951,
1035,
4130,
1010,
4372,
2615,
1007,
1001,
7170,
1996,
9563,
2005,
1996,
3698,
3463,
1027,
3698,
1035,
9530,
8873,
2290,
1006,
2171,
1010,
10802,
1010,
8378,
1010,
2951,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_policy/lib/2018-05-01/generated/azure_mgmt_policy/policy_definitions.rb | Azure::Policy::Mgmt::V2018_05_01.PolicyDefinitions.delete_at_management_group | def delete_at_management_group(policy_definition_name, management_group_id, custom_headers:nil)
response = delete_at_management_group_async(policy_definition_name, management_group_id, custom_headers:custom_headers).value!
nil
end | ruby | def delete_at_management_group(policy_definition_name, management_group_id, custom_headers:nil)
response = delete_at_management_group_async(policy_definition_name, management_group_id, custom_headers:custom_headers).value!
nil
end | [
"def",
"delete_at_management_group",
"(",
"policy_definition_name",
",",
"management_group_id",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"delete_at_management_group_async",
"(",
"policy_definition_name",
",",
"management_group_id",
",",
"custom_headers",
":cus... | Deletes a policy definition in a management group.
This operation deletes the policy definition in the given management group
with the given name.
@param policy_definition_name [String] The name of the policy definition to
delete.
@param management_group_id [String] The ID of the management group.
@param custom... | [
"Deletes",
"a",
"policy",
"definition",
"in",
"a",
"management",
"group",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_policy/lib/2018-05-01/generated/azure_mgmt_policy/policy_definitions.rb#L548-L551 | train | Deletes the policy definition at management group level. | [
30522,
13366,
3972,
12870,
1035,
2012,
1035,
2968,
1035,
2177,
1006,
3343,
1035,
6210,
1035,
2171,
1010,
2968,
1035,
2177,
1035,
8909,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
3972,
12870,
1035,
2012,
1035,
2968,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
samvera/hyrax | app/presenters/hyrax/stats_usage_presenter.rb | Hyrax.StatsUsagePresenter.date_for_analytics | def date_for_analytics
earliest = Hyrax.config.analytic_start_date
date_uploaded = string_to_date(model.date_uploaded)
date_analytics = date_uploaded ? date_uploaded : model.create_date
return date_analytics if earliest.blank?
earliest > date_analytics ? earliest : date_analytics... | ruby | def date_for_analytics
earliest = Hyrax.config.analytic_start_date
date_uploaded = string_to_date(model.date_uploaded)
date_analytics = date_uploaded ? date_uploaded : model.create_date
return date_analytics if earliest.blank?
earliest > date_analytics ? earliest : date_analytics... | [
"def",
"date_for_analytics",
"earliest",
"=",
"Hyrax",
".",
"config",
".",
"analytic_start_date",
"date_uploaded",
"=",
"string_to_date",
"(",
"model",
".",
"date_uploaded",
")",
"date_analytics",
"=",
"date_uploaded",
"?",
"date_uploaded",
":",
"model",
".",
"creat... | model.date_uploaded reflects the date the object was uploaded by the user
and therefore (if available) the date that we want to use for the stats
model.create_date reflects the date the file was added to Fedora. On data
migrated from one repository to another the created_date can be later
than the date the file was... | [
"model",
".",
"date_uploaded",
"reflects",
"the",
"date",
"the",
"object",
"was",
"uploaded",
"by",
"the",
"user",
"and",
"therefore",
"(",
"if",
"available",
")",
"the",
"date",
"that",
"we",
"want",
"to",
"use",
"for",
"the",
"stats",
"model",
".",
"cr... | e2b4f56e829a53b1f11296324736e9d5b8c9ee5f | https://github.com/samvera/hyrax/blob/e2b4f56e829a53b1f11296324736e9d5b8c9ee5f/app/presenters/hyrax/stats_usage_presenter.rb#L29-L35 | train | Returns the date for the analytic start date | [
30522,
13366,
3058,
1035,
2005,
1035,
25095,
5700,
1027,
1044,
19563,
2595,
1012,
9530,
8873,
2290,
1012,
23521,
1035,
2707,
1035,
3058,
3058,
1035,
21345,
1027,
5164,
1035,
2000,
1035,
3058,
1006,
2944,
1012,
3058,
1035,
21345,
1007,
3058,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
projectcypress/health-data-standards | lib/hqmf-parser/2.0/data_criteria_helpers/dc_definition_from_template_or_type_extract.rb | HQMF2.DataCriteriaTypeAndDefinitionExtraction.definition_for_nil_entry | def definition_for_nil_entry
reference = @entry.at_xpath('./*/cda:outboundRelationship/cda:criteriaReference', HQMF2::Document::NAMESPACES)
ref_id = nil
unless reference.nil?
ref_id = "#{HQMF2::Utilities.attr_val(reference, 'cda:id/@extension')}_#{HQMF2::Utilities.attr_val(reference, 'cda:id/@... | ruby | def definition_for_nil_entry
reference = @entry.at_xpath('./*/cda:outboundRelationship/cda:criteriaReference', HQMF2::Document::NAMESPACES)
ref_id = nil
unless reference.nil?
ref_id = "#{HQMF2::Utilities.attr_val(reference, 'cda:id/@extension')}_#{HQMF2::Utilities.attr_val(reference, 'cda:id/@... | [
"def",
"definition_for_nil_entry",
"reference",
"=",
"@entry",
".",
"at_xpath",
"(",
"'./*/cda:outboundRelationship/cda:criteriaReference'",
",",
"HQMF2",
"::",
"Document",
"::",
"NAMESPACES",
")",
"ref_id",
"=",
"nil",
"unless",
"reference",
".",
"nil?",
"ref_id",
"=... | If there is no entry type, extract the entry type from what it references, and extract additional information for
specific occurrences. If there are no outbound references, print an error and mark it as variable. | [
"If",
"there",
"is",
"no",
"entry",
"type",
"extract",
"the",
"entry",
"type",
"from",
"what",
"it",
"references",
"and",
"extract",
"additional",
"information",
"for",
"specific",
"occurrences",
".",
"If",
"there",
"are",
"no",
"outbound",
"references",
"prin... | 252d4f0927c513eacde6b9ea41b76faa1423c34b | https://github.com/projectcypress/health-data-standards/blob/252d4f0927c513eacde6b9ea41b76faa1423c34b/lib/hqmf-parser/2.0/data_criteria_helpers/dc_definition_from_template_or_type_extract.rb#L132-L161 | train | Returns the definition for the nil entry | [
30522,
13366,
6210,
1035,
2005,
1035,
9152,
2140,
1035,
4443,
4431,
30524,
3729,
2050,
1024,
2041,
15494,
16570,
10708,
5605,
1013,
3729,
2050,
1024,
9181,
2890,
25523,
1005,
1010,
16260,
2213,
2546,
2475,
1024,
1024,
6254,
1024,
1024,
3415... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/response.rb | Vault.Response.to_h | def to_h
self.class.fields.inject({}) do |h, (k, opts)|
if opts[:as].nil?
h[k] = self.public_send(k)
else
h[k] = self.public_send(opts[:as])
end
if !h[k].nil? && !h[k].is_a?(Array) && h[k].respond_to?(:to_h)
h[k] = h[k].to_h
end
h
... | ruby | def to_h
self.class.fields.inject({}) do |h, (k, opts)|
if opts[:as].nil?
h[k] = self.public_send(k)
else
h[k] = self.public_send(opts[:as])
end
if !h[k].nil? && !h[k].is_a?(Array) && h[k].respond_to?(:to_h)
h[k] = h[k].to_h
end
h
... | [
"def",
"to_h",
"self",
".",
"class",
".",
"fields",
".",
"inject",
"(",
"{",
"}",
")",
"do",
"|",
"h",
",",
"(",
"k",
",",
"opts",
")",
"|",
"if",
"opts",
"[",
":as",
"]",
".",
"nil?",
"h",
"[",
"k",
"]",
"=",
"self",
".",
"public_send",
"(... | Create a hash-bashed representation of this response.
@return [Hash] | [
"Create",
"a",
"hash",
"-",
"bashed",
"representation",
"of",
"this",
"response",
"."
] | 02f0532a802ba1a2a0d8703a4585dab76eb9d864 | https://github.com/hashicorp/vault-ruby/blob/02f0532a802ba1a2a0d8703a4585dab76eb9d864/lib/vault/response.rb#L69-L83 | train | Returns a hash of the object s fields | [
30522,
13366,
2000,
1035,
1044,
2969,
1012,
2465,
1012,
4249,
1012,
1999,
20614,
1006,
1063,
1065,
1007,
2079,
1064,
1044,
1010,
1006,
1047,
1010,
23569,
2015,
1007,
1064,
2065,
23569,
2015,
1031,
1024,
2004,
1033,
1012,
9152,
2140,
1029,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
middleman/middleman | middleman-core/lib/middleman-core/extension.rb | Middleman.Extension.add_exposed_to_context | def add_exposed_to_context(context)
(self.class.exposed_to_template || {}).each do |k, v|
context.define_singleton_method(k, &method(v))
end
end | ruby | def add_exposed_to_context(context)
(self.class.exposed_to_template || {}).each do |k, v|
context.define_singleton_method(k, &method(v))
end
end | [
"def",
"add_exposed_to_context",
"(",
"context",
")",
"(",
"self",
".",
"class",
".",
"exposed_to_template",
"||",
"{",
"}",
")",
".",
"each",
"do",
"|",
"k",
",",
"v",
"|",
"context",
".",
"define_singleton_method",
"(",
"k",
",",
"method",
"(",
"v",
... | Extensions are instantiated when they are activated.
@param [Middleman::Application] app The Middleman::Application instance
@param [Hash] options_hash The raw options hash. Subclasses should not manipulate this directly - it will be turned into {#options}.
@yield An optional block that can be used to customize opti... | [
"Extensions",
"are",
"instantiated",
"when",
"they",
"are",
"activated",
"."
] | a0dd9f78094813162895511e8516e0c5507cee50 | https://github.com/middleman/middleman/blob/a0dd9f78094813162895511e8516e0c5507cee50/middleman-core/lib/middleman-core/extension.rb#L355-L359 | train | Add exposed_to_template to the context | [
30522,
13366,
5587,
1035,
30524,
1065,
1007,
1012,
2169,
2079,
1064,
1047,
1010,
1058,
1064,
6123,
1012,
9375,
1035,
28159,
1035,
4118,
1006,
1047,
1010,
1004,
4118,
1006,
1058,
1007,
1007,
2203,
2203,
102,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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_authorization/lib/2015-07-01/generated/azure_mgmt_authorization/role_definitions.rb | Azure::Authorization::Mgmt::V2015_07_01.RoleDefinitions.get_by_id | def get_by_id(role_definition_id, custom_headers:nil)
response = get_by_id_async(role_definition_id, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def get_by_id(role_definition_id, custom_headers:nil)
response = get_by_id_async(role_definition_id, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"get_by_id",
"(",
"role_definition_id",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"get_by_id_async",
"(",
"role_definition_id",
",",
"custom_headers",
":custom_headers",
")",
".",
"value!",
"response",
".",
"body",
"unless",
"response",
".",
... | Gets a role definition by ID.
@param role_definition_id [String] The fully qualified role definition ID.
Use the format,
/subscriptions/{guid}/providers/Microsoft.Authorization/roleDefinitions/{roleDefinitionId}
for subscription level role definitions, or
/providers/Microsoft.Authorization/roleDefinitions/{roleDe... | [
"Gets",
"a",
"role",
"definition",
"by",
"ID",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_authorization/lib/2015-07-01/generated/azure_mgmt_authorization/role_definitions.rb#L422-L425 | train | Gets the role definition by ID. | [
30522,
13366,
2131,
1035,
2011,
1035,
8909,
1006,
2535,
1035,
6210,
1035,
8909,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
2131,
1035,
2011,
1035,
8909,
1035,
2004,
6038,
2278,
1006,
2535,
1035,
6210,
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... |
ruby/rake | lib/rake/thread_pool.rb | Rake.ThreadPool.future | def future(*args, &block)
promise = Promise.new(args, &block)
promise.recorder = lambda { |*stats| stat(*stats) }
@queue.enq promise
stat :queued, item_id: promise.object_id
start_thread
promise
end | ruby | def future(*args, &block)
promise = Promise.new(args, &block)
promise.recorder = lambda { |*stats| stat(*stats) }
@queue.enq promise
stat :queued, item_id: promise.object_id
start_thread
promise
end | [
"def",
"future",
"(",
"*",
"args",
",",
"&",
"block",
")",
"promise",
"=",
"Promise",
".",
"new",
"(",
"args",
",",
"block",
")",
"promise",
".",
"recorder",
"=",
"lambda",
"{",
"|",
"*",
"stats",
"|",
"stat",
"(",
"stats",
")",
"}",
"@queue",
".... | :nodoc: all
Creates a ThreadPool object. The +thread_count+ parameter is the size
of the pool.
Creates a future executed by the +ThreadPool+.
The args are passed to the block when executing (similarly to
Thread#new) The return value is an object representing
a future which has been created and added to the queu... | [
":",
"nodoc",
":",
"all",
"Creates",
"a",
"ThreadPool",
"object",
".",
"The",
"+",
"thread_count",
"+",
"parameter",
"is",
"the",
"size",
"of",
"the",
"pool",
".",
"Creates",
"a",
"future",
"executed",
"by",
"the",
"+",
"ThreadPool",
"+",
"."
] | 1c22b490ee6cb8bd614fa8d0d6145f671466206b | https://github.com/ruby/rake/blob/1c22b490ee6cb8bd614fa8d0d6145f671466206b/lib/rake/thread_pool.rb#L33-L41 | train | Create a future | [
30522,
13366,
2925,
1006,
1008,
12098,
5620,
1010,
1004,
3796,
1007,
4872,
1027,
4872,
1012,
2047,
1006,
12098,
5620,
1010,
1004,
3796,
1007,
4872,
1012,
14520,
1027,
23375,
1063,
1064,
1008,
26319,
1064,
28093,
1006,
1008,
26319,
1007,
106... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
ruby-grape/grape | lib/grape/endpoint.rb | Grape.Endpoint.inherit_settings | def inherit_settings(namespace_stackable)
inheritable_setting.route[:saved_validations] += namespace_stackable[:validations]
parent_declared_params = namespace_stackable[:declared_params]
if parent_declared_params
inheritable_setting.route[:declared_params] ||= []
inheritable_setting.... | ruby | def inherit_settings(namespace_stackable)
inheritable_setting.route[:saved_validations] += namespace_stackable[:validations]
parent_declared_params = namespace_stackable[:declared_params]
if parent_declared_params
inheritable_setting.route[:declared_params] ||= []
inheritable_setting.... | [
"def",
"inherit_settings",
"(",
"namespace_stackable",
")",
"inheritable_setting",
".",
"route",
"[",
":saved_validations",
"]",
"+=",
"namespace_stackable",
"[",
":validations",
"]",
"parent_declared_params",
"=",
"namespace_stackable",
"[",
":declared_params",
"]",
"if"... | Create a new endpoint.
@param new_settings [InheritableSetting] settings to determine the params,
validations, and other properties from.
@param options [Hash] attributes of this endpoint
@option options path [String or Array] the path to this endpoint, within
the current scope.
@option options method [String... | [
"Create",
"a",
"new",
"endpoint",
"."
] | e26ae618b86920b19b1a98945ba7d6e953a9b989 | https://github.com/ruby-grape/grape/blob/e26ae618b86920b19b1a98945ba7d6e953a9b989/lib/grape/endpoint.rb#L112-L122 | train | Inherit the settings from the current namespace. | [
30522,
13366,
22490,
1035,
10906,
1006,
3415,
15327,
1035,
9991,
3085,
1007,
22490,
3085,
1035,
4292,
1012,
2799,
1031,
1024,
5552,
1035,
27354,
2015,
1033,
1009,
1027,
3415,
15327,
1035,
9991,
3085,
1031,
1024,
27354,
2015,
1033,
6687,
103... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
decidim/decidim | decidim-core/lib/decidim/stats_registry.rb | Decidim.StatsRegistry.resolve | def resolve(name, context, start_at = nil, end_at = nil)
stat = @stats.detect { |s| s[:name] == name }
return stat[:block].call(context, start_at, end_at) if stat.present?
raise StandardError, "Stats '#{name}' is not registered."
end | ruby | def resolve(name, context, start_at = nil, end_at = nil)
stat = @stats.detect { |s| s[:name] == name }
return stat[:block].call(context, start_at, end_at) if stat.present?
raise StandardError, "Stats '#{name}' is not registered."
end | [
"def",
"resolve",
"(",
"name",
",",
"context",
",",
"start_at",
"=",
"nil",
",",
"end_at",
"=",
"nil",
")",
"stat",
"=",
"@stats",
".",
"detect",
"{",
"|",
"s",
"|",
"s",
"[",
":name",
"]",
"==",
"name",
"}",
"return",
"stat",
"[",
":block",
"]",... | Public: Returns a number returned by executing the corresponding block.
name - The name of the stat
context - An arbritrary context object to compute the result.
start_at - A date to filter resources created after it
end_at - A date to filter resources created before it.
Returns the result of executing the stats... | [
"Public",
":",
"Returns",
"a",
"number",
"returned",
"by",
"executing",
"the",
"corresponding",
"block",
"."
] | 6e2b14e559a63088669904e3c5c49a5180700cf7 | https://github.com/decidim/decidim/blob/6e2b14e559a63088669904e3c5c49a5180700cf7/decidim-core/lib/decidim/stats_registry.rb#L48-L52 | train | Resolve a Stats object by name. | [
30522,
13366,
10663,
1006,
2171,
1010,
6123,
1010,
2707,
1035,
2012,
1027,
9152,
2140,
1010,
2203,
1035,
2012,
1027,
9152,
2140,
1007,
28093,
1027,
1030,
26319,
1012,
11487,
1063,
1064,
1055,
1064,
1055,
1031,
1024,
2171,
1033,
1027,
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_compute/lib/2018-04-01/generated/azure_mgmt_compute/images.rb | Azure::Compute::Mgmt::V2018_04_01.Images.get_with_http_info | def get_with_http_info(resource_group_name, image_name, expand:nil, custom_headers:nil)
get_async(resource_group_name, image_name, expand:expand, custom_headers:custom_headers).value!
end | ruby | def get_with_http_info(resource_group_name, image_name, expand:nil, custom_headers:nil)
get_async(resource_group_name, image_name, expand:expand, custom_headers:custom_headers).value!
end | [
"def",
"get_with_http_info",
"(",
"resource_group_name",
",",
"image_name",
",",
"expand",
":",
"nil",
",",
"custom_headers",
":",
"nil",
")",
"get_async",
"(",
"resource_group_name",
",",
"image_name",
",",
"expand",
":",
"expand",
",",
"custom_headers",
":custom... | Gets an image.
@param resource_group_name [String] The name of the resource group.
@param image_name [String] The name of the image.
@param expand [String] The expand expression to apply on the operation.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP reques... | [
"Gets",
"an",
"image",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_compute/lib/2018-04-01/generated/azure_mgmt_compute/images.rb#L179-L181 | train | Gets the specified image s index. | [
30522,
13366,
2131,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
3746,
1035,
2171,
1010,
7818,
1024,
9152,
2140,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
2131,
1035,
2004,
6038,
2278,
1006,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
piotrmurach/github | lib/github_api/client/markdown.rb | Github.Client::Markdown.render_raw | def render_raw(*args)
params = arguments(args).params
params['data'] = args.shift
params['raw'] = true
params['accept'] = params.fetch('accept') { 'text/plain' }
post_request("markdown/raw", params)
end | ruby | def render_raw(*args)
params = arguments(args).params
params['data'] = args.shift
params['raw'] = true
params['accept'] = params.fetch('accept') { 'text/plain' }
post_request("markdown/raw", params)
end | [
"def",
"render_raw",
"(",
"*",
"args",
")",
"params",
"=",
"arguments",
"(",
"args",
")",
".",
"params",
"params",
"[",
"'data'",
"]",
"=",
"args",
".",
"shift",
"params",
"[",
"'raw'",
"]",
"=",
"true",
"params",
"[",
"'accept'",
"]",
"=",
"params",... | Render a Markdown document in raw mode
= Input
The raw API it not JSON-based. It takes a Markdown document as plaintext
<tt>text/plain</tt> or <tt>text/x-markdown</tt> and renders it as plain
Markdown without a repository context (just like a README.md file is
rendered – this is the simplest way to preview a ... | [
"Render",
"a",
"Markdown",
"document",
"in",
"raw",
"mode"
] | 8702452c66bea33c9388550aed9e9974f76aaef1 | https://github.com/piotrmurach/github/blob/8702452c66bea33c9388550aed9e9974f76aaef1/lib/github_api/client/markdown.rb#L52-L59 | train | Render raw markdown | [
30522,
13366,
17552,
1035,
6315,
1006,
1008,
12098,
5620,
1007,
11498,
5244,
1027,
9918,
1006,
12098,
5620,
1007,
1012,
11498,
5244,
11498,
5244,
1031,
1005,
2951,
1005,
1033,
1027,
12098,
5620,
1012,
5670,
11498,
5244,
1031,
1005,
6315,
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... |
github/linguist | lib/linguist/generated.rb | Linguist.Generated.generated_apache_thrift? | def generated_apache_thrift?
return false unless APACHE_THRIFT_EXTENSIONS.include?(extname)
return lines.first(6).any? { |l| l.include?("Autogenerated by Thrift Compiler") }
end | ruby | def generated_apache_thrift?
return false unless APACHE_THRIFT_EXTENSIONS.include?(extname)
return lines.first(6).any? { |l| l.include?("Autogenerated by Thrift Compiler") }
end | [
"def",
"generated_apache_thrift?",
"return",
"false",
"unless",
"APACHE_THRIFT_EXTENSIONS",
".",
"include?",
"(",
"extname",
")",
"return",
"lines",
".",
"first",
"(",
"6",
")",
".",
"any?",
"{",
"|",
"l",
"|",
"l",
".",
"include?",
"(",
"\"Autogenerated by Th... | Internal: Is the blob generated by Apache Thrift compiler?
Returns true or false | [
"Internal",
":",
"Is",
"the",
"blob",
"generated",
"by",
"Apache",
"Thrift",
"compiler?"
] | 9116c90fcbb82ac03b4b33c58cfbde1fcf745e99 | https://github.com/github/linguist/blob/9116c90fcbb82ac03b4b33c58cfbde1fcf745e99/lib/linguist/generated.rb#L327-L330 | train | Returns true if the file is generated by apache thrift | [
30522,
13366,
7013,
1035,
15895,
1035,
16215,
16338,
1029,
2709,
6270,
4983,
15895,
1035,
16215,
16338,
1035,
14305,
1012,
2421,
1029,
1006,
4654,
2102,
18442,
1007,
2709,
3210,
1012,
2034,
1006,
1020,
1007,
1012,
2151,
1029,
1063,
1064,
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... |
kpumuk/meta-tags | lib/meta_tags/renderer.rb | MetaTags.Renderer.configured_name_key | def configured_name_key(name)
is_property_tag = MetaTags.config.property_tags.any? do |tag_name|
name.to_s.match(/^#{Regexp.escape(tag_name.to_s)}\b/)
end
is_property_tag ? :property : :name
end | ruby | def configured_name_key(name)
is_property_tag = MetaTags.config.property_tags.any? do |tag_name|
name.to_s.match(/^#{Regexp.escape(tag_name.to_s)}\b/)
end
is_property_tag ? :property : :name
end | [
"def",
"configured_name_key",
"(",
"name",
")",
"is_property_tag",
"=",
"MetaTags",
".",
"config",
".",
"property_tags",
".",
"any?",
"do",
"|",
"tag_name",
"|",
"name",
".",
"to_s",
".",
"match",
"(",
"/",
"#{",
"Regexp",
".",
"escape",
"(",
"tag_name",
... | Returns meta tag property name for a give meta tag based on the
configured list of property tags in MetaTags::Configuration#property_tags.
@param [String, Symbol] meta tag key.
@return [String] meta tag attribute name ("property" or "name"). | [
"Returns",
"meta",
"tag",
"property",
"name",
"for",
"a",
"give",
"meta",
"tag",
"based",
"on",
"the",
"configured",
"list",
"of",
"property",
"tags",
"in",
"MetaTags",
"::",
"Configuration#property_tags",
"."
] | 03585f95edf96cd17024c5c155ce46ec8bc47232 | https://github.com/kpumuk/meta-tags/blob/03585f95edf96cd17024c5c155ce46ec8bc47232/lib/meta_tags/renderer.rb#L258-L263 | train | Returns the key for the given name. | [
30522,
13366,
26928,
1035,
2171,
1035,
3145,
1006,
2171,
1007,
2003,
1035,
3200,
1035,
6415,
1027,
18804,
15900,
2015,
1012,
9530,
8873,
2290,
1012,
3200,
1035,
22073,
1012,
2151,
1029,
2079,
1064,
6415,
1035,
2171,
1064,
2171,
1012,
2000,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
puppetlabs/puppet | lib/puppet/network/resolver.rb | Puppet::Network.Resolver.each_priority | def each_priority(records)
pri_hash = records.inject({}) do |groups, element|
groups[element.priority] ||= []
groups[element.priority] << element
groups
end
pri_hash.keys.sort.each do |key|
yield pri_hash[key]
end
end | ruby | def each_priority(records)
pri_hash = records.inject({}) do |groups, element|
groups[element.priority] ||= []
groups[element.priority] << element
groups
end
pri_hash.keys.sort.each do |key|
yield pri_hash[key]
end
end | [
"def",
"each_priority",
"(",
"records",
")",
"pri_hash",
"=",
"records",
".",
"inject",
"(",
"{",
"}",
")",
"do",
"|",
"groups",
",",
"element",
"|",
"groups",
"[",
"element",
".",
"priority",
"]",
"||=",
"[",
"]",
"groups",
"[",
"element",
".",
"pri... | Groups the records by their priority and yields the groups
in order of highest to lowest priority (lowest to highest numbers),
one at a time.
{ 1 => [records], 2 => [records], etc. }
@param [[Resolv::DNS::Resource::IN::SRV]] records the list of
records for a given service
@yields [[Resolv::DNS::Resource::... | [
"Groups",
"the",
"records",
"by",
"their",
"priority",
"and",
"yields",
"the",
"groups",
"in",
"order",
"of",
"highest",
"to",
"lowest",
"priority",
"(",
"lowest",
"to",
"highest",
"numbers",
")",
"one",
"at",
"a",
"time",
".",
"{",
"1",
"=",
">",
"[",... | 4baeed97cbb7571ddc6635f0a24debe2e8b22cd3 | https://github.com/puppetlabs/puppet/blob/4baeed97cbb7571ddc6635f0a24debe2e8b22cd3/lib/puppet/network/resolver.rb#L146-L156 | train | Iterate over the priority of the given records. | [
30522,
13366,
2169,
1035,
9470,
1006,
2636,
1007,
26927,
1035,
23325,
1027,
2636,
1012,
1999,
20614,
1006,
1063,
1065,
1007,
2079,
1064,
2967,
1010,
5783,
1064,
2967,
1031,
5783,
1012,
9470,
1033,
1064,
1064,
1027,
1031,
1033,
2967,
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_network/lib/2018-07-01/generated/azure_mgmt_network/virtual_network_gateways.rb | Azure::Network::Mgmt::V2018_07_01.VirtualNetworkGateways.vpn_device_configuration_script | def vpn_device_configuration_script(resource_group_name, virtual_network_gateway_connection_name, parameters, custom_headers:nil)
response = vpn_device_configuration_script_async(resource_group_name, virtual_network_gateway_connection_name, parameters, custom_headers:custom_headers).value!
response.body unl... | ruby | def vpn_device_configuration_script(resource_group_name, virtual_network_gateway_connection_name, parameters, custom_headers:nil)
response = vpn_device_configuration_script_async(resource_group_name, virtual_network_gateway_connection_name, parameters, custom_headers:custom_headers).value!
response.body unl... | [
"def",
"vpn_device_configuration_script",
"(",
"resource_group_name",
",",
"virtual_network_gateway_connection_name",
",",
"parameters",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"vpn_device_configuration_script_async",
"(",
"resource_group_name",
",",
"virtual_n... | Gets a xml format representation for vpn device configuration script.
@param resource_group_name [String] The name of the resource group.
@param virtual_network_gateway_connection_name [String] The name of the
virtual network gateway connection for which the configuration script is
generated.
@param parameters [V... | [
"Gets",
"a",
"xml",
"format",
"representation",
"for",
"vpn",
"device",
"configuration",
"script",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_network/lib/2018-07-01/generated/azure_mgmt_network/virtual_network_gateways.rb#L1067-L1070 | train | Creates a virtual network gateway connection script. | [
30522,
13366,
21210,
2078,
1035,
5080,
1035,
9563,
1035,
5896,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
7484,
1035,
2897,
1035,
11909,
1035,
4434,
1035,
2171,
1010,
11709,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
mongodb/mongo-ruby-driver | lib/mongo/client.rb | Mongo.Client.start_session | def start_session(options = {})
cluster.send(:get_session, self, options.merge(implicit: false)) ||
(raise Error::InvalidSession.new(Session::SESSIONS_NOT_SUPPORTED))
end | ruby | def start_session(options = {})
cluster.send(:get_session, self, options.merge(implicit: false)) ||
(raise Error::InvalidSession.new(Session::SESSIONS_NOT_SUPPORTED))
end | [
"def",
"start_session",
"(",
"options",
"=",
"{",
"}",
")",
"cluster",
".",
"send",
"(",
":get_session",
",",
"self",
",",
"options",
".",
"merge",
"(",
"implicit",
":",
"false",
")",
")",
"||",
"(",
"raise",
"Error",
"::",
"InvalidSession",
".",
"new"... | Start a session.
If the deployment does not support sessions, raises
Mongo::Error::InvalidSession. This exception can also be raised when
the driver is not connected to a data-bearing server, for example
during failover.
@example Start a session.
client.start_session(causal_consistency: true)
@param [ Hash ... | [
"Start",
"a",
"session",
"."
] | dca26d0870cb3386fad9ccc1d17228097c1fe1c8 | https://github.com/mongodb/mongo-ruby-driver/blob/dca26d0870cb3386fad9ccc1d17228097c1fe1c8/lib/mongo/client.rb#L654-L657 | train | Start a new session | [
30522,
13366,
2707,
1035,
5219,
1006,
7047,
1027,
1063,
1065,
1007,
9324,
1012,
4604,
1006,
1024,
2131,
1035,
5219,
1010,
2969,
1010,
7047,
1012,
13590,
1006,
24655,
1024,
6270,
1007,
1007,
1064,
1064,
1006,
5333,
7561,
1024,
1024,
19528,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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 | actionpack/lib/abstract_controller/caching.rb | AbstractController.Caching.cache | def cache(key, options = {}, &block) # :doc:
if cache_configured?
cache_store.fetch(ActiveSupport::Cache.expand_cache_key(key, :controller), options, &block)
else
yield
end
end | ruby | def cache(key, options = {}, &block) # :doc:
if cache_configured?
cache_store.fetch(ActiveSupport::Cache.expand_cache_key(key, :controller), options, &block)
else
yield
end
end | [
"def",
"cache",
"(",
"key",
",",
"options",
"=",
"{",
"}",
",",
"&",
"block",
")",
"# :doc:",
"if",
"cache_configured?",
"cache_store",
".",
"fetch",
"(",
"ActiveSupport",
"::",
"Cache",
".",
"expand_cache_key",
"(",
"key",
",",
":controller",
")",
",",
... | Convenience accessor. | [
"Convenience",
"accessor",
"."
] | 85a8bc644be69908f05740a5886ec19cd3679df5 | https://github.com/rails/rails/blob/85a8bc644be69908f05740a5886ec19cd3679df5/actionpack/lib/abstract_controller/caching.rb#L58-L64 | train | Get the cache entry for the given key. | [
30522,
13366,
17053,
1006,
30524,
17053,
1035,
3573,
1012,
18584,
1006,
3161,
6342,
9397,
11589,
1024,
1024,
17053,
1012,
7818,
1035,
17053,
1035,
3145,
1006,
3145,
1010,
1024,
11486,
1007,
1010,
7047,
1010,
1004,
3796,
1007,
2842,
10750,
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_network/lib/2018-07-01/generated/azure_mgmt_network/virtual_wans.rb | Azure::Network::Mgmt::V2018_07_01.VirtualWANs.update_tags | def update_tags(resource_group_name, virtual_wanname, wanparameters, custom_headers:nil)
response = update_tags_async(resource_group_name, virtual_wanname, wanparameters, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def update_tags(resource_group_name, virtual_wanname, wanparameters, custom_headers:nil)
response = update_tags_async(resource_group_name, virtual_wanname, wanparameters, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"update_tags",
"(",
"resource_group_name",
",",
"virtual_wanname",
",",
"wanparameters",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"update_tags_async",
"(",
"resource_group_name",
",",
"virtual_wanname",
",",
"wanparameters",
",",
"custom_headers",... | Updates a VirtualWAN tags.
@param resource_group_name [String] The resource group name of the
VirtualWan.
@param virtual_wanname [String] The name of the VirtualWAN being updated.
@param wanparameters [TagsObject] Parameters supplied to Update VirtualWAN
tags.
@param custom_headers [Hash{String => String}] A has... | [
"Updates",
"a",
"VirtualWAN",
"tags",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_network/lib/2018-07-01/generated/azure_mgmt_network/virtual_wans.rb#L183-L186 | train | Updates a virtual wan s tags. | [
30522,
13366,
10651,
1035,
22073,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
7484,
1035,
10587,
4168,
1010,
14071,
28689,
22828,
2015,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
10651,
1035,
22073,
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... |
mongodb/mongoid | lib/mongoid/matchable.rb | Mongoid.Matchable._matches? | def _matches?(selector)
selector.each_pair do |key, value|
if value.is_a?(Hash)
value.each do |item|
if item[0].to_s == "$not".freeze
item = item[1]
return false if matcher(self, key, item)._matches?(item)
else
return false unless... | ruby | def _matches?(selector)
selector.each_pair do |key, value|
if value.is_a?(Hash)
value.each do |item|
if item[0].to_s == "$not".freeze
item = item[1]
return false if matcher(self, key, item)._matches?(item)
else
return false unless... | [
"def",
"_matches?",
"(",
"selector",
")",
"selector",
".",
"each_pair",
"do",
"|",
"key",
",",
"value",
"|",
"if",
"value",
".",
"is_a?",
"(",
"Hash",
")",
"value",
".",
"each",
"do",
"|",
"item",
"|",
"if",
"item",
"[",
"0",
"]",
".",
"to_s",
"=... | Determines if this document has the attributes to match the supplied
MongoDB selector. Used for matching on embedded associations.
@example Does the document match?
document._matches?(:title => { "$in" => [ "test" ] })
@param [ Hash ] selector The MongoDB selector.
@return [ true, false ] True if matches, fal... | [
"Determines",
"if",
"this",
"document",
"has",
"the",
"attributes",
"to",
"match",
"the",
"supplied",
"MongoDB",
"selector",
".",
"Used",
"for",
"matching",
"on",
"embedded",
"associations",
"."
] | 56976e32610f4c2450882b0bfe14da099f0703f4 | https://github.com/mongodb/mongoid/blob/56976e32610f4c2450882b0bfe14da099f0703f4/lib/mongoid/matchable.rb#L62-L78 | train | Returns true if the selector matches the current object. | [
30522,
13366,
1035,
3503,
1029,
1006,
27000,
1007,
27000,
1012,
2169,
1035,
3940,
2079,
1064,
3145,
1010,
3643,
1064,
2065,
3643,
1012,
30524,
1007,
1012,
1035,
3503,
1029,
1006,
8875,
1007,
2842,
2709,
6270,
4983,
2674,
2121,
1006,
2969,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
mongodb/mongo-ruby-driver | lib/mongo/auth.rb | Mongo.Auth.get | def get(user)
mechanism = user.mechanism
raise InvalidMechanism.new(mechanism) if !SOURCES.has_key?(mechanism)
SOURCES[mechanism].new(user)
end | ruby | def get(user)
mechanism = user.mechanism
raise InvalidMechanism.new(mechanism) if !SOURCES.has_key?(mechanism)
SOURCES[mechanism].new(user)
end | [
"def",
"get",
"(",
"user",
")",
"mechanism",
"=",
"user",
".",
"mechanism",
"raise",
"InvalidMechanism",
".",
"new",
"(",
"mechanism",
")",
"if",
"!",
"SOURCES",
".",
"has_key?",
"(",
"mechanism",
")",
"SOURCES",
"[",
"mechanism",
"]",
".",
"new",
"(",
... | Get the authorization strategy for the provided auth mechanism.
@example Get the strategy.
Auth.get(user)
@param [ Auth::User ] user The user object.
@return [ CR, X509, LDAP, Kerberos ] The auth strategy.
@since 2.0.0 | [
"Get",
"the",
"authorization",
"strategy",
"for",
"the",
"provided",
"auth",
"mechanism",
"."
] | dca26d0870cb3386fad9ccc1d17228097c1fe1c8 | https://github.com/mongodb/mongo-ruby-driver/blob/dca26d0870cb3386fad9ccc1d17228097c1fe1c8/lib/mongo/auth.rb#L67-L71 | train | Get the source for a user | [
30522,
13366,
2131,
1006,
5310,
1007,
7337,
1027,
5310,
1012,
7337,
5333,
19528,
4168,
14856,
2964,
1012,
2047,
1006,
7337,
1007,
2065,
999,
4216,
1012,
2038,
1035,
3145,
1029,
1006,
7337,
1007,
4216,
1031,
7337,
1033,
1012,
2047,
1006,
5... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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_name | def file_name
name = ""
name += @user.nickname
name += "-"
name += @organization.name.parameterize
name += "-"
name += token
name + ".zip"
end | ruby | def file_name
name = ""
name += @user.nickname
name += "-"
name += @organization.name.parameterize
name += "-"
name += token
name + ".zip"
end | [
"def",
"file_name",
"name",
"=",
"\"\"",
"name",
"+=",
"@user",
".",
"nickname",
"name",
"+=",
"\"-\"",
"name",
"+=",
"@organization",
".",
"name",
".",
"parameterize",
"name",
"+=",
"\"-\"",
"name",
"+=",
"token",
"name",
"+",
"\".zip\"",
"end"
] | Public: Initialize the reader with a user, and token
user - The user of data portability to be zipped.
token - The token to be send by email, and return to controller.
Returns a String with the filename of the file to be read or generate. | [
"Public",
":",
"Initialize",
"the",
"reader",
"with",
"a",
"user",
"and",
"token"
] | 6e2b14e559a63088669904e3c5c49a5180700cf7 | https://github.com/decidim/decidim/blob/6e2b14e559a63088669904e3c5c49a5180700cf7/decidim-core/lib/decidim/data_portability_file_reader.rb#L19-L27 | train | Returns the file name for the file | [
30522,
13366,
5371,
1035,
2171,
2171,
1027,
1000,
1000,
2171,
1009,
1027,
1030,
5310,
1012,
8367,
2171,
1009,
1027,
1000,
1011,
1000,
2171,
1009,
1027,
1030,
3029,
1012,
2171,
1012,
16381,
4697,
2171,
1009,
1027,
1000,
1011,
1000,
2171,
1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_network/lib/2018-08-01/generated/azure_mgmt_network/network_watchers.rb | Azure::Network::Mgmt::V2018_08_01.NetworkWatchers.get_troubleshooting | def get_troubleshooting(resource_group_name, network_watcher_name, parameters, custom_headers:nil)
response = get_troubleshooting_async(resource_group_name, network_watcher_name, parameters, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def get_troubleshooting(resource_group_name, network_watcher_name, parameters, custom_headers:nil)
response = get_troubleshooting_async(resource_group_name, network_watcher_name, parameters, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"get_troubleshooting",
"(",
"resource_group_name",
",",
"network_watcher_name",
",",
"parameters",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"get_troubleshooting_async",
"(",
"resource_group_name",
",",
"network_watcher_name",
",",
"parameters",
",",... | Initiate troubleshooting on a specified resource
@param resource_group_name [String] The name of the resource group.
@param network_watcher_name [String] The name of the network watcher
resource.
@param parameters [TroubleshootingParameters] Parameters that define the
resource to troubleshoot.
@param custom_head... | [
"Initiate",
"troubleshooting",
"on",
"a",
"specified",
"resource"
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_network/lib/2018-08-01/generated/azure_mgmt_network/network_watchers.rb#L806-L809 | train | Gets the troubleshooting of a virtual network. | [
30522,
13366,
2131,
1035,
13460,
23416,
2075,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2897,
1035,
3422,
2121,
1035,
2171,
1010,
11709,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
2131,
1035,
13460,
23416,
2075,
1035... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | data/azure_event_grid/lib/2018-01-01/generated/azure_event_grid/event_grid_client.rb | Azure::EventGrid::V2018_01_01.EventGridClient.publish_events_async | def publish_events_async(topic_hostname, events, custom_headers:nil)
fail ArgumentError, 'topic_hostname is nil' if topic_hostname.nil?
fail ArgumentError, 'events is nil' if events.nil?
fail ArgumentError, 'api_version is nil' if api_version.nil?
request_headers = {}
request_headers['Co... | ruby | def publish_events_async(topic_hostname, events, custom_headers:nil)
fail ArgumentError, 'topic_hostname is nil' if topic_hostname.nil?
fail ArgumentError, 'events is nil' if events.nil?
fail ArgumentError, 'api_version is nil' if api_version.nil?
request_headers = {}
request_headers['Co... | [
"def",
"publish_events_async",
"(",
"topic_hostname",
",",
"events",
",",
"custom_headers",
":",
"nil",
")",
"fail",
"ArgumentError",
",",
"'topic_hostname is nil'",
"if",
"topic_hostname",
".",
"nil?",
"fail",
"ArgumentError",
",",
"'events is nil'",
"if",
"events",
... | Publishes a batch of events to an Azure Event Grid topic.
@param topic_hostname [String] The host name of the topic, e.g.
topic1.westus2-1.eventgrid.azure.net
@param events [Array<EventGridEvent>] An array of events to be published to
Event Grid.
@param [Hash{String => String}] A hash of custom headers that will ... | [
"Publishes",
"a",
"batch",
"of",
"events",
"to",
"an",
"Azure",
"Event",
"Grid",
"topic",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_event_grid/lib/2018-01-01/generated/azure_event_grid/event_grid_client.rb#L156-L219 | train | Publishes events to a topic. | [
30522,
13366,
10172,
1035,
2824,
1035,
2004,
6038,
2278,
1006,
8476,
1035,
3677,
18442,
1010,
2824,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
8246,
6685,
2121,
29165,
1010,
1005,
8476,
1035,
3677,
18442,
2003,
9152,
2140,
1005,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
square/connect-ruby-sdk | lib/square_connect/api/catalog_api.rb | SquareConnect.CatalogApi.delete_catalog_object | def delete_catalog_object(object_id, opts = {})
data, _status_code, _headers = delete_catalog_object_with_http_info(object_id, opts)
return data
end | ruby | def delete_catalog_object(object_id, opts = {})
data, _status_code, _headers = delete_catalog_object_with_http_info(object_id, opts)
return data
end | [
"def",
"delete_catalog_object",
"(",
"object_id",
",",
"opts",
"=",
"{",
"}",
")",
"data",
",",
"_status_code",
",",
"_headers",
"=",
"delete_catalog_object_with_http_info",
"(",
"object_id",
",",
"opts",
")",
"return",
"data",
"end"
] | DeleteCatalogObject
Deletes a single [CatalogObject](#type-catalogobject) based on the provided ID and returns the set of successfully deleted IDs in the response. Deletion is a cascading event such that all children of the targeted object are also deleted. For example, deleting a [CatalogItem](#type-catalogitem) will... | [
"DeleteCatalogObject",
"Deletes",
"a",
"single",
"[",
"CatalogObject",
"]",
"(",
"#type",
"-",
"catalogobject",
")",
"based",
"on",
"the",
"provided",
"ID",
"and",
"returns",
"the",
"set",
"of",
"successfully",
"deleted",
"IDs",
"in",
"the",
"response",
".",
... | 798eb9ded716f23b9f1518386f1c311a34bca8bf | https://github.com/square/connect-ruby-sdk/blob/798eb9ded716f23b9f1518386f1c311a34bca8bf/lib/square_connect/api/catalog_api.rb#L241-L244 | train | Delete a catalog object | [
30522,
13366,
3972,
12870,
1035,
12105,
1035,
4874,
1006,
4874,
1035,
8909,
1010,
23569,
2015,
1027,
1063,
1065,
1007,
2951,
1010,
1035,
3570,
1035,
3642,
1010,
1035,
20346,
2015,
1027,
3972,
12870,
1035,
12105,
1035,
4874,
1035,
2007,
1035... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
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_for_resource_group | def list_for_resource_group(resource_group_name, query_options:nil, custom_headers:nil)
first_page = list_for_resource_group_as_lazy(resource_group_name, query_options:query_options, custom_headers:custom_headers)
first_page.get_all_items
end | ruby | def list_for_resource_group(resource_group_name, query_options:nil, custom_headers:nil)
first_page = list_for_resource_group_as_lazy(resource_group_name, query_options:query_options, custom_headers:custom_headers)
first_page.get_all_items
end | [
"def",
"list_for_resource_group",
"(",
"resource_group_name",
",",
"query_options",
":",
"nil",
",",
"custom_headers",
":",
"nil",
")",
"first_page",
"=",
"list_for_resource_group_as_lazy",
"(",
"resource_group_name",
",",
"query_options",
":query_options",
",",
"custom_h... | Gets all remediations for the subscription.
@param resource_group_name [String] Resource group name.
@param query_options [QueryOptions] Additional parameters for the operation
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request.
@return [Array<Remediati... | [
"Gets",
"all",
"remediations",
"for",
"the",
"subscription",
"."
] | 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#L1375-L1378 | train | Gets all the segmentation products in a resource group. | [
30522,
13366,
2862,
1035,
2005,
1035,
7692,
1035,
2177,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
23032,
1035,
7047,
1024,
9152,
2140,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
2034,
1035,
3931,
1027,
2862,
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... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_network/lib/2017-03-30/generated/azure_mgmt_network/public_ipaddresses.rb | Azure::Network::Mgmt::V2017_03_30.PublicIPAddresses.list_virtual_machine_scale_set_vmpublic_ipaddresses | def list_virtual_machine_scale_set_vmpublic_ipaddresses(resource_group_name, virtual_machine_scale_set_name, virtualmachine_index, network_interface_name, ip_configuration_name, custom_headers:nil)
first_page = list_virtual_machine_scale_set_vmpublic_ipaddresses_as_lazy(resource_group_name, virtual_machine_scale_... | ruby | def list_virtual_machine_scale_set_vmpublic_ipaddresses(resource_group_name, virtual_machine_scale_set_name, virtualmachine_index, network_interface_name, ip_configuration_name, custom_headers:nil)
first_page = list_virtual_machine_scale_set_vmpublic_ipaddresses_as_lazy(resource_group_name, virtual_machine_scale_... | [
"def",
"list_virtual_machine_scale_set_vmpublic_ipaddresses",
"(",
"resource_group_name",
",",
"virtual_machine_scale_set_name",
",",
"virtualmachine_index",
",",
"network_interface_name",
",",
"ip_configuration_name",
",",
"custom_headers",
":",
"nil",
")",
"first_page",
"=",
... | Gets information about all public IP addresses in a virtual machine IP
configuration in a virtual machine scale set.
@param resource_group_name [String] The name of the resource group.
@param virtual_machine_scale_set_name [String] The name of the virtual
machine scale set.
@param virtualmachine_index [String] Th... | [
"Gets",
"information",
"about",
"all",
"public",
"IP",
"addresses",
"in",
"a",
"virtual",
"machine",
"IP",
"configuration",
"in",
"a",
"virtual",
"machine",
"scale",
"set",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_network/lib/2017-03-30/generated/azure_mgmt_network/public_ipaddresses.rb#L140-L143 | train | Gets all public IP addresses of a virtual machine. | [
30522,
13366,
2862,
1035,
7484,
1035,
3698,
1035,
4094,
1035,
2275,
1035,
1058,
8737,
12083,
10415,
1035,
25249,
16200,
11393,
2015,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
7484,
30524,
2275,
1035,
2171,
1010,
7484,
22911,
14014,
1035,
59... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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.remove_node_state | def remove_node_state(node_name, timeout:60, custom_headers:nil)
response = remove_node_state_async(node_name, timeout:timeout, custom_headers:custom_headers).value!
nil
end | ruby | def remove_node_state(node_name, timeout:60, custom_headers:nil)
response = remove_node_state_async(node_name, timeout:timeout, custom_headers:custom_headers).value!
nil
end | [
"def",
"remove_node_state",
"(",
"node_name",
",",
"timeout",
":",
"60",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"remove_node_state_async",
"(",
"node_name",
",",
"timeout",
":",
"timeout",
",",
"custom_headers",
":custom_headers",
")",
".",
"va... | Notifies Service Fabric that the persisted state on a node has been
permanently removed or lost.
Notifies Service Fabric that the persisted state on a node has been
permanently removed or lost. This implies that it is not possible to recover
the persisted state of that node. This generally happens if a hard disk ... | [
"Notifies",
"Service",
"Fabric",
"that",
"the",
"persisted",
"state",
"on",
"a",
"node",
"has",
"been",
"permanently",
"removed",
"or",
"lost",
"."
] | 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#L4414-L4417 | train | Remove the node state. | [
30522,
13366,
6366,
1035,
13045,
1035,
2110,
1006,
13045,
1035,
2171,
1010,
2051,
5833,
1024,
3438,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
6366,
1035,
13045,
1035,
2110,
1035,
2004,
6038,
2278,
1006,
13045,
1035,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
aws/aws-sdk-ruby | gems/aws-sdk-rds/lib/aws-sdk-rds/db_instance.rb | Aws::RDS.DBInstance.delete | def delete(options = {})
options = options.merge(db_instance_identifier: @id)
resp = @client.delete_db_instance(options)
DBInstance.new(
id: resp.data.db_instance.db_instance_identifier,
data: resp.data.db_instance,
client: @client
)
end | ruby | def delete(options = {})
options = options.merge(db_instance_identifier: @id)
resp = @client.delete_db_instance(options)
DBInstance.new(
id: resp.data.db_instance.db_instance_identifier,
data: resp.data.db_instance,
client: @client
)
end | [
"def",
"delete",
"(",
"options",
"=",
"{",
"}",
")",
"options",
"=",
"options",
".",
"merge",
"(",
"db_instance_identifier",
":",
"@id",
")",
"resp",
"=",
"@client",
".",
"delete_db_instance",
"(",
"options",
")",
"DBInstance",
".",
"new",
"(",
"id",
":"... | @example Request syntax with placeholder values
dbinstance = db_instance.delete({
skip_final_snapshot: false,
final_db_snapshot_identifier: "String",
delete_automated_backups: false,
})
@param [Hash] options ({})
@option options [Boolean] :skip_final_snapshot
A value that indicates whether a ... | [
"@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#L1825-L1833 | train | Delete the DB Instance | [
30522,
13366,
3972,
12870,
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,
3972,
12870,
1035,
16962,
1035,
601... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
projectcypress/health-data-standards | lib/hqmf-model/document.rb | HQMF.Document.backfill_patient_characteristics_with_codes | def backfill_patient_characteristics_with_codes(codes)
[].concat(self.all_data_criteria).concat(self.source_data_criteria).each do |data_criteria|
if (data_criteria.type == :characteristic and !data_criteria.property.nil?)
if (codes)
value_set = codes[data_criteria.code_list_i... | ruby | def backfill_patient_characteristics_with_codes(codes)
[].concat(self.all_data_criteria).concat(self.source_data_criteria).each do |data_criteria|
if (data_criteria.type == :characteristic and !data_criteria.property.nil?)
if (codes)
value_set = codes[data_criteria.code_list_i... | [
"def",
"backfill_patient_characteristics_with_codes",
"(",
"codes",
")",
"[",
"]",
".",
"concat",
"(",
"self",
".",
"all_data_criteria",
")",
".",
"concat",
"(",
"self",
".",
"source_data_criteria",
")",
".",
"each",
"do",
"|",
"data_criteria",
"|",
"if",
"(",... | patient characteristics data criteria such as GENDER require looking at the codes to determine if the
measure is interested in Males or Females. This process is awkward, and thus is done as a separate
step after the document has been converted. | [
"patient",
"characteristics",
"data",
"criteria",
"such",
"as",
"GENDER",
"require",
"looking",
"at",
"the",
"codes",
"to",
"determine",
"if",
"the",
"measure",
"is",
"interested",
"in",
"Males",
"or",
"Females",
".",
"This",
"process",
"is",
"awkward",
"and",... | 252d4f0927c513eacde6b9ea41b76faa1423c34b | https://github.com/projectcypress/health-data-standards/blob/252d4f0927c513eacde6b9ea41b76faa1423c34b/lib/hqmf-model/document.rb#L197-L236 | train | Backfill patient characteristics with codes | [
30522,
13366,
2067,
8873,
3363,
1035,
5776,
1035,
6459,
1035,
2007,
1035,
9537,
1006,
9537,
1007,
1031,
1033,
1012,
9530,
11266,
1006,
2969,
1012,
2035,
1035,
2951,
1035,
9181,
1007,
1012,
9530,
11266,
1006,
2969,
1012,
3120,
1035,
2951,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | data/azure_cognitiveservices_contentmoderator/lib/1.0/generated/azure_cognitiveservices_contentmoderator/list_management_term_lists.rb | Azure::CognitiveServices::ContentModerator::V1_0.ListManagementTermLists.get_all_term_lists | def get_all_term_lists(custom_headers:nil)
response = get_all_term_lists_async(custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def get_all_term_lists(custom_headers:nil)
response = get_all_term_lists_async(custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"get_all_term_lists",
"(",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"get_all_term_lists_async",
"(",
"custom_headers",
":custom_headers",
")",
".",
"value!",
"response",
".",
"body",
"unless",
"response",
".",
"nil?",
"end"
] | gets all the Term Lists
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request.
@return [Array] operation results. | [
"gets",
"all",
"the",
"Term",
"Lists"
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_cognitiveservices_contentmoderator/lib/1.0/generated/azure_cognitiveservices_contentmoderator/list_management_term_lists.rb#L427-L430 | train | Gets all term lists. | [
30522,
13366,
2131,
1035,
2035,
1035,
2744,
1035,
7201,
1006,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
2131,
1035,
2035,
1035,
2744,
1035,
7201,
1035,
2004,
6038,
2278,
1006,
7661,
1035,
20346,
2015,
1024,
7661,
1035,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | data/azure_cognitiveservices_contentmoderator/lib/1.0/generated/azure_cognitiveservices_contentmoderator/text_moderation.rb | Azure::CognitiveServices::ContentModerator::V1_0.TextModeration.detect_language | def detect_language(text_content_type, text_content, custom_headers:nil)
response = detect_language_async(text_content_type, text_content, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def detect_language(text_content_type, text_content, custom_headers:nil)
response = detect_language_async(text_content_type, text_content, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"detect_language",
"(",
"text_content_type",
",",
"text_content",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"detect_language_async",
"(",
"text_content_type",
",",
"text_content",
",",
"custom_headers",
":custom_headers",
")",
".",
"value!",
"res... | This operation will detect the language of given input content. Returns the
<a href="http://www-01.sil.org/iso639-3/codes.asp">ISO 639-3 code</a> for the
predominant language comprising the submitted text. Over 110 languages
supported.
@param text_content_type [Enum] The content type. Possible values include:
'te... | [
"This",
"operation",
"will",
"detect",
"the",
"language",
"of",
"given",
"input",
"content",
".",
"Returns",
"the",
"<a",
"href",
"=",
"http",
":",
"//",
"www",
"-",
"01",
".",
"sil",
".",
"org",
"/",
"iso639",
"-",
"3",
"/",
"codes",
".",
"asp",
"... | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/data/azure_cognitiveservices_contentmoderator/lib/1.0/generated/azure_cognitiveservices_contentmoderator/text_moderation.rb#L180-L183 | train | Detects language. | [
30522,
13366,
11487,
1035,
2653,
1006,
3793,
1035,
4180,
1035,
2828,
1010,
3793,
1035,
4180,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
11487,
1035,
2653,
1035,
2004,
6038,
2278,
1006,
3793,
1035,
4180,
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... |
github-changelog-generator/github-changelog-generator | lib/github_changelog_generator/generator/generator_tags.rb | GitHubChangelogGenerator.Generator.fetch_and_filter_tags | def fetch_and_filter_tags
since_tag
due_tag
all_tags = @fetcher.get_all_tags
fetch_tags_dates(all_tags) # Creates a Hash @tag_times_hash
all_sorted_tags = sort_tags_by_date(all_tags)
@sorted_tags = filter_excluded_tags(all_sorted_tags)
@filtered_tags = get_filtered_tags(@so... | ruby | def fetch_and_filter_tags
since_tag
due_tag
all_tags = @fetcher.get_all_tags
fetch_tags_dates(all_tags) # Creates a Hash @tag_times_hash
all_sorted_tags = sort_tags_by_date(all_tags)
@sorted_tags = filter_excluded_tags(all_sorted_tags)
@filtered_tags = get_filtered_tags(@so... | [
"def",
"fetch_and_filter_tags",
"since_tag",
"due_tag",
"all_tags",
"=",
"@fetcher",
".",
"get_all_tags",
"fetch_tags_dates",
"(",
"all_tags",
")",
"# Creates a Hash @tag_times_hash",
"all_sorted_tags",
"=",
"sort_tags_by_date",
"(",
"all_tags",
")",
"@sorted_tags",
"=",
... | fetch, filter tags, fetch dates and sort them in time order | [
"fetch",
"filter",
"tags",
"fetch",
"dates",
"and",
"sort",
"them",
"in",
"time",
"order"
] | f18c64b5cc0d7473b059275b88385ac11ca8b564 | https://github.com/github-changelog-generator/github-changelog-generator/blob/f18c64b5cc0d7473b059275b88385ac11ca8b564/lib/github_changelog_generator/generator/generator_tags.rb#L6-L25 | train | Fetch and filter all tags and create a hash of the necessary data structures. | [
30522,
13366,
18584,
1035,
1998,
1035,
11307,
1035,
22073,
2144,
1035,
30524,
1035,
22073,
1007,
1001,
9005,
1037,
23325,
1030,
6415,
1035,
2335,
1035,
23325,
2035,
1035,
19616,
1035,
22073,
1027,
4066,
1035,
22073,
1035,
2011,
1035,
3058,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/2015-05-01-preview/generated/azure_mgmt_network/network_interfaces.rb | Azure::Network::Mgmt::V2015_05_01_preview.NetworkInterfaces.get_virtual_machine_scale_set_network_interface | def get_virtual_machine_scale_set_network_interface(resource_group_name, virtual_machine_scale_set_name, virtualmachine_index, network_interface_name, custom_headers:nil)
response = get_virtual_machine_scale_set_network_interface_async(resource_group_name, virtual_machine_scale_set_name, virtualmachine_index, net... | ruby | def get_virtual_machine_scale_set_network_interface(resource_group_name, virtual_machine_scale_set_name, virtualmachine_index, network_interface_name, custom_headers:nil)
response = get_virtual_machine_scale_set_network_interface_async(resource_group_name, virtual_machine_scale_set_name, virtualmachine_index, net... | [
"def",
"get_virtual_machine_scale_set_network_interface",
"(",
"resource_group_name",
",",
"virtual_machine_scale_set_name",
",",
"virtualmachine_index",
",",
"network_interface_name",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"get_virtual_machine_scale_set_network_i... | The Get network interface operation retrieves information about the specified
network interface in a virtual machine scale set.
@param resource_group_name [String] The name of the resource group.
@param virtual_machine_scale_set_name [String] The name of the virtual
machine scale set.
@param virtualmachine_index ... | [
"The",
"Get",
"network",
"interface",
"operation",
"retrieves",
"information",
"about",
"the",
"specified",
"network",
"interface",
"in",
"a",
"virtual",
"machine",
"scale",
"set",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_network/lib/2015-05-01-preview/generated/azure_mgmt_network/network_interfaces.rb#L417-L420 | train | Gets the specified network interface in a virtual machine scale set. | [
30522,
13366,
2131,
1035,
7484,
1035,
3698,
1035,
4094,
1035,
2275,
1035,
2897,
1035,
8278,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
7484,
1035,
3698,
1035,
4094,
1035,
2275,
1035,
2171,
1010,
7484,
22911,
14014,
1035,
5950,
1010,
2897,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
rails/rails | activemodel/lib/active_model/errors.rb | ActiveModel.Errors.of_kind? | def of_kind?(attribute, message = :invalid)
attribute, message = normalize_arguments(attribute, message)
if message.is_a? Symbol
!where(attribute, message).empty?
else
messages_for(attribute).include?(message)
end
end | ruby | def of_kind?(attribute, message = :invalid)
attribute, message = normalize_arguments(attribute, message)
if message.is_a? Symbol
!where(attribute, message).empty?
else
messages_for(attribute).include?(message)
end
end | [
"def",
"of_kind?",
"(",
"attribute",
",",
"message",
"=",
":invalid",
")",
"attribute",
",",
"message",
"=",
"normalize_arguments",
"(",
"attribute",
",",
"message",
")",
"if",
"message",
".",
"is_a?",
"Symbol",
"!",
"where",
"(",
"attribute",
",",
"message"... | Returns +true+ if an error on the attribute with the given message is
present, or +false+ otherwise. +message+ is treated the same as for +add+.
person.errors.add :age
person.errors.add :name, :too_long, { count: 25 }
person.errors.of_kind? :age # => true
person.... | [
"Returns",
"+",
"true",
"+",
"if",
"an",
"error",
"on",
"the",
"attribute",
"with",
"the",
"given",
"message",
"is",
"present",
"or",
"+",
"false",
"+",
"otherwise",
".",
"+",
"message",
"+",
"is",
"treated",
"the",
"same",
"as",
"for",
"+",
"add",
"... | 85a8bc644be69908f05740a5886ec19cd3679df5 | https://github.com/rails/rails/blob/85a8bc644be69908f05740a5886ec19cd3679df5/activemodel/lib/active_model/errors.rb#L424-L432 | train | Returns true if the given attribute is of the given kind. | [
30522,
13366,
1997,
1035,
2785,
1029,
1006,
17961,
1010,
4471,
1027,
1024,
19528,
1007,
17961,
1010,
30524,
4471,
1007,
2065,
4471,
1012,
2003,
1035,
1037,
1029,
6454,
999,
2073,
1006,
17961,
1010,
4471,
1007,
1012,
4064,
1029,
2842,
7696,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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_stream_analytics/lib/2016-03-01/generated/azure_mgmt_stream_analytics/transformations.rb | Azure::StreamAnalytics::Mgmt::V2016_03_01.Transformations.update | def update(transformation, resource_group_name, job_name, transformation_name, if_match:nil, custom_headers:nil)
response = update_async(transformation, resource_group_name, job_name, transformation_name, if_match:if_match, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def update(transformation, resource_group_name, job_name, transformation_name, if_match:nil, custom_headers:nil)
response = update_async(transformation, resource_group_name, job_name, transformation_name, if_match:if_match, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"update",
"(",
"transformation",
",",
"resource_group_name",
",",
"job_name",
",",
"transformation_name",
",",
"if_match",
":",
"nil",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"update_async",
"(",
"transformation",
",",
"resource_group_name",
... | Updates an existing transformation under an existing streaming job. This can
be used to partially update (ie. update one or two properties) a
transformation without affecting the rest the job or transformation
definition.
@param transformation [Transformation] A Transformation object. The
properties specified her... | [
"Updates",
"an",
"existing",
"transformation",
"under",
"an",
"existing",
"streaming",
"job",
".",
"This",
"can",
"be",
"used",
"to",
"partially",
"update",
"(",
"ie",
".",
"update",
"one",
"or",
"two",
"properties",
")",
"a",
"transformation",
"without",
"a... | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_stream_analytics/lib/2016-03-01/generated/azure_mgmt_stream_analytics/transformations.rb#L201-L204 | train | Updates a transformation. | [
30522,
13366,
10651,
1006,
8651,
1010,
7692,
1035,
2177,
1035,
2171,
1010,
3105,
1035,
2171,
1010,
8651,
1035,
2171,
1010,
2065,
1035,
2674,
1024,
9152,
2140,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
10651,
1035,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
ruby/rake | lib/rake/task_manager.rb | Rake.TaskManager.attempt_rule | def attempt_rule(task_name, task_pattern, args, extensions, block, level)
sources = make_sources(task_name, task_pattern, extensions)
prereqs = sources.map { |source|
trace_rule level, "Attempting Rule #{task_name} => #{source}"
if File.exist?(source) || Rake::Task.task_defined?(source)
... | ruby | def attempt_rule(task_name, task_pattern, args, extensions, block, level)
sources = make_sources(task_name, task_pattern, extensions)
prereqs = sources.map { |source|
trace_rule level, "Attempting Rule #{task_name} => #{source}"
if File.exist?(source) || Rake::Task.task_defined?(source)
... | [
"def",
"attempt_rule",
"(",
"task_name",
",",
"task_pattern",
",",
"args",
",",
"extensions",
",",
"block",
",",
"level",
")",
"sources",
"=",
"make_sources",
"(",
"task_name",
",",
"task_pattern",
",",
"extensions",
")",
"prereqs",
"=",
"sources",
".",
"map... | Attempt to create a rule given the list of prerequisites. | [
"Attempt",
"to",
"create",
"a",
"rule",
"given",
"the",
"list",
"of",
"prerequisites",
"."
] | 1c22b490ee6cb8bd614fa8d0d6145f671466206b | https://github.com/ruby/rake/blob/1c22b490ee6cb8bd614fa8d0d6145f671466206b/lib/rake/task_manager.rb#L264-L282 | train | Attempt a rule | [
30522,
13366,
3535,
1035,
3627,
1006,
4708,
1035,
2171,
1010,
4708,
1035,
5418,
1010,
12098,
5620,
1010,
14305,
1010,
3796,
1010,
2504,
1007,
4216,
1027,
2191,
1035,
4216,
1006,
4708,
1035,
2171,
1010,
4708,
1035,
5418,
1010,
14305,
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_instance_metric_definitions_next | def list_worker_pool_instance_metric_definitions_next(next_page_link, custom_headers:nil)
response = list_worker_pool_instance_metric_definitions_next_async(next_page_link, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def list_worker_pool_instance_metric_definitions_next(next_page_link, custom_headers:nil)
response = list_worker_pool_instance_metric_definitions_next_async(next_page_link, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"list_worker_pool_instance_metric_definitions_next",
"(",
"next_page_link",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"list_worker_pool_instance_metric_definitions_next_async",
"(",
"next_page_link",
",",
"custom_headers",
":custom_headers",
")",
".",
"val... | 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 next_page_link [String] The NextLink from the previous successful call
to List operation.
@param custom_headers [Ha... | [
"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#L6556-L6559 | train | Gets the metric definitions for a worker pool. | [
30522,
13366,
2862,
1035,
7309,
1035,
4770,
1035,
6013,
1035,
12046,
1035,
15182,
1035,
2279,
1006,
2279,
1035,
3931,
1035,
4957,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
2862,
1035,
7309,
1035,
4770,
1035,
6013,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
sporkmonger/addressable | lib/addressable/uri.rb | Addressable.URI.request_uri= | def request_uri=(new_request_uri)
if !new_request_uri.respond_to?(:to_str)
raise TypeError, "Can't convert #{new_request_uri.class} into String."
end
if self.absolute? && self.scheme !~ /^https?$/i
raise InvalidURIError,
"Cannot set an HTTP request URI for a non-HTTP URI."
... | ruby | def request_uri=(new_request_uri)
if !new_request_uri.respond_to?(:to_str)
raise TypeError, "Can't convert #{new_request_uri.class} into String."
end
if self.absolute? && self.scheme !~ /^https?$/i
raise InvalidURIError,
"Cannot set an HTTP request URI for a non-HTTP URI."
... | [
"def",
"request_uri",
"=",
"(",
"new_request_uri",
")",
"if",
"!",
"new_request_uri",
".",
"respond_to?",
"(",
":to_str",
")",
"raise",
"TypeError",
",",
"\"Can't convert #{new_request_uri.class} into String.\"",
"end",
"if",
"self",
".",
"absolute?",
"&&",
"self",
... | Sets the HTTP request URI for this URI.
@param [String, #to_str] new_request_uri The new HTTP request URI. | [
"Sets",
"the",
"HTTP",
"request",
"URI",
"for",
"this",
"URI",
"."
] | 5894c95a7768435cb46d1355954611dbd194832e | https://github.com/sporkmonger/addressable/blob/5894c95a7768435cb46d1355954611dbd194832e/lib/addressable/uri.rb#L1756-L1774 | train | Set the request URI. | [
30522,
13366,
5227,
1035,
24471,
2072,
1027,
1006,
2047,
1035,
5227,
1035,
24471,
2072,
1007,
2065,
999,
2047,
1035,
5227,
1035,
24471,
2072,
1012,
6869,
1035,
2000,
1029,
1006,
1024,
2000,
1035,
2358,
2099,
1007,
5333,
2828,
2121,
29165,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_compute/lib/2017-03-30/generated/azure_mgmt_compute/disks.rb | Azure::Compute::Mgmt::V2017_03_30.Disks.revoke_access | def revoke_access(resource_group_name, disk_name, custom_headers:nil)
response = revoke_access_async(resource_group_name, disk_name, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def revoke_access(resource_group_name, disk_name, custom_headers:nil)
response = revoke_access_async(resource_group_name, disk_name, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"revoke_access",
"(",
"resource_group_name",
",",
"disk_name",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"revoke_access_async",
"(",
"resource_group_name",
",",
"disk_name",
",",
"custom_headers",
":custom_headers",
")",
".",
"value!",
"response"... | Revokes access to a disk.
@param resource_group_name [String] The name of the resource group.
@param disk_name [String] The name of the managed disk that is being created.
The name can't be changed after the disk is created. Supported characters for
the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 c... | [
"Revokes",
"access",
"to",
"a",
"disk",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_compute/lib/2017-03-30/generated/azure_mgmt_compute/disks.rb#L502-L505 | train | Revoke access to a disk. | [
30522,
13366,
7065,
11045,
1035,
3229,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
9785,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
7065,
11045,
1035,
3229,
1035,
2004,
6038,
2278,
1006,
7692,
1035,
2177,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
aws/aws-sdk-ruby | gems/aws-sdk-s3/lib/aws-sdk-s3/client.rb | Aws::S3.Client.select_object_content | def select_object_content(params = {}, options = {}, &block)
params = params.dup
event_stream_handler = case handler = params.delete(:event_stream_handler)
when EventStreams::SelectObjectContentEventStream then handler
when Proc then EventStreams::SelectObjectContentEventStream.new.tap(&hand... | ruby | def select_object_content(params = {}, options = {}, &block)
params = params.dup
event_stream_handler = case handler = params.delete(:event_stream_handler)
when EventStreams::SelectObjectContentEventStream then handler
when Proc then EventStreams::SelectObjectContentEventStream.new.tap(&hand... | [
"def",
"select_object_content",
"(",
"params",
"=",
"{",
"}",
",",
"options",
"=",
"{",
"}",
",",
"&",
"block",
")",
"params",
"=",
"params",
".",
"dup",
"event_stream_handler",
"=",
"case",
"handler",
"=",
"params",
".",
"delete",
"(",
":event_stream_hand... | This operation filters the contents of an Amazon S3 object based on a
simple Structured Query Language (SQL) statement. In the request,
along with the SQL expression, you must also specify a data
serialization format (JSON or CSV) of the object. Amazon S3 uses this
to parse object data into records, and returns onl... | [
"This",
"operation",
"filters",
"the",
"contents",
"of",
"an",
"Amazon",
"S3",
"object",
"based",
"on",
"a",
"simple",
"Structured",
"Query",
"Language",
"(",
"SQL",
")",
"statement",
".",
"In",
"the",
"request",
"along",
"with",
"the",
"SQL",
"expression",
... | e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d | https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-s3/lib/aws-sdk-s3/client.rb#L6717-L6738 | train | Select object content | [
30522,
13366,
7276,
1035,
4874,
1035,
4180,
1006,
11498,
5244,
1027,
1063,
1065,
1010,
7047,
1027,
1063,
1065,
1010,
1004,
3796,
1007,
11498,
5244,
1027,
11498,
5244,
1012,
4241,
2361,
2724,
1035,
5460,
1035,
28213,
1027,
2553,
28213,
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_network/lib/2018-07-01/generated/azure_mgmt_network/public_ipprefixes.rb | Azure::Network::Mgmt::V2018_07_01.PublicIPPrefixes.get_with_http_info | def get_with_http_info(resource_group_name, public_ip_prefix_name, expand:nil, custom_headers:nil)
get_async(resource_group_name, public_ip_prefix_name, expand:expand, custom_headers:custom_headers).value!
end | ruby | def get_with_http_info(resource_group_name, public_ip_prefix_name, expand:nil, custom_headers:nil)
get_async(resource_group_name, public_ip_prefix_name, expand:expand, custom_headers:custom_headers).value!
end | [
"def",
"get_with_http_info",
"(",
"resource_group_name",
",",
"public_ip_prefix_name",
",",
"expand",
":",
"nil",
",",
"custom_headers",
":",
"nil",
")",
"get_async",
"(",
"resource_group_name",
",",
"public_ip_prefix_name",
",",
"expand",
":",
"expand",
",",
"custo... | Gets the specified public IP prefix in a specified resource group.
@param resource_group_name [String] The name of the resource group.
@param public_ip_prefix_name [String] The name of the Public IP Prefix.
@param expand [String] Expands referenced resources.
@param custom_headers [Hash{String => String}] A hash o... | [
"Gets",
"the",
"specified",
"public",
"IP",
"prefix",
"in",
"a",
"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/public_ipprefixes.rb#L89-L91 | train | Gets the specified public IP prefix. | [
30522,
13366,
2131,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
2270,
1035,
12997,
1035,
17576,
1035,
2171,
1010,
7818,
1024,
9152,
2140,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
2131,
1035,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
fastlane/fastlane | fastlane_core/lib/fastlane_core/configuration/configuration.rb | FastlaneCore.Configuration.values | def values(ask: true)
# As the user accesses all values, we need to iterate through them to receive all the values
@available_options.each do |option|
@values[option.key] = fetch(option.key, ask: ask) unless @values[option.key]
end
@values
end | ruby | def values(ask: true)
# As the user accesses all values, we need to iterate through them to receive all the values
@available_options.each do |option|
@values[option.key] = fetch(option.key, ask: ask) unless @values[option.key]
end
@values
end | [
"def",
"values",
"(",
"ask",
":",
"true",
")",
"# As the user accesses all values, we need to iterate through them to receive all the values",
"@available_options",
".",
"each",
"do",
"|",
"option",
"|",
"@values",
"[",
"option",
".",
"key",
"]",
"=",
"fetch",
"(",
"o... | see fetch | [
"see",
"fetch"
] | 457c5d647c77f0e078dafa5129da616914e002c5 | https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/fastlane_core/lib/fastlane_core/configuration/configuration.rb#L281-L287 | train | Get all the values for this object | [
30522,
13366,
5300,
1006,
3198,
1024,
2995,
1007,
1001,
2004,
1996,
5310,
3229,
2229,
2035,
5300,
1010,
2057,
2342,
2000,
2009,
22139,
2083,
2068,
2000,
4374,
2035,
1996,
5300,
1030,
2800,
1035,
7047,
1012,
2169,
2079,
1064,
5724,
1064,
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 | data/azure_cognitiveservices_luisauthoring/lib/2.0/generated/azure_cognitiveservices_luisauthoring/model.rb | Azure::CognitiveServices::LuisAuthoring::V2_0.Model.delete_hierarchical_entity_role | def delete_hierarchical_entity_role(app_id, version_id, h_entity_id, role_id, custom_headers:nil)
response = delete_hierarchical_entity_role_async(app_id, version_id, h_entity_id, role_id, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def delete_hierarchical_entity_role(app_id, version_id, h_entity_id, role_id, custom_headers:nil)
response = delete_hierarchical_entity_role_async(app_id, version_id, h_entity_id, role_id, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"delete_hierarchical_entity_role",
"(",
"app_id",
",",
"version_id",
",",
"h_entity_id",
",",
"role_id",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"delete_hierarchical_entity_role_async",
"(",
"app_id",
",",
"version_id",
",",
"h_entity_id",
",",... | Delete a role for a given hierarchical role in a version of the application.
@param app_id The application ID.
@param version_id [String] The version ID.
@param h_entity_id The hierarchical entity extractor ID.
@param role_id The entity role Id.
@param custom_headers [Hash{String => String}] A hash of custom head... | [
"Delete",
"a",
"role",
"for",
"a",
"given",
"hierarchical",
"role",
"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#L10868-L10871 | train | Deletes a role from a hierarchical entity. | [
30522,
13366,
3972,
12870,
1035,
25835,
1035,
9178,
1035,
2535,
1006,
10439,
1035,
8909,
1010,
2544,
1035,
8909,
1010,
1044,
1035,
9178,
1035,
8909,
1010,
2535,
1035,
8909,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
geokit/geokit | lib/geokit/mappable.rb | Geokit.Mappable.to_lat_lng | def to_lat_lng
if instance_of?(Geokit::LatLng) || instance_of?(Geokit::GeoLoc)
return self
end
lat = send(self.class.lat_column_name)
lng = send(self.class.lng_column_name)
LatLng.new(lat, lng)
end | ruby | def to_lat_lng
if instance_of?(Geokit::LatLng) || instance_of?(Geokit::GeoLoc)
return self
end
lat = send(self.class.lat_column_name)
lng = send(self.class.lng_column_name)
LatLng.new(lat, lng)
end | [
"def",
"to_lat_lng",
"if",
"instance_of?",
"(",
"Geokit",
"::",
"LatLng",
")",
"||",
"instance_of?",
"(",
"Geokit",
"::",
"GeoLoc",
")",
"return",
"self",
"end",
"lat",
"=",
"send",
"(",
"self",
".",
"class",
".",
"lat_column_name",
")",
"lng",
"=",
"sen... | -----------------------------------------------------------------------------------------------
Instance methods below here
-----------------------------------------------------------------------------------------------
Extracts a LatLng instance. Use with models that are acts_as_mappable | [
"-----------------------------------------------------------------------------------------------",
"Instance",
"methods",
"below",
"here",
"-----------------------------------------------------------------------------------------------",
"Extracts",
"a",
"LatLng",
"instance",
".",
"Use",
"wi... | b7c13376bd85bf14f9534228ea466d09ac0afbf4 | https://github.com/geokit/geokit/blob/b7c13376bd85bf14f9534228ea466d09ac0afbf4/lib/geokit/mappable.rb#L206-L213 | train | Convert the object to a LatLng or LatLoc object. | [
30522,
13366,
2000,
1035,
2474,
2102,
1035,
1048,
3070,
2065,
6013,
1035,
1997,
1029,
1006,
20248,
23615,
1024,
1024,
2474,
19646,
3070,
1007,
1064,
1064,
6013,
1035,
1997,
1029,
1006,
20248,
23615,
1024,
1024,
20248,
4135,
2278,
1007,
2709... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/parser.rb | CombinePDF.PDFParser.catalog_pages | def catalog_pages(catalogs = nil, inheritance_hash = {})
unless catalogs
if root_object[:Root]
catalogs = root_object[:Root][:referenced_object] || root_object[:Root]
else
catalogs = (@parsed.select { |obj| obj[:Type] == :Catalog }).last
end
@parsed.delete_if ... | ruby | def catalog_pages(catalogs = nil, inheritance_hash = {})
unless catalogs
if root_object[:Root]
catalogs = root_object[:Root][:referenced_object] || root_object[:Root]
else
catalogs = (@parsed.select { |obj| obj[:Type] == :Catalog }).last
end
@parsed.delete_if ... | [
"def",
"catalog_pages",
"(",
"catalogs",
"=",
"nil",
",",
"inheritance_hash",
"=",
"{",
"}",
")",
"unless",
"catalogs",
"if",
"root_object",
"[",
":Root",
"]",
"catalogs",
"=",
"root_object",
"[",
":Root",
"]",
"[",
":referenced_object",
"]",
"||",
"root_obj... | resets cataloging and pages | [
"resets",
"cataloging",
"and",
"pages"
] | 09054051019c069f551f3e60be789577c0f93900 | https://github.com/boazsegev/combine_pdf/blob/09054051019c069f551f3e60be789577c0f93900/lib/combine_pdf/parser.rb#L493-L586 | train | This method is used to extract pages from a catalog | [
30522,
13366,
12105,
1035,
5530,
1006,
12105,
2015,
1027,
9152,
2140,
1010,
12839,
1035,
23325,
1027,
1063,
1065,
1007,
4983,
12105,
2015,
2065,
7117,
1035,
4874,
1031,
1024,
7117,
1033,
12105,
2015,
1027,
7117,
1035,
4874,
1031,
1024,
7117... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
randym/axlsx | lib/axlsx/workbook/worksheet/cell.rb | Axlsx.Cell.cast_value | def cast_value(v)
return v if v.is_a?(RichText) || v.nil?
case type
when :date
self.style = STYLE_DATE if self.style == 0
v
when :time
self.style = STYLE_DATE if self.style == 0
if !v.is_a?(Time) && v.respond_to?(:to_time)
v.to_time
else
... | ruby | def cast_value(v)
return v if v.is_a?(RichText) || v.nil?
case type
when :date
self.style = STYLE_DATE if self.style == 0
v
when :time
self.style = STYLE_DATE if self.style == 0
if !v.is_a?(Time) && v.respond_to?(:to_time)
v.to_time
else
... | [
"def",
"cast_value",
"(",
"v",
")",
"return",
"v",
"if",
"v",
".",
"is_a?",
"(",
"RichText",
")",
"||",
"v",
".",
"nil?",
"case",
"type",
"when",
":date",
"self",
".",
"style",
"=",
"STYLE_DATE",
"if",
"self",
".",
"style",
"==",
"0",
"v",
"when",
... | Cast the value into this cells data type.
@note
About Time - Time in OOXML is *different* from what you might expect. The history as to why is interesting, but you can safely assume that if you are generating docs on a mac, you will want to specify Workbook.1904 as true when using time typed values.
@see Axlsx#dat... | [
"Cast",
"the",
"value",
"into",
"this",
"cells",
"data",
"type",
"."
] | c593a08b2a929dac7aa8dc418b55e26b4c49dc34 | https://github.com/randym/axlsx/blob/c593a08b2a929dac7aa8dc418b55e26b4c49dc34/lib/axlsx/workbook/worksheet/cell.rb#L450-L475 | train | Casts the value to the correct type. | [
30522,
13366,
3459,
1035,
3643,
1006,
1058,
1007,
2709,
1058,
2065,
1058,
1012,
2003,
1035,
1037,
1029,
1006,
4138,
18209,
1007,
1064,
1064,
1058,
1012,
9152,
2140,
1029,
2553,
2828,
2043,
1024,
3058,
2969,
1012,
2806,
1027,
2806,
1035,
3... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
RailsEventStore/rails_event_store | ruby_event_store/lib/ruby_event_store/client.rb | RubyEventStore.Client.append | def append(events, stream_name: GLOBAL_STREAM, expected_version: :any)
serialized_events = serialize_events(enrich_events_metadata(events))
append_to_stream_serialized_events(serialized_events, stream_name: stream_name, expected_version: expected_version)
self
end | ruby | def append(events, stream_name: GLOBAL_STREAM, expected_version: :any)
serialized_events = serialize_events(enrich_events_metadata(events))
append_to_stream_serialized_events(serialized_events, stream_name: stream_name, expected_version: expected_version)
self
end | [
"def",
"append",
"(",
"events",
",",
"stream_name",
":",
"GLOBAL_STREAM",
",",
"expected_version",
":",
":any",
")",
"serialized_events",
"=",
"serialize_events",
"(",
"enrich_events_metadata",
"(",
"events",
")",
")",
"append_to_stream_serialized_events",
"(",
"seria... | Persists new event(s) without notifying any subscribed handlers
@param (see #publish)
@return [self] | [
"Persists",
"new",
"event",
"(",
"s",
")",
"without",
"notifying",
"any",
"subscribed",
"handlers"
] | 3ee4f3148499794154ee6fec74ccf6d4670d85ac | https://github.com/RailsEventStore/rails_event_store/blob/3ee4f3148499794154ee6fec74ccf6d4670d85ac/ruby_event_store/lib/ruby_event_store/client.rb#L44-L48 | train | Append the given events to the stream. | [
30522,
13366,
10439,
10497,
1006,
2824,
1010,
5460,
1035,
2171,
1024,
3795,
1035,
5460,
1010,
3517,
1035,
2544,
1024,
1024,
2151,
1007,
27289,
1035,
2824,
1027,
7642,
4697,
1035,
2824,
1006,
4372,
13149,
1035,
2824,
1035,
27425,
1006,
2824,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
watir/watir | lib/watir/elements/iframe.rb | Watir.IFrame.execute_script | def execute_script(script, *args)
args.map! do |e|
e.is_a?(Element) ? e.wait_until(&:exists?).wd : e
end
returned = driver.execute_script(script, *args)
browser.wrap_elements_in(self, returned)
end | ruby | def execute_script(script, *args)
args.map! do |e|
e.is_a?(Element) ? e.wait_until(&:exists?).wd : e
end
returned = driver.execute_script(script, *args)
browser.wrap_elements_in(self, returned)
end | [
"def",
"execute_script",
"(",
"script",
",",
"*",
"args",
")",
"args",
".",
"map!",
"do",
"|",
"e",
"|",
"e",
".",
"is_a?",
"(",
"Element",
")",
"?",
"e",
".",
"wait_until",
"(",
":exists?",
")",
".",
"wd",
":",
"e",
"end",
"returned",
"=",
"driv... | Executes JavaScript snippet in context of frame.
@see Watir::Browser#execute_script | [
"Executes",
"JavaScript",
"snippet",
"in",
"context",
"of",
"frame",
"."
] | 2d8db09811c6221ae401b85b2f61f5fa66e463a3 | https://github.com/watir/watir/blob/2d8db09811c6221ae401b85b2f61f5fa66e463a3/lib/watir/elements/iframe.rb#L47-L54 | train | Execute a script | [
30522,
13366,
15389,
1035,
5896,
1006,
5896,
1010,
1008,
12098,
5620,
1007,
12098,
5620,
1012,
4949,
999,
2079,
1064,
1041,
1064,
1041,
1012,
2003,
1035,
1037,
1029,
1006,
5783,
1007,
1029,
1041,
1012,
3524,
1035,
2127,
1006,
1004,
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... |
rubocop-hq/rubocop | lib/rubocop/result_cache.rb | RuboCop.ResultCache.relevant_options_digest | def relevant_options_digest(options)
options = options.reject { |key, _| NON_CHANGING.include?(key) }
options = options.to_s.gsub(/[^a-z]+/i, '_')
# We must avoid making file names too long for some filesystems to handle
# If they are short, we can leave them human-readable
options.length ... | ruby | def relevant_options_digest(options)
options = options.reject { |key, _| NON_CHANGING.include?(key) }
options = options.to_s.gsub(/[^a-z]+/i, '_')
# We must avoid making file names too long for some filesystems to handle
# If they are short, we can leave them human-readable
options.length ... | [
"def",
"relevant_options_digest",
"(",
"options",
")",
"options",
"=",
"options",
".",
"reject",
"{",
"|",
"key",
",",
"_",
"|",
"NON_CHANGING",
".",
"include?",
"(",
"key",
")",
"}",
"options",
"=",
"options",
".",
"to_s",
".",
"gsub",
"(",
"/",
"/i",... | Return a hash of the options given at invocation, minus the ones that have
no effect on which offenses and disabled line ranges are found, and thus
don't affect caching. | [
"Return",
"a",
"hash",
"of",
"the",
"options",
"given",
"at",
"invocation",
"minus",
"the",
"ones",
"that",
"have",
"no",
"effect",
"on",
"which",
"offenses",
"and",
"disabled",
"line",
"ranges",
"are",
"found",
"and",
"thus",
"don",
"t",
"affect",
"cachin... | 2a4f4f0fdac4e1bb25891fc312af2ea60c6aa2f0 | https://github.com/rubocop-hq/rubocop/blob/2a4f4f0fdac4e1bb25891fc312af2ea60c6aa2f0/lib/rubocop/result_cache.rb#L183-L189 | train | Returns the digest of the options | [
30522,
13366,
7882,
1035,
7047,
1035,
17886,
1006,
7047,
1007,
7047,
1027,
7047,
1012,
15454,
1063,
1064,
3145,
1010,
1035,
1064,
2512,
1035,
5278,
1012,
2421,
1029,
1006,
3145,
1007,
1065,
7047,
1027,
7047,
1012,
2000,
1035,
1055,
1012,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_compute/lib/2018-04-01/generated/azure_mgmt_compute/snapshots.rb | Azure::Compute::Mgmt::V2018_04_01.Snapshots.revoke_access | def revoke_access(resource_group_name, snapshot_name, custom_headers:nil)
response = revoke_access_async(resource_group_name, snapshot_name, custom_headers:custom_headers).value!
nil
end | ruby | def revoke_access(resource_group_name, snapshot_name, custom_headers:nil)
response = revoke_access_async(resource_group_name, snapshot_name, custom_headers:custom_headers).value!
nil
end | [
"def",
"revoke_access",
"(",
"resource_group_name",
",",
"snapshot_name",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"revoke_access_async",
"(",
"resource_group_name",
",",
"snapshot_name",
",",
"custom_headers",
":custom_headers",
")",
".",
"value!",
"n... | Revokes access to a snapshot.
@param resource_group_name [String] The name of the resource group.
@param snapshot_name [String] The name of the snapshot that is being created.
The name can't be changed after the snapshot is created. Supported characters
for the name are a-z, A-Z, 0-9 and _. The max name length is ... | [
"Revokes",
"access",
"to",
"a",
"snapshot",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_compute/lib/2018-04-01/generated/azure_mgmt_compute/snapshots.rb#L496-L499 | train | Revoke access to a snapshot. | [
30522,
13366,
7065,
11045,
1035,
3229,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
20057,
12326,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
7065,
11045,
1035,
3229,
1035,
2004,
6038,
2278,
1006,
7692,
1035,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_network/lib/2019-02-01/generated/azure_mgmt_network/virtual_network_taps.rb | Azure::Network::Mgmt::V2019_02_01.VirtualNetworkTaps.begin_create_or_update_with_http_info | def begin_create_or_update_with_http_info(resource_group_name, tap_name, parameters, custom_headers:nil)
begin_create_or_update_async(resource_group_name, tap_name, parameters, custom_headers:custom_headers).value!
end | ruby | def begin_create_or_update_with_http_info(resource_group_name, tap_name, parameters, custom_headers:nil)
begin_create_or_update_async(resource_group_name, tap_name, parameters, custom_headers:custom_headers).value!
end | [
"def",
"begin_create_or_update_with_http_info",
"(",
"resource_group_name",
",",
"tap_name",
",",
"parameters",
",",
"custom_headers",
":",
"nil",
")",
"begin_create_or_update_async",
"(",
"resource_group_name",
",",
"tap_name",
",",
"parameters",
",",
"custom_headers",
"... | Creates or updates a Virtual Network Tap.
@param resource_group_name [String] The name of the resource group.
@param tap_name [String] The name of the virtual network tap.
@param parameters [VirtualNetworkTap] Parameters supplied to the create or
update virtual network tap operation.
@param custom_headers [Hash{S... | [
"Creates",
"or",
"updates",
"a",
"Virtual",
"Network",
"Tap",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_network/lib/2019-02-01/generated/azure_mgmt_network/virtual_network_taps.rb#L528-L530 | train | Creates or updates a virtual network tap. | [
30522,
13366,
4088,
1035,
3443,
1035,
2030,
1035,
10651,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
11112,
1035,
2171,
1010,
11709,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
4088,
1035,
3443,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
fluent/fluentd | lib/fluent/plugin/in_monitor_agent.rb | Fluent::Plugin.MonitorAgentInput.get_monitor_info | def get_monitor_info(pe, opts={})
obj = {}
# Common plugin information
obj['plugin_id'] = pe.plugin_id
obj['plugin_category'] = plugin_category(pe)
obj['type'] = pe.config['@type']
obj['config'] = pe.config if opts[:with_config]
# run MONITOR_INFO in plugins' instance context... | ruby | def get_monitor_info(pe, opts={})
obj = {}
# Common plugin information
obj['plugin_id'] = pe.plugin_id
obj['plugin_category'] = plugin_category(pe)
obj['type'] = pe.config['@type']
obj['config'] = pe.config if opts[:with_config]
# run MONITOR_INFO in plugins' instance context... | [
"def",
"get_monitor_info",
"(",
"pe",
",",
"opts",
"=",
"{",
"}",
")",
"obj",
"=",
"{",
"}",
"# Common plugin information",
"obj",
"[",
"'plugin_id'",
"]",
"=",
"pe",
".",
"plugin_id",
"obj",
"[",
"'plugin_category'",
"]",
"=",
"plugin_category",
"(",
"pe"... | get monitor info from the plugin `pe` and return a hash object | [
"get",
"monitor",
"info",
"from",
"the",
"plugin",
"pe",
"and",
"return",
"a",
"hash",
"object"
] | add2af9a5b7f74fc36957b8e6138b3c5a2871a92 | https://github.com/fluent/fluentd/blob/add2af9a5b7f74fc36957b8e6138b3c5a2871a92/lib/fluent/plugin/in_monitor_agent.rb#L360-L409 | train | Get the monitor info from the plugin | [
30522,
13366,
2131,
1035,
8080,
1035,
18558,
1006,
21877,
1010,
23569,
2015,
1027,
1063,
1065,
1007,
27885,
3501,
1027,
1063,
1065,
1001,
2691,
13354,
2378,
2592,
27885,
3501,
1031,
1005,
13354,
2378,
1035,
8909,
1005,
1033,
1027,
21877,
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_web/lib/2018-02-01/generated/azure_mgmt_web/app_service_environments.rb | Azure::Web::Mgmt::V2018_02_01.AppServiceEnvironments.change_vnet_next | def change_vnet_next(next_page_link, custom_headers:nil)
response = change_vnet_next_async(next_page_link, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def change_vnet_next(next_page_link, custom_headers:nil)
response = change_vnet_next_async(next_page_link, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"change_vnet_next",
"(",
"next_page_link",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"change_vnet_next_async",
"(",
"next_page_link",
",",
"custom_headers",
":custom_headers",
")",
".",
"value!",
"response",
".",
"body",
"unless",
"response",
"... | Move an App Service Environment to a different VNET.
Move an App Service Environment to a different VNET.
@param next_page_link [String] The NextLink from the previous successful call
to List operation.
@param custom_headers [Hash{String => String}] A hash of custom headers that
will be added to the HTTP request... | [
"Move",
"an",
"App",
"Service",
"Environment",
"to",
"a",
"different",
"VNET",
"."
] | 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#L5282-L5285 | train | Change the virtual network network. | [
30522,
13366,
2689,
1035,
1058,
7159,
1035,
2279,
1006,
2279,
1035,
3931,
1035,
4957,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
2689,
1035,
1058,
7159,
1035,
2279,
1035,
2004,
6038,
2278,
1006,
2279,
1035,
3931,
1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
aws/aws-sdk-ruby | gems/aws-sdk-s3/lib/aws-sdk-s3/object_summary.rb | Aws::S3.ObjectSummary.restore_object | def restore_object(options = {})
options = options.merge(
bucket: @bucket_name,
key: @key
)
resp = @client.restore_object(options)
resp.data
end | ruby | def restore_object(options = {})
options = options.merge(
bucket: @bucket_name,
key: @key
)
resp = @client.restore_object(options)
resp.data
end | [
"def",
"restore_object",
"(",
"options",
"=",
"{",
"}",
")",
"options",
"=",
"options",
".",
"merge",
"(",
"bucket",
":",
"@bucket_name",
",",
"key",
":",
"@key",
")",
"resp",
"=",
"@client",
".",
"restore_object",
"(",
"options",
")",
"resp",
".",
"da... | @example Request syntax with placeholder values
object_summary.restore_object({
version_id: "ObjectVersionId",
restore_request: {
days: 1,
glacier_job_parameters: {
tier: "Standard", # required, accepts Standard, Bulk, Expedited
},
type: "SELECT", # accepts SELECT
... | [
"@example",
"Request",
"syntax",
"with",
"placeholder",
"values"
] | e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d | https://github.com/aws/aws-sdk-ruby/blob/e28b8d320ddf7b6ee0161bdd9d00fb786d99b63d/gems/aws-sdk-s3/lib/aws-sdk-s3/object_summary.rb#L860-L867 | train | Restores the object from the cache | [
30522,
13366,
9239,
1035,
4874,
1006,
7047,
1027,
1063,
1065,
1007,
7047,
1027,
7047,
1012,
13590,
1006,
13610,
1024,
1030,
13610,
1035,
2171,
1010,
3145,
1024,
1030,
3145,
1007,
24501,
2361,
1027,
1030,
7396,
1012,
9239,
1035,
4874,
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... |
watir/watir | lib/watir/elements/select.rb | Watir.Select.selected? | def selected?(str_or_rx)
by_text = options(text: str_or_rx)
return true if by_text.find(&:selected?)
by_label = options(label: str_or_rx)
return true if by_label.find(&:selected?)
return false unless (by_text.size + by_label.size).zero?
raise(UnknownObjectException, "Unable to loc... | ruby | def selected?(str_or_rx)
by_text = options(text: str_or_rx)
return true if by_text.find(&:selected?)
by_label = options(label: str_or_rx)
return true if by_label.find(&:selected?)
return false unless (by_text.size + by_label.size).zero?
raise(UnknownObjectException, "Unable to loc... | [
"def",
"selected?",
"(",
"str_or_rx",
")",
"by_text",
"=",
"options",
"(",
"text",
":",
"str_or_rx",
")",
"return",
"true",
"if",
"by_text",
".",
"find",
"(",
":selected?",
")",
"by_label",
"=",
"options",
"(",
"label",
":",
"str_or_rx",
")",
"return",
"... | Returns true if any of the selected options' text or label matches the given value.
@param [String, Regexp] str_or_rx
@raise [Watir::Exception::UnknownObjectException] if the options do not exist
@return [Boolean] | [
"Returns",
"true",
"if",
"any",
"of",
"the",
"selected",
"options",
"text",
"or",
"label",
"matches",
"the",
"given",
"value",
"."
] | 2d8db09811c6221ae401b85b2f61f5fa66e463a3 | https://github.com/watir/watir/blob/2d8db09811c6221ae401b85b2f61f5fa66e463a3/lib/watir/elements/select.rb#L97-L107 | train | Returns true if the option is selected | [
30522,
13366,
3479,
1029,
1006,
2358,
2099,
1035,
2030,
1035,
1054,
2595,
1007,
2011,
1035,
3793,
1027,
7047,
1006,
3793,
1024,
2358,
2099,
1035,
2030,
1035,
1054,
2595,
1007,
2709,
2995,
2065,
2011,
1035,
3793,
1012,
2424,
1006,
1004,
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... |
rubocop-hq/rubocop | lib/rubocop/cli.rb | RuboCop.CLI.run | def run(args = ARGV)
@options, paths = Options.new.parse(args)
if @options[:init]
init_dotfile
else
validate_options_vs_config
act_on_options
apply_default_formatter
execute_runners(paths)
end
rescue ConfigNotFoundError, IncorrectCopNameError, OptionA... | ruby | def run(args = ARGV)
@options, paths = Options.new.parse(args)
if @options[:init]
init_dotfile
else
validate_options_vs_config
act_on_options
apply_default_formatter
execute_runners(paths)
end
rescue ConfigNotFoundError, IncorrectCopNameError, OptionA... | [
"def",
"run",
"(",
"args",
"=",
"ARGV",
")",
"@options",
",",
"paths",
"=",
"Options",
".",
"new",
".",
"parse",
"(",
"args",
")",
"if",
"@options",
"[",
":init",
"]",
"init_dotfile",
"else",
"validate_options_vs_config",
"act_on_options",
"apply_default_forma... | @api public
Entry point for the application logic. Here we
do the command line arguments processing and inspect
the target files.
@param args [Array<String>] command line arguments
@return [Integer] UNIX exit code
rubocop:disable Metrics/MethodLength, Metrics/AbcSize | [
"@api",
"public"
] | 2a4f4f0fdac4e1bb25891fc312af2ea60c6aa2f0 | https://github.com/rubocop-hq/rubocop/blob/2a4f4f0fdac4e1bb25891fc312af2ea60c6aa2f0/lib/rubocop/cli.rb#L42-L69 | train | Run the command | [
30522,
13366,
2448,
1006,
12098,
5620,
1027,
12098,
2290,
2615,
1007,
1030,
7047,
1010,
10425,
1027,
7047,
1012,
2047,
1012,
11968,
3366,
1006,
12098,
5620,
1007,
2065,
1030,
7047,
1031,
1024,
1999,
4183,
1033,
1999,
4183,
1035,
11089,
8873... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
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.begin_update_with_http_info | def begin_update_with_http_info(resource_group_name, profile_name, profile_update_parameters, custom_headers:nil)
begin_update_async(resource_group_name, profile_name, profile_update_parameters, custom_headers:custom_headers).value!
end | ruby | def begin_update_with_http_info(resource_group_name, profile_name, profile_update_parameters, custom_headers:nil)
begin_update_async(resource_group_name, profile_name, profile_update_parameters, custom_headers:custom_headers).value!
end | [
"def",
"begin_update_with_http_info",
"(",
"resource_group_name",
",",
"profile_name",
",",
"profile_update_parameters",
",",
"custom_headers",
":",
"nil",
")",
"begin_update_async",
"(",
"resource_group_name",
",",
"profile_name",
",",
"profile_update_parameters",
",",
"cu... | Updates an existing CDN profile with the specified profile name under the
specified subscription and resource group.
@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... | [
"Updates",
"an",
"existing",
"CDN",
"profile",
"with",
"the",
"specified",
"profile",
"name",
"under",
"the",
"specified",
"subscription",
"and",
"resource",
"group",
"."
] | 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#L940-L942 | train | Updates a managed network profile. | [
30522,
13366,
4088,
1035,
10651,
1035,
2007,
1035,
8299,
1035,
18558,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
6337,
1035,
2171,
1010,
6337,
1035,
10651,
1035,
11709,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
4088,
1035,
10651... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_cdn/lib/2017-04-02/generated/azure_mgmt_cdn/origins.rb | Azure::CDN::Mgmt::V2017_04_02.Origins.list_by_endpoint_as_lazy | def list_by_endpoint_as_lazy(resource_group_name, profile_name, endpoint_name, custom_headers:nil)
response = list_by_endpoint_async(resource_group_name, profile_name, endpoint_name, custom_headers:custom_headers).value!
unless response.nil?
page = response.body
page.next_method = Proc.new d... | ruby | def list_by_endpoint_as_lazy(resource_group_name, profile_name, endpoint_name, custom_headers:nil)
response = list_by_endpoint_async(resource_group_name, profile_name, endpoint_name, custom_headers:custom_headers).value!
unless response.nil?
page = response.body
page.next_method = Proc.new d... | [
"def",
"list_by_endpoint_as_lazy",
"(",
"resource_group_name",
",",
"profile_name",
",",
"endpoint_name",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"list_by_endpoint_async",
"(",
"resource_group_name",
",",
"profile_name",
",",
"endpoint_name",
",",
"cust... | Lists all of the existing origins within an endpoint.
@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 endpoint_name [String] Name of the endpoint under the profile w... | [
"Lists",
"all",
"of",
"the",
"existing",
"origins",
"within",
"an",
"endpoint",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_cdn/lib/2017-04-02/generated/azure_mgmt_cdn/origins.rb#L544-L553 | train | Gets the list of all the resources under the endpoint. | [
30522,
13366,
2862,
1035,
2011,
1035,
2203,
8400,
1035,
2004,
1035,
13971,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
6337,
1035,
2171,
1010,
2203,
8400,
1035,
2171,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
2862,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_cdn/lib/2017-04-02/generated/azure_mgmt_cdn/endpoints.rb | Azure::CDN::Mgmt::V2017_04_02.Endpoints.create_async | def create_async(resource_group_name, profile_name, endpoint_name, endpoint, custom_headers:nil)
# Send request
promise = begin_create_async(resource_group_name, profile_name, endpoint_name, endpoint, custom_headers:custom_headers)
promise = promise.then do |response|
# Defining deserializati... | ruby | def create_async(resource_group_name, profile_name, endpoint_name, endpoint, custom_headers:nil)
# Send request
promise = begin_create_async(resource_group_name, profile_name, endpoint_name, endpoint, custom_headers:custom_headers)
promise = promise.then do |response|
# Defining deserializati... | [
"def",
"create_async",
"(",
"resource_group_name",
",",
"profile_name",
",",
"endpoint_name",
",",
"endpoint",
",",
"custom_headers",
":",
"nil",
")",
"# Send request",
"promise",
"=",
"begin_create_async",
"(",
"resource_group_name",
",",
"profile_name",
",",
"endpoi... | @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 endpoint_name [String] Name of the endpoint under the profile which is
unique globally.
@param endpoint [Endpoint] En... | [
"@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/2017-04-02/generated/azure_mgmt_cdn/endpoints.rb#L273-L289 | train | Creates an endpoint in the specified subscription. | [
30522,
13366,
3443,
1035,
2004,
6038,
2278,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
6337,
1035,
2171,
1010,
2203,
8400,
1035,
2171,
1010,
2203,
8400,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
1001,
4604,
5227,
4872,
1027,
4... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Azure/azure-sdk-for-ruby | management/azure_mgmt_container_registry/lib/2018-02-01-preview/generated/azure_mgmt_container_registry/builds.rb | Azure::ContainerRegistry::Mgmt::V2018_02_01_preview.Builds.begin_update | def begin_update(resource_group_name, registry_name, build_id, build_update_parameters, custom_headers:nil)
response = begin_update_async(resource_group_name, registry_name, build_id, build_update_parameters, custom_headers:custom_headers).value!
response.body unless response.nil?
end | ruby | def begin_update(resource_group_name, registry_name, build_id, build_update_parameters, custom_headers:nil)
response = begin_update_async(resource_group_name, registry_name, build_id, build_update_parameters, custom_headers:custom_headers).value!
response.body unless response.nil?
end | [
"def",
"begin_update",
"(",
"resource_group_name",
",",
"registry_name",
",",
"build_id",
",",
"build_update_parameters",
",",
"custom_headers",
":",
"nil",
")",
"response",
"=",
"begin_update_async",
"(",
"resource_group_name",
",",
"registry_name",
",",
"build_id",
... | Patch the build properties.
@param resource_group_name [String] The name of the resource group to which
the container registry belongs.
@param registry_name [String] The name of the container registry.
@param build_id [String] The build ID.
@param build_update_parameters [BuildUpdateParameters] The build update
... | [
"Patch",
"the",
"build",
"properties",
"."
] | 78eedacf8f8cbd65c2d8a2af421405eaa4373d8e | https://github.com/Azure/azure-sdk-for-ruby/blob/78eedacf8f8cbd65c2d8a2af421405eaa4373d8e/management/azure_mgmt_container_registry/lib/2018-02-01-preview/generated/azure_mgmt_container_registry/builds.rb#L447-L450 | train | Updates a build. | [
30522,
13366,
4088,
1035,
10651,
1006,
7692,
1035,
2177,
1035,
2171,
1010,
15584,
1035,
2171,
1010,
3857,
1035,
8909,
1010,
3857,
1035,
10651,
1035,
11709,
1010,
7661,
1035,
20346,
2015,
1024,
9152,
2140,
1007,
3433,
1027,
4088,
1035,
10651... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.