class Class
Public Instance Methods
conform_to?(protocol)
click to toggle source
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.
# File lib/protocol/xt.rb, line 42 def conform_to?(protocol) protocol.check(self) end