Class: OpenEHR::AssumedLibraryTypes::Timezone
- Inherits:
-
Object
- Object
- OpenEHR::AssumedLibraryTypes::Timezone
- Defined in:
- lib/openehr/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.
122 123 124 |
# File 'lib/openehr/assumed_library_types.rb', line 122 def initialize(value) self.value = value end |
Instance Attribute Details
#hour ⇒ Object (readonly) Also known as: hours
Returns the value of attribute hour.
120 121 122 |
# File 'lib/openehr/assumed_library_types.rb', line 120 def hour @hour end |
#minute ⇒ Object (readonly) Also known as: minutes
Returns the value of attribute minute.
120 121 122 |
# File 'lib/openehr/assumed_library_types.rb', line 120 def minute @minute end |
#value ⇒ Object
Returns the value of attribute value.
120 121 122 |
# File 'lib/openehr/assumed_library_types.rb', line 120 def value @value end |
Instance Method Details
#sign ⇒ Object
144 145 146 147 148 149 150 151 152 153 |
# File 'lib/openehr/assumed_library_types.rb', line 144 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
155 156 157 |
# File 'lib/openehr/assumed_library_types.rb', line 155 def to_s return value end |