Sha256: b893d3f524c6edf328c75380b50336ee7addebb3730e2abb18644d8181141a30
Contents?: true
Size: 670 Bytes
Versions: 61
Compression:
Stored size: 670 Bytes
Contents
module Celerity # # Mixed in to all elements that can have the 'disabled' attribute. # module DisabledElement include Celerity::Exception # # Returns false if the element is disabled. # def enabled? !disabled? end # # Returns true if the element is disabled. # def disabled? assert_exists unless defined?(@object) && @object @object.isDisabled end alias_method :disabled, :disabled? # # Used internally. # @api private # def assert_enabled if disabled? raise ObjectDisabledException, "Object #{identifier_string} is disabled" end end end end
Version data entries
61 entries across 61 versions & 11 rubygems