Skip to content

Instantly share code, notes, and snippets.

@ymendel
Created August 23, 2010 21:14
Show Gist options
  • Select an option

  • Save ymendel/546351 to your computer and use it in GitHub Desktop.

Select an option

Save ymendel/546351 to your computer and use it in GitHub Desktop.
attr_accessor :secret
undef_method "secret"
undef_method "secret="
def secret
@modes["s"]
end
alias_method :secret?, :secret
def secret=(bool)
if bool
mode "+s"
else
mode "-s"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment