Class: Rocx::Properties::IntegerProperty

Inherits:
ValueProperty show all
Defined in:
lib/rocx/properties/integer_property.rb

Instance Attribute Summary

Attributes inherited from ValueProperty

#value

Attributes inherited from BaseProperty

#value

Instance Method Summary collapse

Methods inherited from ValueProperty

#initialize, #render?, #to_xml

Methods inherited from BaseProperty

#default_name, #default_tag, name, #name, #render?, tag, #tag

Constructor Details

This class inherits a constructor from Rocx::Properties::ValueProperty

Instance Method Details

#invalid_messageObject



9
10
11
# File 'lib/rocx/properties/integer_property.rb', line 9

def invalid_message
  "Invalid #{name}: must be an integer"
end

#valid?Boolean

Returns:



5
6
7
# File 'lib/rocx/properties/integer_property.rb', line 5

def valid?
  value.is_a? Integer
end