Class: OrUser

Inherits:
ApplicationController show all
Defined in:
lib/spec/virtualizees/or_user.rb

Instance Method Summary collapse

Constructor Details

#initialize(value) ⇒ OrUser

Returns a new instance of OrUser.



2
3
4
# File 'lib/spec/virtualizees/or_user.rb', line 2

def initialize(value)
  @value = value
end

Instance Method Details

#if_with_orObject



10
11
12
13
14
15
16
# File 'lib/spec/virtualizees/or_user.rb', line 10

def if_with_or
  if @value or true
    'Both @value or true were true (the latter is no surprise)'
  else
    "This can't happen!"
  end
end

#method_with_orObject



6
7
8
# File 'lib/spec/virtualizees/or_user.rb', line 6

def method_with_or
  @value or false
end