#This is a test
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
{ | |
"command": "ruby -rubygems -r./custom_plan -eZeus.go", | |
"plan": { | |
"boot": { | |
"default_bundle": { | |
"development_environment": { | |
"prerake": {"rake": []}, | |
"runner": ["r"], | |
"console": ["c"], |
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
custom_plan.rb | |
zeus.json |
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
Qué? | |
Metaprogramming is code that writes code | |
Metafora lenguaje compilado - dinámico | |
Ruby es un lenguaje dinámico y orientado a objetos | |
Todo son mensajes que se pasan | |
Manejo de esos mensajes | |
Dónde manejamos esos mensajes? | |
Ruby object model | |
Open Classes | |
Monkey Patchs |
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 Computer | |
def initialize(computer_id, data_source) | |
@id = computer_id | |
@data_source = data_source | |
end | |
def mouse | |
info = @data_source.get_mouse_info(@id) | |
price = @data_source.get_mouse_price(@id) | |
result = "Mouse: #{info} ($#{price})" | |
return "* #{result}" if price >= 100 |
OlderNewer