In Files

Parent

Files

Object

Public Instance Methods

Protocol(&block) click to toggle source

Define a protocol configured by block. Look at the methods of ProtocolModule to get an idea on how to do that.

# File lib/protocol.rb, line 22
    def Protocol(&block)
      ProtocolModule.new(&block)
    end
conform_to?(protocol) click to toggle source

Returns true if this object 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.rb, line 16
    def conform_to?(protocol)
      protocol.check(self, :none)
    end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.