Class: TaLib::Function
- Inherits:
-
Object
- Object
- TaLib::Function
- Defined in:
- lib/tafunc.rb
Overview
Util extension for default TaLib::Function by open-class.
Direct Known Subclasses
Class Method Summary collapse
-
.function_exists?(func) ⇒ Boolean
check if a function is existed.
-
.function_find(func) ⇒ Object
find func from hash.
-
.group_of_function(func) ⇒ Object
get the group of specified function.
Class Method Details
.function_exists?(func) ⇒ Boolean
check if a function is existed.
Args
- func
-
name of function which you want to search from the table.
Return
- true
-
there exists
- false
-
no such function.
119 120 121 |
# File 'lib/tafunc.rb', line 119 def self.function_exists?( func ) return not(self.function_find(func).nil?) end |
.function_find(func) ⇒ Object
find func from hash.
Args
- func
-
name of function which you want to search from the table. (Symbol can match with String. So you can use also Symbol)
Return
- String
-
function name found.
- nil
-
no such function.
109 110 111 |
# File 'lib/tafunc.rb', line 109 def self.function_find( func ) return __group_of_function( func )[:function] end |
.group_of_function(func) ⇒ Object
get the group of specified function.
126 127 128 |
# File 'lib/tafunc.rb', line 126 def self.group_of_function( func ) return __group_of_function( func )[:group] end |