Module: OpenEHR::AM::Archetype::ConstraintModel::Primitive::CDateModule
Instance Attribute Summary collapse
-
#day_validity ⇒ Object
Returns the value of attribute day_validity.
-
#list ⇒ Object
Returns the value of attribute list.
-
#month_validity ⇒ Object
Returns the value of attribute month_validity.
-
#pattern ⇒ Object
Returns the value of attribute pattern.
-
#range ⇒ Object
Returns the value of attribute range.
-
#timezone_validity ⇒ Object
Returns the value of attribute timezone_validity.
Instance Method Summary collapse
Instance Attribute Details
#day_validity ⇒ Object
Returns the value of attribute day_validity.
183 184 185 |
# File 'lib/openehr/am/archetype/constraint_model/primitive.rb', line 183 def day_validity @day_validity end |
#list ⇒ Object
Returns the value of attribute list.
183 184 185 |
# File 'lib/openehr/am/archetype/constraint_model/primitive.rb', line 183 def list @list end |
#month_validity ⇒ Object
Returns the value of attribute month_validity.
184 185 186 |
# File 'lib/openehr/am/archetype/constraint_model/primitive.rb', line 184 def month_validity @month_validity end |
#pattern ⇒ Object
Returns the value of attribute pattern.
184 185 186 |
# File 'lib/openehr/am/archetype/constraint_model/primitive.rb', line 184 def pattern @pattern end |
#range ⇒ Object
Returns the value of attribute range.
183 184 185 |
# File 'lib/openehr/am/archetype/constraint_model/primitive.rb', line 183 def range @range end |
#timezone_validity ⇒ Object
Returns the value of attribute timezone_validity.
183 184 185 |
# File 'lib/openehr/am/archetype/constraint_model/primitive.rb', line 183 def timezone_validity @timezone_validity end |
Instance Method Details
#valid_value?(value) ⇒ Boolean
205 206 207 208 209 210 |
# File 'lib/openehr/am/archetype/constraint_model/primitive.rb', line 205 def valid_value?(value) date = as_date(value) return false if date.nil? date_fields_valid?(date) && constrained_date?(date) end |
#validity_is_range? ⇒ Boolean
201 202 203 |
# File 'lib/openehr/am/archetype/constraint_model/primitive.rb', line 201 def validity_is_range? return !@range.nil? end |