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.
93 94 95 |
# File 'lib/openehr/assumed_library_types.rb', line 93 def initialize(value) self.value = value end |
Instance Attribute Details
#hour ⇒ Object (readonly) Also known as: hours
Returns the value of attribute hour.
91 92 93 |
# File 'lib/openehr/assumed_library_types.rb', line 91 def hour @hour end |
#minute ⇒ Object (readonly) Also known as: minutes
Returns the value of attribute minute.
91 92 93 |
# File 'lib/openehr/assumed_library_types.rb', line 91 def minute @minute end |
#value ⇒ Object
Returns the value of attribute value.
91 92 93 |
# File 'lib/openehr/assumed_library_types.rb', line 91 def value @value end |
Instance Method Details
#sign ⇒ Object
115 116 117 118 119 120 121 122 123 124 |
# File 'lib/openehr/assumed_library_types.rb', line 115 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
126 127 128 |
# File 'lib/openehr/assumed_library_types.rb', line 126 def to_s return value end |