Sha256: ee3710ec13a071fa52a2376b1056e5a41c49356e0effc0f4c4ae30aa7d4c6272
Contents?: true
Size: 561 Bytes
Versions: 11
Compression:
Stored size: 561 Bytes
Contents
module Relevance module Tarantula class 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) Relevance::Tarantula::Attack === other && HASHABLE_ATTRS.all? { |attr| send(attr) == other.send(attr)} end def input(input_field=nil) @input end end end end
Version data entries
11 entries across 11 versions & 2 rubygems