This file contains 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 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 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 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 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 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 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 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 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 |
This file contains 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 Lluvia | |
def initialize(intensidad, granizo) | |
@intensidad = intensidad | |
@granizo = granizo | |
end | |
def empieza_lluvia | |
puts "=============LLUVIA=#{@intensidad}==========" | |
end | |
end |