Class: Stupidedi::Schema::SimpleElementDef

Inherits:
AbstractElementDef show all
Defined in:
lib/stupidedi/schema/element_def.rb

Overview

See Also:

  • B.1.1.3.1 Data Element

Instance Attribute Summary

Attributes inherited from AbstractElementDef

#description, #id, #name

Instance Method Summary collapse

Methods inherited from AbstractElementDef

#element?

Methods included from Inspect

#inspect

Methods inherited from AbstractDef

#component?, #definition?, #element?, #functional_group?, #interchange?, #loop?, #repeated?, #segment?, #table?, #transaction_set?, #usage?

Instance Method Details

#code_lists(subset = Sets.universal) ⇒ AbstractSet<CodeList>

This is overridden (if needed) by the concrete subclasses. Specifically the "ID" element types have an extra attribute to link the CodeList.



73
74
75
# File 'lib/stupidedi/schema/element_def.rb', line 73

def code_lists(subset = Sets.universal)
  Sets.empty
end

#component_use(requirement, parent = nil) ⇒ ComponentElementUse



65
66
67
# File 'lib/stupidedi/schema/element_def.rb', line 65

def component_use(requirement, parent = nil)
  ComponentElementUse.new(self, requirement, Sets.universal, parent)
end

#composite?Boolean



55
56
57
# File 'lib/stupidedi/schema/element_def.rb', line 55

def composite?
  false
end

#emptySimpleElementVal



41
# File 'lib/stupidedi/schema/element_def.rb', line 41

abstract :empty, :args => %w(position)

#parentSimpleElementUse, ComponentElementUse



38
# File 'lib/stupidedi/schema/element_def.rb', line 38

abstract :parent

#parseSimpleElementVal



47
# File 'lib/stupidedi/schema/element_def.rb', line 47

abstract :parse, :args => %w(string position)

#simple?Boolean



50
51
52
# File 'lib/stupidedi/schema/element_def.rb', line 50

def simple?
  true
end

#simple_use(requirement, repeat_count, parent = nil) ⇒ SimpleElementUse



60
61
62
# File 'lib/stupidedi/schema/element_def.rb', line 60

def simple_use(requirement, repeat_count, parent = nil)
  SimpleElementUse.new(self, requirement, repeat_count, Sets.universal, parent)
end

#valueSimpleElementVal



44
# File 'lib/stupidedi/schema/element_def.rb', line 44

abstract :value, :args => %w(object position)