Sha256: 65573c1e31671350361557d65c9ab578650a45afec03c17d607bb519296bfdbf

Contents?: true

Size: 1.13 KB

Versions: 17

Compression:

Stored size: 1.13 KB

Contents

module Nucleon
module Plugin
class Event < Nucleon.plugin_class(:nucleon, :base)

  #-----------------------------------------------------------------------------
  # Event plugin interface

  
  #-----------------------------------------------------------------------------
  # Property accessor / modifiers

  #-----------------------------------------------------------------------------
  # Operations
  
  def render
    return name
  end
  
  #---
 
  def check(source)
    # Implement in sub classes
    return true
  end
  
  #-----------------------------------------------------------------------------
  # Utilities
  
  def self.build_info(namespace, plugin_type, data)  
    data = data.split(/\s*,\s*/) if data.is_a?(String)
    return super(namespace, plugin_type, data)
  end
  
  #---
   
  def self.translate(data)
    options = super(data)
    
    case data        
    when String
      components = data.split(':')
      
      options[:provider] = components.shift
      options[:string]   = components.join(':')
      
      logger.debug("Translating event options: #{options.inspect}") 
    end
    return options  
  end
end
end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
nucleon-0.2.16 lib/core/plugin/event.rb
nucleon-0.2.15 lib/core/plugin/event.rb
nucleon-0.2.14 lib/core/plugin/event.rb
nucleon-0.2.13 lib/core/plugin/event.rb
nucleon-0.2.12 lib/core/plugin/event.rb
nucleon-0.2.11 lib/core/plugin/event.rb
nucleon-0.2.10 lib/core/plugin/event.rb
nucleon-0.2.9 lib/core/plugin/event.rb
nucleon-0.2.8 lib/core/plugin/event.rb
nucleon-0.2.7 lib/core/plugin/event.rb
nucleon-0.2.6 lib/core/plugin/event.rb
nucleon-0.2.5 lib/core/plugin/event.rb
nucleon-0.2.4 lib/core/plugin/event.rb
nucleon-0.2.3 lib/core/plugin/event.rb
nucleon-0.2.2 lib/core/plugin/event.rb
nucleon-0.2.1 lib/core/plugin/event.rb
nucleon-0.2.0 lib/core/plugin/event.rb