Class: Adhearsion::PunchblockPlugin

Inherits:
Plugin show all
Extended by:
ActiveSupport::Autoload
Defined in:
lib/adhearsion/punchblock_plugin.rb,
lib/adhearsion/punchblock_plugin/initializer.rb

Defined Under Namespace

Classes: Initializer

Constant Summary

Constant Summary

Constants inherited from Plugin

Adhearsion::Plugin::METHODS_OPTIONS

Class Method Summary (collapse)

Methods inherited from Plugin

add, config, count, delete, delete_all, generators, init, init_plugins, initializers, load_tasks, plugin_name, plugin_name=, reset_rake_tasks, run, run_plugins, runners, show_description, subclasses, tasks

Class Method Details

+ (Object) execute_component(command, timeout = 60)



45
46
47
48
49
50
# File 'lib/adhearsion/punchblock_plugin.rb', line 45

def execute_component(command, timeout = 60)
  client.execute_command command, :async => true
  response = command.response timeout
  raise response if response.is_a? Exception
  command
end

+ (Object) validate_number(value)



40
41
42
43
# File 'lib/adhearsion/punchblock_plugin.rb', line 40

def validate_number(value)
  return 1.0/0.0 if ["Infinity", 1.0/0.0].include? value
  value.to_i
end