Class: OpenXml::Pptx::Properties::Font

Inherits:
OpenXml::Properties::ComplexProperty
  • Object
show all
Defined in:
lib/openxml/pptx/properties/font.rb

Instance Method Summary collapse

Constructor Details

#initialize(value) ⇒ Font

Returns a new instance of Font.

Raises:

  • (ArgumentError)


11
12
13
14
15
# File 'lib/openxml/pptx/properties/font.rb', line 11

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

Instance Method Details

#invalid_messageObject



17
18
19
# File 'lib/openxml/pptx/properties/font.rb', line 17

def invalid_message
  "Invalid font: value must be a string indicating the typeface"
end