Class: Safer::HashProtocol::ProtocolBase

Inherits:
Object
  • Object
show all
Defined in:
lib/safer/hashprotocol.rb

Overview

Object signature required of HashProtocol objects. Used to derive Safer::HashProtocol::Protocol.

Instance Method Summary collapse

Instance Method Details

#===(h) ⇒ Object

Check that a Hash (h) follows this object’s protocol.



64
65
# File 'lib/safer/hashprotocol.rb', line 64

def ===(h)
end

#descriptionObject

Retrieve a human-readable description of this HashProtocol object.



59
60
# File 'lib/safer/hashprotocol.rb', line 59

def description
end

#match(h, remaining) ⇒ Object

Check that a Hash (h) follows this object’s protocol, keeping track of which parts of (h) do not. remaining should only be updated if h matches this object.



71
72
# File 'lib/safer/hashprotocol.rb', line 71

def match(h, remaining)
end