Module: Yogo::Operations

Defined in:
lib/yogo/operation.rb

Class Method Summary collapse

Class Method Details

.[](op_name) ⇒ Object



39
40
41
42
43
44
45
46
47
# File 'lib/yogo/operation.rb', line 39

def self.[](op_name)
  op_name.split("::").reduce(self) do |namespace, const|
    if namespace && namespace.const_defined?(const)
      namespace.const_get(const)
    else
      nil
    end
  end
end