twingly / twingly-search-api-ruby

:gem: Twingly Blog Search API in Ruby
https://developer.twingly.com/
MIT License
4 stars 0 forks source link

Inconsistent formating in Result#inspect #79

Closed jage closed 5 years ago

jage commented 6 years ago
#<Twingly::Search::Result:0x3fc870543c10 @posts, @number_of_matches_returned=1000, @number_of_matches_total=2847@incomplete_result=false>

https://github.com/twingly/twingly-search-api-ruby/blob/785d8604c2422eee7a1abc26422649fcdc57f861/lib/twingly/search/result.rb#L38-L43

and:

https://github.com/twingly/twingly-search-api-ruby/blob/785d8604c2422eee7a1abc26422649fcdc57f861/lib/twingly/livefeed/result.rb#L26-L35 We should probably do something like this instead:

[
  "@posts",
  "@number_of_matches_returned=#{self.number_of_matches_returned}",
  "@number_of_matches_total=#{self.number_of_matches_total}",
  "@incomplete_result=#{self.incomplete?}",
].join(", ")
jage commented 5 years ago

Duplicate of #66