Class: OozieJobs::ConfMaker

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(params) ⇒ ConfMaker

Returns a new instance of ConfMaker.



97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
# File 'lib/oozie_jobs.rb', line 97

def initialize(params)
  @conf = ""
  @xb = Builder::XmlMarkup.new(:target => @conf, :indent => 2)
  @xb.configuration do
    params.each do |name, value|
      name = name.to_s unless name.is_a? String
      value = value.to_s unless value.is_a? String
      @xb.property do
        @xb.name(name)
        @xb.value(value)
      end
    end
  end
  return @conf
end

Instance Attribute Details

#confObject (readonly)

Returns the value of attribute conf.



95
96
97
# File 'lib/oozie_jobs.rb', line 95

def conf
  @conf
end