Class: Zonomi::API::Action
- Inherits:
-
OpenStruct
- Object
- OpenStruct
- Zonomi::API::Action
- Defined in:
- lib/zonomi/api/action.rb
Constant Summary collapse
- ATTRIBUTES =
[:action, :host, :name, :type, :value, :prio, :ttl]
- ACTIONS =
{ set: 'SET', query: 'QUERY', delete: 'DELETE', delete_zone: 'DELETEZONE', query_zones: 'QUERYZONES', }
- TYPES =
{ a: 'A', mx: 'MX', txt: 'TXT', }
Instance Method Summary collapse
Instance Method Details
#attributes ⇒ Object
19 20 21 |
# File 'lib/zonomi/api/action.rb', line 19 def attributes get_allowed_attributes end |
#to_hash ⇒ Object
23 24 25 |
# File 'lib/zonomi/api/action.rb', line 23 def to_hash format_attributes end |
#to_param ⇒ Object
31 32 33 |
# File 'lib/zonomi/api/action.rb', line 31 def to_param attributes_to_params end |
#to_s ⇒ Object
27 28 29 |
# File 'lib/zonomi/api/action.rb', line 27 def to_s attributes_to_params end |
#valid? ⇒ Boolean
35 36 37 |
# File 'lib/zonomi/api/action.rb', line 35 def valid? validate_attributes! end |