Class: NominetEPP::Domain::Request
- Defined in:
- lib/nominet-epp/requests/domain/request.rb
Instance Attribute Summary
Attributes inherited from Request
Instance Method Summary collapse
Methods inherited from Request
#command_name, #namespaces, #xml_namespace, #xml_node
Instance Method Details
#validate_period(period) ⇒ Object
4 5 6 7 8 9 10 11 |
# File 'lib/nominet-epp/requests/domain/request.rb', line 4 def validate_period(period) unit = period[-1,1] val = period.to_i if unit == 'y' && val > 10 raise ArgumentError, "maximum period accepted by Nominet is 10 years" end end |