Module: AgentHelpers

Defined in:
lib/agent_helpers.rb,
lib/agent_helpers/engine.rb,
lib/agent_helpers/version.rb,
app/helpers/agent_helpers/application_helper.rb

Defined Under Namespace

Modules: ApplicationHelper, DetectorHelper Classes: ApplicationController, Detector, Engine

Constant Summary collapse

VERSION =
"0.0.4"

Class Method Summary collapse

Class Method Details

.const_missing(name) ⇒ Object



5
6
7
8
9
10
11
12
13
14
15
# File 'lib/agent_helpers.rb', line 5

def self.const_missing(name)
  filepath = "#{File.dirname(__FILE__)}/agent_helpers/#{::StringCases.camel_to_snake(name)}.rb"
  
  if File.exists?(filepath)
    require filepath
    raise LoadError, "Still not defined: #{name}" unless ::AgentHelpers.const_defined?(name)
    return ::AgentHelpers.const_get(name)
  end
  
  super
end