Sha256: ea2e5f3fd98bb686daf6d8bbe0e3ea96794184056244c7f55cee1a4d3c7e42dd

Contents?: true

Size: 875 Bytes

Versions: 6

Compression:

Stored size: 875 Bytes

Contents

module WashoutBuilderComplexTypeHelper
  
  
  def create_element_type_html(pre, element)
    element.type = "string" if element.type == "text"
    element.type = "integer" if element.type == "int"
     if WashoutBuilder::Type::BASIC_TYPES.include?(element.type)
        pre << "<span class='blue'>#{element.type}</span>&nbsp;<span class='bold'>#{element.name}</span>"
      else
        create_complex_element_type_html(pre, element)
      end
  end
  
  
  def create_complex_element_type_html(pre, element)
    complex_class = element.get_complex_class_name
    unless  complex_class.nil?
      complex_class_content =  element.multiplied == false ? "#{complex_class}" : "Array of #{complex_class}"
      pre << "<a href='##{complex_class}'><span class='lightBlue'>#{complex_class_content}</span></a>&nbsp;<span class='bold'>#{element.name}</span>"
    end
  end

end


  

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
washout_builder-0.14.0 app/helpers/washout_builder_complex_type_helper.rb
washout_builder-0.13.9 app/helpers/washout_builder_complex_type_helper.rb
washout_builder-0.13.8 app/helpers/washout_builder_complex_type_helper.rb
washout_builder-0.13.7 app/helpers/washout_builder_complex_type_helper.rb
washout_builder-0.13.4 app/helpers/washout_builder_complex_type_helper.rb
washout_builder-0.13.5 app/helpers/washout_builder_complex_type_helper.rb