class YleTf::Plugin

Constants

DEFAULT_BACKEND
DEFAULT_COMMAND

Public Class Methods

action_hook(&block) click to toggle source
# File lib/yle_tf/plugin.rb, line 24
def self.action_hook(&block)
  action_hooks << block
end
action_hooks() click to toggle source
# File lib/yle_tf/plugin.rb, line 20
def self.action_hooks
  @action_hooks ||= []
end
backend(type, &block) click to toggle source
# File lib/yle_tf/plugin.rb, line 54
def self.backend(type, &block)
  type = type.to_s if type.is_a?(Symbol)
  backends[type] = block
end
backends() click to toggle source
# File lib/yle_tf/plugin.rb, line 50
def self.backends
  @backends ||= {}
end
command(name, synopsis, &block) click to toggle source
# File lib/yle_tf/plugin.rb, line 32
def self.command(name, synopsis, &block)
  name = name.to_s if name.is_a?(Symbol)
  commands[name] = {
    synopsis: synopsis,
    proc:     block
  }
end
commands() click to toggle source
# File lib/yle_tf/plugin.rb, line 28
def self.commands
  @commands ||= {}
end
config_context(context = nil) click to toggle source
# File lib/yle_tf/plugin.rb, line 45
def self.config_context(context = nil)
  @config_context = context if context
  @config_context || {}
end
default_config(config = nil) click to toggle source
# File lib/yle_tf/plugin.rb, line 40
def self.default_config(config = nil)
  @default_config = config if config
  @default_config || {}
end
manager() click to toggle source
# File lib/yle_tf/plugin.rb, line 12
def self.manager
  @manager ||= Manager.new
end
register() click to toggle source
# File lib/yle_tf/plugin.rb, line 16
def self.register
  Plugin.manager.register(self)
end