Actually, I believe this could be boiled down to @metrics.fetch(component.key, nil).present?

--
Randy Antler
Senior Software Engineer, Platform Team
New Relic Seattle Office
rantler@newrelic.com
skype: tantlerur

On Oct 3, 2013, at 11:35 AM, Jason Stenhouse <notifications@github.com> wrote:

> In lib/newrelic_platform_binding/request.rb:
> 
> >          end
> >          return components_array
> >        end
> >  
> > +      def component_has_metrics?(component)
> > +        return true if @metrics.has_key?(component.key) && @metrics[component.key].size > 0
> > +        return false
> Could you simplify this to @metrics.has_key?(component.key) && @metrics[component.key].size > 0 without the return statements? And is there an .empty? check instead of the size comparison?
> 
> —
> Reply to this email directly or view it on GitHub.
>