Sha256: 2e923413d4d692b492c9b0a722cbaf4e0404ad463704971d5e1aad49461ae394

Contents?: true

Size: 817 Bytes

Versions: 8

Compression:

Stored size: 817 Bytes

Contents

module WashoutBuilderMethodReturnTypeHelper
  def create_html_public_method_return_type(xml, pre, output)
    if !output.nil?
      complex_class = output[0].find_complex_class_name
      if WashoutBuilder::Type::BASIC_TYPES.include?(output[0].type)
        xml.span('class' => 'blue') { |y| y << "#{output[0].type}" }
      else
        html_public_method_complex_type(pre, output, complex_class)
      end
    else
      pre << 'void'
    end
  end

  def html_public_method_complex_type(pre, output, complex_class)
    return if complex_class.nil?
    if output[0].multiplied == false
      complex_return_type = "#{complex_class}"
    else
      complex_return_type = "Array of #{complex_class}"
    end
    pre << "<a href='##{complex_class}'><span class='lightBlue'>#{complex_return_type}</span></a>"
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
washout_builder-0.15.8 app/helpers/washout_builder_method_return_type_helper.rb
washout_builder-0.15.7 app/helpers/washout_builder_method_return_type_helper.rb
washout_builder-0.15.6 app/helpers/washout_builder_method_return_type_helper.rb
washout_builder-0.15.5 app/helpers/washout_builder_method_return_type_helper.rb
washout_builder-0.15.4 app/helpers/washout_builder_method_return_type_helper.rb
washout_builder-0.15.3 app/helpers/washout_builder_method_return_type_helper.rb
washout_builder-0.15.1 app/helpers/washout_builder_method_return_type_helper.rb
washout_builder-0.15.0 app/helpers/washout_builder_method_return_type_helper.rb