Class: RVM::Functions::Split

Inherits:
Function show all
Defined in:
lib/rvm/functions/list/split.rb

Class Method Summary collapse

Methods inherited from Function

call, execargs, method_missing, method_missing_old_functions

Methods included from Plugin

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

Class Method Details

.data_typeObject



17
18
19
# File 'lib/rvm/functions/list/split.rb', line 17

def data_type
  :list
end

.execute(params, env) ⇒ Object



5
6
7
8
9
10
11
# File 'lib/rvm/functions/list/split.rb', line 5

def execute params, env
  if params.length == 2
    RVM::Classes[:list].new(params[0].to_s,params[1])
  else
    RVM::Classes[:error].new(1,"#-1 FUNCTION (#{self.class.to_s}) EXPECTS 2 OR 3 ARGUMENTS BUT GOT #{params.length}")
  end
end

.signatureObject



13
14
15
# File 'lib/rvm/functions/list/split.rb', line 13

def signature
  [:string, :string]
end