query
stringlengths
7
9.5k
document
stringlengths
10
1.07M
negatives
sequencelengths
19
19
metadata
dict
minimumLeaseRate : Decimal The Minimum Lease Rate associated with the listing
def minimum_lease_rate self.dig_for_decimal("minimumLeaseRate") end
[ "def maximum_lease_rate\n self.dig_for_decimal(\"maximumLeaseRate\")\n end", "def autosizedMinimumOutdoorAirFlowRate\n\n return self.model.getAutosizedValue(self, 'Minimum Outdoor Air Flow Rate', 'm3/s')\n \n end", "def final_minimum_rate\n # if blank just take property minimum\n if self.minimum_rate.blank?\n self.property.minimum_room_rate\n else\n # compare to property min rate, if smaller then take room type ones\n result = self.minimum_rate\n if result < self.property.minimum_room_rate\n result = self.property.minimum_room_rate\n end\n result\n end\n end", "def get_min_bid_amount\n min_step = self.minimum_step.present? ? self.minimum_step : 0\n (self.get_highest_price + min_step).to_f\n end", "def min_mortgage\n @min_mortgage ||= ReverseMortgage.new(max_mortgage.rate, @term, @deposit, @min_payment)\n end", "def min_amount_by_precision\n 0.1.to_d**amount_precision\n end", "def min_rate_must_be_over_minimum\n if !minimum_rate.blank? and minimum_rate < self.property.minimum_room_rate\n errors.add(:minimum_rate, I18n.t('room_types.validate.minimum_rate_must_be_over_minimum', :minimum => self.property.minimum_room_rate))\n end\n end", "def minimum_price\n price = production_cost + ah_deposit\n margin = recipe_group.profit_margin.blank? || recipe_group.profit_margin == 0 ? DEFAULT_PROFIT_MARGIN : recipe_group.profit_margin\n (price / 100) * margin\n end", "def min_price\n result = case self.payment_type\n when :credit_card then Money.new(MIN_CREDIT_CARD_OFFER_CENTS, self.default_currency)\n else\n Money.new(MIN_PIGGY_BANK_OFFER_CENTS, self.default_currency)\n end\n if self.kase && self.kase.offers_reward?\n result = Money.max(result, self.kase.max_reward_price || result).convert_to(self.default_currency) +\n Money.new(MIN_PIGGY_BANK_OFFER_CENTS, self.default_currency)\n end\n result\n end", "def min_rating\n configuration.min_rating\n end", "def min_price\n \t@declinaison = DeclinaisonPanier.where('panier_id = ?', self.id)\n \tif @declinaison.count > 0\n \t\t@min = @declinaison[0].prix_panier_ttc\n \t\t@declinaison.each do |decli|\n\t \t\tif decli.prix_panier_ttc < @min\n\t \t\t\t@min = decli.prix_panier_ttc\n\t \t\tend\n\t \tend\n\t \t\n\t \treturn @min\n\t else\n\t \treturn 0\n \tend\n \t\n end", "def get_lowest_gate\n factor = @resolution.to_f / @rate\n (100.0 / factor).ceil\n end", "def minimum_for_withdrawal\n (minimum_withdrawal_amount.to_f > 0) ? minimum_withdrawal_amount : DEFAULT_MINIMUM_FOR_WITHDRAWAL\n end", "def min_price\n @attrs[:price].to_i\n end", "def minimum_room_rate_must_be_less_than_lowest\n if !self.room_types.blank?\n lowest = 0\n # find the lowest minimum rate\n self.room_types.each do |rt|\n if !rt.minimum_rate.blank?\n if rt.minimum_rate < lowest or lowest == 0\n lowest = rt.minimum_rate\n end\n end\n end\n if lowest > 0 and self.minimum_room_rate > lowest\n errors.add(:minimum_room_rate, I18n.t('properties.validate.minimum_room_rate_must_be_less_than_lowest', :lowest => lowest))\n end\n end\n end", "def min_rating\n 0\n end", "def lowest_volume_price\n self.product.master.volume_prices.where(:currency => order.currency, :role_id => nil).minimum(:amount)\n end", "def min_next_bid_amount\n highest_bid_value = self.highest_bid.bid_amount \n if highest_bid_value.present? \n highest_bid_value+highest_bid_value*0.05\n else\n self.cost\n end\n end", "def default_rate_in_pounds\n default_rate_pence / 100\n end" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
netOperatingIncome : Decimal The potential rental income plus other income, less vacancy, credit losses, and operating expenses
def net_operating_income self.dig_for_decimal("netOperatingIncome") end
[ "def net_operating_income\n total_annual_rent_collected - total_annual_expenses\n end", "def net_price\n (self.NetPrice - (self.NetPrice * self.DiscountI / 100)).round(2)\n rescue\n 0\n end", "def calculation_total_income(calculation)\n return '' if calculation.inputs[:total_income].nil?\n number_to_currency(calculation.inputs[:total_income], precision: 0, unit: '£')\n end", "def net_total\n net_total_base.round(2)\n end", "def calc_potential_income_elec(val1= chp_salable_elec, val2= elec_price)\n\t\t(val1 * val2).round 2\n\tend", "def calc_net_taxable_property_income_amount(simulation, postponed_negative_taxable_property_income_from_previous_fiscal_year, investment_fiscal_year)\n # Calculate net taxable property income amount thks to fiscal regimen\n case simulation[:fiscal_regimen]\n when \"Forfait\"\n calc_flat_rate_regimen_net_taxable_property_income_amount(simulation)\n when \"Réel\"\n calc_deductible_expenses_regimen_net_taxable_property_income_amount(simulation, postponed_negative_taxable_property_income_from_previous_fiscal_year, investment_fiscal_year)\n end\n end", "def net_price\n price_actual - total_tax_ticket\n end", "def net_price\n if @vat_included\n gross_price - vat_sum\n else\n @price\n end\n end", "def calc_global_net_taxable_amount(simulation, net_taxable_property_income_amount)\n ((simulation[:fiscal_revenues_p1] + (simulation[:fiscal_revenues_p2].nil? ? 0 : simulation[:fiscal_revenues_p2])) * (1 - REVENUES_STANDARD_ALLOWANCE)) + net_taxable_property_income_amount\n end", "def discount_net\n return self.discount - self.discount * event.tax_share_25 * 0.25 - self.discount * event.tax_share_12 * 0.12 - self.discount * event.tax_share_6 * 0.06\n end", "def calc_property_income_minus_loan_interet_cost(simulation)\n simulation[:house_rent_amount_per_year] - simulation[:credit_loan_cumulative_interests_paid_for_year_two]\n end", "def net_price\n if self.patient.is_a_firm?\n self.price\n else\n self.price + get_additional_cost_totals()[:negative]\n end\n end", "def calc_annual_income\n @total_income =+ @rent\n\n end", "def noi\n\t\t(total_income - operating_expenses) * 12\n\tend", "def net_price\n net_price_not_rounded.round(2)\n end", "def calc_gross_taxable_property_income_amount(simulation, deductible_expenses, postponed_negative_taxable_property_income_from_previous_fiscal_year)\n simulation[:house_rent_amount_per_year] - deductible_expenses - postponed_negative_taxable_property_income_from_previous_fiscal_year\n end", "def calc_gross_taxable_property_income_amount(simulation, deductible_expenses, amortization_property, amortization_first_works, postponed_negative_taxable_property_income_from_previous_fiscal_year)\n simulation[:house_rent_amount_per_year] - deductible_expenses - amortization_property - amortization_first_works - postponed_negative_taxable_property_income_from_previous_fiscal_year\n end", "def gross_income\n self.dig_for_decimal(\"grossIncome\")\n end", "def calc_annual_income\n get_rented_units.inject(0) { |sum, x| sum + x.rent }\n end" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
numberOfDocks : Integer The Number of Docks associated with the property
def number_of_docks self.dig_for_integer("numberOfDocks") end
[ "def available_docks\n self['availableDocks']\n end", "def dock_height\n self.dig_for_string(\"dockHeight\")\n end", "def target_num_containers() ; info[:target_num_containers] ; end", "def number_of_properties\n self.instance_variables.count\n end", "def size\n count = 0\n @properties.each do |gid, values|\n if ! values.empty?\n count += 1\n end\n end\n return count\n end", "def class_wheel_count=(number_of_wheels)\n \n # Ideally there must be a lock mechanism to prevent other instances \n # from accessing @@wheel_count at the same time.\n @@wheel_count = number_of_wheels\n end", "def properties(which)\n case which\n when \"closed\"\n count = 0\n for y in 0...@size\n for x in 0...@size\n if @cells[x][y] == nil #closed \n count += 1\n elsif @cells[x][y].dw_hash.empty?\n count += 1\n end\n end\n end\n puts count\n when \"open\"\n u = d = l = r = 0\n for y in 0...@size\n for x in 0...@size\n if @cells[x][y] != nil && !@cells[x][y].dw_hash.empty?\n @cells[x][y].dw_hash.keys.each { |k| \n case k\n when \"u\"\n u += 1\n when \"d\"\n d += 1\n when \"l\"\n l += 1\n when \"r\"\n r += 1\n end\n }\n end\n end\n end\n wall_counts = \"u: #{u}, d: #{d}, l: #{l}, r: #{r}\"\n puts wall_counts\n end \n end", "def number_in_set(game = @owner.game)\n\t\t\tproperties_in_set(game).count\n\t\tend", "def assert_openshift_objects_count(cnt)\n expect(kube_client.config_maps.size).to eq(cnt)\n expect(kube_client.deployment_configs.size).to eq(cnt)\n expect(kube_client.secrets.size).to eq(cnt)\n expect(kube_client.services.size).to eq(cnt)\n end", "def find_num_owned(prop)\n num_owned = 0\n if (prop.owned)\n @properties.each { |p| num_owned += 1 if prop.owner == p.owner }\n end\n return num_owned\n end", "def count_painted_panels\n count = 0\n @hull.each do |row|\n row.each do |panel|\n next if panel.nil?\n\n count += 1\n end\n end\n count\n end", "def num_wheels=(value)\n @num_wheels = value\n end", "def running_num_containers() ; info[:running_num_containers] ; end", "def num_of_property(prop_class)\n return @owned_props.count{|prop| prop.is_a?(prop_class)}\n end", "def n_ports\n @ports.size\n end", "def shape_count\n @shapes.size\n end", "def number_of_floors\n\t\t@floors.count\n\tend", "def num_paintings\n self.paintings.count \n end", "def sheet_count\n @worksheets.length\n end" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
numberOfBallrooms : Integer The number of ballrooms in a property
def number_of_ballrooms self.dig_for_integer("numberOfBallrooms") end
[ "def no_of_bedrooms\n self.dig_for_integer(\"listingSummary\", \"noOfBedrooms\")\n end", "def total_rooms\n self.dig_for_integer(\"totalRooms\")\n end", "def number_of_bottles\n bottles = self.line_items.inject(0) {|bottles, line_item| bottles + line_item.quantity}\n end", "def number_of_conference_rooms\n self.dig_for_integer(\"numberOfConferenceRooms\")\n end", "def door_count; end", "def total_guests_in_rooms()\n guests_in_bar = 0\n for room in @rooms\n guests_in_bar += room.guests_in_room()\n end\n return guests_in_bar\n end", "def num_rooms_next_round\n \tif self.hasRounds?\n \t\treturn 1; #self.next_round.room_draws.count;\n \telse\n \t\treturn 0;\n \tend\n end", "def total_number_of_parcels\n end", "def total_rent\n count = 0\n self.offices.map do |office|\n count+= office.building.rent_per_floor\n end\n count\n end", "def num_paintings\n self.paintings.count \n end", "def number_of_bookings\n\t\troom_reservations.empty? ? 0 : capacity - min_disponibility\n\tend", "def bounties\n end", "def size\n count = 0\n @properties.each do |gid, values|\n if ! values.empty?\n count += 1\n end\n end\n return count\n end", "def how_many_on_bus\n return @passengers.length\n end", "def joinees_count\n self.joinees.count\n end", "def game_objects_count\n @game_objects.count\n end", "def count\n @vehicles.map { |v| v.wheels }.reduce(:+)\n end", "def gallons\n (area / ONE_GALLON_COVERS).ceil\n end", "def count_occupants()\n return @occupants.length\n end" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
numberOfConferenceRooms : Integer The number of conference rooms in a property
def number_of_conference_rooms self.dig_for_integer("numberOfConferenceRooms") end
[ "def total_rooms\n self.dig_for_integer(\"totalRooms\")\n end", "def number_of_guests()\n return @guests_in_room.count()\n end", "def property_rooms\n self.dig_for_array(\"propertyRooms\")\n end", "def no_of_bedrooms\n self.dig_for_integer(\"listingSummary\", \"noOfBedrooms\")\n end", "def participants_size\n participants.size\n end", "def number_of_ballrooms\n self.dig_for_integer(\"numberOfBallrooms\")\n end", "def how_many_on_bus\n return @passengers.length\n end", "def total_guests_in_rooms()\n guests_in_bar = 0\n for room in @rooms\n guests_in_bar += room.guests_in_room()\n end\n return guests_in_bar\n end", "def n_participants\n self.sport_session_participants.where(:confirmed => true).count\n end", "def created_classrooms_collaborations_count\n created_classrooms.map(&:collaborations_count).reduce(:+).to_i\n end", "def per_participant_count\n\n per_participant.remap { |(k, v), h| h[k] = v.size }\n end", "def get_opportunity_length\n length =0\n account = Account.find(self.id)\n account.contacts.each do |contact|\n if contact.present?\n if contact.opportunities.size >0\n length +=contact.open_opportunities.size\n end\n end\n end\n\n length\n end", "def number_of_passengers\n @passengers.length\n end", "def size\n count = 0\n @properties.each do |gid, values|\n if ! values.empty?\n count += 1\n end\n end\n return count\n end", "def passenger_count()\n @passengers.length()\n end", "def num_rooms_next_round\n \tif self.hasRounds?\n \t\treturn 1; #self.next_round.room_draws.count;\n \telse\n \t\treturn 0;\n \tend\n end", "def collaboration_count\n (attributes['collaboration_count'] || mixables.size).to_i\n end", "def num_channels\n @resource[:channelCount]\n end", "def count_chatroom_members(chatroom) \n if chatroom.admins.count == 1 \n \"#{chatroom.admins.count} Member\"\n else \n \"#{chatroom.admins.count} Members\"\n end \n end" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
occupancyRate : Integer The number of units in a building that have been rented out as compared to the total number of units in the building
def occupancy_rate self.dig_for_integer("occupancyRate") end
[ "def average_occupancy_rate\n self.dig_for_decimal(\"averageOccupancyRate\")\n end", "def percent_of_house\n percent_of(house_capacity)\n end", "def calculate_days_occupied_percent\n ((num_occupied_days.to_f / available_days) * 100).round\n end", "def percent_of_house\n house_capacity.zero? ? 100 : (100.0 * total_sales.size / house_capacity).floor\n end", "def billable_utilization(date=Date.today)\n(resource_assignments.in_date_range(date,date).to_a.sum(&:billable_allocation)/target_utilization)*100\n end", "def value_per_100g; nutr_val; end", "def number_of_bookings\n\t\troom_reservations.empty? ? 0 : capacity - min_disponibility\n\tend", "def per_person\n (total_bill / @party_size).ceil.to_i\n end", "def billable_allocation\n if (billing_rate && billing_rate>0)\n if on_demand\n return 20;\n else\n return percentage_allocation;\n end\n else\n return 0 \n end\n end", "def number_of_units\n return 0.0 if demand.zero?\n return super unless full_load_hours&.positive?\n\n if input_capacity&.positive?\n demand / (input_capacity * full_load_hours)\n elsif output_capacity&.positive?\n (demand - output_of_loss) / (output_capacity * full_load_hours)\n else\n super\n end\n end", "def calories_per_liter\n 672\n end", "def covered_strength; end", "def total_rent\n count = 0\n self.offices.map do |office|\n count+= office.building.rent_per_floor\n end\n count\n end", "def capacity\n\t\tcapacity = 0\n\t\trooms.all.each do |room|\n\t\t\tcapacity += room.capacity\n\t\tend\n\t\tcapacity\n\tend", "def building_setoccupancy(bld)\n stockpile = (bld.getType == :Stockpile)\n complete = (bld.getBuildStage >= bld.getMaxBuildStage)\n extents = (bld.room.extents and bld.isExtentShaped)\n\n z = bld.z\n (bld.x1..bld.x2).each { |x|\n (bld.y1..bld.y2).each { |y|\n next if extents and bld.room.extents[bld.room.width*(y-bld.room.y)+(x-bld.room.x)] == 0\n next if not mb = map_block_at(x, y, z)\n des = mb.designation[x%16][y%16]\n des.pile = stockpile\n des.dig = :No\n if complete\n bld.updateOccupancy(x, y)\n else\n mb.occupancy[x%16][y%16].building = :Planned\n end\n }\n }\n end", "def food_consumption\n return residents.length * 2\n end", "def penalty_factor\n PERFECT_COVERAGE - coverage.to_i\n end", "def occupation\n Location.find(params[:location_id]).update_attributes(:occupation=>params[:rate].to_i)\n\n render :text=>'success'\n end", "def house_capacity\n has_reserved_seating? ? seatmap.seat_count : attributes['house_capacity']\n end" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
parkingRatio : Decimal The ratio of available standard parking spaces to the gross leasable area of a property
def parking_ratio self.dig_for_decimal("parkingRatio") end
[ "def percent_of_house\n percent_of(house_capacity)\n end", "def ratio(unit)\n armour = unit['armour'] * ARMOR_TECH\n (armour / unit['cost']).round(2)\nend", "def ratio\n synchronize do\n proportion = if total\n total > 0 ? (@current.to_f / total) : 0\n else\n (@unknown > 100 ? 200 - @unknown : @unknown).to_f / 100\n end\n [[proportion, 0].max, 1].min\n end\n end", "def percent_of_house\n house_capacity.zero? ? 100 : (100.0 * total_sales.size / house_capacity).floor\n end", "def suggested_mash_ratio\n (preboil_volume_gallons + (preboil_volume_gallons*2 + 2*WATER_RETENTION_COEFFICIENT *\n preboil_volume_gallons * @total_grain_weight_lbs)**0.5) / @total_grain_weight_lbs\n end", "def ratio\n 2.0**(@total_cents.to_f / CENTS_PER_OCTAVE)\n end", "def reduction_ratio\n MSPhysics::Newton::CurvyPiston.get_reduction_ratio(@address)\n end", "def ratio_res_to_listings\n self.reservations.count.to_f / self.listings.count\n end", "def reduction_ratio\n MSPhysics::Newton::Piston.get_reduction_ratio(@address)\n end", "def pressureRatio(machNum)\n k = 1.4\n inside = 1.0 + ((k - 1.0) / 2.0) * machNum**2.0\n return inside**(k / (k - 1.0))\nend", "def percent_of_parent_ceiling_rate\n super\n end", "def valorpolialcoholesp\n\t\tvag=(polialcoholes * 70) / 100\n vag.round(2)\n\tend", "def ratio\n 2.0**(self.total_cent.to_f / @cents_per_octave)\n end", "def ratio\n chainring / cog.to_f\n end", "def get_PE_ratio\n @PE_ratio = Stock.where(:stock_ticker => self.stock_ticker).first.PE_ratio / 100\n end", "def ratio\n return self.x.to_f / self.y\n end", "def reduction_ratio\n MSPhysics::Newton::Servo.get_reduction_ratio(@address)\n end", "def percentage_gap\n gap_openings / alignment_length.to_f * 100\n end", "def percent_ratio\n session = Transmission::Model::Session.get\n return unless session.seed_ratio_limited\n (attributes['uploadRatio'] * 1.0 / session.seed_ratio_limit).round(2)\n end" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
power : String The type and voltage of power applicable for the property
def power self.dig_for_string("power") end
[ "def power\n\t\tget('power').chomp('W').to_f\n\tend", "def power_text\n power = data.power\n return text_get(11, 12) if power == 0\n\n return power.to_s\n end", "def power\n return @POWER\n end", "def base_power\n return data.power\n end", "def power_text\n power = base_power\n return text_get(11, 12) if power == 0\n\n return power.to_s\n end", "def get_power\n send_request(FUNCTION_GET_POWER, [], '', 4, 'l')\n end", "def pow(power)\n Dimensions.new(self.to_hash).pow!(power)\n end", "def set_power_level power_level\n puts \"Set power to #{power_level}\"\nend", "def ^(power)\n Measure.new(value, units.map{ |u| u**power }) #.reduce\n end", "def power(power_command)\n return chassis(\"power\", power_command)\n end", "def parse_power()\n # puts \"parsing power\"\n # A Power must begin with a factor either way\n fact = parse_factor\n # Check the token after evaluating the factor\n if @tokens.first.kind == Token::POWR\n # Case: Power is factor to the power of a Power\n # Return: Evaluated factor to the power of a Power\n @tokens.shift\n return fact ** parse_power\n else\n # Case: Power is a factor\n # Return: Evaluated factor\n return fact\n end\n end", "def pow(power)\n return nil if power == 0\n cloned_unit = self.clone\n return cloned_unit if power == 1\n if power > 0\n new_unit = self.clone\n (power - 1).times { new_unit *= cloned_unit }\n elsif power < 0\n new_unit = reciprocalize\n ((power.abs) - 1).times { new_unit /= cloned_unit }\n end\n return new_unit\n end", "def mw_power\n fetch(:mw_power) do\n full_load_seconds == 0.0 ? 0.0 : demand / full_load_seconds\n end\n end", "def override_power=(v)\n @dyio.command_to.set_override_power v\n end", "def gain_power(number)\n @@power_level = @@power_level + number\n end", "def power=(new_power)\n if !new_power.nil?\n if !looks_like_number?(new_power)\n attr = NonIntAttribute.find(original_attribute: new_power)\n if attr.nil?\n card_attribute = -65_535 + NonIntAttribute.all.size\n attr = NonIntAttribute.find_or_create(original_attribute: new_power, card_attribute: card_attribute)\n end\n super(attr.card_attribute)\n else\n super(new_power)\n end\n else\n super(new_power)\n end\n end", "def power?(state)\n\t\t@power = state\n\tend", "def gain_power(i)\n power_level + i\n end", "def set_power!(state)\n level = case state\n when :on\n 1\n when :off\n 0\n else\n raise ArgumentError.new(\"Must pass in either :on or :off\")\n end\n send_message!(Protocol::Device::SetPower.new(level: level), wait_for: Protocol::Device::StatePower) do |payload|\n if level == 0\n payload.level == 0\n else\n payload.level > 0\n end\n end\n self\n end" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
pricePerArea : Decimal The price per area of the property, this is generally the list price divided by the area
def price_per_area self.dig_for_decimal("pricePerArea") end
[ "def percent_place_total_area\n total_area / place.total_area\n end", "def percent_zcta_total_area\n total_area / zcta.total_area\n end", "def percent_urban_area_total_area\n total_area / urban_area.total_area\n end", "def percent_county_total_area\n total_area / county.total_area\n end", "def percent_county_subdivision_total_area\n total_area / county_subdivision.total_area\n end", "def outdoor_airflow_rate_per_area()\n\n tot_oa_flow_rate_per_area = 0.0\n\n # Find total area of the zone\n sum_floor_area = 0.0\n self.spaces.sort.each do |space|\n sum_floor_area += space.floorArea\n end\n\n # Get the OA flow rate\n tot_oa_flow_rate = outdoor_airflow_rate\n \n # Calculate the per-area value\n tot_oa_flow_rate_per_area = tot_oa_flow_rate / sum_floor_area\n\n OpenStudio::logFree(OpenStudio::Info, \"openstudio.Standards.Model\", \"For #{self.name}, OA per area = #{tot_oa_flow_rate_per_area.round(8)} m^3/s*m^2.\")\n\n return tot_oa_flow_rate_per_area\n\n end", "def score_area(area)\n 50\n end", "def common_area_factor\n self.dig_for_decimal(\"commonAreaFactor\")\n end", "def calculate_area\n\n \tarea = 3.14*@radius*@radius\n\n end", "def area_in_sqm\n (self.area * 0.09290304).round\n end", "def calculate_fee_pounds\n calculate_fee / PENCE_IN_POUND\n end", "def total_paper\n surface_area + smallest_area\n end", "def percent_place_land_area\n land_area / place.land_area\n end", "def average_by_area\n areas = [{area: \"Toulouse\", average_price: 2580},\n {area: \"Lalande, Toulouse\", average_price: 2000},\n {area: \"Les Izards, Toulouse\", average_price: 1860},\n {area: \"Croix Daurade, Toulouse\", average_price: 2130},\n {area: \"Barrière de Paris, Toulouse\", average_price: 2190},\n {area: \"Sept Deniers, Toulouse\", average_price: 2620},\n {area: \"Minimes, Toulouse\", average_price: 2500},\n {area: \"Bonnefoy, Toulouse\", average_price: 2480},\n {area: \"Roseraie, Toulouse\", average_price: 2150},\n {area: \"Juncasse, Toulouse\", average_price: 2140},\n {area: \"Chateau de l'Hers, Toulouse\", average_price: 2270},\n {area: \"La terrasse, Toulouse\", average_price: 2500},\n {area: \"Montaudran, Toulouse\", average_price: 2350},\n {area: \"Rangueil, Toulouse\", average_price: 2710},\n {area: \"Poupourville, Toulouse\", average_price: 2800},\n {area: \"La Fourguette, Toulouse\", average_price: 1770},\n {area: \"Saint Simon, Toulouse\", average_price: 2190},\n {area: \"Basso Cambo, Toulouse\", average_price: 2250},\n {area: \"Lardenne, Toulouse\", average_price: 2600},\n {area: \"Saint Martin du Touch, Toulouse\", average_price: 2170},\n {area: \"Purpan, Toulouse\", average_price: 2150},\n {area: \"Marengo, Toulouse\", average_price: 2660},\n {area: \"Guilhemery, Toulouse\", average_price: 2650},\n {area: \"Cote pavé, Toulouse\", average_price: 2850},\n {area: \"Pont des demoiseilles, Toulouse\", average_price: 2600},\n {area: \"Sauzelong - Rangueil, Toulouse\", average_price: 2090},\n {area: \"Jules Julien, Toulouse\", average_price: 2760},\n {area: \"Croix de pierre, Toulouse\", average_price: 2070},\n {area: \"La cépière, Toulouse\", average_price: 2330},\n {area: \"Casselardit, Toulouse\", average_price: 2620},\n {area: \"Amidonniers, Toulouse\", average_price: 3000},\n {area: \"Compans, Toulouse\", average_price: 3310},\n {area: \"Les chalets, Toulouse\", average_price: 3800},\n {area: \"Matabiau, Toulouse\", average_price: 3620},\n {area: \"Saint Aubin Dupuy, Toulouse\", average_price: 4150},\n {area: \"Le busca, Toulouse\", average_price: 3350},\n {area: \"Saint Agne, Toulouse\", average_price: 2670},\n {area: \"Arenes, Toulouse\", average_price: 2480},\n {area: \"Patte d'oie, Toulouse\", average_price: 2780},\n {area: \"Arnaud Bernard, Toulouse\", average_price: 3570},\n {area: \"Saint Georges, Toulouse\", average_price: 4490},\n {area: \"Saint Etienne, Toulouse\", average_price: 4130},\n {area: \"Carmes, Toulouse\", average_price: 4230},\n {area: \"Saint Cyprien, Toulouse\", average_price: 3670},\n {area: \"Capitole, Toulouse\", average_price: 2690},\n {area: \"Soupetard, Toulouse\", average_price: 1830}]\n average_prices = areas.each{|a| a[:latitude] = Geocoder.coordinates(a[:area])[0]}.each{|a| a[:longitude] = Geocoder.coordinates(a[:area])[1]}\n end", "def price_in_cents\n (total_price * 100).round\n end", "def unit_price\n @item_price / fractional_units\n end", "def price_per_piece\n self.unit_price / (self.pieces || 1) if self.unit_price\n end", "def price_in_cents\r\n (cart.total_price*100).round\r\n end", "def percent_county_subdivision_land_area\n land_area / county_subdivision.land_area\n end" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
scheduleIncome : Decimal The gross income that would be collected from a rental property with all units 100% occupied and rented
def schedule_income self.dig_for_decimal("scheduleIncome") end
[ "def vacancy_dollars\n\t\t(vacancy / 100.00) * total_income\n\tend", "def calc_gross_taxable_property_income_amount(simulation, deductible_expenses, amortization_property, amortization_first_works, postponed_negative_taxable_property_income_from_previous_fiscal_year)\n simulation[:house_rent_amount_per_year] - deductible_expenses - amortization_property - amortization_first_works - postponed_negative_taxable_property_income_from_previous_fiscal_year\n end", "def calc_annual_income\n @total_income =+ @rent\n\n end", "def calc_gross_taxable_property_income_amount(simulation, deductible_expenses, postponed_negative_taxable_property_income_from_previous_fiscal_year)\n simulation[:house_rent_amount_per_year] - deductible_expenses - postponed_negative_taxable_property_income_from_previous_fiscal_year\n end", "def property_management_dollars\n\t\t(property_management / 100.00) * total_income\n\tend", "def calc_annual_income\n get_rented_units.inject(0) { |sum, x| sum + x.rent }\n end", "def profit\n revenue - total_costs\n end", "def repairs_dollars\n\t\t(repairs_maintenance / 100.00) * total_income\n\tend", "def calc_property_income_minus_loan_interet_cost(simulation)\n simulation[:house_rent_amount_per_year] - simulation[:credit_loan_cumulative_interests_paid_for_year_two]\n end", "def net_operating_income\n total_annual_rent_collected - total_annual_expenses\n end", "def gross_income\n self.dig_for_decimal(\"grossIncome\")\n end", "def cap_ex_dollars\n\t\t(cap_ex / 100.00) * total_income\n\tend", "def insurance_cost(years)\n years * MORTGAGE_INSURANCE_RATE * required_mortgage\n end", "def calc_global_net_taxable_amount(simulation, net_taxable_property_income_amount)\n ((simulation[:fiscal_revenues_p1] + (simulation[:fiscal_revenues_p2].nil? ? 0 : simulation[:fiscal_revenues_p2])) * (1 - REVENUES_STANDARD_ALLOWANCE)) + net_taxable_property_income_amount\n end", "def stake_to_profit profit\n profit / @fractional_odds\n end", "def profit_calculation\r\n @total_profit = @cocktail_profit + @beer_profit + @water_profit\r\n end", "def annual_cost\n (number_of_positions * hourly_rate * hours_per_week * number_of_weeks)\n end", "def actual_income\n outgoing_invoices.where(:status => \"deposited\").inject(0) do |mem, invoice|\n mem += invoice.amount\n end # inject invoice\n end", "def income()\n $units.each do |u|\n income = -Unittypes[u.type].upkeepcost\n u.player.money += income if income > 0\n end\nend" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
suiteApartmentName : String The Suite Apartment Name associated with the listing
def suite_apartment_name self.dig_for_string("power") end
[ "def add_apartment apartment\n @apartments << apartment\n end", "def index\n @apartmentsws = Apartmentsw.all\n end", "def offerings(appt)\n offerings = \"\"\n if appt.offerings == []\n offerings = \"No Services Selected\"\n else\n appt.offerings.each do |off|\n offerings += off.name + \" \"\n end\n end\n return offerings\n end", "def suite=(name)\n @suite = (validate_suite(name) ? name : nil)\n end", "def suite\n return Suite.get(data.suite_id)\n end", "def index\n @apartment_options = ApartmentOptionDecorator.decorate_collection(\n ApartmentOption.page(params[:page])\n )\n end", "def index\n @offer_apartments = OfferApartment.all\n end", "def index\n @ag_apartments = Ag::Apartment.all\n end", "def current_apartment\n Apartment.find(params[:id])\n end", "def apartment_type_name\n apartment_type&.name&.titleize\n end", "def index\n @apartment_types = ApartmentType.all\n end", "def tst_suite_name\n self.class.name\n end", "def getSavingsProductAccountingSetupObjName\r\n\t\t return \"savings_product_accounting_setup__c\"\r\n\t\tend", "def index\n @apartment_showings = ApartmentShowing.all\n end", "def getSavingsProductAccountingSetupObjName\r\n\t\t return \"mfiforce__savings_product_accounting_setup__c\"\r\n\t\tend", "def index\n @appartments = Appartment.all\n end", "def suite(suite_name_or_id)\n if is_id?(suite_name_or_id)\n return Suite.get(suite_name_or_id)\n else\n return suite_by_name(suite_name_or_id)\n end\n end", "def rent_apartment\n #rents an apartment to a tenant\n #does not rent an apartment that is full\n end", "def getTestSuiteInfoBeanbyName(testSuiteName)\n #need to check negative scenarios\n #getSuite Id basedon suiteName given\n testsuiteDetailsDBobj=TestSuiteDetailsDb.new();\n testsuiteId =testsuiteDetailsDBobj.getTestSuiteId(testSuiteName);\n #gettting suite Executed object is not perfect need to fix\n Rails.logger.info(\"selected testsuites Id #{testsuiteId}\");\n testSuiteExectedObj=testsuiteDetailsDBobj.getSuiteExectedObj(testsuiteId);\n #now use suiteObject and build time bean object\n return testSuitesBean = constructSuiteBean(testSuiteExectedObj,testSuiteName);\n end" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
taxIdNumber : String The Tax Id Number associated with the listing
def tax_id_number self.dig_for_string("taxIdNumber") end
[ "def tax_identification_number\n element_with_value('TaxIdentificationNumber', opts[:sender_vat_number] || '')\n end", "def polish_taxpayer_identification_number; end", "def tax_roll_number\n self.dig_for_string(\"taxRollNumber\")\n end", "def tax_code\n @fields[15]\n end", "def vat_number\n taxpayer_id_dd.text\n end", "def bookings_tax(bookings_tax, options = {})\n get(\"bookings_taxes/#{bookings_tax}\", options).pop\n end", "def get_single_tax\n tax = Tax.find_by_tax_id(tax_id)\n json_response(tax)\n end", "def tax_index\n\n end", "def tax_year\n self.dig_for_integer(\"taxYear\")\n end", "def invoice_tax\n if address.present?\n self.invoice_tax_amount, self.tax_description = address.invoice_tax(invoice_items_amount)\n else\n self.invoice_tax_amount = 0\n end\n self.invoice_tax_amount\n end", "def [](ticid)\n tax_codes[ticid]\n end", "def get_tax(tax_value)\n return nil if tax_value.nil?\n tax_full = tax_value*100\n taxes = @client.taxes\n ix_tax = nil\n\n taxes.each do |tax|\n ix_tax=tax if tax.value==tax_full\n end\n\n if ix_tax.nil?\n model_tax = Invoicexpress::Models::Tax.new({\n :name => \"VAT#{tax_full.round}\",\n :value => tax_full,\n :region => \"Desconhecido\",\n :default_tax => 0\n })\n ix_tax = @client.create_tax(model_tax)\n end\n\n return ix_tax\n end", "def russian_tax_number(region: nil, type: :legal)\n inn_number(region, type)\n end", "def tax_information\n self.dig_for_array(\"taxInformation\")\n end", "def get_tax_code(companyId, id) path = \"/api/v2/companies/#{companyId}/taxcodes/#{id}\"\n get(path, {}, AvaTax::VERSION) end", "def tax(tax, options = {})\n get(\"taxes/#{tax}\", options).pop\n end", "def taxation_display_name\n I18n.translate 'orders.taxation.item_name'\n end", "def rrp_inc_sales_tax=(num)\n price_set(2, num)\n end", "def get_taxon(taxonomy_id, taxon_id)\n get \"/api/taxonomies/#{taxonomy_id}/taxons/#{taxon_id}\"\n end" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
taxYear : Integer The year in which tax was calculated
def tax_year self.dig_for_integer("taxYear") end
[ "def annual_tax\n self.dig_for_decimal(\"annualTax\")\n end", "def end_of_uk_tax_year\n if ( self.month < 4 or ( self.month == 4 and self.day <= 5 ) )\n Date.new( self.year, 4, 5 )\n else\n Date.new( self.year + 1, 4, 5 )\n end\n end", "def tax_rate\n Store::settings.tax_rate/100\n end", "def taxrate\n 0.10\n end", "def gas_year\n y = year\n if self< Date.new(y,10,1)\n y\n else\n y+1\n end\n end", "def tax_rate\n Store.settings.tax_rate/100\n end", "def tax_percentage\n 0\n end", "def year1\n @year1 = @subtotal3 + @mobilisation + @tupe\n end", "def number_of_taxa_by_year\n file_name = '/tmp/taxa_by_year' + '_' + Time.now.to_i.to_s + '.csv'\n a = {}\n descendants.find_each do |z|\n year = z.year_integer\n year = 0 if year.nil?\n a[year] = {valid: 0, synonyms: 0} unless a[year]\n if z.rank_string == 'NomenclaturalRank::Iczn::SpeciesGroup::Species'\n if z.cached_is_valid\n a[year][:valid] = a[year][:valid] += 1\n elsif TaxonNameRelationship.where_subject_is_taxon_name(z.id).with_type_array(::TAXON_NAME_RELATIONSHIP_NAMES_SYNONYM).any?\n a[year][:synonyms] = a[year][:synonyms] += 1\n end\n end\n end\n for i in 1758..Time.now.year do\n a[i] = {valid: 0, synonyms: 0} unless a[i]\n end\n b = a.sort.to_h\n CSV.open(file_name, 'w') do |csv|\n #CSV.generate do |csv|\n csv << ['year', 'valid species', 'synonyms']\n b.keys.each do |i|\n csv << [i, b[i][:valid], b[i][:synonyms]]\n end\n end\n end", "def year=(value)\n @year = value\n end", "def invoice_tax\n if address.present?\n self.invoice_tax_amount, self.tax_description = address.invoice_tax(invoice_items_amount)\n else\n self.invoice_tax_amount = 0\n end\n self.invoice_tax_amount\n end", "def year=(value)\n @year = value\n end", "def tax_rate\n write_attribute( :tax_rate, Float(line_items.inject(0) {|sum, l| sum + l.tax_rate}) / line_items.size)\n end", "def year=(newyear)\n @t_year = newyear.to_i\n end", "def annual_property_tax\n raise NotImplementedError, \"TODO: Implement me in a subclass!\"\n end", "def tax_rate\n self[:tax_rate] ||= Float(line_items.inject(0) {|sum, l| sum + l.tax_rate}) / line_items.size\n end", "def year() end", "def year\n return @year\n end", "def taxi(d)\n return (d /400.to_f) * 2 + 35\nend" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
totalExpenses : Decimal The Total Expenses associated with the listing
def total_expenses self.dig_for_decimal("totalExpenses") end
[ "def total_month_expenses\n sum_expenses(expenses_this_month)\n end", "def total_week_expenses\n sum_expenses(expenses_this_week)\n end", "def total_exp(expenses)\n total = 0\n expenses.each do |price|\n total = total + price\n end\n return total\nend", "def living_expense_total\n '%.2f' % \n Transaction.where(statement_id: object.id, trans_type: \"le\".upcase).sum(:amount)\n end", "def total\n Money.new(self.expense_entries.sum('unit_cost_pence * qty'))\n end", "def total_value\r\n return 0 if self.value.nil?\r\n self.value + self.expenses.includes(:expense).map{ |e|\r\n (e.quantity || 0) * (e.expense.signed_price || 0)\r\n }.sum\r\n end", "def total_year_expenses\n sum_expenses(expenses_this_year)\n end", "def total_cost\n @total_cost = 0\n expenses.each do |expense|\n @total_cost += expense.cost\n end\n @total_cost\n end", "def tot_deposits_made\n Rails.logger.debug(\"*** tot_deposits_made\")\n # note cannot use database sum because big_deposit is not native to database\n dep_result = 0.0\n EmployeeBenefit.where(\n \"employee_id = ? and eff_month = ? and eff_year = ? and deposited_at IS NOT NULL\",\n self.employee_id.to_s,\n self.eff_month.to_s,\n self.eff_year.to_s\n ).each do |eb|\n dep_result += round_money(eb.deposit)\n end\n Rails.logger.debug(\"*** dep_result: #{dep_result.inspect}\")\n return dep_result\n end", "def total_cost\n @total_cost ||= expenses.sum(:cost)\n end", "def get_total_expense_for_current_month\n\t\ttransactions = @user.transactions.with_month_year(@month, @year).expenses\n\t\t@current_month_total_expense = transactions.present? ? transactions.map(&:amount).sum.to_f.round(2) : 0.0\n\tend", "def sum_expense(expenses)\n sum = expenses.sum\n return sum\nend", "def calc_total\n # add up some of the values \n # store that into a variable \n @total = 0.0\n @expenses.each_with_index do |expense, index|\n # p expense\n # p index\n # p expense[:amt]\n # if index >= 0 && index <= 2\n @total = @total + expense[:amt]\n #@total += expense[:amt]\n end\n p @total\n p \"$#{@total}\"\nend", "def get_total_expense_for_current_year\n\t\ttransactions = @user.transactions.with_year(@year).expenses\n\t\t@current_year_total_expense = transactions.present? ? transactions.map(&:amount).sum.to_f.round(2) : 0.0\n\tend", "def dollars\n @dollars=0\n @expenditures.each do |currentexpenses|\n @dollars += currentexpenses.dollars\n end\n @dollars\n end", "def non_living_expense_total\n '%.2f' % \n Transaction.where(statement_id: object.id, trans_type: \"nle\".upcase).sum(:amount)\n end", "def index\n @expenses = current_user.expenses\n @total_amount = Expense.total(current_user.expenses)\n\n respond_to do |format|\n format.html # index.html.erb\n format.xml { render :xml => @expenses }\n end\n end", "def activities_price\n activities_total = 0\n @activities.each { |activity| activities_total += activity.price.to_f}\n return activities_total\n end", "def total\n (subtotal + total_vat - flag_discount - total_discount)\n end" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
totalUnits : Integer The Total Units associated with the listing
def total_units self.dig_for_integer("totalUnits") end
[ "def total_units=(value)\n @total_units = value\n end", "def total_units\n return @total_units\n end", "def units(units=nil)\n cur_page.units(units)\n end", "def units\n return @units\n end", "def units\n @units ||= get_units_for_property_id(propertyID)\n end", "def units=(value)\n @units = value\n end", "def total_items\n @total_items ||= full_response[\"TotalItems\"]&&full_response[\"TotalItems\"].to_i\n end", "def unit_count\n # Assuming items are available if in cart -- check is made at that time\n # Assuming that a format has only 1 processing unit\n # Assuming that an assembly has same amount of titles no matter what format\n items = self.line_items.includes(:product_format => [:format, :product])\n items.inject(0) {|sum, item| sum + item.quantity * item.product_format.format.units}\n end", "def units\n self.ListUnits.first.map { |u| map_unit(u) }\n end", "def available_units\n return 0 if status == NO_SPACE\n\n 999\n end", "def total\n @total\n end", "def total_meters\n data[:total_meters]\n end", "def units(location, count = 3, options={})\n options = {:q => location, :unit_count => count}.merge(options)\n make_friendly(self.class.get(\"/units.json\",\n {:query => options}))\n end", "def total_rooms\n self.dig_for_integer(\"totalRooms\")\n end", "def completed_units\n return @completed_units\n end", "def total_count\n results.total\n end", "def total_results\n response = list_request(list_params).run\n total_results = response.body.fetch('pageInfo', {})['totalResults']\n total_results ||= extract_items(response.body).size\n end", "def unit\n @units\n end", "def units\n Units.names\n end" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
turningRadius : String The available turning radius available in the industrial property. Turning radius is the size of smallest possible circular turn a vehicle is able to take
def turning_radius self.dig_for_string("turningRadius") end
[ "def inradius\n @inradius ||= 2 * self.area / self.perimeter\n end", "def base_radius\n 200\n end", "def max_radius\n 4000\n end", "def direction_to_grads(direction)\n case direction.to_s.downcase.to_sym\n when :north then 0\n when :northeast then 45\n when :east then 90\n when :southeast then 135\n when :south then 180\n when :southwest then 225\n when :west then 270\n when :northwest then 315\n else raise \"Don't know how to move in direction #{direction}\"\n end\n end", "def solar_radius? = unit == 'solar-radius'", "def radius_of_inscribed_circle\n area / (perimeter / 2)\n end", "def search_radius_unit\n @search_radius_unit ||= :km\n end", "def s_radius\r\n Math.sqrt((x**2)+(y**2)+(z**2))\r\n end", "def get_radius( diameter )\n return diameter / 2.0\nend", "def s_radius\n modulus\n end", "def c_radius\r\n s_radius*Math.sin(phi)\r\n end", "def radius\n @side_count * RADIUS_PER_SIDE\n end", "def get_filtering_radius\n result = send(FILTERING_RADIUS_FIELD)\n result.presence || 7\n end", "def rounded_corner(radius, direction)\n r = 0.5522 * radius\n old_mode, @mode = @mode, :relative\n case direction.to_s\n when 'lu' then curve_to(-r, 0, -radius, -(radius - r), -radius, -radius)\n when 'ld' then curve_to(-r, 0, -radius, radius - r, -radius, radius)\n when 'ru' then curve_to( r, 0, radius, -(radius - r), radius, -radius)\n when 'rd' then curve_to( r, 0, radius, radius - r, radius, radius)\n when 'ur' then curve_to( 0, -r, -(r - radius), -radius, radius, -radius)\n when 'ul' then curve_to( 0, -r, r - radius, -radius, -radius, -radius)\n when 'dr' then curve_to( 0, r, -(r - radius), radius, radius, radius)\n when 'dl' then curve_to( 0, r, r - radius, radius, -radius, radius)\n else raise TypeError(\"Invalid rounded corner argument: #{direction}\")\n end\n @mode = old_mode\n return self\n end", "def radius(treasure)\n influence = 10\n base_radius + influence * popularity(treasure)\n end", "def get_filtering_radius()\n result = self.send( FILTERING_RADIUS_FIELD )\n result.blank? ? 7 : result\n end", "def perimeter\n 2 * Math::PI * radius\n end", "def radian(degree)\n degree*(Math::PI/180)\n end", "def c_radius \n Math.sqrt((@x*@x)+(@y*@y))\n end" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
linkedOffice : Hash The Realogy office associated with the Non Realogy Listing. This field will be present only in case the caller is allowed to view the linked office TODO EXIST?
def linked_office self.dig_for_hash("linkedOffice") end
[ "def office_id\n self.dig_for_string(\"officeSummary\", \"officeId\")\n end", "def rfg_office_id\n self.dig_for_string(\"RFGOfficeId\")\n end", "def office_id\n self.dig_for_string(\"agentSummary\", \"office\", \"officeId\")\n end", "def linked\n @linked\n end", "def linked_editing_range\n attributes.fetch(:linkedEditingRange)\n end", "def add_office(office_name, port)\n @@lock.synchronize {\n if !(@@office_list.has_key?(office_name))\n @@office_list[office_name] = port\n end\n }\n end", "def is_linked_to_account?(data)\n if data['linked_accounts_names']\n data['linked_accounts_names'].include?(account.name)\n end\n end", "def chosen_office\n query = { id: store[:chosen_office_id] || store[:chosen_office_selection_id], business_id: business.id }\n\n # If we find ourselves in the situation that we have no chosen_office_id\n # Then we simply fallback onto the first available office from the Business.\n # This is risk free as it should only be possible in less complex test scenarios.\n Office.where(query).first\n end", "def links_already_read\n links_concerned= []\n if self.link_interactions.any?\n links_concerned=self.link_interactions.where('interaction_type_id' => InteractionType::ALREADY_READ).to_a.map{ |i| i.useful_link_id}\n end\n links_concerned\n end", "def linked_sections(return_associated_sections_on_nil = true)\n return associated_sections if return_associated_sections_on_nil && attributes[\"LinkedSectionTypes\"].nil?\n self.LinkedSectionTypes.SectionType.LinkedSections.LinkedSection\n end", "def linked?(cell)\n\t\t@links.key? cell\n\tend", "def linked? cell:\n\t\t\t@links.key? cell\n\t\tend", "def getOfficeNameObjName\r\n\t\t\treturn \"mfiforce__Office___c\"\r\n\t\tend", "def populate_offices_reps(office_official_data)\n reformatted_offices = []\n\n these_offices = office_official_data[\"offices\"]\n these_offices.map do |office|\n office[\"officialIndices\"].length.times do \n reformatted_offices << office\n end\n end\n\n my_officials = office_official_data[\"officials\"]\n\n reformatted_offices.each_with_index do |office, index|\n\n division = Division.find_by(identifier: office[\"divisionId\"])\n current_office = Office.find_by(name: office[\"name\"], division_id: division.id) || Office.create(name: office[\"name\"])\n division.offices << current_office unless division.offices.include?(current_office)\n\n politician = Politician.find_by(name: my_officials[index][\"name\"],\n state: if my_officials[index][\"address\"] != nil then my_officials[index][\"address\"][0][\"state\"] end) || \n Politician.create(name: my_officials[index][\"name\"], \n street: if my_officials[index][\"address\"] != nil then my_officials[index][\"address\"][0][\"line1\"] end,\n city: if my_officials[index][\"address\"] != nil then my_officials[index][\"address\"][0][\"city\"] end,\n state: if my_officials[index][\"address\"] != nil then my_officials[index][\"address\"][0][\"state\"] end,\n zip_code: if my_officials[index][\"address\"] != nil then my_officials[index][\"address\"][0][\"zip\"] end,\n party: my_officials[index][\"party\"],\n phone: if my_officials[index][\"phones\"] != nil then my_officials[index][\"phones\"][0] end,\n website_url: if my_officials[index][\"urls\"] != nil then my_officials[index][\"urls\"][0] end,\n photo_url: my_officials[index][\"photoUrl\"],\n twitter_id: if my_officials[index][\"channels\"] != nil &&\n my_officials[index][\"channels\"].find { |hash| hash[\"type\"] == \"Twitter\" } != nil\n then my_officials[index][\"channels\"].find { |hash| hash[\"type\"] == \"Twitter\" }[\"id\"] end,\n status: \"active\")\n\n current_office.politicians << politician unless current_office.politicians.include?(politician)\n end \n end", "def office_name\n self.dig_for_string(\"agentSummary\", \"office\", \"name\")\n end", "def acc_offices(rd_code)\n\t\tif rd_code == 'ALL'\n\t\t AccountingOffice.pluck(\"name\")\t\t\t\n\t\telse\n\t\t\tRegionalDirectorate.find_by_code(rd_code).accounting_offices.pluck(\"name\")\t\n\t\tend\n\tend", "def linked_editing_range_provider\n attributes.fetch(:linkedEditingRangeProvider)\n end", "def links\n # Since a slide can have multiple links, we need a hash\n links = Hash.new\n # a:r elements containing a link\n links_xml = @slide_xml.xpath('//a:r[a:rPr/a:hlinkClick]')\n if links_xml.empty?\n else\n links_xml.each do |f|\n # Text that is shown on the slide\n shown_text = f.xpath('a:t/text()')\n # Gather the ID of a link to search at the relation file\n link_id = f.xpath('string(a:rPr/a:hlinkClick/@r:id)')\n # Sadly the relation xml file is not well formed, we need to manipulate a string\n xml_string = @relation_xml.xpath('//@Id | //@Target')\n # Build an array of he single ids\n id_array = xml_string.to_s.scan(/rId./)\n # Build an array of the Target value\n content_array = xml_string.to_s.split(/rId./)\n # Remove the first empty entry\n content_array.delete_at(0)\n # Since powerpoint sometimes splits plain text into multiple paragraphs we need to check if the link is already present\n # If it is, we just concat the link_name string instead of storing it a second time\n if links.has_key?(content_array[id_array.index(link_id)])\n links[content_array[id_array.index(link_id)]] = links[content_array[id_array.index(link_id)]] + ' ' + shown_text.to_s\n else\n links.store(content_array[id_array.index(link_id)], shown_text.to_s)\n end\n end\n end\n\n link_on_picture_xml = @slide_xml.xpath('//p:pic[p:nvPicPr/p:cNvPr/a:hlinkClick]')\n if link_on_picture_xml.empty?\n else\n link_on_picture_xml.each do |f|\n # Gather the ID of a link to search at the relation file\n link_id = f.xpath('string(p:nvPicPr/p:cNvPr/a:hlinkClick/@r:id)')\n if link_id == ''\n else\n # Sadly the relation xml file is not well formed, we need to manipulate a string\n xml_string = @relation_xml.xpath('//@Id | //@Target')\n # Build an array of he single ids\n id_array = xml_string.to_s.scan(/rId./)\n # Build an array of the Target value\n content_array = xml_string.to_s.split(/rId./)\n # Remove the first empty entry\n content_array.delete_at(0)\n links.store(content_array[id_array.index(link_id)], 'Link on a picture')\n end\n end\n end\n links\n end", "def get_orglist_link\n @orglist ||= @links.select {|l| l.type == VCloud::Constants::ContentType::ORG_LIST}.first\n end" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
propertyFeatures : Array Collection of features for the property
def property_features self.dig_for_array("propertyFeatures") end
[ "def index\n @property_features = PropertyFeature.all\n end", "def features\r\n\t\t@features.map{|feature| feature}\r\n\tend", "def get_feature_properties(object_)\n object_.properties\n end", "def get_feature_properties(object)\n object.properties\n end", "def feature\n @property[:feature]\n end", "def features\n adapter.features.map { |name| feature(name) }.to_set\n end", "def features\n self.object.features.map do |f|\n FeatureSerializer.new(f)\n end\n end", "def features\n return @features\n end", "def features\n FEATURES\n end", "def values_for_properties; end", "def property_properties\n _property_properties\n end", "def features=(value)\n @features = value\n end", "def all_features\r\n feature_objects.inject([]) {|r, obj| r + obj.features }\r\n end", "def get_product_property_array\n\t\t\tarr = []\n\t\t\tself.properties.each do |property|\n\t\t\t\trow = {\n\t\t\t\t\tname: property.name,\n\t\t\t\t\tvalues: self.products_values_by_property(property).map {|products_value|\n\t\t\t\t\t\tproducts_value.properties_value.value\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tarr << row\n\t\t\tend\n\t\t\tarr\n\t\tend", "def features\n @features ||= ActiveRecordModel.find(:all).inject({}) do |ret,feature|\n name = feature.feature.to_sym\n ret[name]||=Feature.new(name)\n ret[name].percentage ||= feature.percentage\n ret[name].users[feature.user_id]=true if feature.user_id\n ret\n end\n end", "def features\n res = []\n each_element('feature') { |feature|\n res.push(feature.var)\n }\n res\n end", "def features\n if @features then\n return @features\n end\n\n @features = (0...@nFeatureEntries).map do |i|\n start = 16 + i * 12\n featureType, featureSetting, enableFlags, disableFlags = @bytes[start, 8].unpack('nnnn')\n\n Feature.new(\n featureType: featureType,\n featureSetting: featureSetting,\n enableFlags: enableFlags,\n disableFlags: disableFlags,\n )\n end\n end", "def properties_array\n @properties_array = self.singleton_class.get_bits_set_for_properties(properties)\n end", "def get_allowed_property_details\n allowed_property_details = []\n selectable_property_details = PropertyDetail.where(:selectable => true)\n selectable_property_details.each do |pd|\n allowed_property_details.push(pd[:msgid])\n end\n\n return allowed_property_details\n end" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
openHouse : [Hash] Collection of OpenHouses for the property
def open_house self.dig_for_array("openHouse") end
[ "def house\n fetch('game_of_thrones.houses')\n end", "def house_incumbencies\n respond_to?(:houseHasHouseIncumbency) ? houseHasHouseIncumbency : []\n end", "def houses\n respond_to?(:procedureStepHasHouse) ? procedureStepHasHouse : []\n end", "def house\n fetch('harry_potter.houses')\n end", "def house\n respond_to?(:houseIncumbencyHasHouse) ? houseIncumbencyHasHouse.first : nil\n end", "def create_houses house\n self.create_house(:owned => house[:owned],:rented => house[:rented],:co_provider => house[:co_provider])\n end", "def alliance_members( house )\n HHouse.joins( :al_alliances ).merge( al_alliances.where( h_peer_house_id: house.id ) )\n end", "def house_names(list)\n houses = list.map do |c|\n c[:house]\n end\n return houses.uniq\nend", "def list\n @fab_houses = FabHouse.find(:all, :order => 'name')\n end", "def index\n @open_house_times = OpenHouseTime.all\n end", "def index\n @ag_households = Ag::Household.all\n end", "def index\n @income_loss_house_properties = IncomeLossHouseProperty.all\n end", "def property_rooms\n self.dig_for_array(\"propertyRooms\")\n end", "def house_data(house)\n house.map do |data|\n House.create(name: data[\"name\"], region: data[\"region\"], coat_of_arms: data[\"coatOfArms\"], words: data[\"words\"], founded: data[\"founded\"], died_out: data[\"diedOut\"])\n end\nend", "def index\n @house_lists = HouseList.all\n end", "def index\n @owner_properties = @owner.ownerProperties\n end", "def households\n parent.households.where(:irs_group_id => self.id)\n end", "def index\n @hasuk_houses = HasukHouse.all\n end", "def house_managers\n\t\tPerson.find(:all, \n\t\t\t\t\t\t\t\t:conditions => \"people.position = 'House Manager' AND house_id = #{self.id}\", \n\t\t\t\t\t\t\t\t:joins => :houses, \n\t\t\t\t\t\t\t\t:order => \"last_name, first_name ASC\")\n\tend" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
remarks : Array Collection of remarks for the property
def remarks self.dig_for_array("remarks") end
[ "def remarks\n attributes[\"remarks\"] || Remarks.new(id)\n rescue StandardError\n Remarks.new(id)\n end", "def remark\n params['remark']\n end", "def inherited_exam_and_term_remarks\n reportable_ids = []\n terms = reportable.assessment_terms\n terms.each{ |at| reportable_ids << at.assessment_groups.collect(&:id)}\n build_general_remark(\"AssessmentGroup\",true, reportable_ids.flatten)\n reportable_ids = terms.collect(&:id)\n build_general_remark(\"AssessmentTerm\", true, reportable_ids)\n end", "def find_remarks_in_doc(doc,source)\n rems = doc.find('//db:remark')\n rems.map {|rem|\n c = rem.content.strip\n kw = STD_REMARK\n unless c.empty?\n kw1 = c.match('^([[:upper:]]+)([[:space:][:punct:]]|$)')\n unless kw1.nil?\n kw = kw1[1]\n c = kw1.post_match.lstrip\n end\n else\n c = EMPTY_REMARK\n end\n # TODO XPath integrieren? :path => rem.path, :parent => rem.parent.path,\n {:keyword => kw, :text => c, :file=>source, :line => rem.line_num}\n }\n end", "def remarks(keyword=nil)\n if keyword.nil?\n @remarks\n else\n ukw = keyword.upcase\n @remarks.find_all {|r| r[:keyword] == (ukw)}\n end\n end", "def fetch_general_remarks\n @remarks = new_collection\n build_general_remark(reportable.class.table_name.classify,false,[reportable.id]) \n if is_assessment_term? and inherit_from_exam_enabled?\n inherited_exam_remarks\n elsif is_assessment_plan? and inherit_from_term_exam_enabled?\n inherited_exam_and_term_remarks\n end\n @remarks\n end", "def add_remark( author, string )\n fail ArgumentError, 'Author cannot be blank.' if author.to_s.empty?\n fail ArgumentError, 'String cannot be blank.' if string.to_s.empty?\n\n (@remarks[author] ||= []) << string\n end", "def notes\n notes_range.to_a.map(&:to_s)\n end", "def personal_notes\n return @personal_notes\n end", "def person_notes\n return @person_notes\n end", "def idiom_notes\n @notes=[] # for redisplaying in case of error\n Rkanren::NREPS.times do |kind|\n @notes[kind]=params[Rkanren::KIND_REP_NOTE[kind]]\n end\n @notes\n end", "def note_contents\n self.notes.map(&:content)\n end", "def clear_remarks\n remarks.each(&:destroy)\n end", "def term_remark_for_planner_subjectwise(subject)\n assessment_terms = reportable.assessment_terms\n assessment_terms.each do |term|\n remark = gradebook_remarks.detect{|gr| gr.remarkable_type == \"Subject\" and \n gr.remarkable_id == subject.id and gr.student_id == student.s_id and \n gr.reportable_type == term.class.table_name.classify and\n gr.reportable_id == term.id}\n @remarks.push(build_remark_object(remark, \"subject\", subject.id, subject.name, term)) if remark.present? and remark.remark_body.present?\n end\n end", "def description\r\n params['remark']\r\n end", "def description\n note.description\n end", "def note_contents\n self.notes.collect(&:content)\n end", "def friendly_property_list(arr)\n return nil if arr.empty? # resources w/o properties\n\n # create an array of backticked property names for use in markdown.\n props = arr.map { |x| \"`#{x[\"name\"]}`\" }\n\n # build the text string containing all properties bolded w/ punctuation\n if props.size > 1\n props[-1] = \"and #{props[-1]}\"\n end\n text = props.size == 2 ? props.join(\" \") : props.join(\", \")\n text << ( props.size > 1 ? \" are the properties\" : \" is the property\" )\n text << \" available to this resource.\"\n text\n end", "def proptextarray(name) #:nodoc:\n @properties.select{ |f| f.name? name }.map{ |p| p.to_text }\n end" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
propertyFees : Array Collection of property fees
def property_fees self.dig_for_array("propertyFees") end
[ "def all_fees\n services.map{|el| el[:fee]}\n end", "def fixed_fees\n fixed_fee.nil? ? [] : [fixed_fee]\n end", "def fees(options = {})\n response = JSON.parse(@client.get(\"items/#{send(:id)}/fees\", options).body)\n fees = response.key?('fees') ? response['fees'] : []\n fees.map { |attributes| Promisepay::Fee.new(@client, attributes) }\n end", "def index\n @invoiceable_fees = InvoiceableFee.all\n end", "def get_fees_by_path(path)\n rules = Array(property_hash.get(path))\n\n rules.map do |rule|\n {\n amount: rule.to_f,\n from: rule.attributes[\"From\"],\n to: rule.attributes[\"To\"]\n }\n end\n end", "def fees\n resp = authenticated_post(\"account_fees\")\n resp.body\n end", "def get_fees(access_token, event)\n event_id = get_id_for(event)\n url = Util::Config.get('endpoints.base_url') +\n sprintf(Util::Config.get('endpoints.event_fees'), event_id)\n url = build_url(url)\n\n response = RestClient.get(url, get_headers(access_token))\n body = JSON.parse(response.body)\n \n fees = body.collect do |fee|\n Components::Fee.create(fee)\n end\n end", "def get_fees(event)\n event_id = get_id_for(event)\n url = Util::Config.get('endpoints.base_url') +\n sprintf(Util::Config.get('endpoints.event_fees'), event_id)\n url = build_url(url)\n\n response = RestClient.get(url, get_headers())\n body = JSON.parse(response.body)\n \n fees = body.collect do |fee|\n Components::EventFee.create(fee)\n end\n end", "def fees\n initial_hash = Hash.new { |h, k| h[k] = Hash.new(0.0) }\n @export.fees.each_with_object(initial_hash) do |fee, hash|\n hash[fee.bank_account][fee.category] += fee.amount || 0.0\n end\n end", "def fees\n @fees ||= {\n \"insurance_fee\" => (commission * ASSURANCE_SHARE).round(0),\n \"assistance_fee\" => (ASSISTANCE_COST * rental.duration).round(0)\n }.tap { |fees| fees[\"drivy_fee\"] = commission - fees.values.inject(:+) }\n end", "def verify_fees(test_data)\n fees = test_data[CoreUseOfCollectionsData::FEE_GRP.name] || [CoreUseOfCollectionsData.empty_fee]\n fees.each_with_index do |fee, index|\n verify_values_match(fee[CoreUseOfCollectionsData::FEE_CURRENCY.name], element_value(fee_currency_input index))\n verify_values_match(fee[CoreUseOfCollectionsData::FEE_VALUE.name], element_value(fee_value_input index))\n verify_values_match(fee[CoreUseOfCollectionsData::FEE_NOTE.name], element_value(fee_note_input index))\n end\n end", "def index\n @shipping_fees = ShippingFee.all\n end", "def verify_fees(test_data)\n fees = test_data[UseOfCollections::FEE_GRP.name] || [UseOfCollections.empty_fee]\n fees.each_with_index do |fee, index|\n verify_values_match(fee[UseOfCollections::FEE_CURRENCY.name], element_value(fee_currency_input index))\n verify_values_match(fee[UseOfCollections::FEE_VALUE.name], element_value(fee_value_input index))\n verify_values_match(fee[UseOfCollections::FEE_NOTE.name], element_value(fee_note_input index))\n end\n end", "def blocks_get_fees\n fees = @client.query_get \"blocks/getFees\"\n end", "def getCollectionFeeObjName\r\n\t\t\treturn \"mfiforce__Collection_Fee__c\"\r\n\t\tend", "def index\n @additional_fees = AdditionalFee.all\n end", "def total_fees\n total_fees = 0\n courses.each do |course|\n # Add total fees (while checking if the student is a Domestic or International student)\n total_fees += self.enrolment_type == 'Domestic' ? course.domestic_cost : course.international_cost \n end\n total_fees\n end", "def fees\n raise Sibit::NotSupportedError, 'Btc.com doesn\\'t provide recommended fees'\n end", "def fee\n response = JSON.parse(@client.get(\"transactions/#{send(:id)}/fees\").body)\n response.key?('fees') ? Promisepay::Fee.new(@client, response['fees']) : nil\n end" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
webSites : Array Collection of websites for the property
def websites self.dig_for_array("webSites") end
[ "def websites\n Array(@websites)\n end", "def websites\n return @websites\n end", "def websites=(value)\n @websites = value\n end", "def websites\n query = {\n :module => 'WebsiteFeed',\n :output => 'xml'\n }.merge(@auth)\n result = self.do_get(query)\n result = [result] if result.is_a?(Hash)\n result\n end", "def sites\n @sites ||= []\n end", "def websites\n contact_method.select { |cm| cm['InternetWebAddress'] }\n end", "def sites\n return @sites\n end", "def addl_websites\n self.dig_for_array(\"addlWebSites\")\n end", "def sites\n return @sites\n end", "def websites=(websites)\n set_collection(CapsuleCRM::Website, websites)\n end", "def webpages\n @data[\"webpage\"]\n end", "def sites\n @sites ||= GeoListings.find_sites @sites_specs\n @sites\n end", "def structured_websites\n sites = two_own_websites_and_one_pdf\n\n Website::HOSTS[1..-2].each do |host| # no \"other\"\n sites << websites.send(host).first\n end\n sites.compact\n end", "def sites\n\t\t\t @sites ||= load_site_collections\n\t\t\tend", "def structured_websites\n # TODO: Refactor!\n sites = [\n websites.own.non_pdf.first,\n websites.own.pdf.first\n ]\n Website::HOSTS[1..-2].each do |host| # no \"other\"\n sites << websites.send(host).first\n end\n sites.compact\n end", "def urls\n return @urls\n end", "def urls\n each_url.to_set\n end", "def hub_site_urls\n return @hub_site_urls\n end", "def extract_web_entries\n @web_sites = myworkspace.web_sites\n @web_pages = myworkspace.web_pages\n @web_forms = myworkspace.web_forms\n @web_vulns = myworkspace.web_vulns\n end" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
media : Array Collection of media for this property
def media self.dig_for_array("media") end
[ "def list_media\n self.class.get(\"/gp/gpMediaList\")\n end", "def case_media_list\n\t\t@case_media_attachments = @surgery_case.case_media.case_media_attachments\n\tend", "def list\n make_request(\"GetMediaList\").xpath(\"/response/media\").map {|node| MediaListItem.new(node) }\n end", "def media_list\n @redis.hkeys(\"contact_media:#{self.id}\") - ['pagerduty']\n end", "def media\n return @media\n end", "def media\n @fields.values.inject(Widgets::Media.new) do |media, field|\n media + field.widget.media\n end\n end", "def mediafiles\n source_node.xpath('.//MediaFile').to_a.collect do |node|\n Mediafile.new(node)\n end\n end", "def media_streams\n return @media_streams\n end", "def media=(value)\n @media = value\n end", "def media_types\n return @media_types\n end", "def media_file_names()\n file_names = []\n file_names.push(self['--media1'].last) if !!self['--media1']\n file_names.push(self['--media2'].last) if !!self['--media2']\n file_names.push(self['--media3'].last) if !!self['--media3']\n file_names.push(self['--media4'].last) if !!self['--media4']\n return file_names\n end", "def load_mediasets\n []\n end", "def items\n media.map(&:proper_items_by_time).flatten\n end", "def media_sizes\n return @media_sizes\n end", "def media_elements_at\n case self.kind\n when AUDIO, VIDEO1, VIDEO2\n resp = self.media_elements_slides.first\n resp.nil? ? nil : resp.media_element\n when COVER, IMAGE1, IMAGE3\n self.media_elements_slides.first\n when IMAGE2\n resp = [nil, nil]\n mes = self.media_elements_slides\n resp[mes[0].position - 1] = mes[0] if !mes[0].nil?\n resp[mes[1].position - 1] = mes[1] if !mes[1].nil?\n resp\n when IMAGE4\n resp = [nil, nil, nil, nil]\n mes = self.media_elements_slides\n resp[mes[0].position - 1] = mes[0] if !mes[0].nil?\n resp[mes[1].position - 1] = mes[1] if !mes[1].nil?\n resp[mes[2].position - 1] = mes[2] if !mes[2].nil?\n resp[mes[3].position - 1] = mes[3] if !mes[3].nil?\n resp\n else\n nil\n end\n end", "def media_streams=(value)\n @media_streams = value\n end", "def media_quality_list\n return @media_quality_list\n end", "def index\n @media_attachments = MediaAttachment.all\n end", "def media_list\n DATABASE.execute(\"SELECT media.cover_name FROM media_members JOIN media ON media_members.media_id = media.id WHERE media_members.member_id = #{id};\")\n end" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
schools : Array Collection of schools for the property TODO blank strings in returned hash
def schools self.dig_for_array("schools") end
[ "def schools_list\n @schools_list\n end", "def schools\n return @schools\n end", "def schools=(value)\n @schools = value\n end", "def schools\n self.course_sections\n &.collect{ |section| section.schools }\n .reduce(:+)\n .uniq\n end", "def school_list\n @schools.to_a\n end", "def parse_schools_data(schools)\n parsed_schools = schools\n return parsed_schools\n end", "def schools\n Rollcall::School.for_user(self).order(:display_name)\n end", "def schools(school_code = nil)\n data = get_data(\"api/v2/schools/#{school_code}\")\n if school_code.nil?\n models = []\n data.each do |school_data|\n models << AeriesNetApi::Models::School.new(school_data)\n end\n models\n else\n AeriesNetApi::Models::School.new(data)\n end\n end", "def school_list(abbrs)\n abbrs.map { |abbr|\n s = school(abbr)\n if s.nil?\n Err.nonexistent_school(abbr)\n end\n s\n }\n end", "def organize_schools(schools)\n by_location = {}\n schools.each do |school, location_hash|\n # binding.pry\n location_hash.each do |symbol, location|\n if by_location[location] == nil\n by_location[location] = [school]\n else\n by_location[location] << school\n end\n end\n end\n by_location\n end", "def organize_schools(schools)\n by_location = {}\n schools.each do |school, location_hash|\n location_hash.each do |a, location|\n if by_location[location] == nil\n by_location[location] = [school]\n else\n by_location[location] << school\n end\n end\n end\n by_location\nend", "def schools(starting_position)\n (@leaderboard.drop(starting_position-1) || []).map { |sr| sr.school }\n end", "def supported_schools\n @supported_schools ||= School.where(school_type: ['ECS', 'ESMS', 'ES', 'MS'])\n end", "def students\n Rollcall::Student.find_all_by_school_id schools\n end", "def index\n @cms_schools = Cms::School.all\n end", "def organize_schools(array)\n school_hash = {}\n array.each do |key, value|\n value.each do |key2, place|\n if !school_hash.include?(place)\n school_hash[place] = [key]\n else \n school_hash[place] << key\n end\n end\n end\n return school_hash\nend", "def school_names(potter)\n houses = []\n potter.each {|spot| houses << spot[:school]}\n return houses.uniq!.compact!\nend", "def user_schools\n @user_schools ||= School.where(account_name: enabled_account_names)\n end", "def school_1(schools)\n schools.find { |school| school.id == @school_1_id }\n end" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
propertyRooms : Array Collection of propertyRooms for the property
def property_rooms self.dig_for_array("propertyRooms") end
[ "def set_PropertyRooms(value)\n set_input(\"PropertyRooms\", value)\n end", "def room_list\n return rooms\n end", "def list_all_rooms_in_hotel\n\n return @rooms.map { |room| room }\n end", "def list_all_rooms\n return @rooms\n end", "def each_room\n get_attribute(:rooms).each_pair\n end", "def create_rooms\n @rooms = []\n (1..20).each do |room_num|\n room = Hotel::Room.new(room_num: 1)\n room.room_num = room_num\n @rooms << room\n end\n return @rooms\n end", "def make_rooms\n room_array = []\n (1..20).each do |room_num|\n room_array << Room.new(room_num)\n end\n return room_array\n end", "def floor_rooms\n\t\t@rooms[floor_no]\n\tend", "def rooms\n data = client.get \"#{api_prefix}/rooms\"\n\n Room::Collection.new self, data\n end", "def rooms\n if @rooms.empty? && cache != :none\n api.get_joined_rooms.joined_rooms.each do |id|\n ensure_room(id)\n end\n end\n\n @rooms.values\n end", "def manage_rooms\n @userId = UserService.find_user session[:user]\n @ListOfRooms = RoomService.find_all();\n @RoomTypes = RoomTypeService.find_all()\n @ListOfBuildings = BuildingService.find_all()\n @RoomList = []\n @ListOfBuildings.each {|b|\n rooms = RoomService.find_all_in_building(b)\n @RoomList << [b,rooms]\n }\n end", "def list_rooms\n @rooms.each do\n |room_name, room|\n puts \"#{room_name} : #{room.available_space}\"\n end\n end", "def list_reserved_rooms\n @guests.each do |name, guest|\n guest.list_reserved_rooms\n end\n end", "def list_reserved_rooms\n unless @rooms.empty?\n @rooms.each do |key, room|\n puts room.report_lister\n end\n end\n end", "def rooms_list\n self.class.get(hipchat_api_url_for('rooms/list'), :query => {:auth_token => @token})\n end", "def list_rooms\n @rooms.each do |room_name, cap| \n puts \"#{room_name} #{cap.available_space()}\"\n end\n end", "def sections\n sections = []\n rooms.each do |room|\n room.products.each do |product|\n product.product_sections.each do |section|\n sections << section\n end\n end\n end\n sections\n end", "def items\r\n return @rooms.map { |room| room.items }.flatten\r\n end", "def list_available_rooms\n p \"Available Rooms:\"\n available_rooms.each do |room_type, rooms|\n p \"#{room_type} = #{rooms.length}\"\n end\n p\n end" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
propertyFloors : Array Collection of property floors for the property
def property_floors self.dig_for_array("propertyFloors") end
[ "def floppies\n @floppies\n end", "def floors\n self.dig_for_array(\"floors\")\n end", "def floppies=(list)\n if list.class == Array\n list = List.new(list)\n list.each_with_index do |value, index|\n if value.is_a?(Hash)\n list[index] = Floppy.new(value)\n end\n end\n end\n @floppies = list\n end", "def property_features\n self.dig_for_array(\"propertyFeatures\")\n end", "def property_fees\n self.dig_for_array(\"propertyFees\")\n end", "def create_floors \n\t\ti = @max_floor\n\t\twhile i > 0 do\n\t\t\t@floors.push(Floors.new(i, @elevators, @people))\n\t\t\ti -= 1\n\t\tend\n\tend", "def for_property\n # Cast the resulting hash.\n slice = Property.column_names - [\"id\", \"feed_id\", \"created_at\", \"updated_at\"]\n\n Hash[\n field_attributes.map do |field, css|\n if css.present?\n [ field, FieldPathMapping.css_path_relative_to_property(css) ]\n end\n end.compact\n ].slice(*slice)\n end", "def friendly_property_list(arr)\n return nil if arr.empty? # resources w/o properties\n\n # create an array of backticked property names for use in markdown.\n props = arr.map { |x| \"`#{x[\"name\"]}`\" }\n\n # build the text string containing all properties bolded w/ punctuation\n if props.size > 1\n props[-1] = \"and #{props[-1]}\"\n end\n text = props.size == 2 ? props.join(\" \") : props.join(\", \")\n text << ( props.size > 1 ? \" are the properties\" : \" is the property\" )\n text << \" available to this resource.\"\n text\n end", "def all_floors\n all_floors = Array(1..self.number_of_floors)\n end", "def floors\n abbr = 'NP'\n floors_array.map { |x| \"#{x}#{abbr}\" }.join ','\n end", "def values_for_properties; end", "def properties\n properties = []\n relations = self.property_relations\n relations.each do |relationship|\n properties.push relationship.property\n end\n properties\n end", "def property_names; @properties.keys; end", "def property_ids\n result = Array.new\n self.properties.each do |p|\n result << p.id\n end\n result\n end", "def floors\n # start with a range of all the floors\n # collect a hash of the apartments on that floor and the floor number\n (1..@number_of_floors).collect{ |floor_number| {:apartments=>floor(floor_number), :floor=>floor_number}}\n end", "def properties\n @rules.map(&:property).uniq\n end", "def propvaluearray(name) #:nodoc:\n @properties.select{ |f| f.name? name }.map{ |p| p.value }\n end", "def all_facts\n @facts.values.collect { |property_facts| property_facts.values }.flatten\n end", "def index\n @property_land_shapes = PropertyLandShape.all\n end" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
floors : Array Collection of floors for the property
def floors self.dig_for_array("floors") end
[ "def property_floors\n self.dig_for_array(\"propertyFloors\")\n end", "def all_floors\n all_floors = Array(1..self.number_of_floors)\n end", "def floppies\n @floppies\n end", "def create_floors \n\t\ti = @max_floor\n\t\twhile i > 0 do\n\t\t\t@floors.push(Floors.new(i, @elevators, @people))\n\t\t\ti -= 1\n\t\tend\n\tend", "def floors\n # start with a range of all the floors\n # collect a hash of the apartments on that floor and the floor number\n (1..@number_of_floors).collect{ |floor_number| {:apartments=>floor(floor_number), :floor=>floor_number}}\n end", "def floors\n abbr = 'NP'\n floors_array.map { |x| \"#{x}#{abbr}\" }.join ','\n end", "def floppies=(list)\n if list.class == Array\n list = List.new(list)\n list.each_with_index do |value, index|\n if value.is_a?(Hash)\n list[index] = Floppy.new(value)\n end\n end\n end\n @floppies = list\n end", "def create_floors(floor_count)\n floors = []\n (floor_count+1).times { |i| floors << Floor.new(i) }\n floors\n end", "def available_floors\n self.dig_for_integer(\"availableFloors\")\n end", "def floors_available\n available_floors_array = all_floors\n self.offices.each do |office|\n available_floors_array.delete(office.floor)\n end\n available_floors_array\n end", "def number_of_floors\n\t\t@floors.count\n\tend", "def number_of_floors\n @floors.count\n end", "def allocation_floors\n Floor.with_allocations_to_person(self.id)\n # floors = []\n # self.allocations.each do |alloc|\n # idx = floors.find_index { |f| f[:floor].id == alloc.space.floor_id }\n # floors << {floor: alloc.space.floor, allocations: []} unless idx\n # idx ||= floors.size - 1\n # floors[idx][:allocations] << alloc\n # end\n # sorted_floors = []\n # Building.all.with_floors.each do |building|\n # building.wings.each do |wing|\n # wing.floors.each do |floor|\n # idx = floors.find_index { |f| f[:floor].id == floor.id }\n # sorted_floors << floors[idx] if idx\n # end\n # end\n # end\n # sorted_floors\n end", "def get_building_floors\n\t\tbuilding = Building.find(params[:building_id])\n\t\tif building.floors.count > 0\n\t\t\trender :json => building.floors.map{|f| f.as_json(:only => [:description, :number, :photo], :methods => :photo)}.to_json\n\t\telse\n\t\t\trender :json => [:message => \"El edificio no tiene pisos disponibles\"].to_json\n\t\tend\n\tend", "def current_company_floors(company_id)\n current_company_floors_ar = []\n company_offices_in_this_building = self.offices.where(company_id: company_id)\n company_offices_in_this_building.each do |office|\n current_company_floors_ar << office.floor\n end\n current_company_floors_ar\n end", "def state_changes_for_floors(*floors, open: true)\n result = []\n floors.reduce do |from, to|\n result += floors_sequence(from, to).map { |x| [:floor, x] }\n result += [[:doors_open, true], [:doors_open, false]] if open\n to\n end\n result\n end", "def index\n @floors = Floor.all\n end", "def set_floors(floor_count, main_coridor_count, sub_coridor_count)\n floor_count.times do |count|\n floor = Floor.new(count + 1, @hotel)\n floor.main_coridors = set_main_coridors(floor, main_coridor_count, sub_coridor_count)\n @hotel.floors << floor\n end\n end", "def get_adjacent_floors tile\n floors = Array.new\n @maze.get_adjacent_tiles(tile).each do |tile|\n floors.push tile if tile.is_floor\n end\n floors\n end" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
subUnits : Array Collection of sub units for the property
def sub_units self.dig_for_array("subUnits") end
[ "def units\n squares.each_with_object([]) do |square, array|\n square.units.each { |unit| array << unit }\n end\n end", "def subunit_to_unit; end", "def units\n @units ||= get_units_for_property_id(propertyID)\n end", "def units\n\t\tret = []\n\t\t@db.smembers('sgt-structure:' + @id + ':units').each do |uid|\n\t\t\tret.push(getUnit(@db, uid))\n\t\tend\n\t\tret\n\tend", "def subunit=(value)\n @subunit = value\n end", "def units\n self.ListUnits.first.map { |u| map_unit(u) }\n end", "def units\n armyunits = []\n @army.each{|army| next if army.nil? ; armyunits += army.units}\n return armyunits\n end", "def fetch_sub_units\n @logger.info \"EXEC(SUB_UNITS) : Unit=#{@unit.name}, #{@unit.unit_number}\"\n\n # sub_units (dens, patrols, etc.) are on the setup wizard page, item #3\n # listed in a table, with the second column the list of names\n dash_page = login\n unit_page = dash_page.link_with(text: %r{#{@unit.unit_number}}).click\n @logger.info 'CLICK : Site Setup Wizard'\n site_setup_wizard_page = unit_page.link_with(text: %r/Site Setup Wizard/).click\n @logger.info 'CLICK : Add Dens or Patrols'\n add_dens_page = site_setup_wizard_page.link_with(text: %r/Add Dens or Patrols/).click\n sub_unit_names = add_dens_page.search('table#ctl00_mainContent_adminsubunitmgr_tblData tr td[2]').children.map(&:text)\n @logger.info \"SUB UNIT NAMES : #{sub_unit_names.join(', ')}\"\n logout\n\n unless sub_unit_names.nil? || sub_unit_names.empty?\n sub_unit_names = remove_dups(remove_empties(sub_unit_names)).map(&:strip)\n sub_unit_names.delete('Patrols')\n @sub_units = sub_unit_names.map { |su| Scoutlander::Datum::SubUnit.new(name: su, inspected: true) }\n end\n end", "def units\n Units.names\n end", "def subunit\n return @subunit\n end", "def units\n @units ||= Unit.select{|u| u.dimension == dimension}.inject(Hash.new{|h, s| h[s] = []}){|h, u| h[u.system] << u;h}\n end", "def list_units(incategory = false)\n units = []\n if !incategory\n @units_config.each_value do |val|\n val['units'].each_key { |key| units << key }\n end\n else\n @units_config[@unit_category]['units'].each_key { |key| units << key }\n end\n units\n end", "def allowed_units_for_property(property)\n if @allowed_units_for_property.key?(property)\n @allowed_units_for_property[property]\n else\n @globally_allowed_units\n end\n end", "def returnUnitsAsArray\n return [@UUnits, @DBUnits] if isUnits\n []\n end", "def units(by=nil)\n Unit.units.values.select { |unit| unit.dimensions == self }.map(&by).to_a\n end", "def units\n game.squares.each_with_object([]) do |square, collection|\n square.units.each do |unit|\n collection << unit if unit.player_number == number\n end\n end\n end", "def rdfs_sub_property_of\n end", "def get_selected_units\n units = []\n @sel_area.each {|tile| units.push(tile.unit_contents) }\n units.flatten!\n units.uniq!\n return units\n end", "def get_units\n return self.get_probe.results_units\n end" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
suites : Array Collection of sub units/suites for the property
def suites self.dig_for_array("suites") end
[ "def suite_data\n data.fetch(:suites, [])\n end", "def test_suites\n TestSuiteModelItem.list(self.root)\n end", "def collect_specs(suites)\n suites.each_with_object([]) do |suite, specs|\n specs.concat(suite['specs'])\n specs.concat(collect_specs(suite['suites'])) if suite['suites']\n end\n end", "def suites\n @api.get_suites( :project_id => @id )\n end", "def collect_specs(suites)\n suites.inject([]) do |specs, suite|\n specs = (specs | suite['specs']) if suite['specs']\n specs = (specs | collect_specs(suite['suites'])) if suite['suites']\n specs\n end\n end", "def tests_suites\n @tests_suites.keys.sort\n end", "def extract_test_suites\n test_suites = []\n\n suites = @xml.xpath(\"//testsuites//testsuite\")\n suites.each do |suite|\n name = suite.attributes[\"name\"].value\n duration = suite.attributes[\"time\"].value.to_f\n test_count = suite.attributes[\"total\"].value.to_i\n test_cases = extract_test_cases(suite)\n test_suites.push(\"name\" => name, \"duration\" => duration,\n \"test_count\" => test_count, \"test_cases\" => test_cases)\n end\n\n test_suites\n end", "def test_suites\n all(QTest::TestSuite, project: @project.id, test_cycle: @id)\n end", "def test_suites\n all(QTest::TestSuite, project: @project.id, release: @id)\n end", "def suites(project_id)\n get(\"get_suites/#{project_id}\")\n end", "def test_suites_for_test_suite suite_id\n args = { :testsuiteid => suite_id }\n make_call(\"tl.getTestSuitesForTestSuite\", args, \"1.0\")\n end", "def suites\n # Since we're not using `ruby -Itest -Ilib` to run the tests, we need to add this directory to the `LOAD_PATH`\n $LOAD_PATH.unshift \"./test\", \"./spec\", \"./lib\"\n\n begin\n # Fire up this Ruby file. Let's hope it actually has tests.\n require \"./#{testable.file}\"\n rescue LoadError => e\n # Fail with a happier error message instead of spitting out a backtrace from this gem\n warn \"Failed loading test file:\\n#{e.message}\"\n return []\n end\n\n suites = runner.suites\n\n # Use some janky internal APIs to group test methods by test suite.\n suites.each_with_object({}) do |suite_class, test_suites|\n # End up with a hash of suite class name to an array of test methods, so we can later find them and ignore empty test suites\n test_suites[suite_class] = runner.test_methods(suite_class) if runner.test_methods(suite_class).any?\n end\n end", "def _run_suites suites, type\n suites.map { |suite| _run_suite suite, type }\n end", "def test_suite_list(_)\n test_suites = TestSuitePrivate.all_test_suites(@path_to)\n @console.info self, TestSuitePrivate.table(test_suites)\n end", "def suites\n # Since we're not using `ruby -Itest -Ilib` to run the tests, we need to add this directory to the `LOAD_PATH`\n $:.unshift \"./test\", \"./lib\"\n\n if framework == :testunit1\n Test::Unit::TestCase.class_eval {\n @@test_suites = {}\n def self.inherited(klass)\n @@test_suites[klass] = true\n end\n def self.test_suites\n @@test_suites.keys\n end\n def self.test_methods\n public_instance_methods(true).grep(/^test/).map(&:to_s)\n end\n }\n end\n\n begin\n # Fire up the Ruby files. Let's hope they actually have tests.\n @files.each { |f| load f }\n rescue LoadError => e\n # Fail with a happier error message instead of spitting out a backtrace from this gem\n abort \"Failed loading test file:\\n#{e.message}\"\n end\n\n # Figure out what test framework we're using\n case framework\n when :minitest\n suites = MiniTest::Unit::TestCase.test_suites\n when :testunit1, :testunit2\n suites = Test::Unit::TestCase.test_suites\n else\n not_supported\n end\n\n # Use some janky internal APIs to group test methods by test suite.\n suites.inject({}) do |suites, suite_class|\n # End up with a hash of suite class name to an array of test methods, so we can later find them and ignore empty test suites\n suites[suite_class] = suite_class.test_methods if suite_class.test_methods.size > 0\n suites\n end\n end", "def tests\n @tests ||= begin\n # With each suite and array of tests,\n # and with each test method present in this test file,\n # shove a new test method into this collection.\n suites.inject(TestCollection.new) do |collection, (suite_class, test_methods)|\n test_methods.each do |test_method|\n find_locations = (@files.size == 1 && @line)\n collection << TestMethod.create(suite_class, test_method, find_locations)\n end\n collection\n end\n end\n end", "def compare_suites(suite_a, suite_b); end", "def tests\n @tests ||= begin\n require \"m/test_collection\"\n require \"m/test_method\"\n # With each suite and array of tests,\n # and with each test method present in this test file,\n # shove a new test method into this collection.\n suites.each_with_object TestCollection.new do |(suite_class, test_methods), collection|\n test_methods.each do |test_method|\n collection << TestMethod.create(suite_class, test_method)\n end\n end\n end\n end", "def suite_data_for(name)\n data.fetch(:suites, {}).find(-> { Hash.new }) do |suite|\n suite.fetch(:name, nil) == name\n end\n end" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
mlsInformation : Array Collection of MLS information for the property
def mls_information self.dig_for_array("mlsInformation") end
[ "def mls_numbers\n self.dig_for_array(\"listingSummary\", \"mlsNumbers\")\n end", "def listpropertiesMP\n @api.request 'listproperties_MP'\n end", "def property_features\n self.dig_for_array(\"propertyFeatures\")\n end", "def properties_word_ml\n @properties.map { |k, v| transform_attr(k, v) }.join\n end", "def get_allowed_property_details\n allowed_property_details = []\n selectable_property_details = PropertyDetail.where(:selectable => true)\n selectable_property_details.each do |pd|\n allowed_property_details.push(pd[:msgid])\n end\n\n return allowed_property_details\n end", "def proptextlistarray(name) #:nodoc:\n @properties.select{ |f| f.name? name }.map{ |p| Vpim.decode_text_list(p.value_raw) }.flatten\n end", "def getlpars\n @log.debug(\"Getting lpar list on #{self.name}\") \n @lpars = Array.new\n begin \n\tcommand = \"lssyscfg -r lpar -m #{@name} -F name\"\n output = self.hmc.run_command(command).chomp()\n\tif output =~ /^HSCL/\n\t raise PowerVMTools::Error::CustomError, {:message => output, :command => command}\n\tend\n output.split(\"\\n\").each do |entry|\n @lpars.push(entry)\n end\n return @lpars\n rescue PowerVMTools::Error::CustomError => e\n\te.handle\n end\n end", "def names\n @mplab_pin.names\n end", "def sinfo\n sinfo = []\n parse(SINFO_REGEX) do |title_id, section_id, code, info|\n code = RakeMKV::Code[code]\n title = title_id.to_i\n section = section_id.to_i\n sinfo[title] ||= Array.new\n sinfo[title][section] ||= Hash.new\n sinfo[title][section][code] = info\n end\n sinfo\n end", "def get_all_property_info_objects()\n return @@parsedPropertyHash.values\n end", "def cm\n return self.map { |l| l.cm}\n end", "def ms_level\n fetch_by_acc('MS:1000511')\n end", "def features\r\n\t\t@features.map{|feature| feature}\r\n\tend", "def measures\n instance.measures.values\n end", "def property_details(separator = ': ')\n variant_properties.collect {|vp| [vp.property.display_name ,vp.description].join(separator) }\n end", "def windows_information_protection_app_learning_summaries\n return @windows_information_protection_app_learning_summaries\n end", "def med_list\n list = self.medications.where(active: true)\n list.map{|med| \"#{med.name} #{med.strength} #{med.freq}\"} if list.any?\n end", "def windows_information_protection_network_learning_summaries\n return @windows_information_protection_network_learning_summaries\n end", "def monitors\n @monitors=@pool_hash.properties.basic.monitors || []\n end" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
taxInformation : Array Tax information associated with the Property
def tax_information self.dig_for_array("taxInformation") end
[ "def getTaxAddress property\n\t\tarr = []\n\t\taddray = property[:taxAddr].split\n\t\tarr << (addray[0...-3].join \" \")\n\t\tarr << addray[-3]\n\t\tarr << addray[-2]\n\t\tarr << addray[-1]\n\t\tarr << property[:owns]\n\t\tarr << property[:owner]\n\t\tarr\n\tend", "def annual_property_tax\n raise NotImplementedError, \"TODO: Implement me in a subclass!\"\n end", "def tax_details_if_enabled\n if @fee.tax_enabled?\n @tax_collections = @fee.tax_collections\n @total_tax = @tax_collections.map do |x|\n FedenaPrecision.set_and_modify_precision(x.tax_amount).to_f\n end.sum.to_f\n @tax_slabs = @tax_collections.group_by { |x| x.tax_slab }\n end\n end", "def index\n @tax_informations = TaxInformation.all\n end", "def create_order_tax_details\n self.order_tax_detail = {total_tax_paid: 0.0, tax_breakup: [], total_convenience_charges: 0.0, tax_breakup_on_convenience_charges: []}\n end", "def tax_charges\n order_items.map {|item| item.tax_charge }\n end", "def p_i\n\t\tinsurance + property_tax\n\tend", "def tax_index\n\n end", "def invoice_tax\n if address.present?\n self.invoice_tax_amount, self.tax_description = address.invoice_tax(invoice_items_amount)\n else\n self.invoice_tax_amount = 0\n end\n self.invoice_tax_amount\n end", "def taxpayer_individual_details(taxpayer)\n { 'ins1:ForeName': taxpayer.firstname, 'ins1:Surname': taxpayer.surname }\n end", "def taxa_array()\n # list of taxa of each tree of the spot\n taxa_tab = []\n trees.each do |tree|\n taxa_tab << tree.taxon.common_noun\n end\n # taxa tab without duplication\n taxa_tab.uniq!\n return taxa_tab\n end", "def compute_tax(line); end", "def tax_rates\n []\n end", "def annual_tax\n self.dig_for_decimal(\"annualTax\")\n end", "def get_all_tax\n taxes = Tax.all\n json_response(taxes)\n end", "def getTaxon\n classification = ['Kingdom:', 'Phylum:', 'Class:', 'Order:', 'Family:', 'Genus:', 'Species:', 'Organism:']\n i = 0\n gb = @genbanks.next_entry\n gb.classification.each do |taxon|\n puts classification[i] + \"\\t\" + taxon\n i += 1\n end\n puts classification[i] + \"\\t\" + @gb.organism\n end", "def to_taxa(options = {})\n self.api_response ||= FlickrPhoto.get_api_response(self.native_photo_id, :user => options[:user] || self.user)\n taxa = if api_response.tags.blank?\n []\n else\n # First try to find taxa matching taxonomic machine tags, then default \n # to all tags\n tags = api_response.tags.values.map(&:raw)\n machine_tags = tags.select{|t| t =~ /taxonomy\\:/}\n taxa = Taxon.tags_to_taxa(machine_tags) unless machine_tags.blank?\n taxa ||= Taxon.tags_to_taxa(tags, options)\n taxa\n end\n taxa.compact\n end", "def getTaxon\n classification = ['Kingdom:', 'Phylum:', 'Class:', 'Order:', 'Family:', 'Genus:', 'Species:', 'Organism:']\n i = 0\n @gbkObj.classification.each do |taxon|\n puts classification[i] + \"\\t\" + taxon\n i += 1\n end\n puts classification[i] + \"\\t\" + @gbkObj.organism\n end", "def to_active_array\n array = []\n array << [self.tax1_name, self.tax1_value] if self.tax1_enabled.to_i == 1\n array << [self.tax2_name, self.tax2_value] if self.tax2_enabled.to_i == 1\n array << [self.tax3_name, self.tax3_value] if self.tax3_enabled.to_i == 1\n array << [self.tax4_name, self.tax4_value] if self.tax4_enabled.to_i == 1\n array\n end" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
listingSummary listingId : String Globally unique identifier assigned to a listing by Realogy
def listing_id self.dig_for_string("listingSummary", "listingId") end
[ "def rfg_listing_id\n self.dig_for_string(\"listingSummary\", \"RFGListingId\")\n end", "def listing_id(listing_id)\n ensure_valid_parameter('listing id', listing_id, lambda {|k| k.is_a? Fixnum and k >= 0})\n @request[:listing_id] ||= []\n @request[:listing_id] << listing_id\n self \n end", "def parse_listing_id\n listing_id = @listing_url.match(/\\d{6}/)\n { listing_id: listing_id.to_s.to_i }\n end", "def listing_url\n self.dig_for_string(\"listingSummary\", \"listingURL\")\n end", "def listing_type\n self.dig_for_string(\"listingSummary\", \"listingType\")\n end", "def set_listing\n\t\t@listing = Listing.find(params[:id])\n\tend", "def get_by_id(listing_id)\n find(listing_id)\n end", "def show\n\t\t@single_listing = Listing.find_by(id: params[:id])\n\tend", "def snipe_listing_from_url(listing_url)\n snipe = listing_url.match(/\\/listing(\\/[\\w\\-]+){4}|\\/listings\\/(\\d{7,})\\/gallery(\\?refer=map)?/)\n if snipe\n result1, result2, result3 = snipe[1], snipe[2], snipe[3]\n if result1\n listingid = result1.sub(\"/\",\"\")\n elsif result2\n listingid = result2\n elsif result3\n listing = result3\n end\n end\n end", "def edit\n @listing = Listing.find(params[:id])\n end", "def edit\n\t\t@listing = Listing.find_by(id: params[:id]) \n\tend", "def get_listing_from_id\n #convert URL id to integer and set into instance var listing_id\n @listing_id = params[:id].to_i\n #look up the listing based on id and cast into instance var\n @listing = Listing.find_by_id(@listing_id)\n #if no listing found redirect back to previous page with error\n if !@listing\n flash[:error] = \"That listing does not exist\"\n custom_redirect_back\n end\n end", "def listed_on\n self.dig_for_string(\"listingSummary\", \"listedOn\")\n end", "def get_account_listing(account_id, listing_id)\n where(account_id: account_id).find(listing_id)\n end", "def delete\n api_delete(\"/listings/#{@listing_id}\")\n end", "def listing_number\n \t self.LN\n end", "def update\n respond_to do |format|\n if @listing.update(listing_params)\n format.html { redirect_to @listing, notice: 'Sale listing was successfully updated.' }\n format.json { render :show, status: :ok, location: @listing }\n else\n format.html { render :edit }\n format.json { render json: @listing.errors, status: :unprocessable_entity }\n end\n end\n end", "def edit\n # this allows the user to edit an existing todo item\n # this is done by first finding the the todo items listing params :id\n @listing = Listing.find(params[:id])\n end", "def update\n @listing = Listing.find(params[:id])\n\n respond_to do |format|\n if @listing.update_attributes(params[:listing])\n flash[:notice] = 'Listing was successfully updated.'\n format.html { redirect_to(@listing) }\n format.xml { head :ok }\n else\n format.html { render :action => \"edit\" }\n format.xml { render :xml => @listing.errors, :status => :unprocessable_entity }\n end\n end\n end" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
isActive : Boolean Will be 'true' if this is an Active listing
def active? self.dig_for_boolean("listingSummary", "isActive") end
[ "def active\n if @context\n add_breadcrumb 'Active', polymorphic_path( [ :active, @context, :memberships ] )\n end\n @memberships = @memberships.active\n index\n end", "def active?\n @_active_status ||= ( attributes.include?('active') ? !!self.active : true )\n end", "def active?\r\n self.state == :active\r\n end", "def enable_for_public\n # TODO Create and write all the checks necessary for the listing to become active and public\n self.update_attribute(:active, true)\n end", "def active?\n state == \"ACTIVE\"\n end", "def is_active\n return @is_active\n end", "def user_status_active?\n return self.status==\"Active\" ? true : false\n end", "def is_active \n\t\tif self.servings == 0\n\t\t\tself.active = false\n\t\tend\n\t\tactive\n\tend", "def get_active\n @active\n end", "def is_active=(value)\n @is_active = value\n end", "def mark_active\n if ACTIVE_BY_DEFAULT.include? self.name\n self.active = true\n end\n end", "def current_active?(active)\n active == current_active\n end", "def active?\n\t\t\treturn account_life_cycle_status == ACTIVE \n\t\tend", "def status\n is_active? ? \"Active\" : \"In Active\"\n end", "def is_active_list?(user, list)\n\t\treturn user.active_list_id == list.id\n\tend", "def make_active\n self.status = \"A\"\n end", "def active=(value)\n @active = value\n end", "def make_active\n self.status = ACTIVE\n end", "def active? path\n \"active\" if current_page? path\n end" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
listingType : String The type of Listings you are interested in. It can be ForSale, ForRent, ForSaleCommercial and ForLeaseCommercial.
def listing_type self.dig_for_string("listingSummary", "listingType") end
[ "def listing(type, uid)\n self.get(\"listing_types/#{type}/listings/#{uid}.json\", :transform => Listing)\n end", "def index\n @listing_types = ListingType.all\n end", "def set_ListingType(value)\n set_input(\"ListingType\", value)\n end", "def listing_id\n self.dig_for_string(\"listingSummary\", \"listingId\")\n end", "def create\n @listing_type = ListingType.new(listing_type_params)\n\n respond_to do |format|\n if @listing_type.save\n format.html { redirect_to @listing_type, notice: 'Listing type was successfully created.' }\n format.json { render :show, status: :created, location: @listing_type }\n else\n format.html { render :new }\n format.json { render json: @listing_type.errors, status: :unprocessable_entity }\n end\n end\n end", "def create\n @listing_type = ListingType.new(params[:listing_type])\n\n respond_to do |format|\n if @listing_type.save\n flash[:notice] = 'ListingType was successfully created.'\n format.html { redirect_to(admin_listing_type_url(@listing_type)) }\n else\n format.html { render :action => \"new\" }\n end\n end\n end", "def rfg_listing_id\n self.dig_for_string(\"listingSummary\", \"RFGListingId\")\n end", "def update\n @listing_type = ListingType.find(params[:id])\n\n respond_to do |format|\n if @listing_type.update_attributes(params[:listing_type])\n flash[:notice] = 'ListingType was successfully updated.'\n format.html { redirect_to(admin_listing_type_url(@listing_type)) }\n else\n format.html { render :action => \"edit\" }\n end\n end\n end", "def update\n respond_to do |format|\n if @listing_type.update(listing_type_params)\n format.html { redirect_to @listing_type, notice: 'Listing type was successfully updated.' }\n format.json { render :show, status: :ok, location: @listing_type }\n else\n format.html { render :edit }\n format.json { render json: @listing_type.errors, status: :unprocessable_entity }\n end\n end\n end", "def create_listing(type, uid)\n self.put(\"listing_types/#{type}/listings/#{uid}.json\", :transform => Listing)\n end", "def new\n @listing_type = ListingType.new\n\n respond_to do |format|\n format.html # new.html.erb\n end\n end", "def set_listing\n\t\t@listing = Listing.find(params[:id])\n\tend", "def listing_id(listing_id)\n ensure_valid_parameter('listing id', listing_id, lambda {|k| k.is_a? Fixnum and k >= 0})\n @request[:listing_id] ||= []\n @request[:listing_id] << listing_id\n self \n end", "def offering_type\n data.offering_type\n end", "def discussion_type\n listing_type.eql?(\"request\") ? \"offer\" : \"request\"\n end", "def listing_url\n self.dig_for_string(\"listingSummary\", \"listingURL\")\n end", "def listing_type\n return nil if share_type.nil?\n return share_type.top_level_parent.transaction_type || share_type.top_level_parent.name\n end", "def is_listing_fee?\n sku_type.to_s == Product::SKU_TYPE_LISTING_FEE && self.internal?\n end", "def index\n @listings = SaleListing.all\n end" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
listedOn : String The date when the Listing became active
def listed_on self.dig_for_string("listingSummary", "listedOn") end
[ "def active_listings\n all_listings.select do |listing|\n listing.check_in >= current_time\n end\n end", "def past_listings\n all_listings.select do |listing|\n listing.check_out < current_time\n end\n end", "def is_in_hot_list\n if self.added_to_hot_list.nil?\n return false\n end\n\n if self.added_to_hot_list >= 4.days.ago.utc\n return true\n end\n\n return false\n end", "def in_hot_list\n where(:added_to_hot_list.gte => 4.days.ago.utc)\n end", "def active_on\n available_from || begins\n end", "def active?\n limit_date >= Date.current \n end", "def new_listings\n ll = listings\n return ll if self.last_alerted_at.nil?\n ll.select { |listing| listing.updated_at >= self.last_alerted_at }\n end", "def trans_list_at_date(trans_at_date)\n trans_at_date.css('ol li')\n end", "def date_active \n self.head.date_active\n end", "def get_date_completed_element_for_list(list_name = '', visible: :visible)\n date_completed_list_element = get_checklist_li_item_element(list_name)\n expect(date_completed_list_element).to have_xpath(USERCHECKLIST_DATECOMPLETED_DESC_XPATHSTR, visible: visible)\n date_completed_list_element.find(:xpath, USERCHECKLIST_DATECOMPLETED_DESC_XPATHSTR, visible: visible)\nend", "def list\n @checklists = Checklist.find(:all, :order => 'released_on DESC')\n end", "def mark_as_joining\n\t date = params[:date]\n\t\tresume = Resume.find(params[:id])\n\t\tif date.present?\n resume.update_columns(:joining_date => date)\n flash[:success] = \"You have successfully updated the joining date \\'#{resume.name}'\\.\"\n\t\tend\n\t\trender 'index'\n\tend", "def set_date \n @listing.list_date = DateTime.strptime(listing_params[:list_date], '%m/%d/%Y') if I18n.locale==:en\n end", "def due_today\n TodosList.new(@todos.filter { |todo| todo.due_today? })\n end", "def do_before_save\n self.display_on = Date.today unless self.display_on\n end", "def bookable?(date)\n date < booking_date_limit\n end", "def getScheduledOn\r\n\t\t\t\t\treturn @scheduledOn\r\n\t\t\t\tend", "def shown_invite_friends!\n update_column(:invited_friends_at, Time.current)\n end", "def set_join_date\n membership = current_membership\n membership.join_date = Time.zone.now\n membership.save\n end" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
photoCount : Integer Number of photos associated with listing
def photo_count self.dig_for_integer("listingSummary", "photoCount") end
[ "def photo_count\n return size\n end", "def get_counts(args = {})\r\n Net::Flickr.instance().request('flickr.photos.getCounts', args).at('photocounts')\r\n end", "def index\n @photos = Flickr.get_photos(params[:flickr_id], params[:n].to_i, PAGESIZE)\n @total_photos = @photos.total.to_i\n @photos_per_request = @photos.perpage.to_i\n end", "def number_of_images\n images.count\n end", "def listing_count\n @listing_count ||= 0\n end", "def albums_user_photo_count\n count = 0\n albums.each do |a|\n vk_client.photos.get(owner_id: a.owner_id, album_id: a.aid).each do |p|\n count += 1 if p.user_id == user_id\n end\n end\n count\n end", "def check_photo_count\n if @pictureable.photos.count > 9\n @upload_limit = 10\n end\n end", "def count\n @file_list.count\n end", "def image_count\n @image_count ||= 0\n end", "def get_image_count\n begin\n if @filename == ''\n raise \"No file name specified\"\n end\n str_uri = $productURI + \"/slides/\" + @filename + \"/images\"\n signed_uri = Common::Utils.sign(str_uri)\n response = RestClient.get(signed_uri, :accept => 'application/json')\n json = JSON.parse(response)\n return json[\"Images\"][\"List\"].count\n rescue Exception=>e\n print e\n end\n end", "def count_geographic_occurrences_of_photos(locations)\n locations.map { |l|\n { name: l.description, lat: l.latitude.to_f, lon: l.longitude.to_f, z: l.photos.count, ownURL: location_path(l) }\n }\n end", "def version_count\n return inject(0) {|sum, photo| sum += photo.versions.size} \n end", "def count_tagged_images\n self.tagged_images_number = TaggedImage.where(:website_id => self.id).count(:id, :distinct => true)\n end", "def photos=(value)\n @photos = value\n end", "def count_media\n general_data['nb_media']\n end", "def photos_per_product\n @photos_per_product ||= -1\n end", "def max_photos\n if photos.size > MAX_PHOTO\n errors.add(:photos, :too_many)\n end\n end", "def number_of_albums()\n return albums.length\n end", "def summarise_photos\n s = photos.group(:ptype).count.map do |k, v| ActionController::Base.helpers.pluralize(v, (k.blank? ? 'photo' : k).downcase)\n end.join(', ')\n s.blank? ? '0 photos' : s\n end" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
videoCount : Integer Number of videos associated with listing
def video_count self.dig_for_integer("listingSummary", "videoCount") end
[ "def videos_count\n videos.joins(:video_graph).where(:video_graphs => { :status => VideoGraph.get_status_number(:ready) }).count\n end", "def update_video_count(model)\n begin\n model.video_count = model.videos.where(status:'published').count\n model.save!\n rescue\n puts \"there was a problem updating the published video count\"\n end\n end", "def videos_count\n if self.parent.nil?\n child_categories = Category.where(\"parent_id = ?\", self.id)\n cnt = 0\n child_categories.each do |cat|\n cnt = cnt + cat.videos.where(\"published=TRUE\").count\n end\n if cnt == 0\n return self.videos.where(\"published=TRUE\").count\n else\n return cnt\n end\n else\n return self.videos.where(\"published=TRUE\").count\n end\n end", "def votes\n event_video_votes.all.count\n end", "def get_video_count(account_id, args = {})\n api(\"accounts/#{account_id}/counts/videos\")\n end", "def playlist_count\n return @playlists.length\n end", "def playlist_count()\n return @playlist.length\n end", "def save_video_viewcount\n \t\tresponse = HTTParty.get('https://www.googleapis.com/youtube/v3/videos?part=contentDetails,statistics&id=4Y4YSpF6d6w&key=AIzaSyBeMC4eMb_u-IqGeYRSpAzED8m5RcjTumg')\n \t\tputs \"Calling save video count\"\n\t puts \"DATA - #{response[\"items\"][0][\"statistics\"][\"viewCount\"]}\"\n\t self.update.attributes(:ranking => response[\"items\"][0][\"statistics\"][\"viewCount\"] )\n \tend", "def video_streams ; self.count_get(MediaInfoLib_StreamKind::Video, -1); end", "def movie_count\n agent = Mechanize.new\n page = agent.get(IMDB_URL)\n page.links_with(css: 'td.titleColumn a').count\n end", "def listing_count\n @listing_count ||= 0\n end", "def count\n response = call_api method: :get\n json = JSON.parse(response.body)\n if response.code.to_i==200\n ap(\"Found #{json['live_streams'].size} Live Streams total.\", color: {string: :green})\n else\n ap(JSON.parse(response.body))\n end\n return response\n end", "def count_media\n general_data['nb_media']\n end", "def playlistlength\n status['playlistlength'].to_i\n end", "def countAvailableMedia\n count = 0\n \n PVRSearch.all.each do |pvr|\n collection = MediaScanner.createCollectionFromPVRSearch(pvr)\n count += collection.media_items.count\n end\n \n count += MediaScanner.createCollectionFromAdHocDirectory().media_items.count\n \n count\n end", "def count\n return youtube_data_repo.count\n end", "def guest_count\n @guest_list.count\n p @count\n end", "def num_video(id_user)\n msg_query(id_user).map { |msg| msg['video'] }.sum\nend", "def video_viewed(video)\n # get video reaction and comment count from fb\n engagement = Facebook.engagement(video)\n comment_count = engagement['engagement']['comment_plugin_count']\n reaction_count = engagement['engagement']['reaction_count']\n # find old count of reaction and comment\n old_reaction_count = video.reaction_count\n old_comment_count = video.comment_count\n # update video with the new like and comment counts\n video.update(reaction_count: reaction_count, comment_count: comment_count)\n # increment reaction and comment count based on the latest values from fb\n name = member_name(video)\n member_data = member_data(name)\n total_video_count = video.user.videos.count\n total_reaction_count = member_data['total_reaction_count'] + reaction_count - old_reaction_count\n total_comment_count = member_data['total_comment_count'] + comment_count - old_comment_count\n # score formula\n member_data['total_reaction_count'] = total_reaction_count\n member_data['total_comment_count'] = total_comment_count\n Rails.logger.info \"old_reaction_count=#{old_reaction_count} old_comment_count=#{old_comment_count}\"\n Rails.logger.info \"engagement=#{engagement}\"\n Rails.logger.info \"member_data=#{member_data}\"\n Rails.logger.info(\"total_video_count =#{total_video_count} total_reaction_count =#{total_reaction_count} total_comment_count =#{total_comment_count} score = #{score(total_video_count, total_reaction_count, total_comment_count)}\")\n leaderboard.rank_member(name, score(total_video_count, total_reaction_count, total_comment_count), member_data.to_json)\n # return result\n json_friendly(name)\n end" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
geographicRegions : [Hash] A collection of geographic regions associated with the location of the property
def geographic_regions self.dig_for_array("listingSummary", "geographicRegions") end
[ "def geographic_regions\n self.dig_for_array(\"geographicRegions\")\n end", "def regions\n\t\tignore_nil { country.regions }\n\tend", "def regions\n DefinitionFactory.regions_repository.all\n end", "def geographies\n codes = geography_codes.map(&:first)\n codes.each_with_object({}) do |code, hash|\n hash[code] = OnsOpenApi.context(context_name).geographies(code)\n end\n end", "def getRegionsData\n \n begin\n totRegionsData = self.getRegionsTotData\n rescue CustomException => e\n raise e\n return\n end\n \n if totRegionsData != nil\n \n idRegions = totRegionsData[\"total_regions_ids\"]\n \n attributes = Hash.new\n \n idRegions.each do |idRegion|\n\tbegin\n\t attributesRegion = self.getRegionsDataForNodeId(idRegion)\n\trescue CustomException => e\n\t raise e\n\t return\n\tend\n\t\n\tattributes[idRegion] = attributesRegion\n\t\n end \n \n attributes = checkLatLong (attributes);\n returnData = Hash.new\n returnData [\"regions\"] = attributes;\n returnData [\"tot\"] = totRegionsData;\n \n return returnData;\n \n end\n return nil\n end", "def regions\n RegionBuilder.new(self.region_data || {})\n end", "def listRegions\n\t\t\treturn MU::Config.listRegions\n\t\tend", "def regions\n AWS.regions.map(&:name)\n end", "def filter_regions\n regions = if @country_list.present?\n filtered_region_list\n else\n regions_list\n end\n {\n 'name': 'regions[]',\n 'options': regions,\n 'selected': @filter.regions,\n }\n end", "def countries_and_regions\n return @countries_and_regions\n end", "def regions\n client.get_stats('/stats/regions')\n end", "def gke_locations\n @gke.list_project_locations(\"projects/#{@project}\").locations.select do |x|\n x.name.start_with?(\"#{@region}-\")\n end.map(&:name)\n end", "def all_regions\n @wines = Wine.all\n regions = []\n all_regions = []\n @wines.each do |wine|\n regions.push(wine.region)\n end\n all_regions = regions.uniq.sort_by(&:downcase)\n all_regions\n end", "def countries_and_regions=(value)\n @countries_and_regions = value\n end", "def geographic_names\n return @geographic_names if !@geographic_names.nil?\n @geographic_names ||= geographic_area.geographic_name_classification.delete_if{|k,v| v.nil?}\n @geographic_names ||= {}\n end", "def regions_for_solr\n regions.collect{|r| r.region_id}.join(' ')\n end", "def index\n @administrative_regions = AdministrativeRegion.all\n end", "def available_services_regions\n unless @regions\n @regions = []\n service_catalog.each do |service|\n next if service[\"type\"]==\"identity\"\n (service[\"endpoints\"] || []).each do |endpint|\n @regions << endpint['region']\n end\n end\n @regions.uniq!\n end\n @regions\n end", "def allowed_regions\n template.dig('Metadata', 'Region') || []\n end" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
mlsNumbers : [String] A collection of MLS numbers associated with the Listing
def mls_numbers self.dig_for_array("listingSummary", "mlsNumbers") end
[ "def parseNumberList(numbers:String, verbose:boolean = false)\n number_values = numbers.split(\";\")\n creation = CollectibleAttributeList.create\n number_values.each do |value|\n if value =~ /[uU]nknown/\n creation.collectible_attributes.create(collectible_attribute_value: NumberCollectibleAttribute.create(value:0))\n else\n creation.collectible_attributes.create(collectible_attribute_value: NumberCollectibleAttribute.create(value:value))\n end\n if verbose\n puts \"-\\t\" + creation.collectible_attributes.last.collectible_attribute_value.value.to_s\n end\n end\n return creation\nend", "def mls_information\n self.dig_for_array(\"mlsInformation\")\n end", "def listing_number\n \t self.LN\n end", "def list_collection_numbers\n store_location\n query = create_query(:CollectionNumber, :all)\n show_selected_collection_numbers(query)\n end", "def prepare_numbers(number_list)\n number_list.normalized_numbers.map { |n| Phony.formatted(n, format: :international_relative, spaces: '') }.join(';')\n end", "def dids_911\n dids_911_list ? dids_911_list.collection : []\n end", "def generate_number_strings(cleaned_multiline_digits)\n cleaned_multiline_digits.map do |multiline_digit|\n convert_to_numbers(multiline_digit)\n end\nend", "def addl_phone_numbers\n self.dig_for_array(\"addlPhoneNumbers\")\n end", "def incoming_numbers\n authorize!(:manage, Form)\n @numbers = configatron.incoming_sms_numbers\n render_csv(\"elmo-#{current_mission.compact_name}-incoming-numbers\")\n end", "def list_sms(cmgl,encoding=:ascii)\n #logger.info \"Listing %s messages\" % cmgl\n cmgf=set_cmgf(encoding)\n messages = []\n meta([cmgl,cmgf],this_method).each_with_index do |msg,index|\n begin\n messages << SMS.new(msg, encoding)\n rescue SMSParseException\n #logger.error $!.message\n end\n end\n return messages\n end", "def monthly_ledgers\n list_months.map {|my| Compta::MonthlyLedger.new(self, my)}\n end", "def add_phone_numbers!(list_of_phone_numbers)\n phone_numbers = Expect.normalize_string_to_array(list_of_phone_numbers)\n \n phone_numbers.each do |phone_number|\n add_phone_number!(phone_number)\n end\n end", "def num_strings(num_strings)\n @num_strings = num_strings\n end", "def alma_availability_mms_ids\n fetch(\"bound_with_ids\", [id])\n end", "def read_L4(number)\n num_i = number.to_i\n million_i, thousand_i = num_i.divmod(1_000_000)\n million_s = case million_i\n when 1 then 'un millon'\n when 2..9 then SP_UNITS_A[million_i]\n when 10..99 then read_L1(million_i)\n when 100..999 then read_L2(million_i)\n else ''\n end\n million_s += ' millones ' unless million_i == 1\n million_s + case thousand_i\n when 1..999 then read_L2(thousand_i)\n when 1000..999_999 then read_L3(thousand_i)\n else ''\n end\n end", "def ids_in_list_limit\n 1499\n end", "def get_num_strings\n @num_strings\n end", "def normalized_numbers\n numbers.map(&:to_number)\n end", "def ids_in_list_limit\n 1499\n end" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
RFGListingId : String A short unique identifier assigned to the Listing by Realogy
def rfg_listing_id self.dig_for_string("listingSummary", "RFGListingId") end
[ "def listing_id\n self.dig_for_string(\"listingSummary\", \"listingId\")\n end", "def listing_id(listing_id)\n ensure_valid_parameter('listing id', listing_id, lambda {|k| k.is_a? Fixnum and k >= 0})\n @request[:listing_id] ||= []\n @request[:listing_id] << listing_id\n self \n end", "def parse_listing_id\n listing_id = @listing_url.match(/\\d{6}/)\n { listing_id: listing_id.to_s.to_i }\n end", "def rp_id; end", "def rfg_id\n self.dig_for_string(\"companySummary\", \"RFGID\")\n end", "def identifier\n rdf_resource.to_s\n end", "def relist_child_id\n item_hash.deep_find([:listing_details, :relisted_item_id])\n end", "def trip_id\n \"#{number}-#{kind}-#{direction - 1}\"\n end", "def list_item_unique_id\n return @list_item_unique_id\n end", "def rfg_office_id\n self.dig_for_string(\"RFGOfficeId\")\n end", "def set_listing\n\t\t@listing = Listing.find(params[:id])\n\tend", "def get_by_id(listing_id)\n find(listing_id)\n end", "def identifier\n rdf_resource\n end", "def rrid\n \"#\" + rid\n end", "def origin_listing_id\n case self.broker_site_name\n when 'citi-habitats'\n reg = self.origin_url.match(/\\/(\\d+)\\//)\n if reg\n reg[1]\n end\n else\n nil\n end\n end", "def list_id\n raise 'answer a unique, never changing value'\n end", "def local_id; end", "def list_item_id\n return @list_item_id\n end", "def list_item_unique_id=(value)\n @list_item_unique_id = value\n end" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
isNewConstruction : Boolean Will be 'true' if the Property is a new construction
def new_construction? self.dig_for_boolean("listingSummary", "isNewConstruction") end
[ "def creation?\n self.diff['attributes']['new'] && !self.diff['attributes']['old']\n end", "def new?\n self.design_type == 'New'\n end", "def is_constructor()\n res = super(context,self)\n return res\n end", "def constructor?\n @constructor\n end", "def is_constructor?\n __boolean(OCI_ATTR_IS_CONSTRUCTOR)\n end", "def composed?\n metadata.creation_mode == COMPOSED\n end", "def add_construction(construction_name, construction_props = nil)\n\n # First check model and return construction if it already exists\n self.getConstructions.each do |construction|\n if construction.name.get.to_s == construction_name\n OpenStudio::logFree(OpenStudio::Debug, 'openstudio.standards.Model', \"Already added construction: #{construction_name}\")\n return construction\n end\n end\n \n OpenStudio::logFree(OpenStudio::Debug, 'openstudio.standards.Model', \"Adding construction: #{construction_name}\") \n\n # Get the object data\n data = self.find_object(self.standards['constructions'], {'name'=>construction_name})\n if !data\n OpenStudio::logFree(OpenStudio::Warn, 'openstudio.standards.Model', \"Cannot find data for construction: #{construction_name}, will not be created.\")\n return false #TODO change to return empty optional material\n end\n \n # Make a new construction and set the standards details\n construction = OpenStudio::Model::Construction.new(self)\n construction.setName(construction_name)\n standards_info = construction.standardsInformation\n\n intended_surface_type = data['intended_surface_type']\n unless intended_surface_type\n intended_surface_type = ''\n end\n standards_info.setIntendedSurfaceType(intended_surface_type)\n\n standards_construction_type = data['standards_construction_type']\n unless standards_construction_type\n standards_construction_type = ''\n end\n standards_info.setStandardsConstructionType(standards_construction_type)\n\n # TODO: could put construction rendering color in the spreadsheet\n\n # Add the material layers to the construction\n layers = OpenStudio::Model::MaterialVector.new\n data['materials'].each do |material_name|\n material = add_material(material_name)\n if material\n layers << material\n end\n end\n construction.setLayers(layers)\n\n # Modify the R value of the insulation to hit the specified U-value, C-Factor, or F-Factor.\n # Doesn't currently operate on glazing constructions\n if construction_props\n #puts construction.class #puts construction.methods.sort\n # Determine the target U-value, C-factor, and F-factor\n target_u_value_ip = construction_props['assembly_maximum_u_value']\n target_f_factor_ip = construction_props['assembly_maximum_f_factor']\n target_c_factor_ip = construction_props['assembly_maximum_c_factor']\n \n OpenStudio::logFree(OpenStudio::Debug, 'openstudio.standards.Model', \"#{data['intended_surface_type']} u_val #{target_u_value_ip} f_fac #{target_f_factor_ip} c_fac #{target_c_factor_ip}\")\n \n if target_u_value_ip && !(data['intended_surface_type'] == 'ExteriorWindow' || data['intended_surface_type'] == 'Skylight')\n \n # Set the U-Value\n construction.set_u_value(target_u_value_ip.to_f, data['insulation_layer'], data['intended_surface_type'], true)\n \n elsif target_f_factor_ip && data['intended_surface_type'] == 'GroundContactFloor'\n \n # Set the F-Factor (only applies to slabs on grade)\n # TODO figure out what the prototype buildings did about ground heat transfer\n #construction.set_slab_f_factor(target_f_factor_ip.to_f, data['insulation_layer'])\n construction.set_u_value(0.0, data['insulation_layer'], data['intended_surface_type'], true)\n \n elsif target_c_factor_ip && data['intended_surface_type'] == 'GroundContactWall' \n \n # Set the C-Factor (only applies to underground walls)\n # TODO figure out what the prototype buildings did about ground heat transfer\n #construction.set_underground_wall_c_factor(target_c_factor_ip.to_f, data['insulation_layer'])\n construction.set_u_value(0.0, data['insulation_layer'], data['intended_surface_type'], true)\n \n end\n\n end\n\n OpenStudio::logFree(OpenStudio::Info, 'openstudio.standards.Model', \"Adding construction #{construction.name}.\") \n\n return construction\n \n end", "def chk_create\n raise(RuntimeError, \"Illegal operation when not creating a source\") unless(@current.attributes)\n end", "def valid_data_on_creation?\n valid_data_on_creation\n end", "def new_record?\n !_persisted_obj\n end", "def new_line?\n self[:value] ||= {}\n @new_line ||= CustomFields::CheckBox.true_or_false?(self[:value][:new_line])\n end", "def complete_property_checkups?\n nil\n end", "def new?\n\t\t\t@fieldlets.empty? || self.all?{|x| x.new?} \n\t\tend", "def new_version?\n new_record? || (changed_versioned_attributes - mutable_attributes).length > 0\n end", "def built?\n @built = false if @built.nil?\n @built\n end", "def new_version?\n !!(version_obj && version_obj.new_record?)\n end", "def new_section?\n @new_section\n end", "def before_save_collection_association\n @new_record_before_save = new_record?\n true\n end", "def new\n @prop = @scene.scene_props.build\n end" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
listingURL : String Public URL where the listing can be accessed
def listing_url self.dig_for_string("listingSummary", "listingURL") end
[ "def list_url; end", "def set_listing\n\t\t@listing = Listing.find(params[:id])\n\tend", "def info_url\n result = lib.web_page_url(self)\n root = result['return']\n root += \"/\" unless root[-1,1] == '/'\n \"#{root}listinfo/#{name}\"\n end", "def show\n\t\t@single_listing = Listing.find_by(id: params[:id])\n\tend", "def listing_id\n self.dig_for_string(\"listingSummary\", \"listingId\")\n end", "def dir_listing_url\n return URI.parse( \"#{@opts.base_url}/#{@opts.branch}/\" )\n end", "def snipe_listing_from_url(listing_url)\n snipe = listing_url.match(/\\/listing(\\/[\\w\\-]+){4}|\\/listings\\/(\\d{7,})\\/gallery(\\?refer=map)?/)\n if snipe\n result1, result2, result3 = snipe[1], snipe[2], snipe[3]\n if result1\n listingid = result1.sub(\"/\",\"\")\n elsif result2\n listingid = result2\n elsif result3\n listing = result3\n end\n end\n end", "def listing(type, uid)\n self.get(\"listing_types/#{type}/listings/#{uid}.json\", :transform => Listing)\n end", "def url_for_list(type)\n url_for_file(\"#{type}_list.html\")\n end", "def fetch_listing_page\n @listing_agent.user_agent_alias = Mechanize::AGENT_ALIASES.keys.sample\n\n @page = @listing_agent.get(@listing_url)\n collect_table_cells(page)\n page\n end", "def listing_id(listing_id)\n ensure_valid_parameter('listing id', listing_id, lambda {|k| k.is_a? Fixnum and k >= 0})\n @request[:listing_id] ||= []\n @request[:listing_id] << listing_id\n self \n end", "def index\n @urlings = Urling.all\n end", "def new\n @listing = Listing.new\n end", "def get_listings sub\n uri = URI(\"#{base_uri}/r/#{sub}/new.json\")\n params = { limit: 100 }\n uri.query = URI.encode_www_form(params)\n JSON.parse(Net::HTTP.get_response(uri).body)\n end", "def show\n @listing = Listing.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.xml { render :xml => @listing }\n end\n end", "def opening_url\n fetch('jera.openings')\n end", "def scrape_craigslist_listings(results_listings, listing_base_url)\n\t\tall_info = []\n\t\tresults_listings.each do |listing|\n\t\t\tlisting_info = Listing.new\n\t\t\tlisting_info[:name] = listing.search('.hdrlnk').inner_text\n\t\t\turl_temp = listing_url(listing_base_url, listing)\n\t\t\tlisting_info[:url] = \"<a href=\\\"#{url_temp}\\\" target=\\\"_blank\\\">Listing URL</a>\" \n\t\t\tlisting_info[:price] = listing.search('.price').inner_text\n\t\t\tlisting_info[:location] = listing_location(listing)\n\t\t\tall_info << listing_info\n\t\tend\n\t\tall_info\n\tend", "def edit\n @listing = Listing.find(params[:id])\n end", "def show\n @admin_listing = Listing.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.xml { render :xml => @admin_listing }\n end\n end" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
rentalFrequency : String The frequency at which the Rental amount is to be paid
def rental_frequency self.dig_for_string("listingSummary", "rentalFrequency") end
[ "def frequency=(freq)\n @rrule.setFreq(freq)\n self\n end", "def billing_frequency\n @attributes[:billing_frequency]\n end", "def recurrence_frequency=(new_rec_freq)\n new_rec_freq = nil if new_rec_freq.blank?\n write_attribute(:recurrence_frequency, new_rec_freq)\n new_rec_freq\n end", "def radio_freq\n return (self.sendcmd(\"main.get_frequency\").to_i+self.get_carrier()).to_i\n end", "def send_mtf_values_rfreq; end", "def freq(f=false)\n if f\n @dial_freq=f-@carrier\n else\n # If the last time we checked the dial frequency is more than\n # @fexpire seconds ago, re-read the frequency and update the\n # timestamp.\n if Time.now().to_i-@ftime>@fexpire\n @dial_freq=(self.radio_freq()+self.get_carrier()).to_i\n @ftime=Time.now().to_i\n end\n return (@dial_freq+self.get_carrier()).to_i\n end\n end", "def angular_frequency\n @angular_frequency ||= 2.0 * Math::PI * frequency\n end", "def frequency\n growth_rate = 2 ** (1.0 / 12)\n frequency = 440 * (growth_rate ** semitones_from_A4)\n frequency.round(3)\n end", "def user_reaccept_required_frequency=(value)\n @user_reaccept_required_frequency = value\n end", "def convert_frequency(freq)\n return 'never' if !freq\n\n {\n \"annual\"=> \"annually\",\n \"quarterly\"=> \"quarterly\",\n \"monthly\"=> \"monthly\"\n }[freq] || \"never\"\nend", "def rentals_fee(rentals_fee, options = {})\n get(\"rentals_fees/#{rentals_fee}\", options).pop\n end", "def get_frequency_symbol(frequency)\n string_to_symbol = {\n 'Every X Years' => 'years',\n 'Every X Months' => 'months',\n 'Every X Weeks' => 'weeks',\n 'Every X Days' => 'days'\n }\n\n string_to_symbol[frequency].to_sym\n end", "def user_reaccept_required_frequency\n return @user_reaccept_required_frequency\n end", "def note_freq(note)\n return (2.0**(note/12.0)) * C3_FREQ\nend", "def setup_frequency(frequency = DEFAULT_FREQUENCY)\n @frequency = Integer(frequency)\n end", "def installment_frequency_in_days\n case installment_frequency\n when :weekly\n 7\n when :daily\n 1\n when :monthly\n 30\n when :bi_weekly\n 15\n end\n end", "def frequency\n FREQUENCY\n end", "def payment_type_yearly_frecuency(payment_type)\n case payment_type\n when 1 then 12\n when 2 then 26\n when 3 then 52\n else 12\n end\n end", "def reaping_frequency\n configuration_hash.fetch(:reaping_frequency, 60)&.to_f\n end" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
isCallToShow : Boolean Will be 'true' if a prospective buyer or agent has to contact the Seller to schedule an appoinment to view the Property
def call_to_show? self.dig_for_boolean("listingSummary", "isCallToShow") end
[ "def wants_to_subscribe?\n source_is_ffcrm? && has_list?\n end", "def on_sale?\n sale == true\n end", "def show?\n if user.type == 'ReferralAgency'\n user.tenants.include?(app.tenant)\n else\n user.properties.each do |property|\n return true if property.applications.include?(app)\n end\n false\n end\n end", "def go_to_prop?(prop, time)\n if !is_prop_fake?(prop) ## we check if the property is fake if we have enough informations (surface + price)\n if is_link_in_db?(prop) ## we check if the prop is in DB by its link\n false ## we dont go to the property show because we already have it\n else ## it doesnt exist in db so we check by 3 - 4 keys if its already in DB from another source\n filtered_prop = prop.select { |k, v| !v.nil? && [:area, :rooms_number, :surface, :price].include?(k) } ## we only keep existants arguments\n if filtered_prop.length > 2 ## we verify that theres at least 3 arguements\n does_prop_exists?(prop, time) ? false : true ## if it doesnt exist, we go to the show\n else ## not enought args, so fuck off we dont go to the show\n false\n end\n end\n else\n false ## prop is fake so goodbye we dont go the the show.\n end\n end", "def add_no_call_show\n humanity_request_id = HumanityAPI.create_request(@pto_request, @user)\n HumanityAPI.approve_request(humanity_request_id)\n\n @calendar = Calendar.find_by(date: @pto_request.request_date)\n @pto_request.humanity_request_id = humanity_request_id\n @pto_request.excused = false\n @pto_request.save\n\n @calendar.signed_up_total.nil? ? @calendar.signed_up_total = 1 : @calendar.signed_up_total += 1\n @calendar.signed_up_agents.push(@user.name)\n\n @calendar.save\n\n @user.no_call_show.nil? ? @user.no_call_show = 1 : @user.no_call_show += 1\n @user.save\n\n redirect_to show_user_path(@user)\n UpdatePrice.update_calendar_item(@calendar)\n RequestsMailer.with(user: @user, pto_request: @pto_request).no_call_show_email.deliver_now\n end", "def is_rollcall_health_officer?\n has_role?(:health_officer, 'rollcall')\n end", "def is_viewing_before_acceptance_required\n return @is_viewing_before_acceptance_required\n end", "def show?\n if user.type == 'ReferralAgency'\n return user.id == referral_agency.id\n else\n user.properties.each do |property|\n next unless property.applicationsproperty.applications&.each do |app|\n return true if app.tenant.referral_agency == referral_agency\n end\n end\n end\n\n false\n end", "def is_viewing_before_acceptance_required=(value)\n @is_viewing_before_acceptance_required = value\n end", "def is_phone_notif_allowed?\n !self.phone.blank?\n end", "def check_is_property_user\n params[:is_lease_agent] == 'true' ? false : ((params[:note_add_edit] == 'true' || params[:is_property_folder] == 'true' || params[:edit_inside_asset] == \"true\" || params[:from_debt_summary] == \"true\" || params[:from_property_details] || params[:call_from_prop_files] == 'true') ? true : false)\n end", "def show?\n return true if user.admin? || is_in_company?(record)\n\n record.information_complete? ? true : false\n end", "def display_claim_actions?\n !object.claimed? && (!object.config.league_claimable.nil? && object.config.league_claimable == true)\n end", "def offer_call\n\n profile_id = params[:session][:parameters][:profile_id]\n caller_id = params[:session][:parameters][:caller_id]\n call_id = params[:session][:parameters][:call_id]\n session_id = params[:session][:parameters][:session_id]\n\n sys_config = SysConfig.first\n user = Profile.get(profile_id).user\n\n forwarding_numbers = user.phone_numbers.collect {|num|\n num.number\n }\n\n tropo = Tropo::Generator.new do\n\n signal_url = \"signal_peer?event=voicemail&call_id=#{call_id}&session_id=#{session_id}\"\n\n on(:event => 'error', :next => signal_url)\n on(:event => 'hangup', :next => signal_url)\n on(:event => 'incomplete', :next => signal_url)\n on(:event => 'continue', :next => \"user_menu_selection?profile_id=#{profile_id}&caller_id=#{caller_id}&call_id=#{call_id}&session_id=#{session_id}\")\n call( :to => forwarding_numbers)\n ask( :name => 'main_menu',\n :attempts => 2,\n :bargein => true,\n :choices => { :value => \"connect(1), voicemail(2)\", :mode => \"DTMF\" },\n :say => {:value => \"Incoming call from #{sys_config.server_url}/voice/get_contact_recording?caller_id=#{caller_id}&amp;profile_id=#{profile_id} . Press 1 to connect. To send to voicemail press 2 or simply hangup.\"})\n end\n\n render :json => tropo.response\n\n end", "def is_customer_facing?\n self.company_type.price_set?\n end", "def is_delivery\n profile.delivery\n end", "def isCallFwEnabled ()\n\ttheValue = $driver.find_element(:xpath, \"//div[@class='small-1 medium-2 large-1 columns bold text-right setting-option-value-text']\")\n\tif theValue.text().eql? \"Yes\" then\n\t\tputs \"---> Call forwarding displayed as Yes\"\n\t\treturn true\n\telse \n\t\tputs \"---> Call forwarding displayed as No\"\n\t\treturn false\n\tend\nend", "def can_subscribe?(show)\n open_slots? && !has_subscription?(show)\n end", "def show?\n return true if event.is_public?\n event.is_private? and user and (event.is_owner?(user) or event.user_invited?(user)) #or event.user_joined?(user))\n end" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
isForAuction : Boolean Will be 'true' if this property is being sold by Auction
def is_for_auction? self.dig_for_boolean("listingSummary", "isForAuction") end
[ "def can_auction?(_company)\n true\n end", "def purchased?\n @purchased\n end", "def purchase_order?\n true \n end", "def on_sale?\n sale == true\n end", "def can_buy?(item)\r\n item.buyable_by?(self)\r\n end", "def has_autopay_rent\r\n if ((self.actual_rent) && (self.actual_rent.has_autopay))\r\n return true\r\n else\r\n return false\r\n end\r\n end", "def bought_by?(user)\n buyer_id == user.id\n end", "def on_order?\n !self.paid?\n end", "def bought_by?(account)\n buyer == account\n end", "def tradeable?\n @tradeable\n end", "def can_buy?(item)\n item.buyable_by?(self)\n end", "def tradeable?\n @tradeable\n end", "def unredeemable?\n payment_owed? && !(ProductStrategy === self.order.promotion.strategy) \n end", "def sold_by_business? \r\n user.is_business? rescue false\r\n end", "def allow_purchase?\n stock > 0 && available_for_sale && !vendor.vacation\n end", "def is_venue?\n if self.is_venue == true\n return true\n else\n return false\n end\n end", "def may_purchase?(_company)\n false\n end", "def inbid?\n item = Item.find(item_id)\n if(item.expired? == false && inBid_notify == false)\n return true\n else\n return false\n end\n end", "def sold?\n !self.sold_at.nil?\n end" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
isHideListPrice : Boolean Will be 'true' if the list price is not supposed to be shown on consumer site
def hide_list_price? self.dig_for_boolean("listingSummary", "isHideListPrice") end
[ "def check_if_can_be_set_to_visible_against_price\n return true if visibility_changed? && !visible\n unless self.price && self.price > 0\n errors.add(\"Can't update the product visibility because the price is not set\") \n false\n end\n end", "def hide?\n @hide\n end", "def is_hidden\n return @is_hidden\n end", "def hidden?\n not visible?\n end", "def display_price\n self.discounted ? self.discounted_sell_price : self.sell_price\n end", "def is_hidden=(value)\n @is_hidden = value\n end", "def hidden?()\n not visible?()\n end", "def hidden?\n !visible?\n end", "def hidden?\n !visible?\n end", "def hide_terms_of_use\n return @hide_terms_of_use\n end", "def is_discounted?\n price < 2\n end", "def is_listing_fee?\n sku_type.to_s == Product::SKU_TYPE_LISTING_FEE && self.internal?\n end", "def calculate_list_price\n logger.debug(\"Running product_format.calculate_list_price method\")\n logger.debug(\" self = #{self.product.name} -- #{self.to_s} (#{self.id})\")\n logger.debug(\" price_change = #{self.price_change.inspect}\")\n if self.product.is_a?(Title) && CONFIG[:calculate_list_price] != true\n logger.debug(\"Skip: Config calculate_list_price set to FALSE\")\n elsif !self.product.is_a?(Title) && CONFIG[:calculate_list_price] == true && CONFIG[:calculate_assembly_price] == true\n logger.debug(\"Skip: Assembly list price calculated as sum of parts\")\n # elsif !self.product.is_a?(Title) && CONFIG[:calculate_list_price] == true && CONFIG[:calculate_assembly_price] != true # ***\n # logger.debug(\"Skip: Assembly list price calculated as sum of parts\")\n elsif !self.product.is_a?(Title) && CONFIG[:calculate_list_price] != true && CONFIG[:calculate_assembly_price] == true\n logger.debug(\"Skip: Assembly list price calculated as sum of parts\")\n elsif !self.product.is_a?(Title) && CONFIG[:calculate_list_price] != true && CONFIG[:calculate_assembly_price] != true\n logger.debug(\"Skip: Assembly list price is user-defined\")\n elsif !self.price_changed?\n logger.debug(\"Skip: Price has not changed\")\n else\n self.price_list = (self.price / CONFIG[:member_price_decimal]).round(2)\n logger.debug(\"New price_list = #{self.price_list}\")\n end\n end", "def hide_terms_of_use=(value)\n @hide_terms_of_use = value\n end", "def hideOffer()\n @item['offer']['activate'] = false\n self.updateOffer()\n end", "def handle_list_price(attrs)\n price = attrs.delete(:list_price)\n if price\n self.pricing_reference = price\n end\n end", "def single_display_price?\n price = nil\n variants.unarchived.published.each do |variant|\n if price\n return false unless variant.display_price == price\n else\n price = variant.display_price\n end\n end\n true\n end", "def is_hidden_from_customers\n return @is_hidden_from_customers\n end", "def price_is_gross?\n false\n end" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
isByAppointmentOnly : Boolean Will be 'true' if a prospective buyer or agent has to contact the Seller to schedule an appoinment to view the Property
def by_appointment_only? self.dig_for_boolean("listingSummary", "isByAppointmentOnly") end
[ "def is_appointment?\n self.kind == \"Appointment\"\n end", "def has_appointment?(current_employee)\n appointments = current_employee.brand.appointments.where(customer_id: self.id)\n unless appointments.empty?\n if appointments.last.date >= Date.today\n true\n end\n else\n false\n end\n end", "def has_appointments?(gsi)\n gsi.appointments_count > 0\n end", "def my_appointment(appointment)\n if appointment.user_id == current_user.id\n return true\n else\n return false\n end\n end", "def appt_started?\n appointment.start_date.present?\n end", "def appointment?\n !open && !close\n end", "def appointment_by_status(appointments)\n if params[:booked] == 'true'\n appointments.booked\n else\n appointments.free\n end\n end", "def restricted_appointments_info(tutor, current_user)\n if current_user && current_user.tutor == self\n @appointments = self.appointments\n else\n @appointments = self.appointments_with_times_only_for_public_scheduler\n end\n end", "def has_appt?\n !appt_date.blank?\n end", "def booked?\n if self.appointments.count == 0\n return false # It is not booked.\n elsif self.appointments.count == 2\n return true # It is booked.\n elsif self.appointments.count == 1 and !self.appointments.last.closed?\n return false # It is not booked.\n else\n return true # It is booked.\n end\n end", "def approval\n @appointments = Appointment.in_clinic(@admin).requests.\n order_by_time.includes(:doctor, :patient).not_past\n end", "def must_pay_to_avoid_cancellation\n\t\tif @event.start_date < (Time.now + 1.week) && @event.paid == false \n\t\t\t#cannot book event\n\t\tend\n\tend", "def registration_appointment? time = Time.now\n\t\ttrue if not registration_appointments.select { |appointment|\n\t\t\t(appointment[:start]..appointment[:end]).cover?(time)\n\t\t}.empty?\n\tend", "def update_associated_appointments()\n if self.is_payed? # When the receipt is flagged as 'payed', make sure all appointments are too:\n # [Steve, 20100501] The added check on the structure of Appointments is\n # needed to be compliant with the previous version of the structure of the\n # table, otherwise the migration from older DB version fails.\n Appointment.update_all( \"is_payed=1\", ['receipt_id = ?', self.id] ) if Appointment.new.attributes.include?('receipt_id')\n end\n end", "def supports_shipment_auto_booking?\n return false\n end", "def set_alarm(employed, vacation)\n if employed == true && vacation == false\n true\n else\n false\n end\nend", "def can_update_profile?\n !@patient.appointments.current || # if there's no appointment, allow\n @patient.doses.count.positive? || # if there's already a dose, allow\n @patient.can_schedule? # if it's the user 1st dose and there's an appointment, check if they can still schedule\n end", "def appointment_confirmation(appoint_obj)\n @doctor = Doctor.find_by_id(appoint_obj.doctor_id)\n @patient = Patient.find_by_id(appoint_obj.patient_id)\n mail(:to => @patient.email, :subject => \"Appointment Approved\")\n end", "def refused_to_participate?\n !self.pr_recruitment_end_date.blank? && self.pr_recruitment_status_code == 2\n end" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
propertyCategory : String Category of property
def property_category self.dig_for_string("listingSummary", "propertyCategory") end
[ "def property_label_method\n\t\tself.property_category ? self.property_category.category_name + \": \" + self.property_name : self.property_name\n\tend", "def properties\n self.class.category_properties_map[self]\n end", "def find_category \r\n #Find the property file category based on the path\r\n PropertyFileAttributes::PROPERTY_FILE_CATEGORIES.each do |p|\r\n if @filename.index(p)\r\n @category = p\r\n end\r\n end\r\n if @category == nil\r\n puts \"Unknown property file category: #{@filename}\"\r\n raise\r\n end\r\n end", "def find_category\t\r\n\t#Find the property file category based on the path\r\n\tPROPERTY_FILE_CATEGORIES.each do |p|\r\n\t if @filename.index(p)\r\n\t @category = p\r\n\t end\r\n\tend\r\n\tif @category == nil\r\n\t puts \"Unknown property file category: #{@filename}\"\r\n\t raise\r\n\tend\r\n end", "def categories_property=(*property_values)\n @categories_property= property_values\n end", "def create\n @category_property = CategoryProperty.new(params[:category_property])\n\n respond_to do |format|\n if @category_property.save\n format.html { redirect_to @category_property, :notice => 'Category property was successfully created.' }\n format.json { render :json => @category_property, :status => :created, :location => @category_property }\n else\n format.html { render :action => \"new\" }\n format.json { render :json => @category_property.errors, :status => :unprocessable_entity }\n end\n end\n end", "def organize_by_category\r\n @property_files_by_category = Hash.new\r\n @property_files.each do |p| \r\n #If we don't have an instance for this category yet, create one\r\n if !@property_files_by_category.has_key?(p.category)\r\n @property_files_by_category[p.category] = PropertyFileCategory.new(p.category)\r\n end\r\n #Add the property file to the category based on whether it is in English (nominal) or a translation\r\n @property_files_by_category[p.category].add_property_file(p) \r\n end\r\n end", "def create\n @property_category = PropertyCategory.new(property_category_params)\n\n respond_to do |format|\n if @property_category.save\n format.html { redirect_to @property_category, notice: 'Property category was successfully created.' }\n format.json { render :show, status: :created, location: @property_category }\n else\n format.html { render :new }\n format.json { render json: @property_category.errors, status: :unprocessable_entity }\n end\n end\n end", "def categories_property\n @categories_property ||= []\n end", "def get_property_file(category, language)\r\n property_file = nil\r\n @property_files.each do |p|\r\n if p.category == category and p.language == language\r\n property_file = p\r\n break\r\n end\r\n end\r\n property_file\r\n end", "def index\n @property_categories = PropertyCategory.all\n end", "def compare_category(property_file_category)\r\n nominal_properties = property_file_category.nominal.get_properties\r\n property_file_category.translations.each do |t|\r\n translation_errors = compare_against_nominal(nominal_properties, t.get_properties)\r\n t.set_errors(translation_errors)\r\n end\r\n end", "def property_description (property) \n ret = {:name => property.name}\n ext_type = EXT_TYPE_TRANSLATIONS[property.primitive.to_s] || EXT_TYPE_TRANSLATIONS[\"String\"]\n \n if property.respond_to? :flag_map\n ret[:type] = EXT_TYPE_TRANSLATIONS[\"String\"][:type]\n else\n ret[:type] = ext_type[:type]\n end\n \n if dateFormat = ext_type[:dateFormat]\n ret[:dateFormat] = dateFormat\n end\n ret\n end", "def name\n @property_name\n end", "def get_properties\r\n #Assumes PropertyName=PropertyString with or without whitespace around =\r\n properties = Hash.new\r\n File.open(@filename, \"r:\" + PropertyFileAttributes::CATEGORY_ENCODINGS[@category]).each_line do |s| \r\n m = PropertyFileAttributes::PROPERTY_FILE_REGEX.match(s)\r\n if m != nil\r\n property = m[1]\r\n property = PropertyFileAttributes.convert_to_utf8(property)\r\n #This is a hack to get rid of the unicode non-break space that sometimes find their way into international files\r\n property = PropertyFileAttributes.remove_break_space(property).strip() \r\n value = m[2]\r\n value = PropertyFileAttributes.convert_to_utf8(value)\r\n value = PropertyFileAttributes.remove_break_space(value).strip()\r\n properties[property] = value\r\n end\r\n end \r\n @number_properties = properties.size\r\n properties\r\n end", "def getProductCategoryObjName\r\n\t\t\treturn \"Product_Category__c\"\r\n\t\tend", "def property_name(property)\n property.name.to_s\n end", "def getProductCategoryObjName\r\n\t\t\treturn \"mfiforce__Product_Category__c\"\r\n\t\tend", "def prop_name(property, key)\n case key\n when :id\n property.attributes['name'] = 'groupId'\n when :name\n property.attributes['name'] = 'groupName'\n when :description\n property.attributes['name'] = 'description'\n when :perms\n property.attributes['name'] = 'emailPermissions'\n end\n\n property\n end" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
propertyUse : String Property Use information of the property
def property_use self.dig_for_string("listingSummary", "propertyUse") end
[ "def prop(prop_name)\n props[prop_name]\n end", "def create_property_use(property_id, post_data)\n perform_post_request(\"/property/#{property_id}/propertyUse\", body: post_data)\n end", "def proptext(name) #:nodoc:\n prop = @properties.detect { |f| f.name? name }\n if prop\n prop = prop.to_text\n end\n prop\n end", "def name\n @property_name\n end", "def property_label_text(property)\n case property.to_sym\n when :fullname then 'Full name'\n when :dob then 'Birth date'\n when :address_business then 'Address'\n when :address_additional then 'Additional'\n when :address_additional_business then 'Additional'\n when :postcode_business then 'Postcode'\n when :city_business then 'City'\n when :state_business then 'State'\n when :country_business then 'Country'\n when :im_aim then 'AIM'\n when :im_icq then 'ICQ'\n when :im_msn then 'MSN'\n when :im_yahoo then 'Yahoo'\n when :im_jabber then 'Jabber'\n when :im_skype then 'Skype'\n when :image_default then 'Image URL'\n when :web_default then 'Website URL'\n when :web_blog then 'Blog URL'\n else property.to_s.humanize\n end\n end", "def _property(p_name)\n __t_stringish(p_name)\n _jinja.properties[__attribute_key(p_name)]\n end", "def utilizes?(property)\n return false if property.class != Property\n property = Property.find_by(id: property.id)\n return false if property.nil?\n self.properties.include?(property)\n end", "def property_description (property) \n ret = {:name => property.name}\n ext_type = EXT_TYPE_TRANSLATIONS[property.primitive.to_s] || EXT_TYPE_TRANSLATIONS[\"String\"]\n \n if property.respond_to? :flag_map\n ret[:type] = EXT_TYPE_TRANSLATIONS[\"String\"][:type]\n else\n ret[:type] = ext_type[:type]\n end\n \n if dateFormat = ext_type[:dateFormat]\n ret[:dateFormat] = dateFormat\n end\n ret\n end", "def _describe_property(name)\n resolved_name = _resolve_property(name)\n described_name = super(resolved_name)\n aliases = aliases_by_property.fetch(resolved_name, [])\n\n if aliases.any?\n \"#{described_name} (#{aliases.map(&:inspect).join(', ')})\"\n else\n \"#{described_name}\"\n end\n end", "def property_name(property)\n property.name.to_s\n end", "def property\n AntPropertyHelper.new(ant, ant_properties)\n end", "def get_property(name, default= \"\")\n\t\treturn @transport.get_path(\"meta\",\"properties\", name) { default }\n\tend", "def property_map\n self.class.properties.map do |name, opts|\n if opts\n yreq = opts[:req] ? :req : :opt\n [\"@#{ name }\", yreq] if yreq\n end\n end.compact\n end", "def scan_property(str)\n property_name = match_and_normalize text: str, pattern: /var:\\s*(.*)\\n/\n @documents[:properties] << {name: property_name, \n abstract: get_abstract(str), description: get_description(str), \n type: get_type(str)}\n end", "def feature\n @property[:feature]\n end", "def target_property\n if options[:target_property].present?\n \"d.#{options[:target_property]}\"\n end\n end", "def include_property_name?(property)\n property = Converter.rsc_2_str(property)\n each_property_name do |item|\n if item == property\n return true\n end\n end\n return false\n end", "def property(name)\n prop = properties.find{|attr| attr.property == name}\n prop.value unless prop.nil?\n end", "def get_java_property_code(prop)\r\n %Q| $i18n.getClass().forName('java.lang.System').getMethod('getProperty', $i18n.getClass().forName('java.lang.String')).invoke(null, '#{prop}').toString() |\r\n end" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
totalBath : Integer Number of partial baths in the property
def total_bath self.dig_for_integer("listingSummary", "totalBath") end
[ "def length_in_bp_within_path\n return 0 if @trail.empty?\n reduce(0) do |total, onode|\n total + onode.node.length_alone\n end\n end", "def partial_bath\n self.dig_for_integer(\"partialBath\")\n end", "def full_bath\n self.dig_for_integer(\"fullBath\")\n end", "def number_of_bottles\n bottles = self.line_items.inject(0) {|bottles, line_item| bottles + line_item.quantity}\n end", "def child_meters_count\n child_meters.size\n end", "def leaf_count\n @leaf_count\n end", "def path_length\n @path_length ||= if (match = @node.inner_text.match(/pathlen:(\\d+)/))\n match[1].to_i\n end\n end", "def half_bath\n self.dig_for_integer(\"halfBath\")\n end", "def height\n CGPathGetBoundingBox(@path).size.height\n end", "def total_hard_brakes\n self.inject(0) do |accum,trip|\n accum += trip.hard_brakes_count\n accum\n end\n end", "def total\n @parts.map {|part| part.abs }.inject(0) {|sum,val| sum + val }\n end", "def number_of_ballrooms\n self.dig_for_integer(\"numberOfBallrooms\")\n end", "def depth_percent; end", "def no_of_bedrooms\n self.dig_for_integer(\"listingSummary\", \"noOfBedrooms\")\n end", "def height\n return @tree_height\n end", "def demand\n demand = 0\n (@path.size - 1).times { |i| demand += @path[i].demand }\n return demand\n end", "def count_leafs\n self.keys.inject(0) do |result, element|\n if self[element].kind_of?(Hash)\n result+=self[element].count_leafs\n else\n result+=1\n end\n end\n end", "def path_length\n @path_length ||= if (match = value.match(/pathlen:(\\d+)/))\n match[1].to_i\n end\n end", "def bounties\n end" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
lotSize : String Lot size of the property
def lot_size self.dig_for_string("listingSummary", "lotSize") end
[ "def display_size\n if !@size\n @size = @comment.size + @name.size + @org.size + 3\n end\n @size + 32\n end", "def append_size_to_description\r\n base = self.description || ''\r\n base = $1 if base =~ /^(.*) \\d+x\\d+$/\r\n self.description = \"#{base} #{self.width}x#{self.height}\"\r\n end", "def fontsize size\n Attribute.new \"fontsize = #{size}\"\n end", "def size=(value)\n @size = value\n end", "def arrowsize size\n Attribute.new \"arrowsize = #{size}\"\n end", "def lot_dimension\n self.dig_for_string(\"lotDimension\")\n end", "def size\n SizableLocation.new(location).size\n end", "def size=(value)\n @size = value\n end", "def size\n # atributo del objeto 1\n @size\n end", "def size; '' end", "def size\n \"#{width}x#{height}\"\n end", "def slot_size (size)\r\n @slot_size = size\r\n end", "def sz\n self.to_s.size\n end", "def size\n @size ||= approximate_size\n end", "def title_size=(v); end", "def record_size(s)\n @size = s\n end", "def nice_size size\n number_to_human_size size, :precision => 0\n end", "def dot_size\n @dot_size || DEFAULT_DOT_SIZE\n end", "def size=(s)\n self.width = self.height = @size = s\n end" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
noOfBedrooms : Integer Number of bedrooms in the property
def no_of_bedrooms self.dig_for_integer("listingSummary", "noOfBedrooms") end
[ "def number_of_ballrooms\n self.dig_for_integer(\"numberOfBallrooms\")\n end", "def total_rooms\n self.dig_for_integer(\"totalRooms\")\n end", "def number_of_bookings\n\t\troom_reservations.empty? ? 0 : capacity - min_disponibility\n\tend", "def number_of_conference_rooms\n self.dig_for_integer(\"numberOfConferenceRooms\")\n end", "def max_guests\n number_of_single_beds + number_of_double_beds * 2\n end", "def number_of_guests()\n return @guests_in_room.count()\n end", "def total_guests_in_rooms()\n guests_in_bar = 0\n for room in @rooms\n guests_in_bar += room.guests_in_room()\n end\n return guests_in_bar\n end", "def how_many_on_bus\n return @passengers.length\n end", "def count_occupants()\n return @occupants.length\n end", "def number_of_passengers\n @passengers.length\n end", "def size\n count = 0\n @properties.each do |gid, values|\n if ! values.empty?\n count += 1\n end\n end\n return count\n end", "def door_count; end", "def number_of_slots\n @number_of_slots ||= placements.size\n end", "def countNumOnBoard()\n count = 0 ;\n @onBoardList.each{|demand|\n count += demand.numPassenger ;\n }\n return count ;\n end", "def total_rent\n count = 0\n self.offices.map do |office|\n count+= office.building.rent_per_floor\n end\n count\n end", "def num_paintings\n self.paintings.count \n end", "def number_of_bottles\n bottles = self.line_items.inject(0) {|bottles, line_item| bottles + line_item.quantity}\n end", "def child_meters_count\n child_meters.size\n end", "def return_beds(population, beds)\n beds.each do |from_location|\n @beds[from_location][:available] += 1\n if from_location==population.name\n @beds[from_location][:used_locally] += 1\n end\n raise \"Too many beds returned\" if @beds[from_location][:available]>@beds[from_location][:max]\n end\n beds.count\n end" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
totalAcres : String Total Acres of the property
def total_acres self.dig_for_string("listingSummary", "totalAcres") end
[ "def airports_total\n get_factbook_property(\"airports_total\")\n end", "def total\n @total\n end", "def total\n @total\n end", "def totalkcal\n\t\t\tkcalproteinas + kcallipidos + kcalglucidos\n\t\tend", "def gastoEnergeticoTotal()\n \t(self.gastoEnergeticoBasal() + self.efectoTermogeno() + self.gastoActividadFisica()).round(2)\n \tend", "def document_total\n attributes[\"documentTotal\"]\n end", "def gasto_energetico_total\n \n gasto_energetico_basal + efecto_termogeno + gasto_actividad_fisica\n \n end", "def total_text\n 'Total: %d' % total\n end", "def subTotal\n ret = 0\n @conceptos.each do |c|\n ret += c.importe\n end\n ret\n end", "def kcal_total\n kcal_glucidos + kcal_lipidos + kcal_proteinas\n end", "def print_total_accountants\n\t\tif Hr === self or Accountant === self or Manager === self\n\t\t\tprint \"Total number of Accountants = #{@@accountantCount} \\n\"\n\t\telse \n\t\t\tputs \"No access to #{self}!\"\n\t\tend\n\tend", "def total_abonado\n movimientos.sum(:monto)\n end", "def gasto_energetico_total\n @gasto_energetico_total_ = @gasto_energetico_basal_ + @efecto_termogeno_ + @gasto_actividad_fisica_\n end", "def total_expenses\n self.dig_for_decimal(\"totalExpenses\")\n end", "def total_owed\n self.appointments.sum(:cost)\n end", "def total\n total = 0\n self.menu_items.each do |item|\n total += item.price\n end\n \"$#{total}\"\n end", "def total_report\n format_visits(:total).join(\"\\n\")\n end", "def total_units\n self.dig_for_integer(\"totalUnits\")\n end", "def genera_columna_total\n\t\ttotal, promedio = 0,0\n\t\t@columnas.keys.each do |columna| \n\t\t\ttotal += @columnas[columna][:total]\n\t\t\tpromedio += @columnas[columna][:promedio]\n\t\tend\n\t\t@columnas[\"Total\"] = {:total => total, :promedio => promedio}\n\tend" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
squareFootage : Double Square Footage of the property
def square_footage self.dig_for_decimal("listingSummary", "squareFootage") end
[ "def total_square_footage\n @apartments.inject(0) {|sum,a| sum + a.square_footage}\n end", "def squares_used(outside_diameter, inside_diameter)\n (outside_diameter**2 - inside_diameter**2)\nend", "def num_squares\n self.size ** 2\n end", "def height\n @radius\n end", "def squared\n Quantity.new(@value, @unit * @unit)\n end", "def describe_square\n\t\tputs \"Area: #{calculate_area} Perimeter: #{calculate_perimeter}\"\n\t\tputs \"Scaled Area: #{scaled_area} Perimeter: #{scaled_perimeter}\"\n\tend", "def area_of_square(side_length)\n return side_length * 4\nend", "def squaremeters(l, w)\n l * w\nend", "def calculate_square_size(square)\n { sw: square.width / 2, sh: square.height / 2 }\n end", "def area_of_square(length)\n length*length\nend", "def square!\n return square\n end", "def board_foot(board_length, board_width)\n # Calculates the height for a board foot\n 144 / (board_length * board_width)\nend", "def square_meter? = unit == 'square-meter'", "def sign_area_cost(width, height, price_per_sq_ft)\n\n width * height * price_per_sq_ft\nend", "def square\n self * self\n end", "def square\n r = real * real - imag * imag\n i = 2 * real * imag\n @real = r\n @imag = i\n end", "def move_cost_of_square(square, unit = nil)\n rules_hash[\"terrain\"][square.terrain][\"move_cost\"]\n end", "def square_inch? = unit == 'square-inch'", "def square_centimeter? = unit == 'square-centimeter'" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
isForeClosure : Boolean Indicates if the property is for foreclosure
def is_foreclosure? self.dig_for_boolean("listingSummary", "isForeClosure") end
[ "def is_closure?\n end", "def cascading_callbacks?\n !!@options[:cascade_callbacks]\n end", "def complete_property_checkups?\n nil\n end", "def add_loop_interior_mark(obj)\n def obj.loop_interior?\n true\n end\n end", "def faithfulness?\n !@markedness\n end", "def lazy?\n false\n end", "def lazy?\n true\n end", "def fo?\n !@fo.nil?\n end", "def lazy?\n @lazy\n end", "def scoping_object?\n self.feed_options[:scoping_object?] == true\n end", "def lazy?\n @lazy\n end", "def custom_property?; end", "def transitive_closure\n end", "def has_callback? \n !collected[:callback].nil?\n end", "def decorated?\n false\n end", "def cascade_closure_from_child_task?(child_task)\n return true if child_task&.type == TimedHoldTask.name\n\n super\n end", "def decorated?\n true\n end", "def real?\n @scope.empty? && !association?\n end", "def is_refinable\n return @is_refinable\n end" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
isShortSale : Boolean Indicates if the property is for short sale
def is_short_sale? self.dig_for_boolean("listingSummary", "isShortSale") end
[ "def on_sale?\n sale == true\n end", "def promotional_sale?\n !promotional_sale.nil?\n end", "def is_on_sale?\n\t !self.tags.find_by_name('On Sale').nil?\n\tend", "def is_apply_sale_tax\n if (@productType == ProductType::BOOK or \n @productType == ProductType::FOOD or \n @productType == ProductType::MEDICAL)\n return false\n end\n return true\n end", "def on_sale_now?\n details = promotional_sale\n return false if details.nil?\n return Time.now.utc >= details[:start_time] && Time.now.utc <= details[:end_time]\n end", "def sold?(product)\n product.status == 'Sold'\n end", "def suitable?(short = true)\n return(short ? confine_collection.valid? : confine_collection.summary)\n end", "def short?\n @straw_size == SHORT_STRAW\n end", "def simple?\n magento_type == 'simple'\n end", "def sale_price\r\n if (sale)\r\n if (sale.start > DateTime.now) || (DateTime.now > sale.end) #if the sale hasn't started yet or is over\r\n false\r\n else\r\n price * (100-sale.markdown) / 100\r\n end\r\n else\r\n false\r\n end\r\n end", "def not_single_sku?\n return self.product && self.product.skus.map(&:active).count == 1 && self.product.single ? false : true\n end", "def is_store?(product)\r\n return false unless product\r\n return false if @cobrand.short_name == \"viewpoints\"\r\n store_type = product.get_answer_value('Sears or Kmart')\r\n product.category.name == 'Department Stores' and (store_type == 'Sears' or store_type == 'Kmart')\r\n end", "def include_short?\n @include_short\n end", "def show_ads?\n return false if @properties.blank?\n\n @properties.values.detect { |property| property.ads_due_ind == 'Y' }.present?\n end", "def subcategory_on_sale name\n on_sale = false\n data.site.products_b.each do |id, product|\n if product.subcategory.nombre === name\n if product.is_sale\n on_sale = true\n break\n end\n end\n end\n on_sale\n end", "def purchased?\n @purchased\n end", "def short_straw?\n straw.short?\n end", "def short?\n @option_config.short?\n end", "def is_venue?\n if self.is_venue == true\n return true\n else\n return false\n end\n end" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
lastUpdateOn : DateTime Timestamp when the listing was last updated at Realogy system
def last_updated self.dig_for_datetime("listingSummary", "lastUpdateOn") end
[ "def last_updated\n self.dig_for_datetime(\"lastUpdateOn\")\n end", "def last_updated\n self.dig_for_datetime(\"companySummary\", \"lastUpdateOn\")\n end", "def last_update_date_time\n return @last_update_date_time\n end", "def last_updated\n @last_updated\n end", "def last_update\n @record.updated_at\n end", "def last_update(*) end", "def last_status_update_date_time\n return @last_status_update_date_time\n end", "def last_updated_date_time\n return @last_updated_date_time\n end", "def _lastChange\n # Convert from DateTime to UNIX timestamp\n to_unix_ms_timestamp read_attribute(:updated_at)\n end", "def last_updated_at\n @last_updated_at\n end", "def last_update\n Time.parse(@record.SystemModstamp)\n end", "def last_updated\n time = self.updated_at\n if time < Time.now - (3600 * 24)\n time.strftime(\"%b %-d, %Y\")\n else\n time.strftime(\"%l:%M %p\")\n end\n end", "def last_update_at\n connection.get_metric_last_update_at(@id)\n end", "def last_updated_time\n data[:last_updated_time]\n end", "def last_update() (last_answer = answers.last) ? last_answer.time_stamp : created_at end", "def last_updated=(value)\n @last_updated = value\n end", "def updated_date_time\n return @updated_date_time\n end", "def update_last_modified_at\n self.last_modified_at = DateTime.now\n end", "def last_update_date\n self.forum_posts.last_posting_date\n end" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
lastSoldOn : DateTime Timestamp on which the property is previously sold
def last_sold_on self.dig_for_datetime("lastSoldOn") end
[ "def last_shopped_at\n if self.has_shopped?\n self.points_entries.purchases.last.performed_on.to_time\n end\n end", "def set_sale_date_time\n @sold_at = Time.new\n end", "def get_last_checked_date_for_sales()\n\tlast_checked_date = RegisterSale.max(:sale_date)\n\tif last_checked_date.nil?\n\t\treturn Time.new(1970,1,1).iso8601\n\telse\n\t\treturn last_checked_date\n\tend\nend", "def sold?\n !self.sold_at.nil?\n end", "def get_last_checked_date_for_products()\n\tlast_checked_date = Product.max(:updated_at)\n\tif last_checked_date.nil?\n\t\treturn Time.new(1970,1,1).iso8601\n\telse\n\t\treturn last_checked_date\n\tend\nend", "def last_delivered_date_time\n return @last_delivered_date_time\n end", "def last_hired(obj)\n\n if obj.class == Job\n last_order = last_order(obj)\n\n if last_order\n return last_order.created_at\n else\n return nil\n end\n elsif obj.class == Service\n last_order = last_order(obj)\n\n if last_order\n return last_order.created_at\n else\n return nil\n end\n else\n return nil\n end\n\n end", "def last_delivered_date_time=(value)\n @last_delivered_date_time = value\n end", "def last_trade_date\n quote.last_trade_date\n end", "def _lastChange\n # Convert from DateTime to UNIX timestamp\n to_unix_ms_timestamp read_attribute(:updated_at)\n end", "def last_trade_time\n quote.last_trade_time\n end", "def last_invoiced\n processed_orders.last.try(:Created)\n end", "def last_use_date\n @attributes.fetch('last use date', nil)\n end", "def last_sighted\n sightings.order(:updated_at).last.updated_at\n end", "def microsoft_store_for_business_last_successful_sync_date_time\n return @microsoft_store_for_business_last_successful_sync_date_time\n end", "def last_fetch\n datetime_from(\"sf:last_fetch\")\n end", "def update_last_traded_at!\n last_trade = ::Trading::Trade.where(\"buyer_id IN (?, ?) AND seller_id IN (?, ?)\", user_id, follower_user_id, user_id, follower_user_id).last\n if last_trade && (last_trade.accepted? || last_trade.completed?)\n update_attributes( last_traded_at: last_trade.updated_at )\n end\n end", "def sell_date\n attributes[\"selldate\"]\n end", "def last_updated\n self.dig_for_datetime(\"lastUpdateOn\")\n end" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
agents : [Hash] The agent(s) associated with the Listing
def agents self.dig_for_array("listingSummary", "agents") end
[ "def agents\n @agents\n end", "def agents=(list)\n if list.class == Array\n list = List.new(list)\n list.each_with_index do |value, index|\n if value.is_a?(Hash)\n list[index] = Agent.new(value)\n end\n end\n end\n @agents = list\n end", "def agents #:yield:agent\n values(\"AGENT\")\n end", "def getAgentList\n agentListHtml = getHtml(\"#{run.society.agents['NCA'].uri}/agents?scope=.\", 3.minutes)\n agents = agentListHtml.body.to_s.scan(/list\\\">(.*)<\\/a>/).sort\n @agentList = agents.collect {|a| a[0]}\n end", "def agents\n @options[\"agents\"]\n end", "def agents\n return @agents unless @agents.nil?\n agents_array = []\n agents = @doc.xpath('//mets:agent')\n agents.each do |agent|\n type = agent.attr('TYPE')\n role = agent.attr('ROLE')\n id = agent.attr('ID')\n if agent.element_children.first.name == 'name'\n name = agent.element_children.first.text\n else\n name = ''\n end\n\n agent_object = {\n type: type, \n role: role,\n id: id,\n name: name\n }\n\n agents_array << agent_object\n end\n\n @agents = agents_array\n @agents\n end", "def index\n @agent_lists = AgentList.all\n end", "def agents\n @response_data[\"agents\"]\n end", "def list_inviting_agents_properties\n agents = []\n user_valid_for_viewing?(['Vendor', 'Agent'], nil)\n if @current_user\n InvitedVendor.where(email: @current_user.email, accepted: nil).select([:created_at, :udprn, :agent_id, :id]).each do |invited_vendor|\n result_hash = {}\n result_hash[:created_at] = invited_vendor.created_at\n result_hash[:udprn] = invited_vendor.udprn\n udprn = invited_vendor.udprn\n details = PropertyDetails.details(udprn)[:_source]\n result_hash[:address] = details[:address]\n result_hash[:agent_id] = invited_vendor.agent_id\n result_hash[:invitation_id] = invited_vendor.id\n agent = Agents::Branches::AssignedAgent.where(id: invited_vendor.agent_id).last\n if agent\n branch = agent.branch\n result_hash[:agent_email] = agent.email\n result_hash[:agent_name] = agent.first_name + ' ' + agent.last_name\n result_hash[:agent_image_url] = agent.image_url\n result_hash[:branch_image_url] = branch.image_url\n result_hash[:branch_address] = branch.address\n result_hash[:branch_website] = branch.website\n result_hash[:branch_phone_number] = branch.phone_number\n result_hash[:title] = agent.title\n result_hash[:mobile_phone_number] = agent.mobile\n result_hash[:office_phone_number] = agent.office_phone_number\n end\n agents.push(result_hash)\n end\n render json: agents, status: 200\n else\n render json: { message: 'Authorization failed' }, status: 401\n end\n end", "def addagents\n @agent=Agent.new()\n end", "def handle_agents(linked_agents)\n linked_agents.map{ |a| a['_resolved'] }.each do |agent|\n # ignore software agents\n next if agent['jsonmodel_type'] == \"agent_software\"\n name = agent['display_name']\n\n # kaltura will automatically split a tag if it has a comma in it, so we need to do some work\n # to export agent names properly\n if agent['jsonmodel_type'] == \"agent_person\" && name['name_order'] == \"inverted\"\n self.tags << \"#{name['rest_of_name']} #{name['primary_name']}\"\n else\n self.tags << name['sort_name'].gsub(\",\", \"\")\n end\n end\n end", "def get_agent_list\n results = Authority::Agent.get_typeahead_objs\n agents = results.nil? ? [] : results.collect{|result| [result['display_value_ssm'].first,result['id']]}\n agents.sort {|a,b| a.first.downcase <=> b.first.downcase }\n end", "def list_all_agents\n url_string=\"http://#{@server_address}:#{@server_port}/agents\"\n url=URI(url_string)\n req = Net::HTTP::Get.new(url)\n res=Net::HTTP.start(url.hostname,url.port) do |http|\n req.basic_auth @username,@password\n http.request(req)\n end\n if res.code.to_i>399 then\n return nil,res.code.to_i\n else\n return (JSON.parse res.body)['data'],res.code.to_i\n end\n end", "def agents\n groups.map(&:agent).push(agent).compact\n end", "def agents(agents_hash)\n return self if agents_hash.nil?\n\n agents_hash.each do |agent_hash|\n @sim_data.add_agent_role(AgentRoleBuilder.from_hash(agent_hash, @sim_data))\n end\n\n self\n end", "def agents(options={})\n \tget('getAgents', options)\n end", "def index\n @registered_agents = RegisteredAgent.all\n end", "def agents\n map { |role| role.agent.first }\n end", "def agents(args)\n # Convert filter string ({:set=>:all}) to URI string (/set=all)\n # XXX Built-in method to do that?\n filter = \"\"\n args.each do |key, value|\n filter += url_escape(key.to_s) + \"=\" + url_escape(value.to_s) + \"&\"\n end\n filter.chomp!(\"&\")\n\n begin\n Net::HTTP.start(@uri.host, @uri.port) do |http|\n headers = {'Content-Type' => 'text/plain; charset=utf-8', 'Connection' => 'close'}\n start_time = Time.now\n response = http.send_request('GET', @uri.request_uri + filter, headers)\n @log.debug \"Announcement send response time for #{agent.host} = #{Time.now-start_time}\" if @log\n return JSON.parse(response.body).collect { |x| OpenStruct.new(x) }\n end\n rescue Exception => e\n # If the json gem is not loaded, we will log the issue here.\n @log.warn \"Client side error: #{e}\" if @log\n end\n end" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
team : Hash The team associated with the Listing
def team self.dig_for_hash("listingSummary", "team") end
[ "def team=(value)\n @team = value\n end", "def team\n @team ||= Struct.new(:name, :domain).new(@team_name, @domain)\n end", "def team\n\t\t@team ||= OpenStruct.new(:name => @team_name, :domain => @domain)\n\tend", "def team_id\n self.dig_for_string(\"teamId\")\n end", "def team_name\n @plist['TeamName']\n end", "def team_ids\n @plist['TeamIdentifier']\n end", "def team\n return @team\n end", "def teams\n @teams\n end", "def team\n team_fixture.team\n end", "def getTeams\n teams = Team.order(:name).all\n teamHash = Hash.new\n # get all the teams and store in an array\n teams.each do |t|\n teamHash[t.id] = t\n end\n return teamHash \n end", "def team_list\n ChgkRating::Collections::TournamentTeams.new tournament: self\n end", "def get_team(team_name)\n hash = game_hash\n home_team_name = hash[:home][:team_name]\n away_team_name = hash[:away][:team_name]\n if(home_team_name == team_name)\n team_hash = hash[:home]\n return team_hash\n end\n if(away_team_name == team_name)\n team_hash = hash[:away]\n return team_hash\n end\nend", "def home_team\n Team.find(@teams['home']['team']['id'])\n end", "def get_github_teams\n github.org_teams(\"chef\").each do |team|\n gh_teams[team[:slug]] = { \"id\" => team[:id], \"privacy\" => team[:privacy] }\n end\n end", "def team_id\n return @team_id\n end", "def team_info\n team = self.team\n {\n :teamname => team.name,\n :teamid => team.id,\n :link => \"#{Rails.configuration.baseurl}#{team_path(team)}\"\n }\n end", "def team_member_list(teams, team_title)\n team_members = []\n teams.each do |player_info|\n if team_title == player_info[\"team\"]\n #create a hash containing first_name, last_name, position to be put into team_member array\n team_members << {first_name: player_info[\"first_name\"], last_name: player_info[\"last_name\"], position: player_info[\"position\"]}\n end\n end\n team_members\nend", "def fteams_for_nav\n @fteams = Fantasyteam.pluck(:teamname)\n @fteamid = Fantasyteam.pluck(:id)\n end", "def build_team_map\n team_map = {}\n NflTeam.all.each { |team|\n team_map[team.id] = team\n }\n return team_map\n end" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
isShowAddressOnInternet : Boolean Will be 'true' if the property address shall be displayed on Internet
def show_address_on_internet? self.dig_for_boolean("listingSummary", "isShowAddressOnInternet") end
[ "def track_address\n config.present? ? config[:track_address] == 'true' : false\n end", "def relay_address?\n true\n end", "def show_in_address_list\n return @show_in_address_list\n end", "def meta_address?\n ip_address == '0.0.0.0'\n end", "def address\n self.addressable\n end", "def address_validation\n \"Y\"\n end", "def use_for_local_addresses\n return @use_for_local_addresses\n end", "def needs_address?\n !flagged? && !sent?\n end", "def with_public_ip_on_launch?\n @subnet.map_public_ip_on_launch\n end", "def public_address\n self\n end", "def show_in_address_list=(value)\n @show_in_address_list = value\n end", "def seller_address? \r\n sold_by_business? && user.has_address? rescue false\r\n end", "def internet_facing?\n @alb.scheme == 'internet-facing'\n end", "def guest_customization_ip_change?\n guest_customization[:ip_address]\n end", "def public_proxy?\n get('is_public_proxy')\n end", "def secondary_address; end", "def internet_facing?\n @elb.scheme == 'internet-facing'\n end", "def url()\n @address.url\n end", "def use_billing_address?\n !use_shipping_address\n end" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
buildingArea : String BuildingArea of the property
def building_area self.dig_for_string("listingSummary", "buildingArea") end
[ "def area\n appellation.region.area\n end", "def area_code\n area\n end", "def to_s \n self.area_desc\n end", "def land_area_unit\n query_root_node(\"fao:landAreaUnit/text()\", @@NAMESPACES).to_s\n end", "def to_s\n self.area_desc\n end", "def to_s\n @area_desc\n end", "def getArea\r\n\t\treturn \"Area from Parent class is #{@width * @height}\"\r\n\tend", "def getArea\n return \"Area from Parent class is #{@width * @height}\"\n end", "def getArea\n return \"Area from Parent class is #{@width*@height}\"\n end", "def get_area()\n @space.get_area()\n end", "def get_floor_area\n return @total_floor_area\n end", "def get_area()\n @space.get_area()\n end", "def get_area\n\n # get the keyword for the shape of the floor\n case get_keyword_value(\"SHAPE\")\n\n # if the keyword value is \"BOX\", the width and depth values are defined\n when \"BOX\"\n return get_keyword_value(\"WIDTH\").to_f * get_keyword_value(\"DEPTH\").to_f\n\n # if the keyword value is \"POLYGON\", the get_area is defined as the area of the\n # given polygon\n when \"POLYGON\"\n return @polygon.get_area\n\n # if the keyword value of the floor is \"No-SHAPE\", the get_area is given as the\n # get_area keyword value\n when \"NO-SHAPE\"\n return get_keyword_value(\"AREA\").to_f\n else\n raise \"Error: The area could not be evaluated. Please check inputs\\n \"\n end\n end", "def area\n return @base * @altura\n end", "def subject_area\n AcademicSubjectType.to_string(@subject)\n end", "def set_Area(value)\n set_input(\"Area\", value)\n end", "def get_area()\n # Finds the floor and space parents and assigns them to @floor and @space \n # variables to be used later\n begin\n floor = get_floor()\n space = get_space()\n # Get the keyword value for location\n location = get_keyword_value(\"LOCATION\")\n # Get the keyword value for polygon\n polygon_id = get_keyword_value(\"POLYGON\")\n rescue\n end\n \n \n # if the polygon_id keyword value was nil and the location value was nil, then \n # the height and width are directly defined within the \"exteriorWall\" command\n \n if ( location == \"BOTTOM\" || location == \"TOP\") && (space.get_shape != \"BOX\")\n return space.polygon.get_area \n \n elsif ( location == nil && polygon_id == nil )\n height = get_keyword_value(\"HEIGHT\")\n width = get_keyword_value(\"WIDTH\")\n #puts \"Direct:\" + height + \" times \" + width\n height = height.to_f\n width = width.to_f\n \n return height * width\n elsif ( location == nil && polygon_id != nil)\n return space.polygon.get_area\n \n \n # if the location was defined as \"SPACE...\", it is immediately followed by a\n # vertex, upon which lies the width of the exteriorwall\n elsif location.match(/SPACE.*/)\n location = location.sub( /^(.{6})/, \"\")\n width = space.polygon.get_length(location)\n if space.check_keyword?(\"HEIGHT\")\n height = space.get_height\n else\n height = floor.get_space_height\n end\n #puts floor.utype\n #puts \"Space:\" + height.to_s + \" times \" + width.to_s\n return width * height\n # if the shape was a box, the width and height would be taken from the\n # \"SPACE\" object\n elsif ( space.get_shape == \"BOX\" ) \n width = space.get_width\n height = space.get_height\n return width * height\n \n \n else\n raise \"The area could not be evaluated\"\n end\n end", "def human\n I18n.t(area, scope: :areas)\n end", "def area\n respond_to?(:constituencyGroupHasConstituencyArea) ? constituencyGroupHasConstituencyArea.first : nil\n end" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
If a method gets called on the Hiera object which is not defined, this sends that method call to hash, then doc, then super.
def method_missing(method, *args, &block) return true if ['exist?', 'exists?'].include?(method.to_s) return @hash.send(method, *args, &block) if @hash.respond_to?(method) return @doc.send(method, *args, &block) if @doc.respond_to?(method) super(method, *args, &block) end
[ "def method_missing(method, *args, &block)\n return true if ['exist?', 'exists?'].include?(method.to_s)\n\n return @hash.send(method, *args, &block) if @hash.respond_to?(method)\n\n return @doc.send(method, *args, &block) if @doc.respond_to?(method)\n\n super(method, *args, &block)\n end", "def call_hash\n raise NotImplementedException.new(\"Must implement call_hash\")\n end", "def method_missing(meth, *args, &block)\n respond_to_missing?(meth) ? result['hits']['hits'].send(meth, *args, &block) : super\n end", "def super_method; end", "def def_hash_delegator(hash, method, key: T.unsafe(nil), **kwd); end", "def delegate_hash; end", "def method_missing(method, *args, &block)\n user[method.to_s] || super\n end", "def respond_to_missing?(meth, include_private = false)\n result['hits']['hits'].respond_to?(meth, include_private) || super\n end", "def add_method(method)\n object_class.record_location self\n return method unless @document_self\n object_class.add_method method\n end", "def method_missing(method, *args)\n self.get unless self.loaded\n\n [:attributes, :objects, :links].each do |field|\n if self.send(field).respond_to?(method)\n if self.class == HyperResource\n define_singleton_method(method) do |*argz|\n self.send(field).send(method, *argz)\n end\n else\n self.class.send(:define_method, method) do |*argz|\n self.send(field).send(method, *argz)\n end\n end\n return self.send(field).send(method, *args)\n end\n end\n super\n end", "def document_hash_optional\n super.merge(document_hash_plum)\n end", "def define_hash_method\n module_eval <<-RUBY, __FILE__, __LINE__ + 1\n def hash\n self.class.hash ^ #{keys.map { |key| \"#{key}.hash\" }.join(' ^ ')}\n end\n RUBY\n end", "def method_missing( method, *args, &block )\n key = @key.dup << method.to_s\n Undefined.warn key\n return Undefined.new(key)\n end", "def hash\n @hash || calculate_hash!\n end", "def method_added(_meth)\n super\n DSL::Internal.current_tool(self, true)&.check_definition_state(is_method: true)\n end", "def method_missing(name, *args, &block)\n\t\t\t@page_data.has_key?(name.to_s) ? @page_data[name.to_s] : super\n\t\tend", "def method_undefined(*) end", "def initialize\n @method_calls = {:instance => {}, :class => {} } \n end", "def method_missing(method_name, *args, &block)\n if Enumerable.public_methods.include?(method_name)\n @documents.send(method_name, *args, &block)\n else\n super\n end\n \n end" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Normalizes the extension for a given asset
def asset_normalize_extension(kind, source) ignore_extension = !APPEND_ASSET_EXTENSIONS.include?(kind.to_sym) source << ".#{kind}" unless ignore_extension || source =~ /\.#{kind}/ || source =~ ABSOLUTE_URL_PATTERN source end
[ "def asset_normalize_extension(kind, source)\n ignore_extension = !APPEND_ASSET_EXTENSIONS.include?(kind.to_s)\n source << \".#{kind}\" unless ignore_extension || source =~ /\\.#{kind}/ || source =~ ABSOLUTE_URL_PATTERN\n source\n end", "def normalize_extension(extension)\n extension = extension.to_s\n if extension[/^\\./]\n extension\n else\n \".#{extension}\"\n end\n end", "def normalize\n Services::Normalize.call(*files)\n end", "def convert_asset(klass, asset)\n # Convert asset content\n converter = klass.new(asset)\n\n # Replace asset content and filename\n asset.content = converter.converted\n asset.filename = File.basename(asset.filename, '.*')\n\n # Add back the output extension if no extension left\n if File.extname(asset.filename) == ''\n asset.filename = \"#{asset.filename}#{@type}\"\n end\n rescue StandardError => e\n puts \"Asset Pipeline: Failed to convert '#{asset.filename}' \" \\\n \"with '#{klass}': #{e.message}\"\n raise e\n end", "def maybe_convert_extension(ext); end", "def asset_kind_extension\n nil\n end", "def normalized_asset_path(path)\n path.sub(/^\\/assets\\//, \"\")\n end", "def asset_path(*args)\n if args.size == 1\n super(File.extname(args[0]).delete(\".\").to_sym, args[0])\n else\n super(*args)\n end\n end", "def convert\n @assets.each do |asset|\n # Convert asset multiple times if more than one converter is found\n finished = false\n while finished == false\n # Find a converter to use\n klass = JAPR::Converter.subclasses.select do |c|\n c.filetype == File.extname(asset.filename).downcase\n end.last\n\n # Convert asset if converter is found\n if klass.nil?\n finished = true\n else\n begin\n # Convert asset content\n converter = klass.new(asset)\n\n # Replace asset content and filename\n asset.content = converter.converted\n asset.filename = File.basename(asset.filename, '.*')\n\n # Add back the output extension if no extension left\n if File.extname(asset.filename) == ''\n asset.filename = \"#{asset.filename}#{@type}\"\n end\n rescue Exception => e\n puts \"Asset Pipeline: Failed to convert '#{asset.filename}' \" \\\n \"with '#{klass}': #{e.message}\"\n raise e\n end\n end\n end\n end\n end", "def compute_asset_extname(source, options = {})\n return if options[:extname] == false\n extname = options[:extname] || ASSET_EXTENSIONS[options[:type]]\n if extname && File.extname(source) != extname\n extname\n else\n nil\n end\n end", "def compute_asset_extname(source, options = T.unsafe(nil)); end", "def normalize_mime(content_type)\n MIME::Type.simplified(content_type, remove_x_prefix: true)\n end", "def normalize_resource\n if @resource[:source]\n decompose_metadata(@resource[:source])\n elsif @resource[:name][/\\.rpm/]\n decompose_metadata(@resource[:name])\n else\n decompose_package_name\n end\n\n # replace linux path with ios-style path\n @resource[:source].gsub!(%r{^/([^/]+)/}, '\\1:') if @resource[:source]\n end", "def change_ext(filename, ext)\n filename.gsub(/\\.[^.]+$/, ext)\nend", "def new_file_ext(item)\n ext = item.getOriginalExtension\n return ext unless nil_empty(ext)\n\n ext = item.getCorrectedExtension\n return ext unless nil_empty(ext)\n\n ext = item.getType.getPreferredExtension\n return ext unless nil_empty(ext)\n\n 'BIN'\n end", "def normalize(filename)\n str_strip(filename) + \".html\"\n end", "def normalize_filename\n self.filename = Pathname.normalize_path(filename)\n end", "def change_extension new_ext\n new_ext = '.'+new_ext unless new_ext[0,1] == '.' or new_ext.empty?\n res = dup\n res = res + new_ext unless res.sub!(/\\..+$/, new_ext)\n res\n end", "def normalize_asset_path(asset_ref, asset_name = 'path', autocorrect = true)\n normalize_system_path(asset_ref, @document.base_dir, nil,\n :target_name => asset_name, :recover => autocorrect)\n end" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
GET /electronic_purses/1 GET /electronic_purses/1.xml
def show @electronic_purse = ElectronicPurse.find(params[:id]) respond_to do |format| format.html # show.html.erb format.xml { render :xml => @electronic_purse } end end
[ "def new\n @electronic_purse = ElectronicPurse.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.xml { render :xml => @electronic_purse }\n end\n end", "def show\n @electronic_economic = ElectronicEconomic.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.xml { render :xml => @electronic_economic }\n end\n end", "def show\n @bp_electronic_economic = BpElectronicEconomic.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.xml { render :xml => @bp_electronic_economic }\n end\n end", "def show\n @erratum = Erratum.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.xml { render :xml => @erratum }\n end\n end", "def xml_for(action) rio(url_for(action)).read end", "def new\n @electronic_economic = ElectronicEconomic.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.xml { render :xml => @electronic_economic }\n end\n end", "def show_memo_return\n doc = Hpricot::XML(request.raw_post)\n memo_return_id = parse_xml(doc/:params/'id')\n @memo_returns = Purchase::PurchaseMemoReturnCrud.show_memo_return(memo_return_id)\n respond_to do |wants|\n wants.xml \n end\n end", "def create\n @electronic_purse = ElectronicPurse.new(params[:electronic_purse])\n\n respond_to do |format|\n if @electronic_purse.save\n format.html { redirect_to(@electronic_purse, :notice => 'Electronic purse was successfully created.') }\n format.xml { render :xml => @electronic_purse, :status => :created, :location => @electronic_purse }\n else\n format.html { render :action => \"new\" }\n format.xml { render :xml => @electronic_purse.errors, :status => :unprocessable_entity }\n end\n end\n end", "def xml(id)\n http.get(\"/nfse/#{id}/xml\") do |response|\n response.headers.fetch(\"Location\") { \"\" }\n end\n end", "def index\n @exposures = Exposure.all\n\n respond_to do |format|\n format.html # index.html.erb\n format.xml { render :xml => @exposures }\n end\n end", "def show\n @equipment = Equipment.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.xml { render :xml => @equipment }\n end\n end", "def destroy\n @electronic_purse = ElectronicPurse.find(params[:id])\n @electronic_purse.destroy\n\n respond_to do |format|\n format.html { redirect_to(electronic_purses_url) }\n format.xml { head :ok }\n end\n end", "def index\n @neuropsyches = Neuropsych.all\n\n respond_to do |format|\n format.html # index.html.erb\n format.xml { render :xml => @neuropsyches }\n end\n end", "def index\n @revenus = @foyer.revenus\n\n respond_to do |format|\n format.html # index.html.erb\n format.xml { render :xml => @revenus }\n end\n end", "def show\n @product_uom = ProductUom.find(params[:id])\n \n respond_to do |format|\n format.html # show.html.erb\n format.xml { render :xml => @product_uom }\n end\n end", "def index\n @demands = Demand.all\n\n respond_to do |format|\n format.html # index.html.erb\n format.xml { render :xml => @demands }\n end\n end", "def index\n @page_title = \"Power Units\"\n @power_units = PowerUnit.all\n\n respond_to do |format|\n format.html # index.html.erb\n format.xml { render :xml => @power_units }\n end\n end", "def show\n @retiree = Retiree.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.xml { render :xml => @retiree }\n end\n end", "def show\n @promos = Promos.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.xml { render :xml => @promos }\n end\n end" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
GET /electronic_purses/new GET /electronic_purses/new.xml
def new @electronic_purse = ElectronicPurse.new respond_to do |format| format.html # new.html.erb format.xml { render :xml => @electronic_purse } end end
[ "def create\n @electronic_purse = ElectronicPurse.new(params[:electronic_purse])\n\n respond_to do |format|\n if @electronic_purse.save\n format.html { redirect_to(@electronic_purse, :notice => 'Electronic purse was successfully created.') }\n format.xml { render :xml => @electronic_purse, :status => :created, :location => @electronic_purse }\n else\n format.html { render :action => \"new\" }\n format.xml { render :xml => @electronic_purse.errors, :status => :unprocessable_entity }\n end\n end\n end", "def new\n @electronic_economic = ElectronicEconomic.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.xml { render :xml => @electronic_economic }\n end\n end", "def new\n @promos = Promos.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.xml { render :xml => @promos }\n end\n end", "def new\n @equipment = Equipment.new\n\t\n respond_to do |format|\n format.html # new.html.erb\n format.xml { render :xml => @equipment }\n end\n end", "def new\n @supply = Supply.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.xml { render :xml => @supply }\n end\n end", "def new\n items = (0...20).collect { ReceiptItem.new } \n @receipt = Receipt.new(:items => items)\n\n respond_to do |format|\n format.html # new.html.erb\n format.xml { render :xml => @receipt }\n end\n end", "def new\n @copperwire = Copperwire.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.xml { render :xml => @copperwire }\n end\n end", "def new\n @omatsuri = Omatsuri.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.xml { render :xml => @omatsuri }\n end\n end", "def new\n @supplyinventory = Supplyinventory.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.xml { render :xml => @supplyinventory }\n end\n end", "def new\n @episodio = Episodio.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.xml { render :xml => @episodio }\n end\n end", "def new\n @equipment = Equipment.new\n @transaction = 'new'\n\n respond_to do |format|\n format.html # new.html.erb\n format.xml { render :xml => @equipment }\n end\n end", "def new\n @purchase = Purchase.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.xml { render :xml => @purchase }\n end\n end", "def new\n new_prc\n\n setup_campuses_and_semesters\n\n respond_to do |format|\n format.html # new.html.erb\n format.xml { render :xml => @prc }\n end\n end", "def new\n @solicitation = Solicitation.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.xml { render :xml => @solicitation }\n end\n end", "def new\n @software = Software.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.xml { render :xml => @software }\n end\n end", "def new\n @receipt = Receipt.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.xml { render :xml => @receipt }\n end\n end", "def new_rest\n @instrument_version = InstrumentVersion.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.xml { render :xml => @instrument_version }\n end\n end", "def new\n @oxygen = Oxygen.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.xml { render :xml => @oxygen }\n end\n end", "def new\n @purchase_information = PurchaseInformation.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.xml { render :xml => @purchase_information }\n end\n end" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
POST /electronic_purses POST /electronic_purses.xml
def create @electronic_purse = ElectronicPurse.new(params[:electronic_purse]) respond_to do |format| if @electronic_purse.save format.html { redirect_to(@electronic_purse, :notice => 'Electronic purse was successfully created.') } format.xml { render :xml => @electronic_purse, :status => :created, :location => @electronic_purse } else format.html { render :action => "new" } format.xml { render :xml => @electronic_purse.errors, :status => :unprocessable_entity } end end end
[ "def new\n @electronic_purse = ElectronicPurse.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.xml { render :xml => @electronic_purse }\n end\n end", "def destroy\n @electronic_purse = ElectronicPurse.find(params[:id])\n @electronic_purse.destroy\n\n respond_to do |format|\n format.html { redirect_to(electronic_purses_url) }\n format.xml { head :ok }\n end\n end", "def update\n @electronic_purse = ElectronicPurse.find(params[:id])\n\n respond_to do |format|\n if @electronic_purse.update_attributes(params[:electronic_purse])\n format.html { redirect_to(@electronic_purse, :notice => 'Electronic purse was successfully updated.') }\n format.xml { head :ok }\n else\n format.html { render :action => \"edit\" }\n format.xml { render :xml => @electronic_purse.errors, :status => :unprocessable_entity }\n end\n end\n end", "def post_expense_xml(xml)\n #request header bekommt Content-type = xml\n header \"Content-Type\", \"text/xml\" \n #expense daten werden alsl xml per Post request an den Server gesendet\n post '/expenses', xml\n #es wird erwartet das dies erfolgreich war\n expect(last_response.status).to eq(200)\n\n parsed = Ox.load(last_response.body, mode: :hash)\n expect(parsed).to include('expense_id' => a_kind_of(Integer))\n #adds an id key to the expense hash, containing the id from the database, after an expense is succesfully stored\n expense.merge('id' => parsed['expense_id'])\nend", "def post_spoonacular\n # %encode ingredients to url\n encoded_ingr = URI.escape(@translated_recipe[:ingredients_list])\n # post call block :\n url = URI(\"https://spoonacular-recipe-food-nutrition-v1.p.rapidapi.com/recipes/parseIngredients?includeNutrition=true\")\n http = Net::HTTP.new(url.host, url.port)\n http.use_ssl = true\n http.verify_mode = OpenSSL::SSL::VERIFY_NONE\n request = Net::HTTP::Post.new(url)\n request[\"content-type\"] = \"application/x-www-form-urlencoded\"\n request[\"x-rapidapi-key\"] = ENV[\"X_RAPIDAPI_KEY\"]\n request[\"x-rapidapi-host\"] = \"spoonacular-recipe-food-nutrition-v1.p.rapidapi.com\"\n # body of the call with ingredients and servings\n request.body = \"ingredientList=#{encoded_ingr}&#{@recipe_hash[:servings]}\"\n # response\n response = http.request(request)\n end", "def create\n @electronic_economic = ElectronicEconomic.new(params[:electronic_economic])\n @electronic_economic.unit = params[:unitHidden]\n @economic = Economic.find(params[:economic_id])\n @electronic_economic.economic = @economic\n\n respond_to do |format|\n if @electronic_economic.save\n format.js { render :action => \"create_economic\" }\n else\n format.html { render :action => \"new\" }\n format.xml { render :xml => @electronic_economic.errors, :status => :unprocessable_entity }\n end\n end\n end", "def show\n @electronic_purse = ElectronicPurse.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.xml { render :xml => @electronic_purse }\n end\n end", "def create\n @warranty = Warranty.new({\n :title => params[:title],\n :context => params[:context],\n :price => params[:price]\n })\n \n respond_to do |format|\n if @warranty.save\n format.xml { render :xml => @warranty.to_xml( :only => :id ), :status => :created }\n else\n format.xml { render :xml => @warranty.errors, :status => :unprocessable_entity }\n end\n end\n end", "def create\n\n electronic_prescription_params[:status] = electronic_prescription_params[:status].to_i\n @electronic_prescription = ElectronicPrescription.new(electronic_prescription_params)\n\n respond_to do |format|\n if @electronic_prescription.save\n format.html { redirect_to @electronic_prescription, notice: 'Electronic prescription was successfully created.' }\n format.json { render :show, status: :created, location: @electronic_prescription }\n else\n format.html { render :new }\n format.json { render json: @electronic_prescription.errors, status: :unprocessable_entity }\n end\n end\n end", "def create\n @episodio = Episodio.new(params[:episodio])\n\n respond_to do |format|\n if @episodio.save\n flash[:notice] = 'Episodio was successfully created.'\n format.html { redirect_to(@episodio) }\n format.xml { render :xml => @episodio, :status => :created, :location => @episodio }\n else\n format.html { render :action => \"new\" }\n format.xml { render :xml => @episodio.errors, :status => :unprocessable_entity }\n end\n end\n end", "def create_expenditure(data, _options = {})\n post 'expenditures', expenditure: data\n end", "def create\n @purcharse = Purcharse.new(purcharse_params)\n\n respond_to do |format|\n if @purcharse.save\n format.html { redirect_to @purcharse, notice: 'Purcharse was successfully created.' }\n format.json { render :show, status: :created, location: @purcharse }\n else\n format.html { render :new }\n format.json { render json: @purcharse.errors, status: :unprocessable_entity }\n end\n end\n end", "def new\n @electronic_economic = ElectronicEconomic.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.xml { render :xml => @electronic_economic }\n end\n end", "def create\n @produced_energy = ProducedEnergy.new(produced_energy_params)\n\n respond_to do |format|\n if @produced_energy.save\n format.html { redirect_to @produced_energy, notice: 'Produced energy was successfully created.' }\n format.json { render :show, status: :created, location: @produced_energy }\n else\n format.html { render :new }\n format.json { render json: @produced_energy.errors, status: :unprocessable_entity }\n end\n end\n end", "def create\n @maintenance_receipt = current_society.maintenance_receipts.new(maintenance_receipt_params)\n\n respond_to do |format|\n if @maintenance_receipt.save\n format.html { redirect_to @maintenance_receipt, notice: 'Maintenance receipt was successfully created.' }\n format.json { render :show, status: :created, location: @maintenance_receipt }\n else\n format.html { render :new }\n format.json { render json: @maintenance_receipt.errors, status: :unprocessable_entity }\n end\n end\n end", "def create\n @ordenmesexp = Ordenmesexp.new(ordenmesexp_params)\n\n respond_to do |format|\n if @ordenmesexp.save\n format.html { redirect_to @ordenmesexp, notice: 'Ordenmesexp was successfully created.' }\n format.json { render :show, status: :created, location: @ordenmesexp }\n else\n format.html { render :new }\n format.json { render json: @ordenmesexp.errors, status: :unprocessable_entity }\n end\n end\n end", "def create\n @purcahse = Purcahse.new(params[:purcahse])\n\n respond_to do |format|\n if @purcahse.save\n format.html { redirect_to @purcahse, notice: 'Purcahse was successfully created.' }\n format.json { render json: @purcahse, status: :created, location: @purcahse }\n else\n format.html { render action: \"new\" }\n format.json { render json: @purcahse.errors, status: :unprocessable_entity }\n end\n end\n end", "def post_expense_xml(expense, pay, amo, dat) #the best \n=======\n\n# post the expense as xml data\ndef post_expense_xml(expense)\n>>>>>>> b4463bcd9c85b8f14eeaed6c61d804930b145295\n #request header bekommt Content-type = xml\n header \"Content-Type\", \"text/xml\" \n #expense daten werden alsl xml per Post request an den Server gesendet\n xml = create_xml_single(expense)\n post '/expenses', xml\n #es wird erwartet das dies erfolgreich war\n \n expect(last_response.status).to eq(200)\n\n<<<<<<< HEAD\n parsed = # #a hash out of the (last_response.body)(in xml). But how to do this?\n expect(parsed).to include('expense_id' => a_kind_of(Integer))\n #adds an id key to the expense hash, containing the id from the database\n xml_expense_hash = #a hash out of the expense_xml_data generated with Ox. goal: this is not needed, becuse the expense_hash is there already.\n #adds an id key to the expense hash, containing the id from the database\n xml_hash.merge('id' => parsed['expense_id'])\n=======\n parsed = Ox.load(last_response.body, mode: :hash)\n expect(parsed).to include('expense_id' => anything)\n #adds an id key to the expense hash, containing the id from the database, after an expense is succesfully stored\n expense.merge('id' => parsed['expense_id'])\n\n>>>>>>> b4463bcd9c85b8f14eeaed6c61d804930b145295\nend", "def create\n @emission = Emission.new(params[:emission])\n @emission.co2 = @emission.co2 * @emission.source.factor\n respond_to do |format|\n if @emission.save\n flash[:notice] = 'Emission was successfully created.'\n format.html { redirect_to :action => 'new_electricity' }\n format.xml { render :xml => @emission, :status => :created, :location => @emission }\n else\n format.html { render :action => \"new\" }\n format.xml { render :xml => @emission.errors, :status => :unprocessable_entity }\n end\n end\n end" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
PUT /electronic_purses/1 PUT /electronic_purses/1.xml
def update @electronic_purse = ElectronicPurse.find(params[:id]) respond_to do |format| if @electronic_purse.update_attributes(params[:electronic_purse]) format.html { redirect_to(@electronic_purse, :notice => 'Electronic purse was successfully updated.') } format.xml { head :ok } else format.html { render :action => "edit" } format.xml { render :xml => @electronic_purse.errors, :status => :unprocessable_entity } end end end
[ "def update\n @electronic_economic = ElectronicEconomic.find(params[:id])\n\n respond_to do |format|\n if @electronic_economic.update_attributes(params[:electronic_economic])\n format.html { redirect_to(@electronic_economic, :notice => 'Electronic economic was successfully updated.') }\n format.xml { head :ok }\n else\n format.html { render :action => \"edit\" }\n format.xml { render :xml => @electronic_economic.errors, :status => :unprocessable_entity }\n end\n end\n end", "def create\n @electronic_purse = ElectronicPurse.new(params[:electronic_purse])\n\n respond_to do |format|\n if @electronic_purse.save\n format.html { redirect_to(@electronic_purse, :notice => 'Electronic purse was successfully created.') }\n format.xml { render :xml => @electronic_purse, :status => :created, :location => @electronic_purse }\n else\n format.html { render :action => \"new\" }\n format.xml { render :xml => @electronic_purse.errors, :status => :unprocessable_entity }\n end\n end\n end", "def update opts = {}\n opts[:headers] ||= {}\n opts[:headers]['Content-Type'] ||= 'text/xml'\n post 'update', opts\n end", "def update_rest\n @instrument = Instrument.find(params[:id])\n\n respond_to do |format|\n if @instrument.update_attributes(params[:instrument])\n flash[:notice] = 'Instrument was successfully updated.'\n format.html { redirect_to(@instrument) }\n format.xml { head :ok }\n else\n format.html { render :action => \"edit\" }\n format.xml { render :xml => @instrument.errors, :status => :unprocessable_entity }\n end\n end\n end", "def update_rest\n @instrument_version = InstrumentVersion.find(params[:id])\n\n respond_to do |format|\n if @instrument_version.update_attributes(params[:instrument_version])\n flash[:notice] = 'InstrumentVersion was successfully updated.'\n format.html { redirect_to(@instrument_version) }\n format.xml { head :ok }\n else\n format.html { render :action => \"edit\" }\n format.xml { render :xml => @instrument_version.errors, :status => :unprocessable_entity }\n end\n end\n end", "def update\n @bp_electronic_economic = BpElectronicEconomic.find(params[:id])\n\n respond_to do |format|\n if @bp_electronic_economic.update_attributes(params[:bp_electronic_economic])\n format.html { redirect_to(@bp_electronic_economic, :notice => 'Bp electronic economic was successfully updated.') }\n format.xml { head :ok }\n else\n format.html { render :action => \"edit\" }\n format.xml { render :xml => @bp_electronic_economic.errors, :status => :unprocessable_entity }\n end\n end\n end", "def update_rest\n @v1_item_usage = V1ItemUsage.find(params[:id])\n\n respond_to do |format|\n if @v1_item_usage.update_attributes(params[:v1_item_usage])\n flash[:notice] = 'V1ItemUsage was successfully updated.'\n format.html { redirect_to(@v1_item_usage) }\n format.xml { head :ok }\n else\n format.html { render :action => \"edit\" }\n format.xml { render :xml => @v1_item_usage.errors, :status => :unprocessable_entity }\n end\n end\n end", "def destroy\n @electronic_purse = ElectronicPurse.find(params[:id])\n @electronic_purse.destroy\n\n respond_to do |format|\n format.html { redirect_to(electronic_purses_url) }\n format.xml { head :ok }\n end\n end", "def update\n @promos = Promos.find(params[:id])\n\n respond_to do |format|\n if @promos.update_attributes(params[:promos])\n flash[:notice] = 'Promos was successfully updated.'\n format.html { redirect_to(@promos) }\n format.xml { head :ok }\n else\n format.html { render :action => \"edit\" }\n format.xml { render :xml => @promos.errors, :status => :unprocessable_entity }\n end\n end\n end", "def update opts = {}\n opts[:headers] ||= {}\n opts[:headers]['Content-Type'] ||= 'text/xml'\n post opts.fetch(:path, update_path), opts\n end", "def update\n @episodio = get_by_numero(params[:id])\n\n respond_to do |format|\n if @episodio.update_attributes(params[:episodio])\n flash[:notice] = 'Episodio was successfully updated.'\n format.html { redirect_to(@episodio) }\n format.xml { head :ok }\n else\n format.html { render :action => \"edit\" }\n format.xml { render :xml => @episodio.errors, :status => :unprocessable_entity }\n end\n end\n end", "def update\n @orc_suplementacao = OrcSuplementacao.find(params[:id])\n\n respond_to do |format|\n if @orc_suplementacao.update_attributes(params[:orc_suplementacao])\n flash[:notice] = 'SALVO COM SUCESSO.'\n format.html { redirect_to(@orc_suplementacao) }\n format.xml { head :ok }\n else\n format.html { render :action => \"edit\" }\n format.xml { render :xml => @orc_suplementacao.errors, :status => :unprocessable_entity }\n end\n end\n end", "def update_rest\n @instrument_content = InstrumentContent.find(params[:id])\n\n respond_to do |format|\n if @instrument_content.update_attributes(params[:instrument_content])\n flash[:notice] = 'InstrumentContent was successfully updated.'\n format.html { redirect_to(@instrument_content) }\n format.xml { head :ok }\n else\n format.html { render :action => \"edit\" }\n format.xml { render :xml => @instrument_content.errors, :status => :unprocessable_entity }\n end\n end\n end", "def update_rest\n @item_usage = ItemUsage.find(params[:id])\n\n respond_to do |format|\n if @item_usage.update_attributes(params[:item_usage])\n flash[:notice] = 'ItemUsage was successfully updated.'\n format.html { redirect_to(@item_usage) }\n format.xml { head :ok }\n else\n format.html { render :action => \"edit\" }\n format.xml { render :xml => @item_usage.errors, :status => :unprocessable_entity }\n end\n end\n end", "def update_rest\n @entry_instrument = EntryInstrument.find(params[:id])\n\n respond_to do |format|\n if @entry_instrument.update_attributes(params[:entry_instrument])\n flash[:notice] = 'EntryInstrument was successfully updated.'\n format.html { redirect_to(@entry_instrument) }\n format.xml { head :ok }\n else\n format.html { render :action => \"edit\" }\n format.xml { render :xml => @entry_instrument.errors, :status => :unprocessable_entity }\n end\n end\n end", "def update\n @purse = Purse.find(params[:id])\n\n respond_to do |format|\n if @purse.update_attributes(params[:purse])\n format.html { redirect_to @purse, notice: 'Schedule was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render action: \"edit\" }\n format.json { render json: @purse.errors, status: :unprocessable_entity }\n end\n end\n end", "def update\n @equipo_promocion = EquipoPromocion.find(params[:id])\n\n respond_to do |format|\n if @equipo_promocion.update_attributes(params[:equipo_promocion])\n format.html { redirect_to @equipo_promocion, notice: 'Equipo promocion was successfully updated.' }\n format.json { head :ok }\n else\n format.html { render action: \"edit\" }\n format.json { render json: @equipo_promocion.errors, status: :unprocessable_entity }\n end\n end\n end", "def update_expenditure(id, data, _options = {})\n put \"expenditures/#{id}\", expenditure: data\n end", "def update\n @manufacturer = Manufacturer.find(params[:id])\n\n respond_to do |format|\n if @manufacturer.update_attributes(params[:manufacturer])\n format.html { redirect_to(manufacturers_url) }\n format.xml { head :ok }\n else\n format.html { render :action => \"edit\" }\n format.xml { render :xml => @manufacturer.errors, :status => :unprocessable_entity }\n end\n end\n end" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
DELETE /electronic_purses/1 DELETE /electronic_purses/1.xml
def destroy @electronic_purse = ElectronicPurse.find(params[:id]) @electronic_purse.destroy respond_to do |format| format.html { redirect_to(electronic_purses_url) } format.xml { head :ok } end end
[ "def destroy\n @erratum = Erratum.find(params[:id])\n @erratum.destroy\n\n respond_to do |format|\n format.html { redirect_to(errata_url) }\n format.xml { head :ok }\n end\n end", "def destroy\n @scrap_xml = ScrapXml.find(params[:id])\n @scrap_xml.destroy\n\n respond_to do |format|\n format.html { redirect_to(scrap_xmls_url) }\n format.xml { head :ok }\n end\n end", "def destroy\n @episodio = get_by_numero(params[:id])\n @episodio.destroy\n\n respond_to do |format|\n format.html { redirect_to(episodios_url) }\n format.xml { head :ok }\n end\n end", "def destroy\n @oxygen = Oxygen.find(params[:id])\n @oxygen.destroy\n\n respond_to do |format|\n format.html { redirect_to(oxygens_url) }\n format.xml { head :ok }\n end\n end", "def delete(name)\r\n id = name_to_id(name)\r\n self.class.delete(\"/cards/#{id}.xml\")\r\n end", "def destroy\n @promos = Promos.find(params[:id])\n @promos.destroy\n\n respond_to do |format|\n format.html { redirect_to(promos_url) }\n format.xml { head :ok }\n end\n end", "def destroy_rest\n @instrument_content = InstrumentContent.find(params[:id])\n @instrument_content.destroy\n\n respond_to do |format|\n format.html { redirect_to(instrument_contents_url) }\n format.xml { head :ok }\n end\n end", "def destroy\n @primary_expr = PrimaryExpr.find(params[:id])\n @primary_expr.destroy\n\n respond_to do |format|\n format.html { redirect_to(primary_exprs_url) }\n format.xml { head :ok }\n end\n end", "def destroy\n @config_xml = ConfigXml.find(params[:id])\n @config_xml.destroy\n\n respond_to do |format|\n format.html { redirect_to(config_xmls_url) }\n format.xml { head :ok }\n end\n rescue ActiveRecord::RecordNotFound => e\n prevent_access(e)\n end", "def destroy \n @qx.destroy\n respond_to do |format|\n format.html { redirect_to(qxes_url) }\n format.xml { head :ok }\n end\n end", "def destroy\n @v1_data_element = V1DataElement.find(params[:id])\n @v1_data_element.destroy\n\n respond_to do |format|\n format.html { redirect_to(v1_data_elements_url) }\n format.xml { head :ok }\n end\n end", "def destroy\n @chemoinformatic = Chemoinformatic.find(params[:id])\n @chemoinformatic.destroy\n\n respond_to do |format|\n format.html { redirect_to(chemoinformatics_url) }\n format.xml { head :ok }\n end\n end", "def destroy\n @equivalencia = Equivalencia.find(params[:id])\n @equivalencia.destroy\n\n respond_to do |format|\n format.html { redirect_to(equivalencias_url) }\n format.xml { head :ok }\n end\n end", "def destroy\n @transaction_xml = Transaction::Xml.find(params[:id])\n @transaction_xml.destroy\n\n respond_to do |format|\n format.html { redirect_to(transaction_xmls_url) }\n format.xml { head :ok }\n end\n end", "def destroy\n @omatsuri = Omatsuri.find(params[:id])\n @omatsuri.destroy\n\n respond_to do |format|\n format.html { redirect_to(omatsuris_url) }\n format.xml { head :ok }\n end\n end", "def destroy\n @economic = Economic.find(params[:id])\n @economic.destroy\n\n respond_to do |format|\n format.html { redirect_to(economics_url) }\n format.xml { head :ok }\n end\n end", "def destroy\n @pdu = Pdu.find(params[:id])\n @pdu.asset.destroy\n @pdu.destroy\n\n respond_to do |format|\n format.html { redirect_to(pdus_url) }\n format.xml { head :ok }\n end\n end", "def destroy\n @demand = Demand.find(params[:id])\n @demand.destroy\n\n respond_to do |format|\n format.html { redirect_to(demands_url) }\n format.xml { head :ok }\n end\n end", "def destroy\n @offre = Offre.find(params[:id])\n @offre.destroy\n\n respond_to do |format|\n format.html { redirect_to(offres_url) }\n format.xml { head :ok }\n end\n end" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
= GET /api/v1/cards.json Returns an array of user's cards.
def index @cards = @user.cards render json: { cards: @cards } end
[ "def index\n cards = current_user.cards\n render json: cards, status: 200\n end", "def cards(options = { :filter => :open })\n return @cards if @cards\n @cards = Client.get(\"/members/#{username}/cards\", options).json_into(Card)\n end", "def cardsByUser\n results = HTTParty.get(\"http://192.168.99.104:3003/credit_cards/user?id=\"+ @current_user[\"id\"].to_s)\n render json: results.parsed_response, status: results.code\n end", "def list\n @client.make_request :get, cards_path\n end", "def cards(options = { :filter => :open })\n return @cards if @cards\n @cards = Client.get(\"/lists/#{id}/cards\", options).json_into(Card)\n end", "def cards(options = { :filter => :open })\n return @cards if @cards\n @cards = Client.get(\"/boards/#{id}/cards\").json_into(Card)\n end", "def get_all_cards\n cards = self.class.get(\"/cards.xml\").parsed_response['cards']\n return cards\n end", "def cards(page)\n self.options[:query][:page] = page || 1\n http_response = self.class.get(\"/v1/cards\", @options)\n json_response = JSON.parse(http_response.body)\n cards = []\n json_response[\"cards\"].each do |json_card|\n cards << Card.new(json_card)\n end\n cards\n end", "def listcards\n getProfile\n\n if @profile.stripe_customer_id.present?\n cards = Stripe::Customer.retrieve(@profile.stripe_customer_id).cards.all\n\n respond_to do |format|\n format.html {render action: dashboards}\n format.json {render json: cards[:data]}\n end\n else # return empty array if user(patient) have not any card\n respond_to do |format|\n format.json {render json: []}\n end\n end\n\n end", "def showcardsbyuser\n @user = User.find(params[:id])\n \n @cards = Card.where(\"user_id = ?\", params[:id]).order(:user_id)\n end", "def show_cards\n data = {\n credit_cards: @subscription.credit_cards\n }\n\n render json: data\n end", "def card_list(card_id, options = {})\n card_resource(card_id, \"list\", options)\n end", "def cards\n @cards\n end", "def index\n card = random_card\n render json: card, status: 200\n end", "def index\n @cards = current_user.cards.pending || current_user.cards.repeating\n render json: @cards.sort_by(&:id), each_serializer: TrainerSerializer\n end", "def show\n @card = Card.find(params[:id])\n render json: @card\n end", "def getCardArray()\n\t\treturn @cards\n\tend", "def getBoardMembersCards(boardId, memberId)\n\tresponse = RestClient.get(\"https://api.trello.com/1/boards/\"+boardId+\"/members/\"+memberId+\"/cards?&key=\"+$key+\"&token=\"+$token)\n\tresponse = JSON.parse(response)\t\nend", "def ownedCards\n \tcus_owned_by_user = cards_users.where(is_shared: false)\n\n \t# Have a list of CardsUsers, but want a list of Owned Cards\n \towned_cards = []\n \tcus_owned_by_user.each do | cu |\n \t\tcard = Card.find(cu.card_id)\n \t\towned_cards.push(card)\n \tend\n \towned_cards\n end" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
GET /cell_blood_count_tests/1 GET /cell_blood_count_tests/1.json
def show @cell_blood_count_test = CellBloodCountTest.find(params[:id]) respond_to do |format| format.html # show.html.erb format.json { render json: @cell_blood_count_test } end end
[ "def new\n @cell_blood_count_test = CellBloodCountTest.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @cell_blood_count_test }\n end\n end", "def index\n @blood_tests = BloodTest.all\n end", "def create\n @cell_blood_count_test = CellBloodCountTest.new(params[:cell_blood_count_test])\n\n respond_to do |format|\n if @cell_blood_count_test.save\n format.html { redirect_to @cell_blood_count_test, notice: 'Cell blood count test was successfully created.' }\n format.json { render json: @cell_blood_count_test, status: :created, location: @cell_blood_count_test }\n else\n format.html { render action: \"new\" }\n format.json { render json: @cell_blood_count_test.errors, status: :unprocessable_entity }\n end\n end\n end", "def index\n @blood_chemistry_tests = BloodChemistryTest.all\n end", "def get_array_counts \n get(\"/arrays.json/summary\")\nend", "def counts\n counts = Actuator.counts\n respond_to do |format|\n format.html { render json: counts}\n format.json { render json: counts}\n end\n end", "def destroy\n @cell_blood_count_test = CellBloodCountTest.find(params[:id])\n @cell_blood_count_test.destroy\n\n respond_to do |format|\n format.html { redirect_to cell_blood_count_tests_url }\n format.json { head :no_content }\n end\n end", "def test\n value = rand(0..100)\n\n Counter[:test_recv].increment(by: (3 * value), labels: { service: 'GET' })\n Counter[:test_send].increment(by: (2 * value), labels: { service: 'POST' })\n\n Gauge[:test_gauge].set(value, labels: { route: :gauge })\n Gauge[:test_gauge2].set(value, labels: { route: :gauge })\n g =\n REGISTRY.get(:test_gauge3) ||\n REGISTRY.gauge(:test_gauge3, docstring: 'A third gauge')\n g.set(18)\n\n Histogram[:test_histogram].observe(value / 16)\n Histogram[:test_histogram].observe(value / 4)\n Histogram[:test_histogram].observe(value)\n Histogram[:test_histogram].observe(value * 4)\n Histogram[:test_histogram].observe(value * 16)\n\n Summary[:test_summary].observe(value)\n\n respond_to do |format|\n format.any do\n render json: { message: 'Success' }, status: :ok\n end\n end\n end", "def index\n @blood_pressures = BloodPressure.all\n\n respond_to do |format|\n format.html # index.html.erb\n format.json { render json: @blood_pressures }\n end\n end", "def index\n @emergencies = Emergency.all\n render json: { emergencies: @emergencies, full_responses: [Emergency.full_response.count, Emergency.count] }\n end", "def index\n @assertions = Assertion.all.sample(10)\n\n respond_to do |format|\n format.html\n format.json { render json: @assertions }\n end\n end", "def getMatchCount\n\t\trender json: Match.count(:user1 => params[:twitter_id])\n\tend", "def index\n @visits = Visit.all\n render json: { \"count\": @visits.count, \"all_visits\": @visits }\n #render json: {\"all_visits\": @visits} \n end", "def index\n @testmonials = Testmonial.all\n\n render json: @testmonials\n end", "def quick_get_attendance_count\n @count = TimetabledSession.find(params[:session_id]).attendees.count\n respond_to do |format|\n format.html\n format.json {render json: @count}\n end\n end", "def get_client_count_time_series_data(args = {}) \n get(\"/clients.json/stats/count\", args)\nend", "def index\n @testings = Testing.all\n render json: {success: true, testings: @testings}\n end", "def index\n @bounties = Bounty.all\n\n respond_to do |format|\n format.html # index.html.erb\n format.json { render :json => @bounties }\n end\n end", "def index\n render status: :ok, json: @tests\n end" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
GET /cell_blood_count_tests/new GET /cell_blood_count_tests/new.json
def new @cell_blood_count_test = CellBloodCountTest.new respond_to do |format| format.html # new.html.erb format.json { render json: @cell_blood_count_test } end end
[ "def create\n @cell_blood_count_test = CellBloodCountTest.new(params[:cell_blood_count_test])\n\n respond_to do |format|\n if @cell_blood_count_test.save\n format.html { redirect_to @cell_blood_count_test, notice: 'Cell blood count test was successfully created.' }\n format.json { render json: @cell_blood_count_test, status: :created, location: @cell_blood_count_test }\n else\n format.html { render action: \"new\" }\n format.json { render json: @cell_blood_count_test.errors, status: :unprocessable_entity }\n end\n end\n end", "def new\n @newtest = Newtest.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render :json => @newtest }\n end\n end", "def new\n @view_count = ViewCount.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @view_count }\n end\n end", "def new\n @counter = Counter.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @counter }\n end\n end", "def new\n @testbb = Testbb.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @testbb }\n end\n end", "def new\n @testbed = Testbed.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @testbed }\n end\n end", "def new\n @status_test = StatusTest.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @status_test }\n end\n end", "def new\n @test_board = TestBoard.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @test_board }\n end\n end", "def create\n @newtest = Newtest.new(params[:newtest])\n\n respond_to do |format|\n if @newtest.save\n format.html { redirect_to @newtest, :notice => 'Newtest was successfully created.' }\n format.json { render :json => @newtest, :status => :created, :location => @newtest }\n else\n format.html { render :action => \"new\" }\n format.json { render :json => @newtest.errors, :status => :unprocessable_entity }\n end\n end\n end", "def new\n @bi_testcase = BiTestcase.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @bi_testcase }\n end\n end", "def new\n @cell = Cell.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @cell }\n end\n end", "def new\n @testspec = Testspec.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @testspec }\n end\n end", "def new\n @test_weight = TestWeight.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @test_weight }\n end\n end", "def new\n @test_summary = TestSummary.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @test_summary }\n end\n end", "def new\n @test10 = Test10.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @test10 }\n end\n end", "def new\n @lab_badge = LabBadge.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render :json => @lab_badge }\n end\n end", "def new\n @biochemistry_test = BiochemistryTest.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @biochemistry_test }\n end\n end", "def new\n @testdb = Testdb.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @testdb }\n end\n end", "def new\n @find_rainbow = FindRainbow.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @find_rainbow }\n end\n end" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
POST /cell_blood_count_tests POST /cell_blood_count_tests.json
def create @cell_blood_count_test = CellBloodCountTest.new(params[:cell_blood_count_test]) respond_to do |format| if @cell_blood_count_test.save format.html { redirect_to @cell_blood_count_test, notice: 'Cell blood count test was successfully created.' } format.json { render json: @cell_blood_count_test, status: :created, location: @cell_blood_count_test } else format.html { render action: "new" } format.json { render json: @cell_blood_count_test.errors, status: :unprocessable_entity } end end end
[ "def new\n @cell_blood_count_test = CellBloodCountTest.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @cell_blood_count_test }\n end\n end", "def create\n @blood_test = BloodTest.new(blood_test_params)\n\n respond_to do |format|\n if @blood_test.save\n format.html { redirect_to @blood_test, notice: 'Blood test was successfully created.' }\n format.json { render :show, status: :created, location: @blood_test }\n else\n format.html { render :new }\n format.json { render json: @blood_test.errors, status: :unprocessable_entity }\n end\n end\n end", "def create\n battery = Battery.find(params[:battery_id])\n params[:banks].each_value do |test|\n test[:inserted_by] = current_user.full_name\n battery.battery_daily_tests.build(test) unless test.values.all?(&:blank?)\n end\n respond_to do |format|\n if battery.save\n format.html { redirect_to station_batteries_path(battery.station), notice: 'Battery daily test was successfully created.' }\n format.json { render json: @battery_daily_test, status: :created, location: @battery_daily_test }\n else\n format.html { render action: \"new\" }\n format.json { render json: @battery_daily_test.errors, status: :unprocessable_entity }\n end\n end\n end", "def create\n battery = Battery.find(params[:battery_id])\n params[:cells].each_value do |test|\n test[:inserted_by] = current_user.full_name\n battery.battery_weekly_tests.build(test) unless test.values.all?(&:blank?)\n end\n \n respond_to do |format|\n if battery.save\n format.html { redirect_to station_batteries_path(battery.station), notice: 'Battery weekly test was successfully created.' }\n format.json { render json: @battery_weekly_test, status: :created, location: @battery_weekly_test }\n else\n format.html { render action: \"new\" }\n format.json { render json: @battery_weekly_test.errors, status: :unprocessable_entity }\n end\n end\n end", "def create\n @blood_chemistry_test = BloodChemistryTest.new(blood_chemistry_test_params)\n\n respond_to do |format|\n if @blood_chemistry_test.save\n format.html { redirect_to @blood_chemistry_test, notice: 'Blood chemistry test was successfully created.' }\n format.json { render :show, status: :created, location: @blood_chemistry_test }\n else\n format.html { render :new }\n format.json { render json: @blood_chemistry_test.errors, status: :unprocessable_entity }\n end\n end\n end", "def show\n @cell_blood_count_test = CellBloodCountTest.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @cell_blood_count_test }\n end\n end", "def destroy\n @cell_blood_count_test = CellBloodCountTest.find(params[:id])\n @cell_blood_count_test.destroy\n\n respond_to do |format|\n format.html { redirect_to cell_blood_count_tests_url }\n format.json { head :no_content }\n end\n end", "def update\n @cell_blood_count_test = CellBloodCountTest.find(params[:id])\n\n respond_to do |format|\n if @cell_blood_count_test.update_attributes(params[:cell_blood_count_test])\n format.html { redirect_to @cell_blood_count_test, notice: 'Cell blood count test was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render action: \"edit\" }\n format.json { render json: @cell_blood_count_test.errors, status: :unprocessable_entity }\n end\n end\n end", "def index\n @blood_tests = BloodTest.all\n end", "def test\n value = rand(0..100)\n\n Counter[:test_recv].increment(by: (3 * value), labels: { service: 'GET' })\n Counter[:test_send].increment(by: (2 * value), labels: { service: 'POST' })\n\n Gauge[:test_gauge].set(value, labels: { route: :gauge })\n Gauge[:test_gauge2].set(value, labels: { route: :gauge })\n g =\n REGISTRY.get(:test_gauge3) ||\n REGISTRY.gauge(:test_gauge3, docstring: 'A third gauge')\n g.set(18)\n\n Histogram[:test_histogram].observe(value / 16)\n Histogram[:test_histogram].observe(value / 4)\n Histogram[:test_histogram].observe(value)\n Histogram[:test_histogram].observe(value * 4)\n Histogram[:test_histogram].observe(value * 16)\n\n Summary[:test_summary].observe(value)\n\n respond_to do |format|\n format.any do\n render json: { message: 'Success' }, status: :ok\n end\n end\n end", "def post_stats(server_count, shards: nil, shard_count: nil)\n jsonPost = {\n server_count: server_count,\n shards: shards,\n shard_count: shard_count\n }.to_json\n @conn.post(\"bots/#{@id}/stats\", jsonPost, { 'Content-Type' => 'application/json' })\n end", "def index\n @blood_chemistry_tests = BloodChemistryTest.all\n end", "def test_create\n\n fab_house_count = FabHouse.count\n new_fab_house = { 'active' => '1', 'name' => 'FabsRus' }\n\n admin_session = cathy_admin_session\n \n post(:create, { :new_fab_house => new_fab_house }, admin_session)\n fab_house_count += 1\n assert_equal(fab_house_count, FabHouse.count)\n assert_equal(\"FabsRus added\", flash['notice'])\n assert_redirected_to(:action => 'list')\n\n post(:create, { :new_fab_house => new_fab_house }, admin_session)\n assert_equal(fab_house_count, FabHouse.count)\n #assert_equal(\"Name has already been taken\", flash['notice'])\n assert_redirected_to(:action => 'add')\n\n end", "def create\n @testbb = Testbb.new(params[:testbb])\n\n respond_to do |format|\n if @testbb.save\n format.html { redirect_to @testbb, notice: 'Testbb was successfully created.' }\n format.json { render json: @testbb, status: :created, location: @testbb }\n else\n format.html { render action: \"new\" }\n format.json { render json: @testbb.errors, status: :unprocessable_entity }\n end\n end\n end", "def test_mb_tips\n # Step 1\n id = (rand(5) + 1)\n\n params = {\n 'user_id' => @user.id\n }\n\n post \"/em/mb_tips/#{id}\", params\n assert_response(@response, :client_error)\n end", "def create\n @biochemistry_test = BiochemistryTest.new(params[:biochemistry_test])\n\n respond_to do |format|\n if @biochemistry_test.save\n format.html { redirect_to @biochemistry_test, notice: 'Biochemistry test was successfully created.' }\n format.json { render json: @biochemistry_test, status: :created, location: @biochemistry_test }\n else\n format.html { render action: \"new\" }\n format.json { render json: @biochemistry_test.errors, status: :unprocessable_entity }\n end\n end\n end", "def create\n \n # raise params.to_s\n # {\"final_good_outcome_percent\"=>\"100\", \"gamble_id\"=>\"1\", \"controller\"=>\"gamble_results\", \"action\"=>\"create\", \"format\"=>\"json\"}\n @gamble_result = GambleResult.new\n @gamble_result.final_good_outcome_percent = params['final_good_outcome_percent']\n @gamble_result.gamble_id = params['gamble_id']\n @gamble_result.survey_instance_id = params['survey_instance_id'].to_i\n # raise @gamble_result.to_s\n \n respond_to do |format|\n if @gamble_result.save\n format.html { redirect_to @gamble_result, notice: 'Gamble result was successfully created.' }\n format.json { render :show, status: :created, location: @gamble_result }\n else\n format.html { render :new }\n format.json { render json: @gamble_result.errors, status: :unprocessable_entity }\n end\n end\n end", "def create\n begin\n params.permit!\n 100.times do |index|\n claim_issue = {:claim_issue => {\"description\" => params[\"description\"][0], \"contact_id\" => params[\"contact_id\"][0], \"user_id\" => params[\"user_id\"][0], \"cut_off_date\" => params[\"cut_off_date\"][0],\"status\"=> params[\"status\"][0], \"notes\" => params[\"notes\"][0], \"division_id\" => params[\"division_id\"]}}\n response = RestClient.post $api_service+'/claim_issues',claim_issue\n end\n redirect_to :action => \"index\"\n rescue =>e\n Rails.logger.custom_log.error { \"#{e} ClaimIssuesController create method\" }\n end\n end", "def assign_badge_to_hero(character_id, template_id)\n headers = { \"Content-Type\" => 'application/json', \"Authorization\" => \"Basic #{token}\" }\n connection = Faraday.new(ENV['BASE_URL']) do |f|\n f.response :logger\n f.adapter Faraday.default_adapter\n end\n \n #Setting the the required body params\n body = {\n recipient_email: \"#{character_id}@test.com\", #Using parameter character_id here, in order to generate the hero specific dummy emails.\n badge_template_id: template_id || 'fea7986e-079e-4917-b671-90fd68aad4de', #Template id passed from the index page is used here\n issued_at: \"2020-04-01 09:41:00 -0500\",\n issued_to_first_name: character_id || \"Test First name\",\n issued_to_last_name: \"Test Last name\"\n }\n response = connection.post(\"/v1/organizations/#{ENV['ORGANIZATION_ID']}/badges\") do |request|\n request.headers = headers \n request.body = body.to_json\n end\n JSON.parse(response.body)\n end" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
PUT /cell_blood_count_tests/1 PUT /cell_blood_count_tests/1.json
def update @cell_blood_count_test = CellBloodCountTest.find(params[:id]) respond_to do |format| if @cell_blood_count_test.update_attributes(params[:cell_blood_count_test]) format.html { redirect_to @cell_blood_count_test, notice: 'Cell blood count test was successfully updated.' } format.json { head :no_content } else format.html { render action: "edit" } format.json { render json: @cell_blood_count_test.errors, status: :unprocessable_entity } end end end
[ "def create\n @cell_blood_count_test = CellBloodCountTest.new(params[:cell_blood_count_test])\n\n respond_to do |format|\n if @cell_blood_count_test.save\n format.html { redirect_to @cell_blood_count_test, notice: 'Cell blood count test was successfully created.' }\n format.json { render json: @cell_blood_count_test, status: :created, location: @cell_blood_count_test }\n else\n format.html { render action: \"new\" }\n format.json { render json: @cell_blood_count_test.errors, status: :unprocessable_entity }\n end\n end\n end", "def update\n respond_to do |format|\n if @blood_test.update(blood_test_params)\n format.html { redirect_to @blood_test, notice: 'Blood test was successfully updated.' }\n format.json { render :show, status: :ok, location: @blood_test }\n else\n format.html { render :edit }\n format.json { render json: @blood_test.errors, status: :unprocessable_entity }\n end\n end\n end", "def new\n @cell_blood_count_test = CellBloodCountTest.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @cell_blood_count_test }\n end\n end", "def destroy\n @cell_blood_count_test = CellBloodCountTest.find(params[:id])\n @cell_blood_count_test.destroy\n\n respond_to do |format|\n format.html { redirect_to cell_blood_count_tests_url }\n format.json { head :no_content }\n end\n end", "def update\n respond_to do |format|\n if @blood_chemistry_test.update(blood_chemistry_test_params)\n format.html { redirect_to @blood_chemistry_test, notice: 'Blood chemistry test was successfully updated.' }\n format.json { render :show, status: :ok, location: @blood_chemistry_test }\n else\n format.html { render :edit }\n format.json { render json: @blood_chemistry_test.errors, status: :unprocessable_entity }\n end\n end\n end", "def update_cell\n @bank = Bank.find(params[:bank_id])\n\t\tcells = @bank.cells\n\t\tcells[params[:id].to_i - 1] = params[:cell_voltage].to_i\n\t\tputs \"@@@@@@cells is #{cells.inspect}\" \n respond_to do |format|\n if @bank.update_attributes(:cells => cells)\n #format.html { redirect_to @bank, notice: 'Bank was successfully updated.' }\n\t\t\t\t#render :text => \"saved\" \n\t\t\t\tformat.json { head :no_content }\n else\n format.html { render action: \"edit\" }\n format.json { render json: @bank.errors, status: :unprocessable_entity }\n end\n end\n end", "def show\n @cell_blood_count_test = CellBloodCountTest.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @cell_blood_count_test }\n end\n end", "def update\n @test_number = TestNumber.find(params[:id])\n\n respond_to do |format|\n if @test_number.update_attributes(params[:test_number])\n format.html { redirect_to app_test_numbers_path, notice: 'Test number was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render action: \"edit\" }\n format.json { render json: @test_number.errors, status: :unprocessable_entity }\n end\n end\n end", "def update\n @testmonial = Testmonial.find(params[:id])\n\n if @testmonial.update(testmonial_params)\n head :no_content\n else\n render json: @testmonial.errors, status: :unprocessable_entity\n end\n end", "def add_one\n @habit.streak = @habit.streak + 1\n render json: @habit, location: @habit if @habit.save\n end", "def update\n respond_to do |format|\n if @blood_count_record.update(blood_count_record_params)\n format.html { redirect_to @blood_count_record, notice: 'Blood count record was successfully updated.' }\n format.json { render :show, status: :ok, location: @blood_count_record }\n else\n format.html { render :edit }\n format.json { render json: @blood_count_record.errors, status: :unprocessable_entity }\n end\n end\n end", "def update\n @biochemistry_test = BiochemistryTest.find(params[:id])\n\n respond_to do |format|\n if @biochemistry_test.update_attributes(params[:biochemistry_test])\n format.html { redirect_to @biochemistry_test, notice: 'Biochemistry test was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render action: \"edit\" }\n format.json { render json: @biochemistry_test.errors, status: :unprocessable_entity }\n end\n end\n end", "def update\n respond_to do |format|\n if @benchmark_test.update(benchmark_test_params)\n format.html { redirect_to @benchmark_test, notice: 'Benchmark test was successfully updated.' }\n format.json { render :show, status: :ok, location: @benchmark_test }\n else\n format.html { render :edit }\n format.json { render json: @benchmark_test.errors, status: :unprocessable_entity }\n end\n end\n end", "def update\n @back_bone_test = BackBoneTest.find(params[:id])\n\n respond_to do |format|\n if @back_bone_test.update_attributes(params[:back_bone_test])\n format.html { redirect_to @back_bone_test, notice: 'Back bone test was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render action: \"edit\" }\n format.json { render json: @back_bone_test.errors, status: :unprocessable_entity }\n end\n end\n end", "def updateservercount(count)\n url = \"https://discordbots.org/api/bots/#{@id}/stats\"\n json = '{\"server_count\":' + count.to_s + '}'\n RestClient.post(url, json, :Authorization => @api, :'Content-Type' => :json)\n \"Successfully set the server count to #{count}\"\n end", "def update\n @badge = Badge.find(params[:id])\n\n if @badge.update(badge_params)\n head :no_content\n else\n render json: @badge.errors, status: :unprocessable_entity\n end\n end", "def update\n respond_to do |format|\n if @memory_test.update(memory_test_params)\n format.html { redirect_to @memory_test, notice: 'Memory test was successfully updated.' }\n format.json { render :show, status: :ok, location: @memory_test }\n else\n format.html { render :edit }\n format.json { render json: @memory_test.errors, status: :unprocessable_entity }\n end\n end\n end", "def update\n respond_to do |format|\n if @allocation_test.update(allocation_test_params)\n format.html { redirect_to @allocation_test, notice: \"Allocation test was successfully updated.\" }\n format.json { render :show, status: :ok, location: @allocation_test }\n else\n format.html { render :edit, status: :unprocessable_entity }\n format.json { render json: @allocation_test.errors, status: :unprocessable_entity }\n end\n end\n end", "def test\n value = rand(0..100)\n\n Counter[:test_recv].increment(by: (3 * value), labels: { service: 'GET' })\n Counter[:test_send].increment(by: (2 * value), labels: { service: 'POST' })\n\n Gauge[:test_gauge].set(value, labels: { route: :gauge })\n Gauge[:test_gauge2].set(value, labels: { route: :gauge })\n g =\n REGISTRY.get(:test_gauge3) ||\n REGISTRY.gauge(:test_gauge3, docstring: 'A third gauge')\n g.set(18)\n\n Histogram[:test_histogram].observe(value / 16)\n Histogram[:test_histogram].observe(value / 4)\n Histogram[:test_histogram].observe(value)\n Histogram[:test_histogram].observe(value * 4)\n Histogram[:test_histogram].observe(value * 16)\n\n Summary[:test_summary].observe(value)\n\n respond_to do |format|\n format.any do\n render json: { message: 'Success' }, status: :ok\n end\n end\n end" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
DELETE /cell_blood_count_tests/1 DELETE /cell_blood_count_tests/1.json
def destroy @cell_blood_count_test = CellBloodCountTest.find(params[:id]) @cell_blood_count_test.destroy respond_to do |format| format.html { redirect_to cell_blood_count_tests_url } format.json { head :no_content } end end
[ "def test_delete_not_exist_metric\n not_exist_id = '10000'\n output = `curl -X DELETE http://localhost:8080/metrics/metrics/#{not_exist_id}`\n assert_match \"<html>\", output, \"TEST 5: delete not existing metric - FAILED\"\n end", "def test_delete_not_exist_experiment\n not_exist_id = '10000'\n output = `curl -X DELETE http://localhost:8080/metrics/experiments/#{not_exist_id}`\n assert_match \"<html>\", output, \"TEST 3: delete not existing experiment - FAILED\"\n end", "def destroy\n @battery_daily_test = BatteryDailyTest.find(params[:id])\n @battery_daily_test.destroy\n\n respond_to do |format|\n format.html { redirect_to battery_daily_tests_url }\n format.json { head :no_content }\n end\n end", "def destroy\n @blood_test.destroy\n respond_to do |format|\n format.html { redirect_to blood_tests_url, notice: 'Blood test was successfully destroyed.' }\n format.json { head :no_content }\n end\n end", "def destroy\n @diagnostic_test = DiagnosticTest.find(params[:id])\n @diagnostic_test.destroy\n\n respond_to do |format|\n format.html { redirect_to client_diagnostic_tests_url }\n format.json { head :ok }\n end\n end", "def destroy\n @blood_chemistry_test.destroy\n respond_to do |format|\n format.html { redirect_to blood_chemistry_tests_url, notice: 'Blood chemistry test was successfully destroyed.' }\n format.json { head :no_content }\n end\n end", "def destroy\n @back_bone_test = BackBoneTest.find(params[:id])\n @back_bone_test.destroy\n\n respond_to do |format|\n format.html { redirect_to back_bone_tests_url }\n format.json { head :no_content }\n end\n end", "def destroy\n @biochemistry_test = BiochemistryTest.find(params[:id])\n @biochemistry_test.destroy\n\n respond_to do |format|\n format.html { redirect_to biochemistry_tests_url }\n format.json { head :no_content }\n end\n end", "def destroy\n @json.destroy\n\n head :no_content\n end", "def destroy\n @unsigned_columns_test = UnsignedColumnsTest.find(params[:id])\n @unsigned_columns_test.destroy\n\n respond_to do |format|\n format.html { redirect_to unsigned_columns_tests_url }\n format.json { head :no_content }\n end\n end", "def destroy\n @one_test = OneTest.find(params[:id])\n @one_test.destroy\n\n respond_to do |format|\n format.html { redirect_to one_tests_url }\n format.json { head :no_content }\n end\n end", "def destroy\n @bloodtest = Bloodtest.find(params[:id])\n @bloodtest.destroy\n\n respond_to do |format|\n format.html { redirect_to(bloodtests_url) }\n format.xml { head :ok }\n end\n end", "def destroy\n @test_detail = TestDetail.find(params[:id])\n @test_detail.destroy\n\n respond_to do |format|\n format.html { redirect_to test_details_url }\n format.json { head :no_content }\n end\n end", "def destroy\n @status_test = StatusTest.find(params[:id])\n @status_test.destroy\n\n respond_to do |format|\n format.html { redirect_to status_tests_url }\n format.json { head :no_content }\n end\n end", "def delete_floor_plan(args = {}) \n delete(\"/files.json/floorplan/images\", args)\nend", "def destroy\n @testbed = Testbed.find(params[:id])\n @testbed.destroy\n\n respond_to do |format|\n format.html { redirect_to testbeds_url }\n format.json { head :ok }\n end\n end", "def destroy\n @device_test = DeviceTest.find(params[:id])\n @device_test.destroy\n\n respond_to do |format|\n format.html { redirect_to device_tests_url }\n format.json { head :ok }\n end\n end", "def destroy\n @test_summary = TestSummary.find(params[:id])\n @test_summary.destroy\n\n respond_to do |format|\n format.html { redirect_to test_summaries_url }\n format.json { head :no_content }\n end\n end", "def destroy\n @testdb = Testdb.find(params[:id])\n @testdb.destroy\n\n respond_to do |format|\n format.html { redirect_to testdbs_url }\n format.json { head :no_content }\n end\n end" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Locate an available SMB PIPE for the specified service
def smb_find_dcerpc_pipe(uuid, vers, pipes) found_pipe = nil found_handle = nil pipes.each do |pipe_name| connected = false begin connect smb_login connected = true handle = dcerpc_handle( uuid, vers, 'ncacn_np', ["\\#{pipe_name}"] ) dcerpc_bind(handle) return pipe_name rescue ::Interrupt => e raise e rescue ::Exception => e raise e if not connected end disconnect end nil end
[ "def service_scanner(target, service='smb', port=nil)\n nmap = commandz('which nmap')[0].to_s.chomp\n Dir.mkdir(@@outdir + target.chomp.gsub('/', '_') + '/') unless File.exists?(@@outdir + target.chomp.gsub('/', '_') + '/') and File.directory?(@@outdir + target.chomp.gsub('/', '_') + '/')\n if Process.uid != 0\n print_error(\"Not running with privs, may affect scan results!\")\n end\n case service\n when 'mssql'\n out = \"#{@@outdir}#{target.chomp.gsub('/', '_')}/mssql-nmap_grepable_output\"\n if port.nil?\n system(\"#{nmap} #{target} -sT -sU -p U:1434,T:1433 -Pn -sV --open -oG #{out}\")\n else\n system(\"#{nmap} #{target} -p #{port} -sV --open -Pn -oG #{out}\")\n end\n when 'mysql'\n out = \"#{@@outdir}#{target.chomp.gsub('/', '_')}/mysql-nmap_grepable_output\"\n if port.nil?\n port = 3306\n end\n system(\"#{nmap} #{target} -p #{port} -Pn -sV --open -oG #{out}\")\n when'pgsql'\n if port.nil?\n port = 5432\n end\n system(\"#{nmap} #{target} -p #{port} -Pn -sV --open -oG #{out}\")\n when 'rdp'\n out = \"#{@@outdir}#{target.chomp.gsub('/', '_')}/rdp-nmap_grepable_output\"\n if port.nil?\n port = 3389\n end\n system(\"#{nmap} #{target} -p #{port} -Pn -sV --open -oG #{out}\")\n when 'ssh'\n out = \"#{@@outdir}#{target.chomp.gsub('/', '_')}/rdp-nmap_grepable_output\"\n if port.nil?\n port = '22,2222'\n end\n system(\"#{nmap} #{target} -p #{port} -Pn -sV --open -oG #{out}\")\n when 'ftp'\n out = \"#{@@outdir}#{target.chomp.gsub('/', '_')}/rdp-nmap_grepable_output\"\n if port.nil?\n port = '21'\n end\n system(\"#{nmap} #{target} -p #{port} -Pn -sV --open -oG #{out}\")\n when 'telnet'\n out = \"#{@@outdir}#{target.chomp.gsub('/', '_')}/rdp-nmap_grepable_output\"\n if port.nil?\n port = '23'\n end\n system(\"#{nmap} #{target} -p #{port} -Pn -sV --open -oG #{out}\")\n when 'winrm'\n out = \"#{@@outdir}#{target.chomp.gsub('/', '_')}/rdp-nmap_grepable_output\"\n if port.nil?\n port = 5985\n end\n system(\"#{nmap} #{target} -p #{port} -Pn -sV --open -oG #{out}\")\n when 'smb'\n out = \"#{@@outdir}#{target.chomp.gsub('/', '_')}/smb-nmap_grepable_output\"\n if port.nil?\n system(\"#{nmap} #{target} -sT -sU -Pn -sV -p U:137,U:138,T:137,T:139,T:445 -script=smb-os-discovery,smb-security-mode --open -oG #{out}\")\n else\n system(\"#{nmap} #{target} -sT -sU -Pn -sV -p U:137,U:138,T:137,T:139,T:445,#{port} -script=smb-os-discovery,smb-security-mode --open -oG #{out}\")\n end\n when 'snmp'\n out = \"#{@@outdir}#{target.chomp.gsub('/', '_')}/snmp-nmap_grepable_output\"\n if port.nil?\n port = '161,162,10161,10162'\n system(\"#{nmap} #{target} -sU -p #{port} -Pn -sV -sC --open -oG #{out}\")\n else\n system(\"#{nmap} #{target} -sU -p #{port} -Pn -sV -sC --open -oG #{out}\")\n end\n else\n if port.nil?\n out = \"#{@@outdir}#{target.chomp.gsub('/', '_')}/nil-nmap_grepable_output\"\n system(\"#{nmap} #{target} -A -T3 -Pn -sV --open -oG #{out}\")\n else\n out = \"#{@@outdir}#{target.chomp.gsub('/', '_')}/custom-nmap_grepable_output\"\n system(\"#{nmap} #{target} -p #{port} -Pn -sV --open -oG #{out}\")\n end\n end\n return out\n end", "def smb_psexec(cmdorfile, verbose=true)\n begin\n @smb.connect(\"\\\\\\\\#{@target}\\\\IPC$\")\n handle = dcerpc_handle('367abb81-9844-35f1-ad32-98f038001003', '2.0', 'ncacn_np', [\"\\\\svcctl\"], @target)\n puts \"[\".light_blue + \"*\".white + \"]\".light_blue + \" #{@target} - Binding to #{handle} ...\".white if verbose\n dcerpc = dcerpc_bind(handle,@socket, @smb, @user, @pass)\n puts \"[\".light_blue + \"*\".white + \"]\".light_blue + \" #{@target} - Bound to #{handle} ...\".white if verbose\n puts \"[\".light_blue + \"*\".white + \"]\".light_blue + \" #{@target} - Obtaining a service manager handle...\".white if verbose\n scm_handle = nil\n stubdata = NDR.uwstring(\"\\\\\\\\#{@target}\") + NDR.long(0) + NDR.long(0xF003F)\n begin\n response = dcerpc.call(0x0f, stubdata)\n if dcerpc.last_response != nil and dcerpc.last_response.stub_data != nil\n scm_handle = dcerpc.last_response.stub_data[0,20]\n end\n rescue ::Exception => e\n puts \"[\".light_red + \"*\".white + \"]\".light_red + \" #{@target} - Error getting scm handle: #{e}\".white\n return false\n end\n servicename = Rex::Text.rand_text_alpha(11)\n displayname = Rex::Text.rand_text_alpha(16)\n holdhandle = scm_handle\n svc_handle = nil\n svc_status = nil\n stubdata =\n scm_handle + NDR.wstring(servicename) + NDR.uwstring(displayname) +\n NDR.long(0x0F01FF) + # Access: MAX\n NDR.long(0x00000110) + # Type: Interactive, Own process\n NDR.long(0x00000003) + # Start: Demand\n NDR.long(0x00000000) + # Errors: Ignore\n NDR.wstring( cmdorfile ) +\n NDR.long(0) + # LoadOrderGroup\n NDR.long(0) + # Dependencies\n NDR.long(0) + # Service Start\n NDR.long(0) + # Password\n NDR.long(0) + # Password\n NDR.long(0) + # Password\n NDR.long(0) # Password\n begin\n puts \"[\".light_blue + \"*\".white + \"]\".light_blue + \" #{@target} - Creating the service...\".white if verbose\n response = dcerpc.call(0x0c, stubdata)\n if dcerpc.last_response != nil and dcerpc.last_response.stub_data != nil\n svc_handle = dcerpc.last_response.stub_data[0,20]\n svc_status = dcerpc.last_response.stub_data[24,4]\n end\n rescue ::Exception => e\n puts \"[\".light_red + \"*\".white + \"]\".light_red + \" #{@target} - Error creating service: #{e}\".white\n return false\n end\n puts \"[\".light_blue + \"*\".white + \"]\".light_blue + \" #{@target} - Closing service handle...\".white if verbose\n begin\n response = dcerpc.call(0x0, svc_handle)\n rescue ::Exception\n end\n puts \"[\".light_blue + \"*\".white + \"]\".light_blue + \" #{@target} - Opening service...\".white if verbose\n begin\n stubdata = scm_handle + NDR.wstring(servicename) + NDR.long(0xF01FF)\n response = dcerpc.call(0x10, stubdata)\n if dcerpc.last_response != nil and dcerpc.last_response.stub_data != nil\n svc_handle = dcerpc.last_response.stub_data[0,20]\n end\n rescue ::Exception => e\n puts \"[\".light_red + \"*\".white + \"]\".light_red + \" #{@target} - Error opening service: #{e}\".white\n return false\n end\n puts \"[\".light_blue + \"*\".white + \"]\".light_blue + \" #{@target} - Starting the service...\".white if verbose\n stubdata = svc_handle + NDR.long(0) + NDR.long(0)\n begin\n response = dcerpc.call(0x13, stubdata)\n if dcerpc.last_response != nil and dcerpc.last_response.stub_data != nil\n end\n rescue ::Exception => e\n puts \"[\".light_red + \"*\".white + \"]\".light_red + \" #{@target} - Error starting service: #{e}\".white\n return false\n end\n puts \"[\".light_blue + \"*\".white + \"]\".light_blue + \" #{@target} - Removing the service...\".white if verbose\n stubdata = svc_handle\n begin\n response = dcerpc.call(0x02, stubdata)\n if dcerpc.last_response != nil and dcerpc.last_response.stub_data != nil\n end\n rescue ::Exception => e\n puts \"[\".light_red + \"*\".white + \"]\".light_red + \" #{@target} - Error removing service: #{e}\".white\n end\n puts \"[\".light_blue + \"*\".white + \"]\".light_blue + \" #{@target} - Closing service handle...\".white if verbose\n begin\n response = dcerpc.call(0x0, svc_handle)\n rescue ::Exception => e\n puts \"[\".light_red + \"*\".white + \"]\".light_red + \" #{@target} - Error closing service handle: #{e}\".white\n end\n select(nil, nil, nil, 1.0)\n @smb.disconnect(\"\\\\\\\\#{@target}\\\\IPC$\")\n return true\n rescue Rex::Proto::SMB::Exceptions::InvalidCommand\n puts \"[\".light_red + \"*\".white + \"]\".light_red + \" #{@target} - Network static causing issues, going to retry....\".white\n smb_psexec(cmdorfile, verbose)\n end\nend", "def address_bound?(ip, port, hourglass)\n _, _, rc = @container.run_in_container_root_context(\"/usr/sbin/lsof -i @#{ip}:#{port}\", timeout: hourglass.remaining)\n rc == 0\n end", "def service_subprocess_io\n write_fds = subproc_by_pid.values.select {|x| not x.stdin_fd.nil? and not x.terminated}.map {|x| x.stdin_fd}\n read_fds = subproc_by_pid.values.select {|x| not x.terminated}.map {|x| [x.stdout_fd, x.stderr_fd].select {|x| not x.nil? } }.flatten\n\n read_fds, write_fds, err_fds = IO.select(read_fds, write_fds, nil, self.poll_period)\n\n self.process_read_fds(read_fds) unless read_fds.nil?\n self.process_write_fds(write_fds) unless write_fds.nil?\n self.process_err_fds(err_fds) unless err_fds.nil?\n # errors? \n end", "def mount_service(service)\n mount_server service.control_url, service.server\n\n service.mount_extra self\n\n @scpds[service.scpd_url] = service\n mount_proc service.scpd_url, method(:scpd)\n end", "def service(service_name =\"all\", command=\"status\")\n sendreceive(\"service #{service_name} #{command}\")\n end", "def find_vfs\n cmd = \"find /sys/devices -type l -name 'virtfn*' -printf '%p#'\"\\\n \" -exec readlink -f '{}' \\\\;\"\n\n out, _err, _rc = Open3.capture3(cmd)\n\n out\n end", "def smb_fingerprint_windows_sp(os)\n sp = ''\n\n if (os == 'Windows XP')\n # SRVSVC was blocked in SP2\n begin\n smb_create(\"\\\\SRVSVC\")\n sp = 'Service Pack 0 / 1'\n rescue ::Rex::Proto::SMB::Exceptions::ErrorCode => e\n if (e.error_code == 0xc0000022)\n sp = 'Service Pack 2+'\n end\n end\n end\n\n if (os == 'Windows 2000' and sp.length == 0)\n # LLSRPC was blocked in a post-SP4 update\n begin\n smb_create(\"\\\\LLSRPC\")\n sp = 'Service Pack 0 - 4'\n rescue ::Rex::Proto::SMB::Exceptions::ErrorCode => e\n if (e.error_code == 0xc0000022)\n sp = 'Service Pack 4 with MS05-010+'\n end\n end\n end\n\n #\n # Perform granular XP SP checks if LSARPC is exposed\n #\n if (os == 'Windows XP')\n\n #\n # Service Pack 2 added a range(0,64000) to opnum 0x22 in SRVSVC\n # Credit to spoonm for first use of unbounded [out] buffers\n #\n handle = dcerpc_handle(\n '4b324fc8-1670-01d3-1278-5a47bf6ee188', '3.0',\n 'ncacn_np', [\"\\\\BROWSER\"]\n )\n\n begin\n dcerpc_bind(handle)\n\n stub =\n NDR.uwstring(Rex::Text.rand_text_alpha(rand(10)+1)) +\n NDR.wstring(Rex::Text.rand_text_alpha(rand(10)+1)) +\n NDR.long(64001) +\n NDR.long(0) +\n NDR.long(0)\n\n dcerpc.call(0x22, stub)\n sp = \"Service Pack 0 / 1\"\n\n rescue ::Interrupt\n raise $!\n rescue ::Rex::Proto::SMB::Exceptions::ErrorCode\n rescue ::Rex::Proto::SMB::Exceptions::ReadPacket\n rescue ::Rex::Proto::DCERPC::Exceptions::Fault\n sp = \"Service Pack 2+\"\n rescue ::Exception\n end\n\n\n #\n # Service Pack 3 fixed information leaks via [unique][out] pointers\n # Call SRVSVC::NetRemoteTOD() to return [out] [ref] [unique]\n # Credit:\n # Pointer leak is well known, but Immunity also covered in a paper\n # Silent fix of pointer leak in SP3 and detection method by Rhys Kidd\n #\n handle = dcerpc_handle(\n '4b324fc8-1670-01d3-1278-5a47bf6ee188', '3.0',\n 'ncacn_np', [\"\\\\BROWSER\"]\n )\n\n begin\n dcerpc_bind(handle)\n\n stub = NDR.uwstring(Rex::Text.rand_text_alpha(rand(8)+1))\n resp = dcerpc.call(0x1c, stub)\n\n if(resp and resp[0,4] == \"\\x00\\x00\\x02\\x00\")\n sp = \"Service Pack 3\"\n else\n if(resp and sp =~ /Service Pack 2\\+/)\n sp = \"Service Pack 2\"\n end\n end\n\n rescue ::Interrupt\n raise $!\n rescue ::Rex::Proto::SMB::Exceptions::ErrorCode\n rescue ::Rex::Proto::SMB::Exceptions::ReadPacket\n rescue ::Exception\n end\n end\n\n sp\n end", "def grep_rsync_process\n ps = \"\"\n Net::SSH.start(@ip, \"pipeline\") do |ssh|\n ps = ssh.exec! \"ps -ef | grep rsync\"\n end\n ps.split(\"\\n\")\n end", "def address_bound?(ip, port)\n out, err, rc = shellCmd(\"/usr/sbin/lsof -i @#{ip}:#{port}\")\n return rc != 0\n end", "def find_base_path\n path = \"\"\n begin \n File.open( \"/proc/mounts\", \"r\").each do |line|\n return path = $1 + \"/\" if line =~ /^\\S+\\s+(\\S+)\\scgroup\\s.*?cpuset/\n end\n rescue Exception => e\n puts \"Could not read /proc/mounts, I am going to die now.\"\n puts \"For the record the exception is #{e}\"\n exit\n end\n raise Exception, \"CGROUPS are not mounted, please mount then try again\"\n end", "def address_bound?(ip, port)\n _, _, rc = Utils.oo_spawn(\"/usr/sbin/lsof -i @#{ip}:#{port}\")\n rc == 0\n end", "def discover_binds\n contents = File.readlines(lxc.path.join('fstab')).each do |line|\n parts = line.split(' ')\n if(parts[3] == 'bind')\n source = parts.first\n target = parts[1].sub(%r{^.+rootfs/}, '')\n container_target = lxc.rootfs.join(target).to_path\n device = Storage::VirtualDevice.new(target.gsub('/', '_'), :tmp_fs => true)\n device.mount\n FileUtils.mkdir_p(container_target)\n ephemeral_binds << device\n if(union == 'overlayfs')\n \"none #{container_target} overlayfs upperdir=#{device.mount_path},lowerdir=#{source} 0 0\"\n else\n \"none #{container_target} aufs br=#{device.mount_path}=rw:#{source}=ro,noplink 0 0\"\n end\n else\n line\n end\n end\n # If bind option used, bind in for rw\n if(bind)\n command(\"mkdir -p #{lxc.rootfs.join(bind).to_path}\", :sudo => true)\n contents << \"#{bind} #{lxc.rootfs.join(bind)} none bind 0 0\\n\"\n end\n write_file(lxc.path.join('fstab'), contents.join)\n true\n end", "def smb_direct\n\tself.scanner_smb_directs ||= {}\n\tself.scanner_smb_directs[Thread.current.to_s]\nend", "def servicepacks\n connect do\n exit_status, stdout = exec \"ls #{SERVICEPACKS_DIR}\"\n stdout.each_line do |service|\n desc = exec! \"#{SERVICEPACKS_DIR}/#{service.chomp}/bin/detect --about\", error_msg: \"Cannor read servicepack description for #{service}\"\n display_ \"* #{desc.strip}\"\n end\n end\n end", "def service_request(service)\n Net::SSH::Buffer.from(:byte, SERVICE_REQUEST, :string, service)\n end", "def find_socket\n # ps axf | grep qemu-system | sed 's|.*qemu-system-x86_64 \\(.*\\)$|g'\n end", "def find service_name\n found = nil\n\n each_tuple_space.any? do |ts|\n tuples = ts.read_all [:name, nil, DRbObject, nil]\n\n found = tuples.find do |_, found_service_name, service, _|\n begin\n next unless found_service_name == service_name\n\n if DRbObject === service then\n service.method_missing :object_id # ping service for liveness\n else\n service\n end\n rescue DRb::DRbConnError\n next\n rescue NoMethodError\n next\n end\n end\n end\n\n raise \"unable to find service #{service_name.inspect}\" unless found\n\n found[2]\n end", "def smb_cmd(cmd, rdir=nil)\n if rdir.nil?\n dir=''\n else\n dir=' -D ' + rdir\n end\n file = Tempfile.new('ruby_smbclient')\n if @hashpass\n success = system(\"#{@smbclient} \\\\\\\\\\\\\\\\#{@host}\\\\\\\\#{@share} -p #{@port} -U #{@user} --pw-nt-hash #{@pass} -c '#{cmd}'#{dir} > #{file.path} 2>&1\")\n else\n success = system(\"#{@smbclient} \\\\\\\\\\\\\\\\#{@host}\\\\\\\\#{@share} -p #{@port} -U #{@user} #{@pass} -c '#{cmd}'#{dir} > #{file.path} 2>&1\")\n end\n if success\n output = File.open(file.path).readlines\n else\n output=nil\n end\n file.unlink\n return output\n end" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
this method passes the test but doesn't account for highest salary def captain
def captain salaries = [] @players.each do |player| salaries << player.salary end salaries.max @players.find do |player| if salaries.max == player.salary return player.name end end end
[ "def max_salary\n approx_salaries.maximum(:max_salary)\n end", "def max_sal\n text = @salary_range.split ' '\n max = if text.length < WebScraper::SAL_RANGE_LENGTH_ONE_NUM\n WebScraper::NOT_APPLICABLE\n elsif text.length < WebScraper::SAL_RANGE_LENGTH_TWO_NUM\n to_annual(text[WebScraper::SAL_RANGE_MIN_POS].delete(WebScraper::MONEY_FORMATTING).to_f, text.last)\n else\n to_annual(text[WebScraper::SAL_RANGE_MAX_POS].delete(WebScraper::MONEY_FORMATTING).to_f, text.last)\n end\n max\n end", "def maximum_salary(search_position)\n matching_people = @people.select { |person| person.position == search_position }\n\n person_with_largest_salary = matching_people.max_by { |person| person.salary }\n\n return person_with_largest_salary.salary\n end", "def check_salary(result, salary, line_num)\n result_pay = result[\"pay\"]\n result_pay =result_pay.downcase\n result_pay = result_pay.gsub(\"$\", \"\").gsub(\"/year\", \"\")\n result_pay = result_pay.gsub(\"k\", \"000\").gsub(\",\",\"\")\n if result_pay.include? \"-\"\n result_pay = result_pay.split(\"-\")\n fail \"At line number #{line_num}\\n #{result}\\nExpected: #{salary}\\n within\\nGot: #{result_pay}\" unless salary.to_i <= result_pay[1].to_i\n else\n fail \"At line number #{line_num}\\n #{result}\\nExpected: #{salary}\\nless or equal to\\nGot: #{result_pay}\" unless salary.to_i <= result_pay.to_i\n end\nend", "def salary_for(reporter)\n\t\t\treturn reporter.length * 10000\n\t\tend", "def biggest_investment\n max = 0\n funding_rounds.each do |round| \n if round.investment > max\n max = round.investment\n end\n end\n max\n \n end", "def most_money(students)\n return \"all\" if students.length > 1 && students.map(&:total_money).uniq.length == 1\n puts students.max_by(&:total_money).name\n end", "def franchise_with_highest_profit\n company = get_company\n no_franchises(company)\n big_earner = company.franchises.max_by { |franchise| franchise.profit }\n puts \"Franchise #{big_earner.id} has the highest profit, having earned $#{big_earner.profit}.\"\n menu\n end", "def highest_paid_actor\n all_characters\n .max_by { |char| char.salary }\n .actor\n end", "def find_salary(driver)\n\thighest_pay_date = \"\"\n\thighest_pay_day_amount = 0\n\tearning_sum = 0\n\t\t\n\tdriver[:dates].each do |date, info|\n\t\tdays_sum = 0\n\t\t\n\t\tinfo[:earnings].each do |earning|\n\t\t\tearning_sum += earning\n\t\t\tdays_sum += earning\n\t\tend\n\t\t\n\t\tif days_sum > highest_pay_day_amount\n\t\t\thighest_pay_day_amount = days_sum\n\t\t\thighest_pay_date = date\n\t\tend\n\tend\n\t\t\n\treturn {\n\t\tdriver_sum:earning_sum, \n\t\tdriver_highest_date:highest_pay_date, \n\t\tdriver_highest_sum:highest_pay_day_amount,\n\t}\nend", "def most_profitable_role\n @agent_roles.max_by { |role| @trade_tracker.profitability_of(role) }\n end", "def test_cannot_give_raises_to_unsatisfactory_employees\n d = Department.new(\"Computer Science\")\n mason = Employee.new(\"Mason Matthews\", \"mason@email.com\", \"919-555-5555\", 200000)\n clinton = Employee.new(\"Clinton Dreisbach\", \"clinton@email.com\", \"919-777-7777\", 200000)\n\n d.add_employee(mason)\n d.add_employee(clinton)\n\n mason.add_review(negative_review_two)\n clinton.add_review(positive_review_one)\n\n total_raise_amount = 50000\n d.give_raises(total: total_raise_amount)\n\n assert_equal 450000, d.get_salary_total\n assert_equal 200000, mason.salary\n assert_equal 250000, clinton.salary\n end", "def biggest_investment\n self.funding_rounds.max_by do |round|\n round.startup.uniq \n end\n end", "def mostSteals\n players.max_by do|name, stats|\n stats[:steals]\n end\nend", "def test_can_mark_performance_correctly_based_on_review\n zeke = Employee.new(\"Zeke Matthews\", \"zeke@email.com\", \"919-555-5555\", 60000)\n yvonne = Employee.new(\"Yvonne yvonne\", \"yvonne@email.com\", \"919-777-7777\", 100000)\n xavier = Employee.new(\"Xavier\", \"xavier@email.com\", \"919-555-5555\", 60000)\n wanda = Employee.new(\"Wanda Sykes\", \"wanda@email.com\", \"919-777-7777\", 100000)\n\n zeke.add_review(negative_review_one)\n yvonne.add_review(negative_review_two)\n xavier.add_review(positive_review_one)\n wanda.add_review(positive_review_two)\n\n assert_equal zeke.is_satisfactory?, false\n assert_equal yvonne.is_satisfactory?, false\n assert_equal xavier.is_satisfactory?, true\n assert_equal wanda.is_satisfactory?, true\n end", "def long_name_steals_a_ton?()\n all_players_array = get_all_players()\n max_steals = 0\n max_steals_player_hash = Hash.new\n len = all_players_array.length()\n i = 0\n while i < len\n player = all_players_array[i]\n steals = player[:steals]\n if(steals > max_steals)\n max_steals = steals\n max_steals_player_hash = player\n end\n i += 1\n end\n max_steal_name = max_steals_player_hash[:player_name]\n longest_name = player_with_longest_name()\n print max_steal_name\n\n print longest_name\n if(max_steal_name == longest_name )\n return true\n end\n return false\nend", "def test_if_qualify(current_salary, monthly_payment)\n\tmonthly_salary = current_salary / 12\n\ttimes_greater = monthly_salary / monthly_payment\n\tif times_greater >= 2 \n\t\tanswer = true \n\telse\n\t\tanswer = false \n\tend\n\treturn answer\nend", "def biggest_investment\n funding_rounds.max_by {|funding_round| funding_round.investment}\n end", "def calculate_salary\n\t\tif hours_week<=40\n\t\t\tsuper\n\t\telsif hours_week>40\n\t\t\tsuper + (hourly_rate*(hours_week-40))\n\n\t\telse\n\t\t\tputs \"Please enter a valid hours work on the week\"\n\n\t end\n end" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
GET /applicants GET /applicants.json
def index @applicants = Applicant.all end
[ "def index\n @applicants = current_user.applicants rescue nil\n end", "def index\n if !check_permissions?(session[:user_type], \"view_applicants\")\n redirect_to root_path\n end\n @applicants = Applicant.all\n end", "def retrieve_tenants()\n start.uri('/api/tenant')\n .get()\n .go()\n end", "def retrieve_tenants()\n start.uri('/api/tenant')\n .get()\n .go()\n end", "def index\n @pet_applications = PetApplication.where(organization_id: params['organization_id'])\n authorize @pet_applications\n\n render json: @pet_applications\n end", "def list_tenants_for_circle(args = {}) \n get(\"/tenantcircles.json/tenants\", args)\nend", "def index\n @tenants = current_user.tenants\n end", "def index\r\n @aspirants = Aspirant.all\r\n\r\n respond_to do |format|\r\n format.html # index.html.erb\r\n format.json { render json: @aspirants }\r\n end\r\n end", "def index\n @tenants = keystone.tenants\n\n respond_to do |format|\n format.html # index.html.erb\n format.json { render :json => @tenants }\n end\n end", "def get_current_tenant \n get(\"/tenants.json/current\")\nend", "def index\n @grants =\n if @company\n @company.grants(params[:filter_by], params[:sort_by], params[:desc])\n else\n Grant.kept.order(name: :asc)\n end\n\n headers[\"Total\"] = @grants.count\n headers[\"Per-Page\"] = params[:per_page]\n\n render json: (params[:page] == 'all' ? @grants : paginator(@grants)), has_type: false\n end", "def list_tenants_for_circles(args = {}) \n get(\"/tenants.json/circles\", args)\nend", "def index\n @job_applicants = JobApplicant.all\n\n respond_to do |format|\n format.html # index.html.erb\n format.json { render json: @job_applicants }\n end\n end", "def keystone_v2_tenants(auth_url,\n token)\n\n url = URI.parse(\"#{auth_url}/tenants\")\n req = Net::HTTP::Get.new url.path\n req['content-type'] = 'application/json'\n req['x-auth-token'] = token\n\n res = handle_request(req, url)\n data = JSON.parse res.body\n data['tenants']\nend", "def index\n if params['user_id'] && !params['user_id'].nil? && !current_user.nil? && params['user_id'].to_i == current_user.id\n admin_organization_ids = current_user.admin_organization_ids\n\n if !admin_organization_ids.present?\n render json: []\n end\n\n @pet_applications = PetApplication.where(organization_id: current_user.admin_organization_ids).filter(params.slice(:status))\n authorize @pet_applications\n render json: @pet_applications\n else\n head 403\n end\n end", "def list_arrays_for_all_tenants(args = {}) \n get(\"/arrays.json/global\", args)\nend", "def tenant_list\n\t\t\n\t\tget_call = Curl::Easy.http_get(\"#{@ip_address}:#{@port_2}/v2.0/tenants\"\n\t\t) do |curl| curl.headers['x-auth-token'] = @token end\n\t\t\n\t\tputs \"invoking tenant-list...\"\n\t\t\n\t\tparsed_json = JSON.parse(get_call.body_str)\n\t\t\n\t\tputs parsed_json\n\t\treturn parsed_json\n\tend", "def index\n \n @plants = Plant.all\n @personal_plants = PersonalPlant.where(:user_id => session[:user][:id])\n\n respond_to do |format|\n format.html # index.html.erb\n format.json { render json: @plants }\n end\n end", "def index\n @event_applicants = EventApplicant.all\n end" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[String, ...] > Sentence (=[Morpheme, ...])
def parse_sentence(lines) lines.map do |line| parse_morpheme(line) end end
[ "def typoglycemiaSentence(input)\n words = input.split(' ')\n words.map! { |x| typoglycemiaWord(x) }\n words.join(\" \")\nend", "def to_stems(sentence)\n return [] if sentence.blank?\n text = sentence.gsub /\\s[A-Z][0-9][0-9]\\..+\\s/, '' # remove codes\n text.gsub!(/[\\(\\)\\:\\[\\],\\.\\?]/, '') # remove special characters\n\n text.downcase!\n words = text.split(/[-\\/\\s]/) # split at whitespace/slash/line\n #words.reject! { |w| w.match(/[A-Z][0-9][0-9]\\..+/) }\n words.reject! { |w| w.match(/[0-9]+/) } # reject digits\n words.map { |w| @stemmer.stem(w) }\n end", "def first_sentence(string); end", "def lex_en_plain_words; end", "def wookie_sentence; end", "def parse_sentence(word_list)\n skip(word_list, 'stop')\n \n subj = parse_subject(word_list)\n verb = parse_verb(word_list)\n obj = parse_object(word_list)\n \n return Sentence.new(subj, verb, obj)\n end", "def sentence_conv(sentence)\n sentence_arr = sentence.split(\" \")\n pig_sentence = \"\"\n sentence_arr.each do |word|\n pig_sentence << converter(word) + \" \"\n end\n return pig_sentence\nend", "def semantic_tokens; end", "def words(s)\n s.split\nend", "def words\n phrase.split\n end", "def tokenize\n return [] if unencoded_text.blank?\n # kill off all punctuation except [stuff]'s or [stuff]'t\n # this includes hyphens (words are split)\n str = unencoded_text.\n downcase.\n gsub(/[^a-zA-Z0-9\\']+/, ' ').\n gsub(/(\\w)\\'([st])\\b/, '\\1!\\2').gsub(/\\'/, ' ').gsub(/!/, \"'\")\n # Busticate at whitespace\n words = str.strip.split(/\\s+/)\n words.reject!{|w| w.length < 3 }\n words.map!{|w| Wukong::encode_str(w) }\n end", "def rubyify(sentence)\r\n\r\nend", "def morph_words\n words = @query.split(/[^a-zA-Z0-9]/)\n morphed_words = words.map{|word| [word,Text::Metaphone.double_metaphone(word)]}\n morphed_words\n end", "def noun; end", "def wookiee_sentence; end", "def tokenize_wikitext(\n s # String\n) # Array<String>\n s\n .split(WIKITEXT_TOKENIZER)\n .lazy\n .map(&:strip)\n .reject(&:empty?)\n .to_a\nend", "def convert_pig_latin(sentence)\n translated = []\n\n sentence.split(' ').each do |word|\n if word.length > 2\n translated << pig_latin(word)\n else\n translated << word\n end\n end\n translated.join(' ')\nend", "def text_token(text, kind); end", "def lex_en_plain_string; end" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
GET /participant/contact/types GET /participant/contact/types.xml
def index @participant_contact_types = Participant::Contact::Type.all respond_to do |format| format.html # index.html.erb format.xml { render :xml => @participant_contact_types } end end
[ "def show\n @participant_contact_type = Participant::Contact::Type.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.xml { render :xml => @participant_contact_type }\n end\n end", "def types\n types = JSON.parse(connection.get(\"/Contact/Types\").body )\n end", "def types\n contact_note = JSON.parse(connection.get(\"/ContactNote/Types\").body )\n end", "def index\n @correspondence_types = CorrespondenceType.all\n\n respond_to do |format|\n format.html # index.html.erb\n format.xml { render :xml => @correspondence_types }\n end\n end", "def new\n @participant_contact_type = Participant::Contact::Type.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.xml { render :xml => @participant_contact_type }\n end\n end", "def index\n @person_types = PersonType.all\n\n respond_to do |format|\n format.html # index.html.erb\n format.xml { render :xml => @person_types }\n end\n end", "def index\n @types = Type.all\n\n respond_to do |format|\n format.html # index.html.erb\n format.xml { render :xml => @types }\n end\n end", "def index\n @type_contacts = TypeContact.all\n end", "def retrieve_entity_types()\n start.uri('/api/entity/type')\n .get()\n .go()\n end", "def index\n @participant_contact_emails = Participant::Contact::Email.all\n\n respond_to do |format|\n format.html # index.html.erb\n format.xml { render :xml => @participant_contact_emails }\n end\n end", "def index\n @participant_contact_addresses = Participant::Contact::Address.all\n\n respond_to do |format|\n format.html # index.html.erb\n format.xml { render :xml => @participant_contact_addresses }\n end\n end", "def show\n @correspondence_type = CorrespondenceType.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.xml { render :xml => @correspondence_type }\n end\n end", "def show\n\n respond_to do |format|\n format.html # show.html.erb\n format.xml { render :xml => @email_type }\n end\n end", "def index\n @participant_types = ParticipantType.all\n end", "def index\n @realty_types = RealtyType.find(:all)\n\n respond_to do |format|\n format.html # index.html.erb\n format.xml { render :xml => @realty_types }\n end\n end", "def index\n @association_types = AssociationType.all\n\n respond_to do |format|\n format.html # index.html.erb\n format.xml { render :xml => @association_types }\n end\n end", "def index\n @claim_types = ClaimType.all\n\n respond_to do |format|\n format.html # index.html.erb\n format.xml { render :xml => @claim_types }\n end\n end", "def show\n @person_type = PersonType.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.xml { render :xml => @person_type }\n end\n end", "def types\n @client.make_request :get, reports_path\n end" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
GET /participant/contact/types/1 GET /participant/contact/types/1.xml
def show @participant_contact_type = Participant::Contact::Type.find(params[:id]) respond_to do |format| format.html # show.html.erb format.xml { render :xml => @participant_contact_type } end end
[ "def index\n @participant_contact_types = Participant::Contact::Type.all\n\n respond_to do |format|\n format.html # index.html.erb\n format.xml { render :xml => @participant_contact_types }\n end\n end", "def new\n @participant_contact_type = Participant::Contact::Type.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.xml { render :xml => @participant_contact_type }\n end\n end", "def index\n @correspondence_types = CorrespondenceType.all\n\n respond_to do |format|\n format.html # index.html.erb\n format.xml { render :xml => @correspondence_types }\n end\n end", "def index\n @person_types = PersonType.all\n\n respond_to do |format|\n format.html # index.html.erb\n format.xml { render :xml => @person_types }\n end\n end", "def index\n @participant_contact_emails = Participant::Contact::Email.all\n\n respond_to do |format|\n format.html # index.html.erb\n format.xml { render :xml => @participant_contact_emails }\n end\n end", "def show\n @correspondence_type = CorrespondenceType.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.xml { render :xml => @correspondence_type }\n end\n end", "def index\n @participant_contact_addresses = Participant::Contact::Address.all\n\n respond_to do |format|\n format.html # index.html.erb\n format.xml { render :xml => @participant_contact_addresses }\n end\n end", "def show\n\n respond_to do |format|\n format.html # show.html.erb\n format.xml { render :xml => @email_type }\n end\n end", "def show\n @person_type = PersonType.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.xml { render :xml => @person_type }\n end\n end", "def types\n types = JSON.parse(connection.get(\"/Contact/Types\").body )\n end", "def show\n @participant_contact = ParticipantContact.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.xml { render :xml => @participant_contact }\n end\n end", "def index\n @participant_people = Participant::Person.all\n\n respond_to do |format|\n format.html # index.html.erb\n format.xml { render :xml => @participant_people }\n end\n end", "def show\n @participant_contact_email = Participant::Contact::Email.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.xml { render :xml => @participant_contact_email }\n end\n end", "def create\n @participant_contact_type = Participant::Contact::Type.new(params[:participant_contact_type])\n\n respond_to do |format|\n if @participant_contact_type.save\n format.html { redirect_to(@participant_contact_type, :notice => 'Type was successfully created.') }\n format.xml { render :xml => @participant_contact_type, :status => :created, :location => @participant_contact_type }\n else\n format.html { render :action => \"new\" }\n format.xml { render :xml => @participant_contact_type.errors, :status => :unprocessable_entity }\n end\n end\n end", "def index\n @type_contacts = TypeContact.all\n end", "def show\n @activity_type = ActivityType.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.xml { render :xml => @activity_type }\n end\n end", "def index\n @types = Type.all\n\n respond_to do |format|\n format.html # index.html.erb\n format.xml { render :xml => @types }\n end\n end", "def types\n contact_note = JSON.parse(connection.get(\"/ContactNote/Types\").body )\n end", "def index\n @contacts = Mailee::Contact.all\n\n respond_to do |format|\n format.html # index.html.erb\n format.xml { render :xml => @contacts }\n end\n end" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
GET /participant/contact/types/new GET /participant/contact/types/new.xml
def new @participant_contact_type = Participant::Contact::Type.new respond_to do |format| format.html # new.html.erb format.xml { render :xml => @participant_contact_type } end end
[ "def create\n @participant_contact_type = Participant::Contact::Type.new(params[:participant_contact_type])\n\n respond_to do |format|\n if @participant_contact_type.save\n format.html { redirect_to(@participant_contact_type, :notice => 'Type was successfully created.') }\n format.xml { render :xml => @participant_contact_type, :status => :created, :location => @participant_contact_type }\n else\n format.html { render :action => \"new\" }\n format.xml { render :xml => @participant_contact_type.errors, :status => :unprocessable_entity }\n end\n end\n end", "def new\n @person_type = PersonType.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.xml { render :xml => @person_type }\n end\n end", "def new\n @contact_number_type = ContactNumberType.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.xml { render :xml => @contact_number_type }\n end\n end", "def new\n @participant_contact = ParticipantContact.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.xml { render :xml => @participant_contact }\n end\n end", "def new\n @correspondence_type = CorrespondenceType.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.xml { render :xml => @correspondence_type }\n end\n end", "def new\n @contact_type = ContactType.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @contact_type }\n end\n end", "def new\n @type = Type.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.xml { render :xml => @type }\n end\n end", "def new\n @contacttype = Contacttype.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @contacttype }\n end\n end", "def new\n @email_type = EmailType.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.xml { render :xml => @email_type }\n end\n end", "def new\n respond_to do |format|\n format.html { render_template } # new.html.erb\n format.xml { render xml: @contact_territory }\n end\n end", "def new\n @contacts = Contact.new\n respond_to do |format|\n format.html # new.html.erb\n format.xml { render :xml => @contacts }\n end\n end", "def new\n @phone_type = PhoneType.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.xml { render :xml => @phone_type }\n end\n end", "def new\n @activity_type = ActivityType.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.xml { render :xml => @activity_type }\n end\n end", "def new\n @participation_type = ParticipationType.new(ParticipationType::RDF_PARTICIPATION_TYPE_NEW_URI, \"\")\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @participation_type }\n end\n end", "def new\n @rtype = Rtype.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.xml { render :xml => @rtype }\n end\n end", "def new\n @person_contact = PersonContact.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.xml { render :xml => @person_contact }\n end\n end", "def new\n @participant_contact_email = Participant::Contact::Email.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.xml { render :xml => @participant_contact_email }\n end\n end", "def new\n @participant_person = Participant::Person.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.xml { render :xml => @participant_person }\n end\n end", "def new\n @uri_type = UriType.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.xml { render :xml => @uri_type }\n end\n end" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
POST /participant/contact/types POST /participant/contact/types.xml
def create @participant_contact_type = Participant::Contact::Type.new(params[:participant_contact_type]) respond_to do |format| if @participant_contact_type.save format.html { redirect_to(@participant_contact_type, :notice => 'Type was successfully created.') } format.xml { render :xml => @participant_contact_type, :status => :created, :location => @participant_contact_type } else format.html { render :action => "new" } format.xml { render :xml => @participant_contact_type.errors, :status => :unprocessable_entity } end end end
[ "def index\n @participant_contact_types = Participant::Contact::Type.all\n\n respond_to do |format|\n format.html # index.html.erb\n format.xml { render :xml => @participant_contact_types }\n end\n end", "def types\n types = JSON.parse(connection.get(\"/Contact/Types\").body )\n end", "def create\n @contact_type = ContactType.new(contact_type_params)\n\n respond_to do |format|\n if @contact_type.save\n format.html { redirect_to @contact_type, notice: 'Contact type was successfully created.' }\n format.json { render action: 'show', status: :created, location: @contact_type }\n else\n format.html { render action: 'new' }\n format.json { render json: @contact_type.errors, status: :unprocessable_entity }\n end\n end\n end", "def new\n @participant_contact_type = Participant::Contact::Type.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.xml { render :xml => @participant_contact_type }\n end\n end", "def create\n @admin_contact_type = Admin::ContactType.new(params[:admin_contact_type])\n\n respond_to do |format|\n if @admin_contact_type.save\n format.html { redirect_to admin_contact_types_url }\n format.json { render json: @admin_contact_type, status: :created, location: @admin_contact_type }\n else\n format.html { render action: \"new\" }\n format.json { render json: @admin_contact_type.errors, status: :unprocessable_entity }\n end\n end\n end", "def create\n logger.info \"Parammeter passed in: #{params.inspect}\"\n @contacttype = Contacttype.new(params[:contacttype])\n @contacttype.user_id = current_user.id\n \n respond_to do |format|\n if @contacttype.save\n format.html { redirect_to contacttypes_path, :notice => 'Contacttype was successfully created.' }\n format.json { render :json => @contacttype, :status => :created, :location => @contacttype }\n else\n format.html { render :action => \"new\" }\n format.json { render :json => @contacttypes.errors, :status => :unprocessable_entity }\n end\n end\n end", "def types\n contact_note = JSON.parse(connection.get(\"/ContactNote/Types\").body )\n end", "def create\n @contact_type = ContactType.new(contact_type_params)\n\n if @contact_type.save\n audit(@contact_type, current_user)\n render json: @contact_type, status: :created\n else\n render json: @contact_type.errors, status: :unprocessable_entity\n end\n end", "def create\n @outgoing_type = OutgoingType.new(params[:outgoing_type])\n\n respond_to do |format|\n if @outgoing_type.save\n format.html { redirect_to(outgoing_types_path, :notice => 'Outgoing type was successfully created.') }\n format.xml { render :xml => @outgoing_type, :status => :created, :location => @outgoing_type }\n else\n format.html { render :action => \"new\" }\n format.xml { render :xml => @outgoing_type.errors, :status => :unprocessable_entity }\n end\n end\n end", "def create\n @contact_number_type = ContactNumberType.new(params[:contact_number_type])\n\n respond_to do |format|\n if @contact_number_type.save\n flash[:notice] = 'Contact Number Type was successfully created.'\n format.html { redirect_to(contact_number_types_path) }\n format.xml { render :xml => @contact_number_type, :status => :created, :location => @contact_number_type }\n else\n format.html { render :action => \"new\" }\n format.xml { render :xml => @contact_number_type.errors, :status => :unprocessable_entity }\n end\n end\n end", "def create\n @person_type = PersonType.new(params[:person_type])\n\n respond_to do |format|\n if @person_type.save\n flash[:notice] = 'PersonType was successfully created.'\n format.html { redirect_to(@person_type) }\n format.xml { render :xml => @person_type, :status => :created, :location => @person_type }\n else\n format.html { render :action => \"new\" }\n format.xml { render :xml => @person_type.errors, :status => :unprocessable_entity }\n end\n end\n end", "def create\n @type_contact = TypeContact.new(type_contact_params)\n\n respond_to do |format|\n if @type_contact.save\n format.html { redirect_to '/maestricos/prueba?titulo=Tipo+Contacto&tabla=TypeContacts'}\n format.json { render :show, status: :created, location: @type_contact }\n else\n flash.now[:success] = \"Welcome to the Sample App!\"\n format.html { redirect_to '/maestricos/prueba?titulo=Tipo+Contacto&tabla=TypeContacts'}\n format.json { render json: @type_contact.errors, status: :unprocessable_entity }\n end\n end\n end", "def create\n @correspondence_type = CorrespondenceType.new(params[:correspondence_type])\n\n respond_to do |format|\n if @correspondence_type.save\n flash[:notice] = 'CorrespondenceType was successfully created.'\n format.html { redirect_to(@correspondence_type) }\n format.xml { render :xml => @correspondence_type, :status => :created, :location => @correspondence_type }\n else\n format.html { render :action => \"new\" }\n format.xml { render :xml => @correspondence_type.errors, :status => :unprocessable_entity }\n end\n end\n end", "def create_entity_type(entity_type_id, request)\n start.uri('/api/entity/type')\n .url_segment(entity_type_id)\n .body_handler(FusionAuth::JSONBodyHandler.new(request))\n .post()\n .go()\n end", "def create\n @correspondence_type = CorrespondenceType.new(params[:correspondence_type])\n\n respond_to do |format|\n if @correspondence_type.save\n format.html { redirect_to @correspondence_type, notice: 'Correspondence type was successfully created.' }\n format.json { render json: @correspondence_type, status: :created, location: @correspondence_type }\n else\n format.html { render action: \"new\" }\n format.json { render json: @correspondence_type.errors, status: :unprocessable_entity }\n end\n end\n end", "def create\n @email_type = EmailType.new(params[:email_type])\n\n respond_to do |format|\n if @email_type.save\n format.html { redirect_to(@email_type, :notice => 'Email type was successfully created.') }\n format.xml { render :xml => @email_type, :status => :created, :location => @email_type }\n else\n format.html { render :action => \"new\" }\n format.xml { render :xml => @email_type.errors, :status => :unprocessable_entity }\n end\n end\n end", "def add_all_to\n if params[:contact_type] && [1, 2, 3].include?(params[:contact_type].to_i)\n contacts = Contact.find_all_by_contact_type_id(params[:contact_type])\n for contact in contacts\n Subscriber.find_or_create_by_subscriber_list_id_and_contact_id(@subscriber_list.id, contact.id)\n end\n\n flash[:notice] = \"Todos los #{Contact::SUBSCRIBER_TYPES.select{|x| x.idx == params[:contact_type].to_i}.first.name} han sido añadidos.\"\n end\n\n redirect_to :back\n end", "def destroy\n @participant_contact_type = Participant::Contact::Type.find(params[:id])\n @participant_contact_type.destroy\n\n respond_to do |format|\n format.html { redirect_to(participant_contact_types_url) }\n format.xml { head :ok }\n end\n end", "def create\n @participant_type = ParticipantType.new(participant_type_params)\n\n respond_to do |format|\n if @participant_type.save\n format.html { redirect_to @participant_type, notice: 'Participant type was successfully created.' }\n else\n format.html { render action: 'new' }\n end\n end\n end" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
PUT /participant/contact/types/1 PUT /participant/contact/types/1.xml
def update @participant_contact_type = Participant::Contact::Type.find(params[:id]) respond_to do |format| if @participant_contact_type.update_attributes(params[:participant_contact_type]) format.html { redirect_to(@participant_contact_type, :notice => 'Type was successfully updated.') } format.xml { head :ok } else format.html { render :action => "edit" } format.xml { render :xml => @participant_contact_type.errors, :status => :unprocessable_entity } end end end
[ "def update\n standard_update(ContactType, params[:id], contact_type_params)\n end", "def update\n @contacttype = Contacttype.find(params[:id])\n\n respond_to do |format|\n if @contacttype.update_attributes(params[:contacttype])\n format.html { redirect_to contacttypes_path, :notice => 'Contacttype was successfully updated.' }\n format.json { head :ok }\n else\n format.html { render :action => \"edit\" }\n format.json { render :json => @contacttype.errors, :status => :unprocessable_entity }\n end\n end\n end", "def update\n @correspondence_type = CorrespondenceType.find(params[:id])\n\n respond_to do |format|\n if @correspondence_type.update_attributes(params[:correspondence_type])\n flash[:notice] = 'CorrespondenceType was successfully updated.'\n format.html { redirect_to(correspondence_types_path) }\n format.xml { head :ok }\n else\n format.html { render :action => \"edit\" }\n format.xml { render :xml => @correspondence_type.errors, :status => :unprocessable_entity }\n end\n end\n end", "def update\n respond_to do |format|\n if @contact_type.update(contact_type_params)\n format.html { redirect_to @contact_type, notice: 'Contact type was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render action: 'edit' }\n format.json { render json: @contact_type.errors, status: :unprocessable_entity }\n end\n end\n end", "def update\n @admin_contact_type = Admin::ContactType.find(params[:id])\n\n respond_to do |format|\n if @admin_contact_type.update_attributes(params[:admin_contact_type])\n format.html { redirect_to admin_contact_types_url }\n format.json { head :ok }\n else\n format.html { render action: \"edit\" }\n format.json { render json: @admin_contact_type.errors, status: :unprocessable_entity }\n end\n end\n end", "def update\n @contact_type = ContactType.find(params[:id])\n\n if @contact_type.update(contact_type_params)\n audit(@contact_type, current_user)\n head :no_content\n else\n render json: @contact_type.errors, status: :unprocessable_entity\n end\n end", "def update\n @contact_number_type = ContactNumberType.find(params[:id])\n\n respond_to do |format|\n if @contact_number_type.update_attributes(params[:contact_number_type])\n flash[:notice] = 'Contact Number Type was successfully updated.'\n format.html { redirect_to(contact_number_types_path) }\n format.xml { head :ok }\n else\n format.html { render :action => \"edit\" }\n format.xml { render :xml => @contact_number_type.errors, :status => :unprocessable_entity }\n end\n end\n end", "def update\n @comptype = Comptype.find(params[:comptype][:id])\n\n respond_to do |format|\n if @comptype.update_attributes(params[:comptype])\n format.xml { head :ok }\n end\n end\n end", "def update\n\n respond_to do |format|\n if @email_type.update_attributes(params[:email_type])\n format.html { redirect_to(@email_type, :notice => 'Email type was successfully updated.') }\n format.xml { head :ok }\n else\n format.html { render :action => \"edit\" }\n format.xml { render :xml => @email_type.errors, :status => :unprocessable_entity }\n end\n end\n end", "def destroy\n @participant_contact_type = Participant::Contact::Type.find(params[:id])\n @participant_contact_type.destroy\n\n respond_to do |format|\n format.html { redirect_to(participant_contact_types_url) }\n format.xml { head :ok }\n end\n end", "def create\n @participant_contact_type = Participant::Contact::Type.new(params[:participant_contact_type])\n\n respond_to do |format|\n if @participant_contact_type.save\n format.html { redirect_to(@participant_contact_type, :notice => 'Type was successfully created.') }\n format.xml { render :xml => @participant_contact_type, :status => :created, :location => @participant_contact_type }\n else\n format.html { render :action => \"new\" }\n format.xml { render :xml => @participant_contact_type.errors, :status => :unprocessable_entity }\n end\n end\n end", "def update\n @type = Type.find(params[:id])\n\n respond_to do |format|\n if @type.update_attributes(params[:type])\n format.html { redirect_to(types_path, :notice => 'Type was successfully updated.') }\n format.xml { head :ok }\n else\n format.html { render :action => \"edit\" }\n format.xml { render :xml => @type.errors, :status => :unprocessable_entity }\n end\n end\n end", "def update\n @correspondence_type = CorrespondenceType.find(params[:id])\n\n respond_to do |format|\n if @correspondence_type.update_attributes(params[:correspondence_type])\n format.html { redirect_to @correspondence_type, notice: 'Correspondence type was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render action: \"edit\" }\n format.json { render json: @correspondence_type.errors, status: :unprocessable_entity }\n end\n end\n end", "def update\n @person_type = PersonType.find(params[:id])\n\n respond_to do |format|\n if @person_type.update_attributes(params[:person_type])\n flash[:notice] = 'PersonType was successfully updated.'\n format.html { redirect_to(@person_type) }\n format.xml { head :ok }\n else\n format.html { render :action => \"edit\" }\n format.xml { render :xml => @person_type.errors, :status => :unprocessable_entity }\n end\n end\n end", "def update_contacts(params)\n params[:types] = index_array(params[:types])\n\n params[:contact_set] = params.delete :contacts\n params[:key] = 'attributes'\n\n run_command :update_contacts, :domain, params\n end", "def update\n @type = Type.find(params[:id])\n\n respond_to do |format|\n if @type.update_attributes(params[:type])\n format.html { redirect_to(\"/typeview\", :notice => 'Type was successfully updated.') }\n format.xml { head :ok }\n else\n format.html { render :action => \"edit\" }\n format.xml { render :xml => @type.errors, :status => :unprocessable_entity }\n end\n end\n end", "def update_entity_type(entity_type_id, request)\n start.uri('/api/entity/type')\n .url_segment(entity_type_id)\n .body_handler(FusionAuth::JSONBodyHandler.new(request))\n .put()\n .go()\n end", "def index\n @participant_contact_types = Participant::Contact::Type.all\n\n respond_to do |format|\n format.html # index.html.erb\n format.xml { render :xml => @participant_contact_types }\n end\n end", "def update\n respond_to do |format|\n if @typ_contact.update(typ_contact_params)\n format.html { redirect_to @typ_contact, notice: 'Typ contact was successfully updated.' }\n format.json { render :show, status: :ok, location: @typ_contact }\n else\n format.html { render :edit }\n format.json { render json: @typ_contact.errors, status: :unprocessable_entity }\n end\n end\n end" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
DELETE /participant/contact/types/1 DELETE /participant/contact/types/1.xml
def destroy @participant_contact_type = Participant::Contact::Type.find(params[:id]) @participant_contact_type.destroy respond_to do |format| format.html { redirect_to(participant_contact_types_url) } format.xml { head :ok } end end
[ "def destroy\n @correspondence_type = CorrespondenceType.find(params[:id])\n @correspondence_type.destroy\n\n respond_to do |format|\n format.html { redirect_to(correspondence_types_url) }\n format.xml { head :ok }\n end\n end", "def destroy\n @participant_contact = ParticipantContact.find(params[:id])\n @participant_contact.destroy\n\n respond_to do |format|\n format.html { redirect_to(participant_contacts_url) }\n format.xml { head :ok }\n end\n end", "def destroy\n @participant_contact_email = Participant::Contact::Email.find(params[:id])\n @participant_contact_email.destroy\n\n respond_to do |format|\n format.html { redirect_to(participant_contact_emails_url) }\n format.xml { head :ok }\n end\n end", "def destroy\n @person_type = PersonType.find(params[:id])\n @person_type.destroy\n\n respond_to do |format|\n format.html { redirect_to(person_types_url) }\n format.xml { head :ok }\n end\n end", "def destroy\n @contact_number_type = ContactNumberType.find(params[:id])\n @contact_number_type.destroy\n\n respond_to do |format|\n format.html { redirect_to(contact_number_types_path) }\n format.xml { head :ok }\n end\n end", "def destroy\n @attendee_type = AttendeeType.find(params[:id])\n @attendee_type.destroy\n\n respond_to do |format|\n format.html { redirect_to(attendee_types_url) }\n format.xml { head :ok }\n end\n end", "def destroy\n @activity_type = ActivityType.find(params[:id])\n @activity_type.destroy\n\n respond_to do |format|\n format.html { redirect_to(activity_types_url) }\n format.xml { head :ok }\n end\n end", "def destroy\n @type_contact.destroy\n respond_to do |format|\n format.html { redirect_to type_contacts_url }\n format.json { head :no_content }\n end\n end", "def destroy\n @contacttype = Contacttype.find(params[:id])\n @contacttype.destroy\n\n respond_to do |format|\n format.html { redirect_to contacttypes_url }\n format.json { head :ok }\n end\n end", "def destroy\n @contact_type = ContactType.find(params[:id])\n @contact_type.destroy\n\n respond_to do |format|\n format.html { redirect_to contact_types_url }\n format.json { head :no_content }\n end\n end", "def destroy\n @attrib_type = AttribType.find(params[:id])\n @attrib_type.destroy\n\n respond_to do |format|\n format.html { redirect_to(attrib_types_url) }\n format.xml { head :ok }\n end\n end", "def destroy\n @contact_type.destroy\n respond_to do |format|\n format.html { redirect_to contact_types_url }\n format.json { head :no_content }\n end\n end", "def destroy\n @admin_contact_type = Admin::ContactType.find(params[:id])\n @admin_contact_type.destroy\n\n respond_to do |format|\n format.html { redirect_to admin_contact_types_url }\n format.json { head :ok }\n end\n end", "def destroy\n @activity_type = ActivityType.find(params[:id])\n @activity_type.destroy\n\n respond_to do |format|\n format.html { redirect_to(:controller => 'administration', :action => 'index') }\n format.xml { head :ok }\n end\n end", "def destroy\n @type = Type.find(params[:id])\n @type.destroy\n\n respond_to do |format|\n format.html { redirect_to(types_path) }\n format.xml { head :ok }\n end\n end", "def destroy\n @correspondence_type = CorrespondenceType.find(params[:id])\n @correspondence_type.destroy\n\n respond_to do |format|\n format.html { redirect_to correspondence_types_url }\n format.json { head :no_content }\n end\n end", "def destroy\n @persona_contacto = PersonaContacto.find(params[:id])\n @persona_contacto.destroy\n\n respond_to do |format|\n format.html { redirect_to(persona_contactos_url) }\n format.xml { head :ok }\n end\n end", "def destroy\n @claim_type = ClaimType.find(params[:id])\n @claim_type.destroy\n\n respond_to do |format|\n format.html { redirect_to(claim_types_url) }\n format.xml { head :ok }\n end\n end", "def destroy\n @phone_type = PhoneType.find(params[:id])\n @phone_type.destroy\n\n respond_to do |format|\n format.html { redirect_to(phone_types_url) }\n format.xml { head :ok }\n end\n end" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Class method to format url. We use an array as args for flexibility. ie Player.format_url(1234,"Account",5678) => "
def format_url(*args) URI.escape(BASE_URL + args.join("/")); end
[ "def format_url(url)\n return url.join('') if url.is_a?(Array)\n\n url.split(\"\\n\").join('')\n end", "def format_url(url_params)\n url_base = \"https://agencyrecruiting.apihealthcare.com/UAM2/index.cfm\"\n args = format_arguments(url_params)\n url = \"#{url_base}?#{args}\"\n return url\n end", "def url(name, *params)\n params.map! do |param|\n if param.is_a?(Hash)\n param[:format] = param[:format].to_s if param.has_key?(:format)\n param.each { |k,v| param[k] = v.to_param if v.respond_to?(:to_param) }\n end\n end\n url = router.generator.generate(name, *params)\n uri_root != \"/\" ? uri_root + url : url\n end", "def rewrite_url_format(url, format = nil)\n # Set the default format\n format ||= '.json'\n # Remove the existing format\n ext = File.extname(url)\n url = url.rpartition(ext)[0] unless ext.nil? || ext.empty?\n # Add the new format if not already present\n url = \"#{url}#{format}\" unless url.empty? || url.end_with?(format)\n # Return the URL\n url\n end", "def format_url(url)\n url.to_s.sub(%r{index\\.html?$}, \"\")\n end", "def format_uri(url, path, query)\n URI \"#{url}/#{path}?#{URI.encode_www_form(query).gsub('%2C', ',')}\"\n end", "def format_url(url_string)\n url_string.starts_with?(\"http://\") ? url_string : \"http://#{url_string}\"\n end", "def human_url(options={})\n options[:locale] ||= ::I18n.locale\n options[:format] ||= :html\n \n unless Humpyard::config.locales.include? options[:locale].to_sym\n options[:locale] = Humpyard::config.locales.first\n end\n \n if options[:path_format]\n format = \"/\"\n else\n format = \".#{options[:format].to_s}\" \n end\n \n page_options = options\n page_options[:path_format] = true\n \n \"#{news_page.page.human_url(page_options)}#{created_at.strftime '%Y/%m/%d'}/#{query_title_for_url(options[:locale])}#{format}\"\n end", "def formatted_website_url\n first_url = self.webaddr.is_a?(Array) ? self.webaddr.first : self.webaddr\n Addressable::URI.heuristic_parse(first_url).to_s\n end", "def format_link_or_text(url)\n return url\n end", "def cvs_url(url, full_path)\n if /%s/ =~ url then\n sprintf url, full_path\n else\n url + full_path\n end\n end", "def url(*args)\n named_route, params, recall, options = extract_params!(*args)\n\n options[:parameterize] ||= lambda { |name, param| Utils.escape_uri(param) }\n\n unless result = generate(:path_info, named_route, params, recall, options)\n return\n end\n\n uri, params = result\n params.each do |k, v|\n if v\n params[k] = v\n else\n params.delete(k)\n end\n end\n\n uri << \"?#{Utils.build_nested_query(params)}\" if uri && params.any?\n uri\n end", "def url_arg url\r\n if url.instance_of?(String) then url else exactize(@view.url_for(url).gsub('amp;', '')) end\n end", "def write_url_range(*args)\n # Check for a cell reference in A1 notation and substitute row and column\n if args[0] =~ /^\\D/\n args = substitute_cellref(*args)\n end\n\n # Check the number of args\n return -1 if args.size < 5\n\n # Reverse the order of $string and $format if necessary. We work on a copy\n # in order to protect the callers args. We don't use \"local @_\" in case of\n # perl50005 threads.\n #\n args[5], args[6] = [ args[6], args[5] ] if args[5].kind_of?(Format)\n\n url = args[4]\n\n # Check for internal/external sheet links or default to web link\n return write_url_internal(*args) if url =~ /^internal:/\n return write_url_external(*args) if url =~ /^external:/\n return write_url_web(*args)\n end", "def u(str)\n str.to_url\nend", "def url_for(*args)\n options = {}\n options = args.pop if args.last.kind_of?(Hash)\n\n segments = []\n segments << url_options[:base_path] if url_options[:base_path]\n segments << prefix if prefix\n segments << version\n segments += args.collect {|part| part.respond_to?(:to_param) ? part.to_param : part.to_s }\n\n url = \"\"\n url << url_options.fetch(:protocol, \"http\").to_s << \"://\"\n url << url_options.fetch(:host, env[\"SERVER_NAME\"])\n\n port = url_options.fetch(:port, env[\"SERVER_PORT\"]).to_i\n url << \":\" << port.to_s if port.nonzero? && port != 80\n\n url << Rack::Mount::Utils.normalize_path(segments.join(\"/\"))\n url << \"?\" << options.to_param if options.any?\n url\n end", "def build_url(options = {})\n raise WebthumbException.new(':url is required') if (options[:url] == nil || options[:url] == '')\n options[:size] ||= :medium\n options[:cache] ||= 15\n hash_out = Digest::MD5.hexdigest(\"#{Time.now.strftime('%Y%m%d')}#{options[:url]}#{@api_key}\")\n \"#{@api_endpoint}?user=#{@user_id}&cache=#{options[:cache]}&size=#{options[:size]}&url=#{CGI.escape(options[:url])}&hash=#{hash_out}\"\n end", "def build_url(pattern, fragments)\n\n # Only allow league if sport is passed in.\n fragments.delete(:league) if fragments[:sport].to_s.empty?\n\n # Remove the /headlines section if fragments does not include a :method.\n # This is due to the HEADLINES API being a little strange.\n unless fragments.include? :method\n pattern.gsub!('headlines', '')\n end\n\n template = URITemplate.new(:colon, pattern)\n url = template.expand(fragments)\n\n # Remove duplicate slashes (if any)\n url = url.gsub(/\\/{2,}/,'/')\n\n # Remove trailing slash (if any)\n url = url.gsub(/\\/+$/, '')\n\n url\n end", "def generate_url(url, params = {})\n uri = URI(url)\n uri.query = params.to_query\n uri.to_s\n end" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Renders the inventory/categories template. Renders and saves a cached version unless admin is logged in
def categories render_with_cache('node-page::'+request.fullpath+'::'+@node.cache_key) { render('inventory/categories') } unless admin? end
[ "def inventory_view(inventory)\r\n \r\n system 'clear'\r\n \r\n # Presents all inventory items to user using the display_method\r\n begin\r\n sub_categories = []\r\n inventory.each { |hash| sub_categories << hash['sub_cat'] }\r\n string_in_line(\" Current Inventory \".colorize(:light_green), 114) ; puts\r\n sub_categories.uniq.each{ |i| display_method(inventory, i) }\r\n rescue NoMethodError\r\n puts \"You don't have any inventory items to view. Add some before using this function.\"\r\n return \"No items in inventory\"\r\n end\r\n\r\n end", "def index\n @inventory_item_categories = InventoryItemCategory.all\n end", "def index\n @ghg_inventory_categories = GhgInventoryCategory.all\n end", "def index\n unless current_user.inventory\n redirect_to :action => 'new'\n return\n end\n @inventory = current_user.inventory\n\n respond_to do |format|\n format.html # index.html.erb\n format.xml { render :xml => @inventories }\n end\n end", "def inventory\n render body: Cogy.bundle_config.to_yaml, content_type: \"application/x-yaml\"\n end", "def by_shortcut\n inventory_search if params[:inventory_search].present?\n if @requested_page.cachable and not admin?\n # Try to render the response from cache...\n render_with_cache(page_cache_key) { \n render(@requested_page.template_path_to_render, :layout => @requested_page.layout_name) \n }\n else\n # Render the response normally...\n render(@requested_page.template_path_to_render, :layout => @requested_page.layout_name)\n end\n end", "def view_catalog_helper\n @catalog = Article.joins(:city).where('cities.subdomain' => request.subdomain).order('position')\n out = \"<ul class='menu'>\"\n if !@catalog.empty?\n @catalog.each do |article|\n if article.red_class\n out += \"<li>#{link_to article.name, article_path(article.permalink), :style => 'color:red;'}</li>\"\n else\n out += \"<li>#{link_to article.name, article_path(article.permalink)}</li>\"\n end\n end\n else\n out += \"<li>В каталоге выбранного города нет уcлуг!</li>\"\n end\n out += \"</ul>\"\n out.html_safe\n end", "def index\n @mounted_inventories = MountedInventory.all\n @mounted_inventory = MountedInventory.new\n respond_to do |format|\n format.html\n end\n end", "def index\r\n get_item_categories \r\n end", "def inventory(req)\n @pagination_data = {\n current: page(req),\n pages: page_nums(req, vehicle_count(req)),\n uri: \"/admin/#{dealership(req).slug}?page=\",\n }\n @vehicles = vehicle_dao.list(dealership(req), page(req), PER_PAGE)\n req.session.delete('back_uri')\n render 'admin/index.erb'\n end", "def update\n @inventory_categories = InventoryCategory.order(name: :asc).map { |u| [ u.name, u.id ] }\n @inventories = Inventory.where(deleted: false).order(name: :asc).map { |u| [ u.name, u.id ] }\n respond_to do |format|\n if @inventory_category.update(inventory_category_params)\n flash[:success] = 'Категория ТМЦ успешно отредактирована.'\n format.html { redirect_to edit_inventory_category_path(@inventory_category) }\n format.json { render :show, status: :ok, location: @inventory_category }\n else\n flash[:danger] = 'Ошибка редактирования категории ТМЦ'\n format.html { render :edit }\n format.json { render json: @inventory_category.errors, status: :unprocessable_entity }\n end\n end\n end", "def create\n @inventory_category = InventoryCategory.new(inventory_category_params)\n @inventory_categories = InventoryCategory.order(name: :asc).map { |u| [ u.name, u.id ] }\n @inventories = Inventory.where(deleted: false).order(name: :asc).map { |u| [ u.name, u.id ] }\n respond_to do |format|\n if @inventory_category.save\n flash[:success] = 'Категория ТМЦ успешно создана.'\n format.html { redirect_to edit_inventory_category_path(@inventory_category) }\n format.json { render :show, status: :created, location: @inventory_category }\n else\n flash[:danger] = 'Ошибка создания категории ТМЦ'\n format.html { render :new }\n format.json { render json: @inventory_category.errors, status: :unprocessable_entity }\n end\n end\n end", "def index\n @item_inventories = ItemInventory.all\n end", "def update_category_select\n authorize! :read, TestCase\n \n unless params[:id].blank? \n @categories = category_list(params[:id], nil) \n end\n render :partial => \"categories\"\n end", "def admin_edit\n return if !user_is_allowed('variants', 'edit') \n @variant = Variant.find(params[:variant_id])\n @product = @variant.product\n render :layout => 'caboose/admin'\n end", "def display_cart\n @items = @cart.items\n if @items.empty?\n redirect_to_index(\"Your cart is currently empty\")\n end\n\n if params[:context] == :checkout\n render(:layout => false)\n end\n end", "def new\n @asset_categorization = AssetCategorization.new(categorize_type: AssetCategorization::CategorizeType.collect{|k,v| v[:weight]}.last) do |cat|\n 1.times{cat.asset_categorization_items.new(vat_rate: 17)}\n end\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @asset_categorization }\n format.xml { render xml: @asset_categorization }\n end\n end", "def show\n @item_categorization = ItemCategorization.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @item_categorization }\n end\n end", "def write_to_sidebar\n puts ' => Creating Categories Sidebar'\n html = \"<ul>\\n\"\n # case insensitive sorting\n @categories.keys.sort_by{ |str| str.downcase }.each do |category|\n url = get_category_url category\n if @config['category_counter']\n html << \" <li><a href='#{url}'>#{category.capitalize} (#{@categories[category].count})</a></li>\\n\"\n else\n html << \" <li><a href='#{url}'>#{category.capitalize}</a></li>\\n\"\n end\n end\n html << \"</ul>\"\n File.open(File.join(@source, '_includes/asides/categories_sidebar.html'), 'w') do |file|\n file << \"\"\"{% if site.category_sidebar %}\n<section>\n<h1>#{@config['category_title'] || 'Categories'}</h1>\n#{html}\n</section>\n{% endif %}\n\"\"\"\n end\n end" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Runs a command via the `thin` command.
def thin(shell,*arguments) options = arguments + ['-C', @thin.config, '-s', @thin.servers] shell.ruby 'thin', *options end
[ "def _thin_bin\n fetch(:thin_bin, 'bundle exec thin')\n end", "def server_start(shell)\n shell.status \"Starting Thin ...\"\n\n thin shell, 'start'\n\n shell.status \"Thin started.\"\n end", "def start(appName)\n @put.normal \"Starting thin for #{appName}\"\n command = @system.execute( \"#{@thinPath} start -C /etc/thin/#{appName}.yml\" )\n if command.success?\n @put.confirm\n else\n @put.error \"Could not start Thin\"\n exit\n end\n end", "def thor(command, *args); end", "def start_thin\n require 'thin'\n\n Faye::WebSocket.load_adapter('thin')\n\n # TODO: See if we can just set Thin to use Firehose.logger instead of\n # printing out messages by itself.\n Thin::Logging.silent = true if Firehose.logger.level == Logger::ERROR\n\n server = Thin::Server.new(@host, @port) do\n run Firehose::Rack::App.new\n end.start\n end", "def thor(command, *args)\n config = args.last.is_a?(Hash) ? args.pop : {}\n verbose = config.key?(:verbose) ? config.delete(:verbose) : true\n pretend = config.key?(:pretend) ? config.delete(:pretend) : false\n capture = config.key?(:capture) ? config.delete(:capture) : false\n\n args.unshift(command)\n args.push Foreman::Thor::Options.to_switches(config)\n command = args.join(\" \").strip\n\n run command, :with => :thor, :verbose => verbose, :pretend => pretend, :capture => capture\n end", "def run(*args)\n Thin::Server.start(@app, *args)\n end", "def run(shell, cmd, &blk)\n run_on_servers(shell, 'sh -l -c', cmd, &blk)\n end", "def server_stop(shell)\n shell.status \"Stopping Thin ...\"\n\n thin shell, 'stop'\n\n shell.status \"Thin stopped.\"\n end", "def server_config(shell)\n unless @thin.config\n raise(MissingOption,\"No 'config' option specified under the server options\",caller)\n end\n\n shell.status \"Configuring Thin ...\"\n\n options = ['-c', shell.uri.path] + @thin.arguments\n shell.ruby 'thin', 'config', *options\n\n shell.status \"Thin configured.\"\n end", "def server_restart(shell)\n shell.status \"Restarting Thin ...\"\n\n thin shell, 'restart'\n\n shell.status \"Thin restarted.\"\n end", "def execute(command)\n Softcover.test? ? system(command) : exec(command)\n end", "def run_cmd(cmd)\n\t\tconsole.run_single(cmd)\n\tend", "def run(command_line)\n # shell_out(command_line).tap(&:run_command)\n shell_out_command(command_line, \"Initiating knife command...\")\n end", "def run_command(command)\n command = \"true\" if command.to_s.strip.empty?\n with_shell_instance do\n stdin.puts wrapped_command(command)\n stdin.close\n out, err = stdout.read, stderr.read\n out, status, _ = raw_stdout_to_parts(out)\n return status, out, err\n end\n end", "def run_server\n ensure_config\n require 'rubygems'\n rackup_path = File.expand_path(\"#{@options[:config_path]}/config.ru\")\n if Gem.available? 'thin'\n exec \"thin -e #{@options[:environment]} -p #{@options[:port]} -R #{rackup_path} start\"\n else\n exec \"rackup -E #{@options[:environment]} -p #{@options[:port]} #{rackup_path}\"\n end\n end", "def send_insteon_command(address, command)\n transmit_command(insteon_command_string(address, command))\n end", "def ping\n exec(COMMAND[:ping])\n end", "def ping\n send_command(\"ping\")\n end" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Configures Thin by calling `thin config`.
def server_config(shell) unless @thin.config raise(MissingOption,"No 'config' option specified under the server options",caller) end shell.status "Configuring Thin ..." options = ['-c', shell.uri.path] + @thin.arguments shell.ruby 'thin', 'config', *options shell.status "Thin configured." end
[ "def thin(shell,*arguments)\n options = arguments + ['-C', @thin.config, '-s', @thin.servers]\n\n shell.ruby 'thin', *options\n end", "def start(appName)\n @put.normal \"Starting thin for #{appName}\"\n command = @system.execute( \"#{@thinPath} start -C /etc/thin/#{appName}.yml\" )\n if command.success?\n @put.confirm\n else\n @put.error \"Could not start Thin\"\n exit\n end\n end", "def _thin_bin\n fetch(:thin_bin, 'bundle exec thin')\n end", "def server_start(shell)\n shell.status \"Starting Thin ...\"\n\n thin shell, 'start'\n\n shell.status \"Thin started.\"\n end", "def start_thin\n require 'thin'\n\n Faye::WebSocket.load_adapter('thin')\n\n # TODO: See if we can just set Thin to use Firehose.logger instead of\n # printing out messages by itself.\n Thin::Logging.silent = true if Firehose.logger.level == Logger::ERROR\n\n server = Thin::Server.new(@host, @port) do\n run Firehose::Rack::App.new\n end.start\n end", "def run!(config_file=nil, &block)\n configure(config_file, &block)\n require 'wink/web'\n Sinatra::Application.run = true\n end", "def run!(config_file=nil, &block)\n configure(config_file, &block)\n require 'wink/web'\n Sinatra.application.options.run = true\n end", "def init_thoth\n trait[:ip] ||= Config.server['address']\n trait[:port] ||= Config.server['port']\n\n open_db\n\n # Ensure that the database schema is up to date.\n #\n # TODO: need to rethink how migration works since newer versions of Sequel\n # don't expose the migration versions.\n #\n # unless Sequel::Migrator.get_current_migration_version(@db) ==\n # Sequel::Migrator.latest_migration_version(File.join(LIB_DIR, 'migrate'))\n # \n # if trait[:mode] == :production\n # raise SchemaError, \"Database schema is missing or out of date. \" <<\n # \"Please run `thoth --migrate`.\"\n # else\n # raise SchemaError, \"Database schema is missing or out of date. \" <<\n # \"Please run `thoth --devel --migrate`.\"\n # end\n # end\n\n # If caching is disabled, replace the default cache store with a no-op\n # API.\n if Config.server['enable_cache']\n # Cache templates once read to prevent unnecessary disk thrashing.\n Innate::View.options.read_cache = true\n\n if Config.server['memcache']['enabled']\n Ramaze::Cache::MemCache::OPTIONS[:servers] = Config.server['memcache']['servers']\n Ramaze::Cache.options.default = Ramaze::Cache::MemCache\n end\n else\n require 'thoth/cache'\n Ramaze::Cache.options.default = Thoth::Cache::Noop\n end\n\n # Create a cache for plugins to use.\n Ramaze::Cache.add(:plugin)\n\n # Tell Innate where to find Thoth's helpers.\n Innate::HelpersHelper.options.paths << LIB_DIR\n Innate::HelpersHelper.options.namespaces << Thoth::Helper\n\n # Load Thoth controllers.\n require File.join(LIB_DIR, 'controller')\n\n # Load Thoth models.\n require File.join(LIB_DIR, 'helper/wiki')\n Ramaze::acquire(File.join(LIB_DIR, 'model', '*'))\n\n # Load startup plugins.\n Config.plugins.each {|plugin| Plugin.load(plugin)}\n\n Ramaze::Log.info \"Thoth home: #{HOME_DIR}\"\n Ramaze::Log.info \"Thoth lib : #{LIB_DIR}\"\n Ramaze::Log.info \"Running in #{trait[:mode] == :production ? 'live' : 'dev'} mode\"\n\n Ramaze.options.setup << self\n end", "def set_config(args)\n config.path = args['PATH'] if args['PATH']\n config.port = args['--port'] if args['--port']\n config.bind = args['--bind'] if args['--bind']\n config.autoh1 = false if args['--no-auto-h1']\n config.highlighter = false if args['--no-syntax']\n config.line_numbers = false if args['--no-line-numbers']\n config.index = true if args['--index']\n config.development = true if args['--development']\n end", "def configure(&blk)\n bot.configure(&blk)\n end", "def run(*args)\n Thin::Server.start(@app, *args)\n end", "def run_server\n ensure_config\n require 'rubygems'\n rackup_path = File.expand_path(\"#{@options[:config_path]}/config.ru\")\n if Gem.available? 'thin'\n exec \"thin -e #{@options[:environment]} -p #{@options[:port]} -R #{rackup_path} start\"\n else\n exec \"rackup -E #{@options[:environment]} -p #{@options[:port]} #{rackup_path}\"\n end\n end", "def set_config(args)\n config.path = args['PATH'] if args['PATH']\n config.port = args['--port'].to_i if args['--port']\n config.bind = args['--bind'] if args['--bind']\n config.toc = args['--toc'] if args['--toc']\n config.auth = args['--auth'] if args['--auth']\n config.auth_realm = args['--auth-realm'] if args['--auth-realm']\n\n config.auto_h1 = false if args['--no-auto-h1']\n config.auto_nav = false if args['--no-auto-nav']\n config.sidebar = false if args['--no-sidebar']\n config.highlighter = false if args['--no-syntax']\n config.line_numbers = false if args['--no-line-numbers']\n config.copy_code = false if args['--no-copy-code']\n config.open = true if args['--open']\n \n config.theme = File.expand_path(args['--theme'], config.path) if args['--theme']\n end", "def configure(config)\n driver.configure(config)\n end", "def initialize\n setup_ohai\n configure\n end", "def _thin_current_config_path\n File.join(current_path, 'config', 'thin.yml')\n end", "def set_config(config)\n\t\tend", "def configure!\n configure do\n apply_defaults\n apply_args_and_service_yml\n\n configure_database\n configure_logger\n\n before do\n logger.info {\n request.request_method + \" \" + request.url + \" \" + request.ip\n }\n end\n\n error do\n logger.error env['sinatra.error'].backtrace.join(\"\\n\\t\")\n end\n\n after do\n ActiveRecord::Base.clear_active_connections!\n end\n end\n configure :development do\n begin\n require 'sinatra/reloader'\n register Sinatra::Reloader\n rescue LoadError\n puts(\"Install sinatra-reloader gem.\")\n end\n end\n end", "def start_web_server\n options = configuration.web_options.dup\n host = options.delete(:host)\n port = options.delete(:port)\n\n Thin::Logging.silent = true\n Thin::Server.new(host, port, Application).tap do |server|\n options.each do |key, value|\n server.__send__(\"#{key}=\", value)\n end\n\n server.start!\n end\n end" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Starts Thin by calling `thin start`.
def server_start(shell) shell.status "Starting Thin ..." thin shell, 'start' shell.status "Thin started." end
[ "def start(appName)\n @put.normal \"Starting thin for #{appName}\"\n command = @system.execute( \"#{@thinPath} start -C /etc/thin/#{appName}.yml\" )\n if command.success?\n @put.confirm\n else\n @put.error \"Could not start Thin\"\n exit\n end\n end", "def start_thin\n require 'thin'\n\n Faye::WebSocket.load_adapter('thin')\n\n # TODO: See if we can just set Thin to use Firehose.logger instead of\n # printing out messages by itself.\n Thin::Logging.silent = true if Firehose.logger.level == Logger::ERROR\n\n server = Thin::Server.new(@host, @port) do\n run Firehose::Rack::App.new\n end.start\n end", "def thin(shell,*arguments)\n options = arguments + ['-C', @thin.config, '-s', @thin.servers]\n\n shell.ruby 'thin', *options\n end", "def run(*args)\n Thin::Server.start(@app, *args)\n end", "def _thin_bin\n fetch(:thin_bin, 'bundle exec thin')\n end", "def start_with_tork\n load_tork\n\n if fork\n start_loop\n else\n # Run tork in main process to keep stdin\n Torkify.logger.info { \"Starting tork\" }\n Tork::CLIApp.new.loop\n end\n end", "def start_web_server\n options = configuration.web_options.dup\n host = options.delete(:host)\n port = options.delete(:port)\n\n Thin::Logging.silent = true\n Thin::Server.new(host, port, Application).tap do |server|\n options.each do |key, value|\n server.__send__(\"#{key}=\", value)\n end\n\n server.start!\n end\n end", "def start\n if File.file?(trait[:pidfile])\n pid = File.read(trait[:pidfile], 20).strip\n abort(\"thoth already running? (pid=#{pid})\")\n end\n\n puts \"Starting thoth.\"\n\n fork do\n Process.setsid\n exit if fork\n\n File.open(trait[:pidfile], 'w') {|file| file << Process.pid}\n at_exit {FileUtils.rm(trait[:pidfile]) if File.exist?(trait[:pidfile])}\n\n Dir.chdir(HOME_DIR)\n File.umask(0000)\n\n STDIN.reopen('/dev/null')\n STDOUT.reopen('/dev/null', 'a')\n STDERR.reopen(STDOUT)\n\n run\n end\n end", "def start_server\n fork do\n $0 = \"rack\"\n Rack::Server.start\n end\n end", "def start\n # we trap CTRL+C in the console and kill the server\n trap(\"INT\") { BeEF::Core::Server.instance.stop }\n \n # starts the web server\n @http_server.start\n end", "def start_server(number)\n log_info \"Starting server on #{server_id(number)} ... \"\n \n run :start, number\n end", "def start!\n Thread.start { @server.start }\n end", "def start\n @server.start\n end", "def start\n puts 'Booting BubBot'\n Thread.new do\n loop do\n #puts \"Checking for servers to shutdown\"\n # TODO: actually do that ^\n sleep 10# * 60\n end\n end\n\n app = Rack::Builder.new do\n # if development (TODO)\n use Rack::Reloader\n # end\n run BubBot\n end.to_app\n\n Rack::Handler::Thin.run(app, BubBot.configuration.rack_options_hash)\n end", "def start\n enable_cow\n start_bunny\n register_signals\n create_queues\n end", "def start(controller = Stream::StreamController.instance)\n # make sure all the keys are set\n validate_keys\n\n options = update_config_options\n\n # create a new server\n @server = WEBrick::HTTPServer.new(Port: options[:port])\n\n # start singleton stream controller\n @controller = controller.start\n\n # mount the REST server on webrick\n @server.mount '/', Http::HttpEndpoint\n\n trap_signals\n\n logger.info(\"Server starting with PID #{Process.pid}\")\n\n @server.start\n end", "def start\n Rack::Server.start :app => @server, :Port => @port, :Host => @host\n end", "def start\n setup\n\n Signal.trap('INT') {\n puts \"Quiting...\"\n exit(0)\n }\n\n Cli.start(ARGV)\n end", "def start\n server = RackServer.new(server_options)\n server.instance_variable_set(\"@app\", self)\n print_start_message(server)\n server.start\n end" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Stops Thin by calling `thin stop`.
def server_stop(shell) shell.status "Stopping Thin ..." thin shell, 'stop' shell.status "Thin stopped." end
[ "def stop(appName)\n @put.normal \"Stopping thin for #{appName}\"\n command = @system.execute( \"#{@thinPath} stop -C /etc/thin/#{appName}.yml\" )\n if command.success?\n @put.confirm\n else\n @put.error \"Could not stop Thin\"\n exit\n end\n end", "def stop\n @server.stop if @server.running?\n end", "def stop!\n @status = :stopping\n\n # invoke a new request, so that the webservice stops.\n socket = TCPSocket.new('localhost', @config.webserver_port)\n socket.send '', 0\n socket.close\n end", "def server_stop\n Process.kill 'INT', 0\n end", "def stop_monit\n system(\"sudo monit stop all\")\n sleep(10)\n system(\"sudo service monit stop\")\n sleep(10)\n end", "def stop\n unless File.file?(trait[:pidfile])\n abort(\"thoth not running? (check #{trait[:pidfile]}).\")\n end\n\n puts \"Stopping thoth.\"\n\n pid = File.read(trait[:pidfile], 20).strip\n FileUtils.rm(trait[:pidfile]) if File.exist?(trait[:pidfile])\n pid && Process.kill('TERM', pid.to_i)\n end", "def stop\n # use pid in controlling process, webrick in server process\n @webrick.shutdown if @webrick\n Process.kill('INT', @pid) if @pid\n end", "def stop\n if @http_server\n # shuts down the server\n @http_server.shutdown\n \n # print goodbye message\n puts\n print_info 'BeEF server stopped'\n end\n end", "def stop\n puts \"Stopping load balancer...\"\n begin\n Process.kill(\"TERM\", @pid)\n rescue\n STDERR.puts \"Error stopping load balancer: #{$!}\"\n end\n end", "def stop\n ctl_proxy('stop','httpd stopped')\n end", "def stop!\n unless @mongos_pio.nil? then\n terminate @mongos_pio\n @mongos_pio = nil\n\n terminate @conf_server_pio\n @conf_server_pio = nil\n end\n\n @shards.each_index { |id| stop_shard(id) }\n end", "def kill\n server.kill\n end", "def stop(klass, *args)\n stop_service(hals[hardcore_alias(klass, *args)])\n end", "def stop \r\n DRb.stop_service\r\n @log.info(\"DRb server stopped on : #{@drb_server_uri}\") \r\n end", "def stop_node\n Thin::Server.kill CloudCrowd.pid_path('node.pid')\n end", "def stop\n EM.cancel_timer @notify_timer\n notify :byebye\n stop_ssdp_server\n\n sleep 2\n stop_http_server\n end", "def stop\r\n DRb.stop_service\r\n @log.info(\"Controller stopped on : #{@drb_server_uri}\")\r\n end", "def stop (bundleId)\n execute(:stop, bundleId)\n end", "def server_stop(shell)\n shell.status \"Stopping Mongrel(s) ...\"\n\n mongrel_cluster 'cluster::stop'\n\n shell.status \"Mongrel(s) stopped.\"\n end" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Restarts Thin by calling `thin restart`.
def server_restart(shell) shell.status "Restarting Thin ..." thin shell, 'restart' shell.status "Thin restarted." end
[ "def restart()\n shutdown()\n start()\n end", "def restart\n request(:restart)\n end", "def restart\n if booted then\n kill\n end\n start\n end", "def restart!\n CouchRest.post \"#{@uri}/_restart\"\n end", "def restart!\n CouchSpring.post \"#{uri}/_restart\"\n end", "def restart!\n Kernel.exec(*@restart_cmdline)\n end", "def restart_server\n stop_server\n sleep 1\n start_server\n end", "def restart!\n stop! if running?\n start!\n end", "def restart_soon\n @restart = true\n @shutdown = true\n end", "def restart\n if @restart_command\n run_command(@restart_command)\n else\n stop\n start\n end\n end", "def restart\n ctl_proxy('restart','httpd restarted')\n end", "def restart!\n stop!\n start!\n end", "def restart!\n CouchRest.post \"#{@uri}/_restart\"\n rescue RestClient::ServerBrokeConnection\n # Shouldn't really happen, but does in CouchDB 1.0.0\n end", "def restart(config = nil)\n config ||= agent&.config\n stop if running?\n start(config)\n end", "def restart\n do_for_each_service { |service| service.restart }\n end", "def restart_monit\n return if ENV['TEST_KITCHEN'] # Don't like it, but we can't run multiple processes in Docker on travis\n\n pidfile = \"/var/run/lock/#{app['shortname']}/puma.pid\"\n context.execute \"monit restart #{adapter}_#{app['shortname']}\" do\n retries 3\n only_if { ::File.exist?(pidfile) }\n end\n end", "def restart\n execute(make_xml('RestartRequest', {})).success\n end", "def restart\n @timer = VM.tick # Generate an event immediately after restart\n end", "def hard_restart\n Samson::ErrorNotifier.notify('Hard restarting, requests will be lost', sync: true)\n output 'Error: Sending SIGTERM to hard restart'\n Process.kill(:SIGTERM, Process.pid)\n sleep 5\n output 'Error: Sending SIGKILL to hard restart'\n Process.kill(:SIGKILL, Process.pid)\n end" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
URL to the profile page of the given +CourseUser+ or +User+ in the current course
def url_to_user_or_course_user(course, user) return course_user_path(course, user) if user.is_a?(CourseUser) return user_path(user) if user.is_a?(User) end
[ "def url_to_user user\n\t\tprofile_path(user.person.nick)\n\tend", "def load_users_page(course)\n navigate_to \"#{Utils.canvas_base_url}/courses/#{course.site_id}/users\"\n end", "def profile_form_url\n if (page? 'users', 'edit') || (page? 'users', 'update')\n user_path(@user)\n else\n registration_path(@user)\n end\n end", "def current_user_profile_path\n profile_path(id: current_user.id,\n first: current_user.first_name.downcase,\n last: current_user.last_name.downcase)\n end", "def display_course_user(user)\n user.name\n end", "def profile_path\n @profile_path\n end", "def fb_profile_url\n \"http://www.facebook.com/profile.php?id=#{fb_user_id}\"\n end", "def profile\n\t@user = current_user\n\t@title = \"This is your profile page\"\n end", "def users_url\n view_context.users_url\n end", "def profile_url\n Rails.application.routes.url_helpers.person_path(person)\n end", "def link_to_course_user(user, options = {})\n link_text = capture { block_given? ? yield(user) : display_course_user(user) }\n link_path = course_user_path(user.course, user)\n link_to(link_text, link_path, options)\n end", "def profile\n @user = User.find(params[:user_id])\n end", "def profile\n\n # redirect to kpass where they can edit their profile and provide a url\n # where they should return in our app. for example, we can provide the url\n # of the page the link was presented on, so they return there when they're\n # done editing their profile.\n # redirect_to \"#{ENV['KPASS_ENDPOINT']}?app_id=#{ENV['KPASS_APP_ID']}&return_to=#{URI::escape(params['return_to'])}\"\n\n profile_url = \"#{ENV['KPASS_ENDPOINT']}?app_id=#{ENV['KPASS_APP_ID']}&return_to=#{URI::escape(params['return_to'])}\"\n redirect_to profile_url\n end", "def url_for_user_show(user)\n if logged_in?\n return url_for user_path(user)\n else\n return url_for login_path\n end\n end", "def profile\n if params[:id].present?\n @user = User.find(params[:id])\n else\n @user = current_user\n end\n \n redirect_to root_url unless @user.present?\n render layout: true\n end", "def current_user_url\n view_context.user_url(current_user)\n end", "def load_users_page(course_id)\n navigate_to \"#{WebDriverUtils.canvas_base_url}/courses/#{course_id}/users\"\n end", "def profile_achievement_url(achievement = nil)\n \"#{world.url}internal/achiev.php?act_user_id=#{user_id}##{achievement.try(:link_anchor)}\"\n end", "def course_user_for(user)\n @user_course_user_hash[user]\n end" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
GET /sicoss_damageds GET /sicoss_damageds.json GET /sicoss_damageds.xml
def index @search = SicossDamaged.search(params[:search]) @sicoss_damageds = @search.page(params[:page]).per(10) flash.now[:notice] = t('flash.actions.index.notice') if @sicoss_damageds.empty? respond_with(@sicoss_damageds) end
[ "def show\n respond_with(@sicoss_damaged)\n end", "def show\n @damage = Damage.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @damage }\n end\n end", "def index\n @damages = Damage.all\n end", "def index\n @damage_vulnerabilities = DamageVulnerability.all\n end", "def new\n @sicoss_damaged = SicossDamaged.new\n respond_with(@sicoss_damaged)\n end", "def index\n @damage_resistances = DamageResistance.all\n end", "def get_all_semesters\n path = \"/d2l/api/lp/#{$lp_ver}/orgstructure/6606/children/?ouTypeId=5\"\n _get(path)\nend", "def index\n @damage_immunities = DamageImmunity.all\n end", "def get_damages_by_year\n\n @damage = Damage.damages_by_year(params[:damage_year])\n\n respond_to do |format|\n format.json { render :json => @damage }\n format.js\n end\n\n end", "def stats\n get 'stats', format: 'json'\n end", "def create\n @sicoss_damaged = SicossDamaged.new(params[:sicoss_damaged])\n flash[:notice] = t('scaffold.notice.created', :item => SicossDamaged.model_name.human) if @sicoss_damaged.save\n respond_with(@sicoss_damaged, :location => sicoss_damageds_path)\n end", "def index\n @damage_types = DamageType.all\n end", "def show\n @badges_scout = BadgesScout.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @badges_scout }\n end\n end", "def show\n @asset_loss = AssetLoss.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.xml { render :xml => @asset_loss }\n end\n end", "def index\n check_authorization\n #@badges = Badge.find(:all, :conditions => [\"organization_id = ? and segment_id = ?\", @organization.id, @segment.id ] )\n @badges = Badge.find(:all)\n respond_to do |format|\n format.html # index.html.erb\n format.xml { render :xml => @badges }\n end\n end", "def index\n @simdowns = Simdown.all\n\n respond_to do |format|\n format.html # index.html.erb\n format.xml { render :xml => @simdowns }\n end\n end", "def update\n flash[:notice] = t('scaffold.notice.updated', :item => SicossDamaged.model_name.human) if @sicoss_damaged.update_attributes(params[:sicoss_damaged])\n respond_with(@sicoss_damaged, :location => sicoss_damageds_path)\n end", "def index\n @attacks = Attack.all\n \n @title = \"Attacks\" \n\n respond_to do |format|\n format.html # index.html.erb\n format.xml { render :xml => @attacks }\n end\n end", "def index\n @dosages = @drug.dosages\n\n respond_to do |format|\n format.html # index.html.erb\n format.xml { render :xml => @dosages }\n end\n end" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
GET /sicoss_damageds/1 GET /sicoss_damageds/1.json GET /sicoss_damageds/1.xml
def show respond_with(@sicoss_damaged) end
[ "def index\n @search = SicossDamaged.search(params[:search])\n @sicoss_damageds = @search.page(params[:page]).per(10)\n flash.now[:notice] = t('flash.actions.index.notice') if @sicoss_damageds.empty?\n respond_with(@sicoss_damageds)\n end", "def show\n @damage = Damage.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @damage }\n end\n end", "def index\n @damages = Damage.all\n end", "def new\n @sicoss_damaged = SicossDamaged.new\n respond_with(@sicoss_damaged)\n end", "def index\n @damage_resistances = DamageResistance.all\n end", "def do_GET(request, response)\n\t\t\t\tstatus = 400\n\t\t\t\tcontent_type = body = ''\n\t\t\t\tif not trusted(request)\n\t\t\t\t\tstatus = 403\n\t\t\t\telse\n\t\t\t\t\tpath = (request.path[-1,1] == '/' ? request.path.chop : request.path)\n\t\t\t\t\tif path == '/pid' and (request.peeraddr[2] == 'localhost' or request.peeraddr[3] == '127.0.0.1')\n\t\t\t\t\t\tstatus, content_type, body = save_pid\n\n\t\t\t\t\telsif path == '/state'\n\t\t\t\t\t\tstatus, content_type, body = get_state\n\n\t\t\t\t\telsif path == '/sfpstate'\n\t\t\t\t\t\tstatus, content_type, body = get_state({:as_sfp => true})\n\n\t\t\t\t\telsif path =~ /^\\/state\\/.+/\n\t\t\t\t\t\tstatus, content_type, body = get_state({:path => path[7, path.length-7]})\n\n\t\t\t\t\telsif path =~ /^\\/sfpstate\\/.+/\n\t\t\t\t\t\tstatus, content_type, body = get_state({:path => path[10, path.length-10]})\n\n\t\t\t\t\telsif path == '/model'\n\t\t\t\t\t\tstatus, content_type, body = get_model\n\n\t\t\t\t\telsif path =~ /\\/model\\/cache\\/.+/\n\t\t\t\t\t\tstatus, content_type, body = self.get_cache_model({:name => path[13, path.length-13]})\n\n\t\t\t\t\telsif path == '/bsig'\n\t\t\t\t\t\tstatus, content_type, body = get_bsig\n\n\t\t\t\t\telsif path == '/bsig/flaws'\n\t\t\t\t\t\tstatus = 200\n\t\t\t\t\t\tcontent_type = 'application/json'\n\t\t\t\t\t\tbody = JSON.generate(Sfp::Agent.bsig_engine.get_flaws)\n\n\t\t\t\t\telsif path =~ /^\\/sfp\\/.+/\n\t\t\t\t\t\tstatus, content_type, body = get_sfp({:module => path[10, path.length-10]})\n\n\t\t\t\t\telsif path == '/modules'\n\t\t\t\t\t\tmods = {}\n\t\t\t\t\t\tSfp::Agent.get_modules.each { |name,data| mods[name] = data[:hash] }\n\t\t\t\t\t\tstatus, content_type, body = [200, 'application/json', JSON.generate(mods)]\n\n\t\t\t\t\telsif path == '/agents'\n\t\t\t\t\t\tstatus, content_type, body = [200, 'application/JSON', JSON.generate(Sfp::Agent.get_agents)]\n\n\t\t\t\t\telsif path == '/log'\n\t\t\t\t\t\tstatus, content_type, body = [200, 'text/plain', Sfp::Agent.get_log(100)]\n\n\t\t\t\t\tend\n\t\t\t\tend\n\n\t\t\t\tresponse.status = status\n\t\t\t\tresponse['Content-Type'] = content_type\n\t\t\t\tresponse.body = body\n\t\t\tend", "def stats\n get 'stats', format: 'json'\n end", "def index\n @damage_vulnerabilities = DamageVulnerability.all\n end", "def show\n @asset_loss = AssetLoss.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.xml { render :xml => @asset_loss }\n end\n end", "def show\n @effectiveness = Effectiveness.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.xml { render :xml => @effectiveness }\n end\n end", "def get_all_semesters\n path = \"/d2l/api/lp/#{$lp_ver}/orgstructure/6606/children/?ouTypeId=5\"\n _get(path)\nend", "def index\n @simdowns = Simdown.all\n\n respond_to do |format|\n format.html # index.html.erb\n format.xml { render :xml => @simdowns }\n end\n end", "def show\r\n SignalStrength.switch_data(params[:connection], \"daily\")\r\n #@signal_strengths = SignalStrength.find(params[:id])\r\n #@signal_strengths = SignalStrength.find(:all, :origin=>'94531', :within=>10)\r\n respond_to do |format|\r\n format.html #show.html.erb\r\n format.xml { render :xml => @signal_strengths.to_xml(:dasherize => false) }\r\n end\r\n end", "def index\n check_authorization\n #@badges = Badge.find(:all, :conditions => [\"organization_id = ? and segment_id = ?\", @organization.id, @segment.id ] )\n @badges = Badge.find(:all)\n respond_to do |format|\n format.html # index.html.erb\n format.xml { render :xml => @badges }\n end\n end", "def index\n @dosages = @drug.dosages\n\n respond_to do |format|\n format.html # index.html.erb\n format.xml { render :xml => @dosages }\n end\n end", "def show\n @badges_scout = BadgesScout.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @badges_scout }\n end\n end", "def get_damages_by_year\n\n @damage = Damage.damages_by_year(params[:damage_year])\n\n respond_to do |format|\n format.json { render :json => @damage }\n format.js\n end\n\n end", "def stats\n request :get, \"_stats\"\n end", "def index\n @graphics = Graphic.find(:all)\n\n respond_to do |format|\n format.html # index.html.erb\n format.xml { render :xml => @graphics }\n end\n end" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
GET /sicoss_damageds/new GET /sicoss_damageds/new.json GET /sicoss_damageds/new.xml
def new @sicoss_damaged = SicossDamaged.new respond_with(@sicoss_damaged) end
[ "def new\n @damage = Damage.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @damage }\n end\n end", "def create\n @sicoss_damaged = SicossDamaged.new(params[:sicoss_damaged])\n flash[:notice] = t('scaffold.notice.created', :item => SicossDamaged.model_name.human) if @sicoss_damaged.save\n respond_with(@sicoss_damaged, :location => sicoss_damageds_path)\n end", "def create\n @damage = Damage.new(params[:damage])\n\n respond_to do |format|\n if @damage.save\n format.html { redirect_to @damage, notice: 'Damage was successfully created.' }\n format.json { render json: @damage, status: :created, location: @damage }\n else\n format.html { render action: \"new\" }\n format.json { render json: @damage.errors, status: :unprocessable_entity }\n end\n end\n end", "def new\n @asset_loss = AssetLoss.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.xml { render :xml => @asset_loss }\n end\n end", "def new_rest\n @item_usage = ItemUsage.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.xml { render :xml => @item_usage }\n end\n end", "def new\n @assetloss = Assetloss.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.xml { render :xml => @assetloss }\n end\n end", "def new\n @drop = @npc.drops.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.xml { render :xml => @drop }\n end\n end", "def new_rest\n @v1_item_usage = V1ItemUsage.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.xml { render :xml => @v1_item_usage }\n end\n end", "def new\n @shot = Shot.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.xml { render :xml => @shot }\n end\n end", "def new\n @attack = Attack.new\n\n @title = \"New Attack\"\n\n respond_to do |format|\n format.html # new.html.erb\n format.xml { render :xml => @attack }\n end\n end", "def new_rest\n @instrument_version = InstrumentVersion.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.xml { render :xml => @instrument_version }\n end\n end", "def new_rest\n @page_usage = PageUsage.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.xml { render :xml => @page_usage }\n end\n end", "def new_rest\n @instrument = Instrument.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.xml { render :xml => @instrument }\n end\n end", "def create\n @damage = Damage.new(damage_params)\n\n respond_to do |format|\n if @damage.save\n format.html { redirect_to @damage, notice: \"Damage was successfully created.\" }\n format.json { render :show, status: :created, location: @damage }\n else\n format.html { render :new, status: :unprocessable_entity }\n format.json { render json: @damage.errors, status: :unprocessable_entity }\n end\n end\n end", "def new\n @simdown = Simdown.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.xml { render :xml => @simdown }\n end\n end", "def new_rest\n @v1_page_usage = V1PageUsage.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.xml { render :xml => @v1_page_usage }\n end\n end", "def new\n @boss = Boss.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.xml { render :xml => @boss }\n end\n end", "def new_rest\n @page_usage_event = PageUsageEvent.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.xml { render :xml => @page_usage_event }\n end\n end", "def new\n @action_graphic = ActionGraphic.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.xml { render :xml => @action_graphic }\n end\n end" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
GET /sicoss_damageds/1/edit GET /sicoss_damageds/1/edit.json GET /sicoss_damageds/1/edit.xml
def edit respond_with(@sicoss_damaged) end
[ "def edit\n respond_with(@sicoss_format)\n end", "def edit\n respond_with(@sicoss_activity)\n end", "def edit\n respond_with(@sicoss_situation)\n end", "def update\n @damage = Damage.find(params[:id])\n\n respond_to do |format|\n if @damage.update_attributes(params[:damage])\n format.html { redirect_to @damage, notice: 'Damage was successfully updated.' }\n format.json { head :ok }\n else\n format.html { render action: \"edit\" }\n format.json { render json: @damage.errors, status: :unprocessable_entity }\n end\n end\n end", "def edit\n @resource = Resource.find(params[:id])\n \n respond_to do |format|\n # format.html { render :layout => false }\n format.html\n format.any(:xml, :json) { render request.format.to_sym => @resource }\n end\n end", "def edit\n respond_with(@sicoss_location)\n end", "def edit\n respond_with(@sicoss_regimen_type)\n end", "def update\n respond_to do |format|\n if @damage.update(damage_params)\n format.html { redirect_to @damage, notice: \"Damage was successfully updated.\" }\n format.json { render :show, status: :ok, location: @damage }\n else\n format.html { render :edit, status: :unprocessable_entity }\n format.json { render json: @damage.errors, status: :unprocessable_entity }\n end\n end\n end", "def edit\n respond_to do |format|\n format.json { render :json => @admin } \n format.xml { render :xml => @admin }\n format.html\n end\n \n rescue ActiveRecord::RecordNotFound\n respond_to_not_found(:json, :xml, :html)\n end", "def edit\n @content = Content.find(params[:id])\n \n respond_to do |format|\n # format.html { render :layout => false }\n format.html\n format.any(:xml, :json) { render request.format.to_sym => @content }\n end\n end", "def update\n @action_graphic = ActionGraphic.find(params[:id])\n\n respond_to do |format|\n if @action_graphic.update_attributes(params[:action_graphic])\n format.html { redirect_to(@action_graphic, :notice => 'Action graphic was successfully updated.') }\n format.xml { head :ok }\n else\n format.html { render :action => \"edit\" }\n format.xml { render :xml => @action_graphic.errors, :status => :unprocessable_entity }\n end\n end\n end", "def edit\n @rim = Rim.find(params[:id])\n\n respond_to do |format|\n # format.html { render :layout => false }\n format.html\n format.any(:xml, :json) { render request.format.to_sym => @rim }\n end\n end", "def update\n flash[:notice] = t('scaffold.notice.updated', :item => SicossDamaged.model_name.human) if @sicoss_damaged.update_attributes(params[:sicoss_damaged])\n respond_with(@sicoss_damaged, :location => sicoss_damageds_path)\n end", "def edit\n respond_with(@sicoss_condition)\n end", "def edit\n Log.add_info(request, params.inspect)\n\n @equipment = Equipment.find(params[:id])\n\n render(:layout => (!request.xhr?))\n end", "def edit\n\tputs \"edit\"\n @resource = Resource.find(params[:id])\n end", "def edit\n @item = Item.find(params[:id])\n respond_to do |format|\n format.json { render :json => @item }\n format.xml { render :xml => @item }\n format.html\n end\n end", "def edit\n respond_with(reagent)\n end", "def edit\n respond_with(@sicoss_contract_mode)\n end" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
POST /sicoss_damageds POST /sicoss_damageds.json POST /sicoss_damageds.xml
def create @sicoss_damaged = SicossDamaged.new(params[:sicoss_damaged]) flash[:notice] = t('scaffold.notice.created', :item => SicossDamaged.model_name.human) if @sicoss_damaged.save respond_with(@sicoss_damaged, :location => sicoss_damageds_path) end
[ "def create\n @damage = Damage.new(damage_params)\n\n respond_to do |format|\n if @damage.save\n format.html { redirect_to @damage, notice: \"Damage was successfully created.\" }\n format.json { render :show, status: :created, location: @damage }\n else\n format.html { render :new, status: :unprocessable_entity }\n format.json { render json: @damage.errors, status: :unprocessable_entity }\n end\n end\n end", "def create\n @damage = Damage.new(params[:damage])\n\n respond_to do |format|\n if @damage.save\n format.html { redirect_to @damage, notice: 'Damage was successfully created.' }\n format.json { render json: @damage, status: :created, location: @damage }\n else\n format.html { render action: \"new\" }\n format.json { render json: @damage.errors, status: :unprocessable_entity }\n end\n end\n end", "def new\n @sicoss_damaged = SicossDamaged.new\n respond_with(@sicoss_damaged)\n end", "def create\n @damage_vulnerability = DamageVulnerability.new(damage_vulnerability_params)\n\n respond_to do |format|\n if @damage_vulnerability.save\n format.html { redirect_to @damage_vulnerability, notice: 'Damage vulnerability was successfully created.' }\n format.json { render :show, status: :created, location: @damage_vulnerability }\n else\n format.html { render :new }\n format.json { render json: @damage_vulnerability.errors, status: :unprocessable_entity }\n end\n end\n end", "def create\n @damage_resistance = DamageResistance.new(damage_resistance_params)\n\n respond_to do |format|\n if @damage_resistance.save\n format.html { redirect_to @damage_resistance, notice: 'Damage resistance was successfully created.' }\n format.json { render :show, status: :created, location: @damage_resistance }\n else\n format.html { render :new }\n format.json { render json: @damage_resistance.errors, status: :unprocessable_entity }\n end\n end\n end", "def create\n @damage_type = DamageType.new(damage_type_params)\n\n respond_to do |format|\n if @damage_type.save\n format.html { redirect_to @damage_type, notice: 'Damage type was successfully created.' }\n format.json { render :show, status: :created, location: @damage_type }\n else\n format.html { render :new }\n format.json { render json: @damage_type.errors, status: :unprocessable_entity }\n end\n end\n end", "def update\n flash[:notice] = t('scaffold.notice.updated', :item => SicossDamaged.model_name.human) if @sicoss_damaged.update_attributes(params[:sicoss_damaged])\n respond_with(@sicoss_damaged, :location => sicoss_damageds_path)\n end", "def create\n @damage_immunity = DamageImmunity.new(damage_immunity_params)\n\n respond_to do |format|\n if @damage_immunity.save\n format.html { redirect_to @damage_immunity, notice: 'Damage immunity was successfully created.' }\n format.json { render :show, status: :created, location: @damage_immunity }\n else\n format.html { render :new }\n format.json { render json: @damage_immunity.errors, status: :unprocessable_entity }\n end\n end\n end", "def update\n respond_to do |format|\n if @damage.update(damage_params)\n format.html { redirect_to @damage, notice: \"Damage was successfully updated.\" }\n format.json { render :show, status: :ok, location: @damage }\n else\n format.html { render :edit, status: :unprocessable_entity }\n format.json { render json: @damage.errors, status: :unprocessable_entity }\n end\n end\n end", "def damage_test(damage)\n # accumulate damage \n @AI_data.dmg.push(damage)\n # set to aggressive\n @AI_data.aggressive = true\n end", "def index\n @search = SicossDamaged.search(params[:search])\n @sicoss_damageds = @search.page(params[:page]).per(10)\n flash.now[:notice] = t('flash.actions.index.notice') if @sicoss_damageds.empty?\n respond_with(@sicoss_damageds)\n end", "def create\n @game_stadistic = GameStadistic.new(game_stadistic_params)\n\n if @game_stadistic.save\n render json: @game_stadistic, status: :created\n else\n render json: @game_stadistic.errors, status: :unprocessable_entity\n end\n end", "def index\n @damages = Damage.all\n end", "def create\n @simdown = Simdown.new(params[:simdown])\n\n respond_to do |format|\n if @simdown.save\n flash[:notice] = 'Simdown was successfully created.'\n format.html { redirect_to(@simdown) }\n format.xml { render :xml => @simdown, :status => :created, :location => @simdown }\n else\n format.html { render :action => \"new\" }\n format.xml { render :xml => @simdown.errors, :status => :unprocessable_entity }\n end\n end\n end", "def update\n @damage = Damage.find(params[:id])\n\n respond_to do |format|\n if @damage.update_attributes(params[:damage])\n format.html { redirect_to @damage, notice: 'Damage was successfully updated.' }\n format.json { head :ok }\n else\n format.html { render action: \"edit\" }\n format.json { render json: @damage.errors, status: :unprocessable_entity }\n end\n end\n end", "def new\n @damage = Damage.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @damage }\n end\n end", "def dif_save(request)\n \n # Build Hash of DIF XML(s)\n xml = request.body.read\n builder = ::Gcmd::Dif.new( xml )\n difs = builder.document_to_array\n j = []\n difs.each do | dif_hash |\n transformer = ::Metadata::DifTransformer.new( dif_hash )\n #transformer.base = request.url.gsub(/\\/\\?#{request.query_string}/, \"\")\n metadata_dataset = transformer.to_dataset\n j << metadata_dataset\n end\n\n # Modify request\n json = j.to_json\n\n #request.env[\"PATH_INFO\"] = request.env[\"PATH_INFO\"].split(\".\").first + \".json\" #XXX\n request.env[\"CONTENT_TYPE\"] = \"application/json\"\n request.env[\"CONTENT_LENGTH\"] = json.bytesize.to_s\n request.env[\"rack.input\"] = ::Rack::Lint::InputWrapper.new( StringIO.new( json ) )\n\n # Save by passing on the request - now with JSON body\n app.call(request.env)\n end", "def post_expense_xml(xml)\n #request header bekommt Content-type = xml\n header \"Content-Type\", \"text/xml\" \n #expense daten werden alsl xml per Post request an den Server gesendet\n post '/expenses', xml\n #es wird erwartet das dies erfolgreich war\n expect(last_response.status).to eq(200)\n\n parsed = Ox.load(last_response.body, mode: :hash)\n expect(parsed).to include('expense_id' => a_kind_of(Integer))\n #adds an id key to the expense hash, containing the id from the database, after an expense is succesfully stored\n expense.merge('id' => parsed['expense_id'])\nend", "def show\n respond_with(@sicoss_damaged)\n end" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
PUT /sicoss_damageds/1 PUT /sicoss_damageds/1.json PUT /sicoss_damageds/1.xml
def update flash[:notice] = t('scaffold.notice.updated', :item => SicossDamaged.model_name.human) if @sicoss_damaged.update_attributes(params[:sicoss_damaged]) respond_with(@sicoss_damaged, :location => sicoss_damageds_path) end
[ "def update\n @damage = Damage.find(params[:id])\n\n respond_to do |format|\n if @damage.update_attributes(params[:damage])\n format.html { redirect_to @damage, notice: 'Damage was successfully updated.' }\n format.json { head :ok }\n else\n format.html { render action: \"edit\" }\n format.json { render json: @damage.errors, status: :unprocessable_entity }\n end\n end\n end", "def update\n respond_to do |format|\n if @damage.update(damage_params)\n format.html { redirect_to @damage, notice: \"Damage was successfully updated.\" }\n format.json { render :show, status: :ok, location: @damage }\n else\n format.html { render :edit, status: :unprocessable_entity }\n format.json { render json: @damage.errors, status: :unprocessable_entity }\n end\n end\n end", "def update\n respond_to do |format|\n if @damage_resistance.update(damage_resistance_params)\n format.html { redirect_to @damage_resistance, notice: 'Damage resistance was successfully updated.' }\n format.json { render :show, status: :ok, location: @damage_resistance }\n else\n format.html { render :edit }\n format.json { render json: @damage_resistance.errors, status: :unprocessable_entity }\n end\n end\n end", "def update\n respond_to do |format|\n if @damage_vulnerability.update(damage_vulnerability_params)\n format.html { redirect_to @damage_vulnerability, notice: 'Damage vulnerability was successfully updated.' }\n format.json { render :show, status: :ok, location: @damage_vulnerability }\n else\n format.html { render :edit }\n format.json { render json: @damage_vulnerability.errors, status: :unprocessable_entity }\n end\n end\n end", "def update\n respond_to do |format|\n if @damagebook.update(damagebook_params)\n format.html { redirect_to @damagebook, notice: '损坏图书信息更新成功!' }\n format.json { render :show, status: :ok, location: @damagebook }\n else\n format.html { render :edit }\n format.json { render json: @damagebook.errors, status: :unprocessable_entity }\n end\n end\n end", "def update\n respond_to do |format|\n if @damage_type.update(damage_type_params)\n format.html { redirect_to @damage_type, notice: 'Damage type was successfully updated.' }\n format.json { render :show, status: :ok, location: @damage_type }\n else\n format.html { render :edit }\n format.json { render json: @damage_type.errors, status: :unprocessable_entity }\n end\n end\n end", "def edit\n respond_with(@sicoss_damaged)\n end", "def update\n @st_energy_data = StEnergyData.find(params[:id])\n\n respond_to do |format|\n if @st_energy_data.update_attributes(params[:st_energy_data])\n format.html { redirect_to(@st_energy_data) }\n format.xml { head :ok }\n else\n format.html { render :action => \"edit\" }\n format.xml { render :xml => @st_energy_data.errors, :status => :unprocessable_entity }\n end\n end\n end", "def put_datastream(pid, dsID, xml)\n uri = URI.parse(@fedora + '/objects/' + pid + '/datastreams/' + dsID ) \n RestClient.put(uri.to_s, xml, :content_type => \"application/xml\")\n rescue => e\n e.response \n end", "def update opts = {}\n opts[:headers] ||= {}\n opts[:headers]['Content-Type'] ||= 'text/xml'\n post 'update', opts\n end", "def update\n @shot = Shot.find(params[:id])\n\n respond_to do |format|\n if @shot.update_attributes(params[:shot])\n flash[:notice] = 'Shot was successfully updated.'\n format.html { redirect_to(@shot) }\n format.xml { head :ok }\n else\n format.html { render :action => \"edit\" }\n format.xml { render :xml => @shot.errors, :status => :unprocessable_entity }\n end\n end\n end", "def update\n @shot = Shot.find(params[:id])\n\n respond_to do |format|\n if @shot.update_attributes(params[:shot])\n format.html { redirect_to(@shot, :notice => 'Shot was successfully updated.') }\n format.xml { head :ok }\n else\n format.html { render :action => \"edit\" }\n format.xml { render :xml => @shot.errors, :status => :unprocessable_entity }\n end\n end\n end", "def update_rest\n @v1_item_usage = V1ItemUsage.find(params[:id])\n\n respond_to do |format|\n if @v1_item_usage.update_attributes(params[:v1_item_usage])\n flash[:notice] = 'V1ItemUsage was successfully updated.'\n format.html { redirect_to(@v1_item_usage) }\n format.xml { head :ok }\n else\n format.html { render :action => \"edit\" }\n format.xml { render :xml => @v1_item_usage.errors, :status => :unprocessable_entity }\n end\n end\n end", "def update\n @sense = Sense.find(params[:id])\n\n respond_to do |format|\n if @sense.update_attributes(params[:sense])\n flash[:notice] = 'Sense was successfully updated.'\n format.html { redirect_to(@sense) }\n format.xml { head :ok }\n else\n format.html { render :action => \"edit\" }\n format.xml { render :xml => @sense.errors, :status => :unprocessable_entity }\n end\n end\n end", "def update\n respond_to do |format|\n if @sausage.update(sausage_params)\n format.html { redirect_to @sausage, notice: 'Sausage was successfully updated.' }\n format.json { render :show, status: :ok, location: @sausage }\n else\n format.html { render :edit }\n format.json { render json: @sausage.errors, status: :unprocessable_entity }\n end\n end\n end", "def update\n @xoso = Xoso.find(params[:id])\n\n respond_to do |format|\n if @xoso.update_attributes(params[:xoso])\n format.html { redirect_to @xoso, notice: 'Xoso was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render action: \"edit\" }\n format.json { render json: @xoso.errors, status: :unprocessable_entity }\n end\n end\n end", "def update_tenant_circle(args = {}) \n put(\"/tenantcircles.json/#{args[:circleId]}\", args)\nend", "def update_rest\n @item_usage = ItemUsage.find(params[:id])\n\n respond_to do |format|\n if @item_usage.update_attributes(params[:item_usage])\n flash[:notice] = 'ItemUsage was successfully updated.'\n format.html { redirect_to(@item_usage) }\n format.xml { head :ok }\n else\n format.html { render :action => \"edit\" }\n format.xml { render :xml => @item_usage.errors, :status => :unprocessable_entity }\n end\n end\n end", "def update\n @shot = Shot.find(params[:id])\n\n if @shot.update(shot_params)\n head :no_content\n else\n render json: @shot.errors, status: :unprocessable_entity\n end\n end" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
POST /rationales POST /rationales.json
def create @rationale = Rationale.new(rationale_params) respond_to do |format| if @rationale.save format.html { redirect_to position_rationale_path, notice: 'Rationale was successfully added.' } format.json { render :show, status: :created, location: @rationale } else format.html { render :new } format.json { render json: @rationale.errors, status: :unprocessable_entity } end end end
[ "def create\n @rationale = Rationale.new(rationale_params)\n @rationale.user = current_user\n respond_to do |format|\n if @rationale.save\n format.html { head :no_content }\n format.json { head :no_content }\n else\n format.html { render :new }\n format.json { render json: @rationale.errors, status: :unprocessable_entity }\n end\n end\n end", "def update\n respond_to do |format|\n if @rationale.update(rationale_params)\n format.html { redirect_to @rationale, notice: 'Rationale was successfully updated.' }\n format.json { render :show, status: :ok, location: @rationale }\n else\n format.html { render :edit }\n format.json { render json: @rationale.errors, status: :unprocessable_entity }\n end\n end\n end", "def create\n @traduction = Traduction.new(traduction_params)\n @data = JSON.parse(open(URI.escape(\"http://translate.google.com/translate_a/t?client=p&q=\"+@traduction.fr+\"&hl=en&sl=fr&tl=en&ie=UTF-8&oe=UTF-8&multires=0\")).read)\n @tmp = @data['sentences'][0]['trans']\n @traduction.en = @tmp\n respond_to do |format|\n if @traduction.save\n format.html { redirect_to @traduction, notice: 'Traduction was successfully created.' }\n format.json { render action: 'show', status: :created, location: @traduction }\n else\n format.html { render action: 'home' }\n format.json { render json: @traduction.errors, status: :unprocessable_entity }\n end\n end\n end", "def index\n @rationales = Rationale.all.order('created_at DESC')\n end", "def create\n @religion = Religion.new(params[:religion])\n\n respond_to do |format|\n if @religion.save\n format.html { redirect_to @religion, notice: 'Religion was successfully created.' }\n format.json { render json: @religion, status: :created, location: @religion }\n else\n format.html { render action: \"new\" }\n format.json { render json: @religion.errors, status: :unprocessable_entity }\n end\n end\n end", "def update\n respond_to do |format|\n if @rationale.update(rationale_params)\n format.html { redirect_to position_rationale_path, notice: 'Rationale was successfully updated.' }\n format.json { render :show, status: :ok, location: @rationale }\n else\n format.html { render :edit }\n format.json { render json: @rationale.errors, status: :unprocessable_entity }\n end\n end\n end", "def create\n @normalization = Normalization.new(normalization_params)\n\n respond_to do |format|\n if @normalization.save\n format.html { redirect_to @normalization, notice: 'Normalization was successfully created.' }\n format.json { render :show, status: :created, location: @normalization }\n else\n format.html { render :new }\n format.json { render json: @normalization.errors, status: :unprocessable_entity }\n end\n end\n end", "def create\n @relational = Relational.new(relational_params)\n\n respond_to do |format|\n if @relational.save\n format.html { redirect_to rental_relationals_path(@rental), notice: '資材貸し出しの予約を完了しました!!' }\n format.json { render :show, status: :created, location: @relational }\n else\n format.html { render :new }\n format.json { render json: @relational.errors, status: :unprocessable_entity }\n end\n end\n end", "def create\n @religion = Religion.new(religion_params)\n\n respond_to do |format|\n if @religion.save\n format.html { redirect_to @religion, notice: 'Religion was successfully created.' }\n format.json { render :show, status: :created, location: @religion }\n else\n format.html { render :new }\n format.json { render json: @religion.errors, status: :unprocessable_entity }\n end\n end\n end", "def create\n @alligator = Alligator.new(params[:alligator])\n\n respond_to do |format|\n if @alligator.save\n format.html { redirect_to @alligator, notice: 'Alligator was successfully created.' }\n format.json { render json: @alligator, status: :created, location: @alligator }\n else\n format.html { render action: \"new\" }\n format.json { render json: @alligator.errors, status: :unprocessable_entity }\n end\n end\n end", "def create\n @spanish_word = SpanishWord.new(spanish_word_params)\n\n respond_to do |format|\n if @spanish_word.save\n format.html { redirect_to @spanish_word, notice: 'Spanish word was successfully created.' }\n format.json { render :show, status: :created, location: @spanish_word }\n else\n format.html { render :new }\n format.json { render json: @spanish_word.errors, status: :unprocessable_entity }\n end\n end\n end", "def create\n @language_and_dialect = LanguageAndDialect.new(params[:language_and_dialect])\n\n respond_to do |format|\n if @language_and_dialect.save\n format.html { redirect_to @language_and_dialect.miscellaneou.personal_detail, notice: 'Language and dialect was successfully created.' }\n format.json { render json: @language_and_dialect, status: :created, location: @language_and_dialect }\n else\n format.html { render action: \"new\" }\n format.json { render json: @language_and_dialect.errors, status: :unprocessable_entity }\n end\n end\n end", "def create\n @lenguage = Lenguage.new(params[:lenguage])\n\n respond_to do |format|\n if @lenguage.save\n format.html { redirect_to @lenguage, notice: 'Lenguage was successfully created.' }\n format.json { render json: @lenguage, status: :created, location: @lenguage }\n else\n format.html { render action: \"new\" }\n format.json { render json: @lenguage.errors, status: :unprocessable_entity }\n end\n end\n end", "def create\n @alligator = Alligator.new(alligator_params)\n\n respond_to do |format|\n if @alligator.save\n format.html { redirect_to @alligator, notice: 'Alligator was successfully created.' }\n format.json { render :show, status: :created, location: @alligator }\n else\n format.html { render :new }\n format.json { render json: @alligator.errors, status: :unprocessable_entity }\n end\n end\n end", "def destroy\n @rationale.destroy\n respond_to do |format|\n format.html { redirect_to rationales_url, notice: 'Rationale was successfully destroyed.' }\n format.json { head :no_content }\n end\n end", "def create\n @my_glossary = MyGlossary.new(params[:my_glossary])\n\n respond_to do |format|\n if @my_glossary.save\n format.html { redirect_to @my_glossary, notice: 'My glossary was successfully created.' }\n format.json { render json: @my_glossary, status: :created, location: @my_glossary }\n else\n format.html { render action: \"new\" }\n format.json { render json: @my_glossary.errors, status: :unprocessable_entity }\n end\n end\n end", "def create\n @recommandation = Recommandation.new(recommandation_params)\n\n respond_to do |format|\n if @recommandation.save\n format.html { redirect_to @recommandation, notice: 'Recommandation was successfully created.' }\n format.json { render :show, status: :created, location: @recommandation }\n else\n format.html { render :new }\n format.json { render json: @recommandation.errors, status: :unprocessable_entity }\n end\n end\n end", "def create\n @narration = Narration.new(params[:narration])\n\n respond_to do |format|\n if @narration.save\n format.html { redirect_to @narration, notice: 'Narration was successfully created.' }\n format.json { render json: @narration, status: :created, location: @narration }\n else\n format.html { render action: \"new\" }\n format.json { render json: @narration.errors, status: :unprocessable_entity }\n end\n end\n end", "def create\n @religion = Religion.new(params[:religion])\n\n respond_to do |format|\n if @religion.save\n format.html { redirect_to(@religion, :notice => 'Religion was successfully created.') }\n format.xml { render :xml => @religion, :status => :created, :location => @religion }\n else\n format.html { render :action => \"new\" }\n format.xml { render :xml => @religion.errors, :status => :unprocessable_entity }\n end\n end\n end" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }