Class: XMLPipe2::SphinxConf

Inherits:
Object
  • Object
show all
Defined in:
lib/xml_pipe2/sphinx_conf.rb

Constant Summary collapse

TEMPLATE =
File.read(File.expand_path(File.dirname(__FILE__) + '/../../erb/sphinx.conf.erb'))

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(clazz) ⇒ SphinxConf

Returns a new instance of SphinxConf.



7
8
9
# File 'lib/xml_pipe2/sphinx_conf.rb', line 7

def initialize(clazz)
  @clazz = clazz
end

Instance Attribute Details

#clazzObject (readonly)

Returns the value of attribute clazz.



11
12
13
# File 'lib/xml_pipe2/sphinx_conf.rb', line 11

def clazz
  @clazz
end

Instance Method Details

#generateObject



13
14
15
# File 'lib/xml_pipe2/sphinx_conf.rb', line 13

def generate
  ERB.new(TEMPLATE).result(binding)
end