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.



155
156
157
158
# File 'lib/safer/protocol.rb', line 155

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.



161
162
163
164
# File 'lib/safer/protocol.rb', line 161

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.



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

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