Class: RVM::Functions::Ljust
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_type ⇒ Object
19
20
21
|
# File 'lib/rvm/functions/string/ljust.rb', line 19
def data_type
:string
end
|
.execute(params, env) ⇒ Object
5
6
7
8
9
10
11
12
13
|
# File 'lib/rvm/functions/string/ljust.rb', line 5
def execute params, env
if params.length == 2
params[0].ljust params[1]
elsif params.length == 3
params[0].ljust params[1], params[2]
else
RVM::Classes[:error].new(1,"#-1 FUNCTION (#{self.class.to_s}) EXPECTS 2 OR 3 ARGUMENTS BUT GOT #{params.length}")
end
end
|
.signature ⇒ Object
15
16
17
|
# File 'lib/rvm/functions/string/ljust.rb', line 15
def signature
[:string, :number, :string]
end
|