Class: AndUser

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

Instance Method Summary collapse

Constructor Details

#initialize(value) ⇒ AndUser

Returns a new instance of AndUser.



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

def initialize(value)
  @value = value
end

Instance Method Details

#if_with_andObject



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

def if_with_and
  if @value and true
    'Both @value and true were true (the latter is no surprise)'
  else
    '@value must have been false, I doubt true was false!'
  end
end

#method_with_andObject



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

def method_with_and
  @value and true
end