Class: Class
Instance Method Summary collapse
-
#conform_to?(protocol) ⇒ Boolean
Returns true if this class conforms to
protocol, otherwise false.
Instance Method Details
#conform_to?(protocol) ⇒ Boolean
Returns true if this class conforms to protocol, otherwise false.
This is especially useful, if check_failure in the protocol is set to :none or :warning, and conformance of a class to a protocol should be checked later in runtime.
42 43 44 |
# File 'lib/protocol/xt.rb', line 42 def conform_to?(protocol) protocol.check(self) end |