Class: OpenXml::Properties::PositiveIntegerProperty
- Inherits:
-
IntegerProperty
- Object
- BaseProperty
- ValueProperty
- IntegerProperty
- OpenXml::Properties::PositiveIntegerProperty
- Defined in:
- lib/openxml/properties/positive_integer_property.rb
Instance Attribute Summary
Attributes inherited from ValueProperty
Attributes inherited from BaseProperty
Instance Method Summary collapse
Methods inherited from ValueProperty
#initialize, #render?, #to_xml
Methods inherited from BaseProperty
#default_name, #default_tag, #initialize, #name, name, namespace, #namespace, #render?, tag, #tag, tag_is_one_of, #validate_tag
Constructor Details
This class inherits a constructor from OpenXml::Properties::ValueProperty
Instance Method Details
#invalid_message ⇒ Object
9 10 11 |
# File 'lib/openxml/properties/positive_integer_property.rb', line 9 def "Invalid #{name}: must be a positive integer" end |
#valid? ⇒ Boolean
5 6 7 |
# File 'lib/openxml/properties/positive_integer_property.rb', line 5 def valid? super && value >= 0 end |