Sha256: e4054ff53e3fac1725cf503b130122f5cbdd9e0bc46a5db64d17fa2f4ed4f9ac

Contents?: true

Size: 229 Bytes

Versions: 4

Compression:

Stored size: 229 Bytes

Contents

module Erlectricity
class TypeCondition < Condition
  attr_accessor :type
  
  def initialize(type)
    self.type = type
  end
  
  def satisfies?(arg)
    arg.is_a? self.type
  end
  
  def binding_for(arg)
    arg
  end
end
end

Version data entries

4 entries across 4 versions & 3 rubygems

Version Path
mojombo-erlectricity-0.2.1 lib/erlectricity/conditions/type.rb
tmm1-erlectricity-0.2.1 lib/erlectricity/conditions/type.rb
erlectricity-0.2.0 lib/erlectricity/conditions/type.rb
erlectricity-0.2.1 lib/erlectricity/conditions/type.rb