Class: RVM::Functions::And

Inherits:
Function show all
Defined in:
lib/rvm/functions/logic/and.rb

Constant Summary collapse

@@type =
:any

Class Method Summary collapse

Methods inherited from Function

call, data_type, method_missing, method_missing_old_functions

Methods included from Plugin

#helper, #included, #plugin_host, #plugin_id, #register_for

Class Method Details

.execargsObject



18
19
20
# File 'lib/rvm/functions/logic/and.rb', line 18

def execargs
  false
end

.execute(params, env) ⇒ Object



6
7
8
9
10
11
12
# File 'lib/rvm/functions/logic/and.rb', line 6

def execute params, env
  result = true
  while result and not params.empty?
    result = result && params.shift.execute(env).is_true?
  end
  result
end

.signatureObject



14
15
16
# File 'lib/rvm/functions/logic/and.rb', line 14

def signature
  [:any] # adjust the signature here
end