45
46
47
48
49
50
51
52
53
54
55
56
57
|
# File 'lib/banana_docs/helpers.rb', line 45
def param(name, description, type, format, options = {})
obs = options[:obs].nil? ? '-' : options[:obs]
required, clazz = options[:required] ? ['Sim', 'badge badge-important'] : ['Não', 'badge badge-info']
content_tag(:tr) do
content_tag(:td, build_span(name, 'label label-inverse')) +
content_tag(:td, encode(description)) +
content_tag(:td, encode(type)) +
content_tag(:td, encode(format)) +
content_tag(:td, encode(obs)) +
content_tag(:td, build_span(required, clazz))
end
end
|