Module: RBoss::Component

Included in:
Datasource, DeployFolder, HypersonicReplacer, JBossWeb, JMX, ModCluster, ProfileFolder, Resource, RunConf, ServiceScript, Slimming, XADatasource
Defined in:
lib/rboss/components/component.rb

Overview

A base helper module for JBoss Components

author: Marcelo Guimarães <[email protected]>

Instance Method Summary collapse

Instance Method Details

#configure(config) ⇒ Object



43
44
45
# File 'lib/rboss/components/component.rb', line 43

def configure config
  @config = config
end

#initialize(jboss, logger, config) ⇒ Object



36
37
38
39
40
41
# File 'lib/rboss/components/component.rb', line 36

def initialize jboss, logger, config
  @jboss = jboss
  @logger = logger
  config = defaults.merge! config if self.respond_to? :defaults
  configure(config)
end

#load_yaml(resource) ⇒ Object



53
54
55
# File 'lib/rboss/components/component.rb', line 53

def load_yaml resource
  YAML::load_file File::join(File.dirname(__FILE__), "#{resource}.yaml")
end

#new_file_processorObject

Creates a FileProcessor using the same logger and jboss path as the variable



49
50
51
# File 'lib/rboss/components/component.rb', line 49

def new_file_processor
  RBoss::FileProcessor::new :logger => @logger, :var => @jboss
end