This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- If you have an error running a query with geometry in Postgresql | |
| CREATE TABLE "some_random_table" ( | |
| "id" int4 NOT NULL, | |
| "map_coords" "public"."geometry(MultiLineString,3857)", | |
| "col3" int4 NOT NULL, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # add this to your bash profile | |
| function gco1() { | |
| echo "$@" | pbcopy | gco "$@" | |
| } | |
| alias gco='git checkout' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Tripita < Taco | |
| attr_reader :tripita_dorada, :frijolitos | |
| def inicializa_despues(args) | |
| @tripita_dorada = args[:tripita_dorada] | |
| @frijolitos = args[:frijolitos] | |
| end | |
| def otras_verduras | |
| { frijolitos: frijolitos} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Taco | |
| attr_reader :maiz_o_harina, :cebolla, :cilantro | |
| def initialize(args) | |
| @maiz_o_harina = args[:maiz_o_harina] | |
| @cebolla = args[:cebolla] || con_cebolla | |
| @cilantro = args[:cilantro] || con_cilantro | |
| inicializa_despues(args) | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Pastor < Taco | |
| attr_reader :salsa | |
| def initialize(args) | |
| @salsa = args[:salsa] | |
| super(args) | |
| end | |
| end | |
| class Pescado < Taco |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Taco | |
| … | |
| def verdura | |
| if @sabor=='pastor | |
| { cebolla: cebolla, | |
| :cilantro cilantro} | |
| elsif @sabor=='tripita | |
| {cebolla: cebolla, | |
| :cilantro cilantro, | |
| :pina pina} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Taco | |
| #… | |
| def verdura | |
| if @sabor==‘pastor’ | |
| { cebolla: cebolla, | |
| :cilantro cilantro} | |
| else | |
| {cebolla: cebolla, | |
| :cilantro cilantro, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Taco | |
| attr_reader :maiz_o_harina, :sabor, :cebolla, :cilantro | |
| def initialize(args) | |
| @maiz_o_harina = args[:maiz_o_harina] | |
| @sabor = args[:sabor] | |
| @cebolla = args[:cebolla] | |
| @cilantro = args[:cilantro] | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class BuenFin | |
| def revisa_oferta(objetos_a_validar) | |
| objetos_a_validar.each do |objeto| | |
| objeto.valida_este_objeto | |
| end | |
| end | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class BuenFin | |
| def revisa_oferta(objetos_a_validar) | |
| objetos_a_validar.each do |objeto| | |
| case objeto | |
| when PantallaPlana | |
| objeto.checar_cuanto_cuesta_y_a_cuantos_meses | |
| when Celular4taGeneracion | |
| objeto.checar_si_tiene_garantia | |
| when MueblesCaros |