Class: Preneeds::AttachmentType
- Inherits:
-
Common::Base
- Object
- Common::Base
- Preneeds::AttachmentType
- Defined in:
- app/models/preneeds/attachment_type.rb
Overview
Models an attachment type from the EOAS service. For use within the BurialForm form.
Instance Attribute Summary collapse
-
#attachment_type_id ⇒ Integer
Attachment type id.
-
#description ⇒ String
Attachment type description.
Attributes inherited from Common::Base
Instance Method Summary collapse
-
#<=>(other) ⇒ Integer
Sort operator Default sort should be by description ascending.
-
#id ⇒ Integer
Alias for :attachment_type_id attribute.
Methods inherited from Common::Base
#changed, #changed?, #changes, default_sort, filterable_attributes, #initialize, max_per_page, per_page, sortable_attributes
Constructor Details
This class inherits a constructor from Common::Base
Instance Attribute Details
#attachment_type_id ⇒ Integer
Returns attachment type id.
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'app/models/preneeds/attachment_type.rb', line 14 class AttachmentType < Common::Base attribute :attachment_type_id, Integer attribute :description, String # Alias for :attachment_type_id attribute # # @return [Integer] attachment type id # def id end # Sort operator # Default sort should be by description ascending # # @return [Integer] -1, 0, or 1 # def <=>(other) description <=> other.description end end |
#description ⇒ String
Returns attachment type description.
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'app/models/preneeds/attachment_type.rb', line 14 class AttachmentType < Common::Base attribute :attachment_type_id, Integer attribute :description, String # Alias for :attachment_type_id attribute # # @return [Integer] attachment type id # def id end # Sort operator # Default sort should be by description ascending # # @return [Integer] -1, 0, or 1 # def <=>(other) description <=> other.description end end |
Instance Method Details
#<=>(other) ⇒ Integer
Sort operator Default sort should be by description ascending
31 32 33 |
# File 'app/models/preneeds/attachment_type.rb', line 31 def <=>(other) description <=> other.description end |
#id ⇒ Integer
Alias for :attachment_type_id attribute
22 23 24 |
# File 'app/models/preneeds/attachment_type.rb', line 22 def id end |