Skip to content

Instantly share code, notes, and snippets.

@sheldonh
Created September 2, 2009 09:48
Show Gist options
  • Save sheldonh/179634 to your computer and use it in GitHub Desktop.
Save sheldonh/179634 to your computer and use it in GitHub Desktop.
[:user, :crypted_password, :uid, :gid, :homedir, :mail_dir, :options, :quota].each do |attribute|
eval %Q{
def #{attribute.to_s} {
@attributes[#{attribute}]
}
}
end
SyntaxError: (eval):4:in `irb_binding': compile error
(eval):2: syntax error, unexpected '{', expecting '\n' or ';'
(eval):4: syntax error, unexpected '}', expecting $end
from (irb):13
from (irb):8:in `eval'
from (irb):13
from (irb):8:in `each'
from (irb):8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment