J
Joe Van Dyk
Hi,
require 'traits'
$applications =3D {}
class Application
has %w{ application_id title executable options}
end
def application(application_id, &block)
a =3D Application.new
###### What goes here? #############
$applications[application_id] =3D a
end
application :joe_app do
title "Joe's Application"
executable "My executable"
options "my options"
end
application :another_app do
title "Another App"
executable "another exec"
options "the options"
end
It should be pretty apparent to what I'm trying to do. Any ideas?=20
Can I restructure this better somehow?
Thanks,
Joe
require 'traits'
$applications =3D {}
class Application
has %w{ application_id title executable options}
end
def application(application_id, &block)
a =3D Application.new
###### What goes here? #############
$applications[application_id] =3D a
end
application :joe_app do
title "Joe's Application"
executable "My executable"
options "my options"
end
application :another_app do
title "Another App"
executable "another exec"
options "the options"
end
It should be pretty apparent to what I'm trying to do. Any ideas?=20
Can I restructure this better somehow?
Thanks,
Joe