Module: Buggy::Views

Defined in:
lib/buggy.rb

Instance Method Summary collapse

Instance Method Details

#apilistObject



89
90
91
92
93
94
95
96
97
98
99
100
101
102
# File 'lib/buggy.rb', line 89

def apilist
  xml = Builder::XmlMarkup.new(:target => self)
  xml.instruct!
  xml.buglist do
  for bug in @bugs
    xml.bug do
      xml.id bug.id
      xml.project bug.project
      xml.priority bug.priority
      xml.body bug.body
    end
    end
  end
end

#apishowObject



105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
# File 'lib/buggy.rb', line 105

def apishow
  @headers['Content-Type'] = 'text/xml'
  
  xml = Builder::XmlMarkup.new(:target => self)
  xml.instruct!
  
  xml.buglist do
  xml.bug do
   xml.id @bug.id
   xml.project @bug.project
   xml.priority @bug.priority
   xml.closed @bug.closed
   xml.body @bug.body
  end
  end
end