Skip to content

Commit

Permalink
small fix public method return showing complex types
Browse files Browse the repository at this point in the history
  • Loading branch information
bogdanRada committed Dec 17, 2013
1 parent 99a7617 commit 0ccbcf4
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 8 deletions.
12 changes: 9 additions & 3 deletions app/helpers/washout_builder_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -181,12 +181,18 @@ def create_html_public_method(xml, operation, formats)
xml.p "Return value:"
xml.ul {
xml.li {
if !formats[:out].nil?

unless formats[:out].nil?
complex_class = formats[:out][0].get_complex_class_name
if WashoutBuilder::Type::BASIC_TYPES.include?(formats[:out][0].type)
xml.span("class" => "pre") { |xml| xml.span("class" => "blue") { |sp| sp << "#{formats[:out][0].type}" } }
else
xml.span("class" => "pre") { xml.a("href" => "##{formats[:out][0].type}") { |xml| xml.span("class" => "lightBlue") { |y| y<<"#{formats[:out][0].type}" } } }
unless complex_class.nil?
if formats[:out][0].multiplied == false
xml.span("class" => "pre") { xml.a("href" => "##{complex_class}") { |xml| xml.span("class" => "lightBlue") { |y| y<<"#{complex_class}" } } }
else
xml.span("class" => "pre") { xml.a("href" => "##{complex_class}") { |xml| xml.span("class" => "lightBlue") { |y| y<<"Array of #{complex_class}" } } }
end
end
end
else
xml.span("class" => "pre") { |sp| sp << "void" }
Expand Down
4 changes: 2 additions & 2 deletions lib/washout_builder/document/generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,9 @@ def fault_types
defined = defined.collect {|operation, formats| formats[:raises].is_a?(Array) ? formats[:raises] : [formats[:raises]] }.flatten.select { |x| x.is_a?(Class) && (x.ancestors.include?(WashOut::SOAPError) || x.ancestors.include?(SOAPError) ) } unless defined.blank?
fault_types = []
if defined.blank?
defined = [SOAPError]
defined = [WashOut::SOAPError]
else
defined << SOAPError
defined << WashOut::SOAPError
end
defined.each{ |exception_class| exception_class.get_fault_class_ancestors( fault_types, true)} unless defined.blank?
complex_types = extract_nested_complex_types_from_exceptions(fault_types)
Expand Down
2 changes: 1 addition & 1 deletion lib/washout_builder/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module WashoutBuilder
VERSION = "0.10.3"
VERSION = "0.10.4"
end
4 changes: 2 additions & 2 deletions washout_builder.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ Gem::Specification.new do |s|
s.name = "washout_builder"
s.version = WashoutBuilder::VERSION
s.platform = Gem::Platform::RUBY
s.summary = "WashOut Soap Service Documentation builder (extends WashOut https://github.com/inossidabile/wash_out/)"
s.summary = "WashOut Soap Service HTML-Documentation generator (extends WashOut https://github.com/inossidabile/wash_out/)"
s.email = "[email protected]"
s.homepage = "http://github.com/bogdanRada/washout_builder/"
s.description = "WashOut Soap Service Documentation builder (extends WashOut https://github.com/inossidabile/wash_out/) "
s.description = "WashOut Soap Service HTML-Documentation generator (extends WashOut https://github.com/inossidabile/wash_out/) "
s.authors = ["bogdanRada"]
s.date = "2013-11-20"

Expand Down

0 comments on commit 0ccbcf4

Please sign in to comment.