Class: OpenEhr::RM::Support::AssumedTypes::String
- Inherits:
-
Object
- Object
- OpenEhr::RM::Support::AssumedTypes::String
- Defined in:
- lib/open_ehr/rm/support/assumed_types.rb
Instance Attribute Summary collapse
-
#content ⇒ Object
readonly
Returns the value of attribute content.
Instance Method Summary collapse
- #as_integer ⇒ Object
-
#initialize(arg) ⇒ String
constructor
A new instance of String.
- #is_empty ⇒ Object
- #is_integer ⇒ Object
Constructor Details
#initialize(arg) ⇒ String
Returns a new instance of String.
59 60 61 |
# File 'lib/open_ehr/rm/support/assumed_types.rb', line 59 def initialize(arg) @content = arg end |
Instance Attribute Details
#content ⇒ Object (readonly)
Returns the value of attribute content.
58 59 60 |
# File 'lib/open_ehr/rm/support/assumed_types.rb', line 58 def content @content end |
Instance Method Details
#as_integer ⇒ Object
63 64 65 |
# File 'lib/open_ehr/rm/support/assumed_types.rb', line 63 def as_integer is_integer if is_integer end |
#is_empty ⇒ Object
67 68 |
# File 'lib/open_ehr/rm/support/assumed_types.rb', line 67 def is_empty end |
#is_integer ⇒ Object
70 71 72 73 74 75 76 |
# File 'lib/open_ehr/rm/support/assumed_types.rb', line 70 def is_integer begin Integer(@content) rescue false end end |