Skip to content

Instantly share code, notes, and snippets.

@joseluistorres
Created January 24, 2014 15:22
Show Gist options
  • Select an option

  • Save joseluistorres/8599353 to your computer and use it in GitHub Desktop.

Select an option

Save joseluistorres/8599353 to your computer and use it in GitHub Desktop.
Herencia - Parte 4
class Pastor < Taco
attr_reader :salsa
def initialize(args)
@salsa = args[:salsa]
super(args)
end
end
class Pescado < Taco
attr_reader :salsa, :col
def initialize(args)
@salsa = args[:salsa]
@col = col
super(args)
end
def verdura
super.merge({col :col}
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment