Class: OpenEHR::AssumedLibraryTypes::Timezone
- Inherits:
-
Object
- Object
- OpenEHR::AssumedLibraryTypes::Timezone
- Defined in:
- lib/open_ehr/assumed_library_types.rb
Overview
end of Interval
Instance Attribute Summary collapse
-
#hour ⇒ Object
(also: #hours)
readonly
Returns the value of attribute hour.
-
#minute ⇒ Object
(also: #minutes)
readonly
Returns the value of attribute minute.
-
#value ⇒ Object
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(value) ⇒ Timezone
constructor
A new instance of Timezone.
- #sign ⇒ Object
- #to_s ⇒ Object (also: #as_string)
Constructor Details
#initialize(value) ⇒ Timezone
Returns a new instance of Timezone.
91 92 93 |
# File 'lib/open_ehr/assumed_library_types.rb', line 91 def initialize(value) self.value = value end |
Instance Attribute Details
#hour ⇒ Object (readonly) Also known as: hours
Returns the value of attribute hour.
89 90 91 |
# File 'lib/open_ehr/assumed_library_types.rb', line 89 def hour @hour end |
#minute ⇒ Object (readonly) Also known as: minutes
Returns the value of attribute minute.
89 90 91 |
# File 'lib/open_ehr/assumed_library_types.rb', line 89 def minute @minute end |
#value ⇒ Object
Returns the value of attribute value.
89 90 91 |
# File 'lib/open_ehr/assumed_library_types.rb', line 89 def value @value end |
Instance Method Details
#sign ⇒ Object
113 114 115 116 117 118 119 120 121 122 |
# File 'lib/open_ehr/assumed_library_types.rb', line 113 def sign unless @hour return nil end if @hour < 0 return -1 else return +1 end end |
#to_s ⇒ Object Also known as: as_string
124 125 126 |
# File 'lib/open_ehr/assumed_library_types.rb', line 124 def to_s return value end |