Class: OpenEHR::AssumedLibraryTypes::Timezone

Inherits:
Object
  • Object
show all
Defined in:
lib/open_ehr/assumed_library_types.rb

Overview

end of Interval

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#hourObject (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

#minuteObject (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

#valueObject

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

#signObject



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_sObject Also known as: as_string



124
125
126
# File 'lib/open_ehr/assumed_library_types.rb', line 124

def to_s
  return value
end