Class: OperatorUser

Inherits:
ActiveRecord::Base show all
Defined in:
lib/spec/spec_helper.rb

Overview

Ruby also lets you use the && and || operators I think they have different precedence rules

Instance Method Summary collapse

Constructor Details

#initialize(value) ⇒ OperatorUser

Returns a new instance of OperatorUser.



202
203
204
# File 'lib/spec/spec_helper.rb', line 202

def initialize(value)
  @value = value
end

Instance Method Details

#symbolic_andObject



206
207
208
# File 'lib/spec/spec_helper.rb', line 206

def symbolic_and
  @value && false
end

#symbolic_and_resultObject



210
211
212
# File 'lib/spec/spec_helper.rb', line 210

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