Class: OperatorUser
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- OperatorUser
- Defined in:
- lib/spec/virtualizees/operator_user.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.
4 5 6 |
# File 'lib/spec/virtualizees/operator_user.rb', line 4 def initialize(value) @value = value end |
Instance Method Details
#symbolic_and ⇒ Object
8 9 10 |
# File 'lib/spec/virtualizees/operator_user.rb', line 8 def symbolic_and @value && false end |
#symbolic_and_result ⇒ Object
12 13 14 |
# File 'lib/spec/virtualizees/operator_user.rb', line 12 def symbolic_and_result my_conditional_and(lambda { @value }, lambda { false }) end |