Module: Predicable
- Included in:
- Cask::Artifact::AbstractArtifact, Cask::Audit, Cask::Cask, Cask::DSL, Cask::DSL::Caveats, Cask::Installer, Debrew, Formula, FormulaInstaller, Homebrew::Cleanup, SystemCommand
- Defined in:
- extend/predicable.rb
Instance Method Summary collapse
Instance Method Details
#attr_predicate(*attrs) ⇒ Object
5 6 7 8 9 10 11 |
# File 'extend/predicable.rb', line 5 def attr_predicate(*attrs) attrs.each do |attr| define_method attr do instance_variable_get("@#{attr.to_s.sub(/\?$/, "")}") == true end end end |