def self.tag_list
  list = {}
  tag_types.each do |context|
    list[context] = tags_on(context)
  end
  list
end

you definitely should use reduce

def self.tag_list
  tag_types.reduce({}) do |memo, context|
    list.merge context => tags_on(context)
  end
end

On Mon, Dec 5, 2016 at 5:06 PM, Kirk Haines <wyhaines / gmail.com> wrote:

> On Mon, Dec 5, 2016 at 5:34 AM, Terry Raimondo <terry.raimondo / gmail.com>
> wrote:
>
>>
>> def self.tag_list
>>   list = {}
>>   tag_types.each do |context|
>>     list[context] = tags_on(context)
>>   end
>>   list
>> end
>>
>> def tag_list
>>   list = {}
>>   tag_types.each do |context|
>>     list[context] = tags_on(context)
>>   end
>>   list
>> end
>>
>>
>>
>
> def self.tag_list
>   list = {}
>   tag_types.each do |context|
>     list[context] = tags_on(context)
>   end
>   list
> end
>
> def tag_list
>   self.class.tag_list
> end
>
>
> Kirk Haines
>
>
> Unsubscribe: <mailto:ruby-talk-request / ruby-lang.org?subject=unsubscribe>
> <http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk>
>
>
(supressed text/html)
Unsubscribe: <mailto:ruby-talk-request / ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk>