Class: OperatorUser
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- OperatorUser
- 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
-
#initialize(value) ⇒ OperatorUser
constructor
A new instance of OperatorUser.
- #symbolic_and ⇒ Object
- #symbolic_and_result ⇒ Object
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_and ⇒ Object
206 207 208 |
# File 'lib/spec/spec_helper.rb', line 206 def symbolic_and @value && false end |
#symbolic_and_result ⇒ Object
210 211 212 |
# File 'lib/spec/spec_helper.rb', line 210 def symbolic_and_result my_conditional_and(lambda { @value }, lambda { false }) end |