Skip to content

Instantly share code, notes, and snippets.

View israellias's full-sized avatar

Israel israellias

  • Sublime
  • Santa Cruz, Bolivia
  • 04:58 (UTC -12:00)
  • X @israellias
View GitHub Profile
@israellias
israellias / platzi_boxes.rb
Last active December 28, 2018 16:07
Platzi - Reto 8
# Platzi - Reto 8 Diciembre 23
# @author: @israellias
# ruby_version: 2.5.3
#regalaconocimiento
module Model
class Box < Struct.new(:name, :money, :weight)
end
class Combination < Struct.new(:boxes)
@israellias
israellias / helper_method_builder.rb
Created May 14, 2018 21:41
override handle_list method of ActionDispatch::Routing::PolymorphicRoutes::HelperMethodBuilder class
class ActionDispatch::Routing::PolymorphicRoutes::HelperMethodBuilder
# Extract from gems/actionpack-5.2.0/lib/action_dispatch/routing/polymorphic_routes.rb#HelperMethodBuilder class
# @param [Array] list
def handle_list(list)
record_list = list.dup
record = record_list.pop
args = []
<?php
public class FirstApp {
private $app;
public function getApp(){
return $this->app;
}