Class: TaLib::Function

Inherits:
Object
  • Object
show all
Defined in:
lib/tafunc.rb

Overview

Util extension for default TaLib::Function by open-class.

Direct Known Subclasses

TAFunc

Class Method Summary collapse

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