Hi guys,

Actually i just want to remove the bracket (The very first and last 
bracket) because if the bracket still there, it will affect the 
indentation on my yaml output (as the posted output above will be 
converted into yaml format). This is what will happen on my yaml output 
if i do not remove the brackets:

  - - name: Efficiency (Energy)
          type: Objective
          subtype: NIZAMMMMzz
          components:
          - type: ContentBox
            title: Audit
            args:
              :content: |
                None

          - type: ChildListingComponent
            title: "Current Targets for the Efficiency (Energy) 
Objective:"
        - children:
          - name: Routinely monitor energy use
            type: Target
            subtype: ATEEN
            components:
            - type: ContentBox
              title: Summary
              args:
                :content: |
                  None

As you can see, there are double indented dash (- -) on the Efficiency 
(energy) and i want to remove one of those.This is the code i use:

    tar = [ ]
    objective = {"name"=>"#{blank}",
           "type"=>"Objective",
           "subtype"=>"NIZAMMMMzz",
           "components"=>
            [{"type"=>"ContentBox",
              "title"=>"Audit",
              "args"=>{:content=>"None\n"}},
             {"type"=>"ChildListingComponent",
              "title"=>"Current Targets for the #{blank} Objective:"}]}
     tar << objective

     mon = { "children"=>
      [{"name"=>"#{question}",
              "type"=>"Target",
              "subtype"=>"ATEEN",
              "components"=>
               [{"type"=>"ContentBox",
                 "title"=>"Summary",
                 "args"=>{:content=>"None\n"}},
                {"type"=>"ContentBox",
                 "title"=>"Description",
                 "args"=>
                  {:content=>
                    ""}},
                {"type"=>"TargetComponent",
                 "title"=>"None",
                 "args"=>
                  {:start_date=>"#<Date: 2010-08-10 ",
                   :end_date=>"#{due_date}",
                   :state=>"#{status}"}}]}]}
     tar << mon
     pp tar

Nizam

-- 
Posted via http://www.ruby-forum.com/.