ruby文件生成html解决方法

ruby文件生成html
想写个ruby文件,之后用这个文件来操作ruby的配置文件,使配置文件生成html文档给做前台的用!
配置文件内容:
require 'app/configuration'
module RubyAMF
  module Configuration
    # => Return Top Level Hash
    # For those scaffolding users out there, who want the top-level object to come as a hash so scaffolding works out of the box.
    # ParameterMappings.scaffolding = false
  
    # => Incoming Remoting Parameter Mappings
    # Incoming Remoting Parameter mappings allow you to map an incoming requests parameters into rails' params hash

    # Here's an example:
    # ParameterMappings.register(:controller => :UserController, :action => :find_friend, :params => { :friend => "[0]['friend']" })
    ClassMappings.register[
      :actionscript  => 'Stock',
      :ruby          => 'Stock',
      :type          => 'active_record',
      :attributes    => ["code", "name"]]
    ClassMappings.register(
      :actionscript  => 'Rolestock',
      :ruby          => 'Rolestock',
      :type          => 'active_record',
      :associations  => ["stock"],
      :attributes    => ["id", "cost", "amount"])
    ClassMappings.register(
      :actionscript  => 'Deal',
      :ruby          => 'Deal',
      :associations  => ["stock"],
      :type          => 'active_record',
      :attributes    => ["price", "amount", "profit", "created_at"])
  end
end

操作文件该如何写呢???
麻烦大家了。
------解决方案--------------------
LZ,你好像diy能力很强的嘛。

下次回贴时写出解决方法吧,分享给大家。