We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
似たようなメソッドを増やしていくのはどうなの...?
def fax? self.code == "fax" end def tel? self.code == "tel" end
こっちの方がいい?
# fax? tel? self.pluck(:code).each do |code| define_method("#{code}?") do self.code == code end end
The text was updated successfully, but these errors were encountered:
基本的ににた様なメソッドは動的に定義することを推奨する。
ただし、定義されるメソッドは必ずコメントで書く事。
Sorry, something went wrong.
No branches or pull requests
似たようなメソッドを増やしていくのはどうなの...?
こっちの方がいい?
The text was updated successfully, but these errors were encountered: