Module: Cdss::Concerns::WellReadingAttributes
- Included in:
- Models::Reading
- Defined in:
- lib/cdss/concerns/well_reading_attributes.rb
Overview
A concern module that adds well reading-related attributes to classes.
This module provides a comprehensive set of standardized attributes for well reading data, including identification, location, measurement, and publication information. When included in a class, it dynamically adds accessor methods for these attributes.
Constant Summary collapse
- WELL_ATTRIBUTES =
Predefined list of well reading attributes
%i[ well_id well_name division water_district county management_district designated_basin publication depth_to_water measuring_point_above_land_surface measurement_date depth_water_below_land_surface elevation_of_water delta published ].freeze
Class Method Summary collapse
-
.included(base) ⇒ Object
Dynamically adds accessor methods when the module is included in a class.
Instance Method Summary collapse
-
#well_reading? ⇒ Boolean
Checks if the instance has a valid well reading.
Class Method Details
.included(base) ⇒ Object
Dynamically adds accessor methods when the module is included in a class
40 41 42 43 44 |
# File 'lib/cdss/concerns/well_reading_attributes.rb', line 40 def self.included(base) base.class_eval do attr_accessor(*WELL_ATTRIBUTES) end end |
Instance Method Details
#well_reading? ⇒ Boolean
Checks if the instance has a valid well reading
51 52 53 |
# File 'lib/cdss/concerns/well_reading_attributes.rb', line 51 def well_reading? !well_id.nil? end |