Sha256: f76b0eb31efceef7b2fe30afd9129ac8a697f795621f5dc6c9a38d07a1ef77c6
Contents?: true
Size: 405 Bytes
Versions: 3
Compression:
Stored size: 405 Bytes
Contents
class Relevance::Tarantula::Attack HASHABLE_ATTRS = [:name, :input, :output, :description] attr_accessor *HASHABLE_ATTRS def initialize(hash) hash.each do |k,v| raise ArgumentError, k unless HASHABLE_ATTRS.member?(k) self.instance_variable_set("@#{k}", v) end end def ==(other) Attack === other && HASHABLE_ATTRS.all? { |attr| send(attr) == other.send(attr)} end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
relevance-tarantula-0.0.1 | lib/relevance/tarantula/attack.rb |
relevance-tarantula-0.0.2 | lib/relevance/tarantula/attack.rb |
relevance-tarantula-0.0.3 | lib/relevance/tarantula/attack.rb |