Class: OpenXml::DrawingML::Properties::PercentageProperty

Inherits:
ValueProperty
  • Object
show all
Defined in:
lib/openxml/drawingml/properties/percentage_property.rb

Instance Method Summary collapse

Instance Method Details

#invalid_messageObject



10
11
12
# File 'lib/openxml/drawingml/properties/percentage_property.rb', line 10

def invalid_message
  "#{value.inspect} is an invalid value for #{name}; it must be a percentage"
end

#valid?Boolean

Returns:

  • (Boolean)


6
7
8
# File 'lib/openxml/drawingml/properties/percentage_property.rb', line 6

def valid?
  value.is_a?(String) && value =~ OpenXml::DrawingML::ST_Percentage
end