Class: OpenXml::DrawingML::Properties::FontProperty

Inherits:
Properties::ComplexProperty
  • Object
show all
Defined in:
lib/openxml/drawingml/properties/font_property.rb

Instance Method Summary collapse

Constructor Details

#initialize(value) ⇒ FontProperty

Returns a new instance of FontProperty.

Raises:

  • (ArgumentError)


8
9
10
11
12
# File 'lib/openxml/drawingml/properties/font_property.rb', line 8

def initialize(value)
  super()
  raise ArgumentError, invalid_message unless value.is_a?(String)
  self.typeface = value
end

Instance Method Details

#invalid_messageObject



14
15
16
# File 'lib/openxml/drawingml/properties/font_property.rb', line 14

def invalid_message
  "Invalid #{name}: value must be a string indicating the typeface"
end