Module: OpenXml::HasAttributes

Included in:
Element, Properties::ComplexProperty, Properties::ContainerProperty
Defined in:
lib/openxml/has_attributes.rb

Defined Under Namespace

Modules: ClassMethods

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ Object



6
7
8
# File 'lib/openxml/has_attributes.rb', line 6

def self.included(base)
  base.extend(ClassMethods)
end

Instance Method Details

#attributesObject



65
66
67
# File 'lib/openxml/has_attributes.rb', line 65

def attributes
  self.class.attributes
end

#render?Boolean

Returns:

  • (Boolean)


61
62
63
# File 'lib/openxml/has_attributes.rb', line 61

def render?
  attributes.keys.map(&method(:send)).any?
end

#required_attributesObject



69
70
71
# File 'lib/openxml/has_attributes.rb', line 69

def required_attributes
  self.class.required_attributes
end