Class: RVM::Functions::Capstr
Class Method Summary
collapse
Methods inherited from Function
call, execargs, method_missing
Methods included from Plugin
#helper, #included, #plugin_host, #plugin_id, #register_for
Class Method Details
.data_type ⇒ Object
16
17
18
|
# File 'lib/rvm/functions/string/capstr.rb', line 16
def data_type
:string
end
|
.execute(params, env) ⇒ Object
5
6
7
8
9
10
11
|
# File 'lib/rvm/functions/string/capstr.rb', line 5
def execute params, env
if (params.length == 1)
RVM::Classes[:string].new(params.first.capitalize)
else
RVM::Classes[:error].new(1,"#-1 FUNCTION (#{self.class.to_s}) EXPECTS 1 ARGUMENT BUT GOT #{params.length}")
end
end
|
.signature ⇒ Object
13
14
15
|
# File 'lib/rvm/functions/string/capstr.rb', line 13
def signature
[:string]
end
|