Class: Stupidedi::Versions::Common::ElementTypes::IdentifierVal::Empty

Inherits:
Valid show all
Defined in:
lib/stupidedi/versions/common/element_types/id.rb

Instance Attribute Summary

Attributes inherited from Stupidedi::Values::SimpleElementVal

#position, #usage

Instance Method Summary collapse

Methods inherited from Valid

#==, #coerce, #copy, #map, #valid?

Methods included from Operators::Wrappers

#wrappers

Methods included from Operators::Unary

#unary_operators

Methods included from Operators::Relational

#relational_operators

Methods inherited from Stupidedi::Versions::Common::ElementTypes::IdentifierVal

empty, #id?, #too_long?, #too_short?, value

Methods inherited from Stupidedi::Values::SimpleElementVal

#allowed?, #component?, #copy, #date?, #id?, #initialize, #leaf?, #numeric?, #simple?, #string?, #time?, #to_s, #too_long?, #too_short?, #valid?

Methods inherited from Stupidedi::Values::AbstractElementVal

#element?, #size

Methods inherited from Stupidedi::Values::AbstractVal

#blank?, #characters, #component?, #composite?, #definition, #descriptor, #element?, #empty?, #functional_group?, #interchange?, #invalid?, #leaf?, #loop?, #present?, #repeated?, #segment?, #separator?, #simple?, #size, #table?, #transaction_set?, #transmission?, #valid?

Methods included from Color

ansi, #ansi

Constructor Details

This class inherits a constructor from Stupidedi::Values::SimpleElementVal

Instance Method Details

#inspectString

:nocov:

Returns:

  • (String)


191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
# File 'lib/stupidedi/versions/common/element_types/id.rb', line 191

def inspect
  id = definition.bind do |d|
    "[#{"% 5s" % d.id}: #{d.name}]".bind do |s|
      if usage.forbidden?
        ansi.forbidden(s)
      elsif usage.required?
        ansi.required(s)
      else
        ansi.optional(s)
      end
    end
  end

  ansi.element("ID.empty#{id}")
end

#to_x12(truncate = true) ⇒ String

Returns:

  • (String)


209
210
211
# File 'lib/stupidedi/versions/common/element_types/id.rb', line 209

def to_x12(truncate = true)
  ""
end

#valueString

Returns:

  • (String)


185
186
187
# File 'lib/stupidedi/versions/common/element_types/id.rb', line 185

def value
  ""
end