Class: Attrocity::AttributeTemplateSet

Inherits:
AttributeSet show all
Defined in:
lib/attrocity/attributes/attribute_template_set.rb

Instance Attribute Summary

Attributes inherited from AttributeSet

#attributes

Instance Method Summary collapse

Methods inherited from AttributeSet

#add, #initialize, #to_h

Constructor Details

This class inherits a constructor from Attrocity::AttributeSet

Instance Method Details

#to_attribute_set(data) ⇒ Object



7
8
9
10
11
12
13
# File 'lib/attrocity/attributes/attribute_template_set.rb', line 7

def to_attribute_set(data)
  AttributeSet.new.tap do |set|
    self.attributes.each do |attr_template|
      set << attr_template.to_attribute(data)
    end
  end
end