Class: OpenEhr::RM::Support::AssumedTypes::String

Inherits:
Object
  • Object
show all
Defined in:
lib/open_ehr/rm/support/assumed_types.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#contentObject (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_integerObject



63
64
65
# File 'lib/open_ehr/rm/support/assumed_types.rb', line 63

def as_integer
  is_integer if is_integer
end

#is_emptyObject



67
68
# File 'lib/open_ehr/rm/support/assumed_types.rb', line 67

def is_empty
end

#is_integerObject



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