Class: Safer::Protocol::Violation

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

Overview

Describes a set of methods that should be implemented by an object, but are not implemented. The Protocol::Error object will contain two Protocol::Violation objects: one for class-method protocol violations, and one for instance-method protocol violations.

Instance Method Summary collapse

Constructor Details

#initialize(table, report) ⇒ Violation

Create a new Protocol::Violation object.



153
154
155
156
# File 'lib/safer/protocol.rb', line 153

def initialize(table, report)
  self.safer_protocol_violation__table = table
  self.safer_protocol_violation__report = report
end

Instance Method Details

#==(other_object) ⇒ Object

Compare two Protocol::Violation objects for content equality.



159
160
161
162
# File 'lib/safer/protocol.rb', line 159

def ==(other_object)
  self.class == other_object.class &&
    self.safer_protocol_violation__table == other_object.safer_protocol_violation__table
end

#selfObject

:attr_reader: report String describing the errors from table in a more human-readable fashion.



143
# File 'lib/safer/protocol.rb', line 143

Safer::IVar.export_reader(self, :table)