module Turnstile::Commands
Public Class Methods
command(name)
click to toggle source
# File lib/turnstile/commands.rb, line 11 def command(name) command_candidate = "#{self.name}::#{ActiveSupport::Inflector.camelize(name)}" ActiveSupport::Inflector.constantize command_candidate rescue NameError raise CommandNotFoundError, "Command #{name} is not found, #{command_candidate}" end