Class: Class

Inherits:
Object show all
Defined in:
lib/protocol/xt.rb

Instance Method Summary collapse

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.

Returns:

  • (Boolean)


42
43
44
# File 'lib/protocol/xt.rb', line 42

def conform_to?(protocol)
  protocol.check(self)
end