Sha256: 34dde5c58102b770fdec5a0ac97f3d532130f2d9a2dc148b1935441f6b949e85

Contents?: true

Size: 328 Bytes

Versions: 2

Compression:

Stored size: 328 Bytes

Contents

# Ruby also lets you use the && and || operators
# I think they have different precedence rules
class OperatorUser < ActiveRecord::Base
  def initialize(value)
    @value = value
  end

  def symbolic_and
    @value && false
  end

  def symbolic_and_result
    my_conditional_and(lambda { @value }, lambda { false })
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
virtual_keywords-0.3.1 lib/spec/virtualizees/operator_user.rb
virtual_keywords-0.3.0 lib/spec/virtualizees/operator_user.rb