Class: Yabeda::Tags

Inherits:
Object
  • Object
show all
Defined in:
lib/yabeda/tags.rb

Overview

Class to merge tags

Class Method Summary collapse

Class Method Details

.build(tags, group_name = nil) ⇒ Object



6
7
8
9
10
11
12
# File 'lib/yabeda/tags.rb', line 6

def self.build(tags, group_name = nil)
  Yabeda.default_tags.dup.tap do |result|
    result.merge!(Yabeda.groups[group_name].default_tags) if group_name
    result.merge!(Yabeda.temporary_tags)
    result.merge!(tags)
  end
end