Class: Preneeds::Cemetery
- Inherits:
-
Common::Base
- Object
- Common::Base
- Preneeds::Cemetery
- Defined in:
- app/models/preneeds/cemetery.rb
Overview
Models a cemetery from the EOAS service. For use within the BurialForm form.
Instance Attribute Summary collapse
-
#cemetery_type ⇒ String
Cemetery type; one of ‘N’, ‘S’, ‘I’, ‘A’, ‘M’.
-
#name ⇒ String
Name of cemetery.
-
#num ⇒ String
Cemetery number.
Attributes inherited from Common::Base
Instance Method Summary collapse
-
#<=>(other) ⇒ Integer
Sort operator.
-
#id ⇒ String
Alias of #num.
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
#cemetery_type ⇒ String
Returns cemetery type; one of ‘N’, ‘S’, ‘I’, ‘A’, ‘M’.
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'app/models/preneeds/cemetery.rb', line 16 class Cemetery < Common::Base attribute :cemetery_type, String attribute :name, String attribute :num, String # Alias of #num # @return [String] cemetery number # def id num end # Sort operator. Default sort should be by name ascending # # @return [Integer] -1, 0, or 1 # def <=>(other) name <=> other.name end end |
#name ⇒ String
Returns name of cemetery.
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'app/models/preneeds/cemetery.rb', line 16 class Cemetery < Common::Base attribute :cemetery_type, String attribute :name, String attribute :num, String # Alias of #num # @return [String] cemetery number # def id num end # Sort operator. Default sort should be by name ascending # # @return [Integer] -1, 0, or 1 # def <=>(other) name <=> other.name end end |
#num ⇒ String
Returns cemetery number.
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'app/models/preneeds/cemetery.rb', line 16 class Cemetery < Common::Base attribute :cemetery_type, String attribute :name, String attribute :num, String # Alias of #num # @return [String] cemetery number # def id num end # Sort operator. Default sort should be by name ascending # # @return [Integer] -1, 0, or 1 # def <=>(other) name <=> other.name end end |
Instance Method Details
#<=>(other) ⇒ Integer
Sort operator. Default sort should be by name ascending
32 33 34 |
# File 'app/models/preneeds/cemetery.rb', line 32 def <=>(other) name <=> other.name end |
#id ⇒ String
Alias of #num
24 25 26 |
# File 'app/models/preneeds/cemetery.rb', line 24 def id num end |