Method: Object#and

Defined in:
lib/volt/extra_core/object.rb

#and(other) ⇒ Object

Provides the same functionality as &&, but since ReactiveValue’s only work with method calls, we provide .and as a convience



21
22
23
24
25
26
27
# File 'lib/volt/extra_core/object.rb', line 21

def and(other)
  if self && !self.nil?
    return other
  else
    return self
  end
end