Module: OpenEHR::AssumedLibraryTypes::ISO8601DurationModule
- Included in:
- ISO8601Duration, RM::DataTypes::Quantity::DateTime::DvDuration
- Defined in:
- lib/open_ehr/assumed_library_types.rb
Overview
end of ISO8601Timezone
Instance Attribute Summary collapse
-
#days ⇒ Object
Returns the value of attribute days.
-
#fractional_second ⇒ Object
Returns the value of attribute fractional_second.
-
#hours ⇒ Object
Returns the value of attribute hours.
-
#minutes ⇒ Object
Returns the value of attribute minutes.
-
#months ⇒ Object
Returns the value of attribute months.
-
#seconds ⇒ Object
Returns the value of attribute seconds.
-
#weeks ⇒ Object
Returns the value of attribute weeks.
-
#years ⇒ Object
Returns the value of attribute years.
Instance Method Summary collapse
Instance Attribute Details
#days ⇒ Object
Returns the value of attribute days.
520 521 522 |
# File 'lib/open_ehr/assumed_library_types.rb', line 520 def days @days end |
#fractional_second ⇒ Object
Returns the value of attribute fractional_second.
521 522 523 |
# File 'lib/open_ehr/assumed_library_types.rb', line 521 def fractional_second @fractional_second end |
#hours ⇒ Object
Returns the value of attribute hours.
521 522 523 |
# File 'lib/open_ehr/assumed_library_types.rb', line 521 def hours @hours end |
#minutes ⇒ Object
Returns the value of attribute minutes.
521 522 523 |
# File 'lib/open_ehr/assumed_library_types.rb', line 521 def minutes @minutes end |
#months ⇒ Object
Returns the value of attribute months.
520 521 522 |
# File 'lib/open_ehr/assumed_library_types.rb', line 520 def months @months end |
#seconds ⇒ Object
Returns the value of attribute seconds.
521 522 523 |
# File 'lib/open_ehr/assumed_library_types.rb', line 521 def seconds @seconds end |
#weeks ⇒ Object
Returns the value of attribute weeks.
520 521 522 |
# File 'lib/open_ehr/assumed_library_types.rb', line 520 def weeks @weeks end |
#years ⇒ Object
Returns the value of attribute years.
520 521 522 |
# File 'lib/open_ehr/assumed_library_types.rb', line 520 def years @years end |
Instance Method Details
#as_string ⇒ Object
579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 |
# File 'lib/open_ehr/assumed_library_types.rb', line 579 def as_string str = 'P' unless @years.nil? str += @years.to_s + 'Y' end unless @months.nil? str += @months.to_s + 'M' end unless @weeks.nil? str += @weeks.to_s + 'W' end unless @days.nil? str += @days.to_s + 'D' end unless @hours.nil? str += 'T' + @hours.to_s + 'H' unless @minutes.nil? str += @minutes.to_s + 'M' unless @seconds.nil? str += @seconds.to_s unless @fractional_second.nil? str += @fractional_second.to_s[1 .. -1] end str += 'S' end end end return str end |