Module: Germinate::SharedStyleAttributes

Included in:
ArticleFormatter, Hunk, Librarian
Defined in:
lib/germinate/shared_style_attributes.rb

Instance Method Summary collapse

Instance Method Details

#copy_shared_style_attrubutes_from(other) ⇒ Object



18
19
20
21
22
# File 'lib/germinate/shared_style_attributes.rb', line 18

def copy_shared_style_attrubutes_from(other)
  other.shared_style_attributes.each_pair do |key, value|
    self.send(key, value) unless other.send(key).nil?
  end
end

#shared_style_attributesObject



9
10
11
12
13
14
15
16
# File 'lib/germinate/shared_style_attributes.rb', line 9

def shared_style_attributes
  Germinate::SharedStyleAttributes.fattrs.inject({}) { 
    |attributes, key|
    
    attributes[key] = send(key)
    attributes
  }
end