Class: Stupidedi::Schema::SegmentReq
- Defined in:
- lib/stupidedi/schema/segment_req.rb
Overview
The 5010 X12 “data segment requirement designator”s include
M - Mandatory
O - Optional
The HIPAA implementation guides “industry usage” include
SITUATIONAL
REQUIRED
Instance Method Summary collapse
- #forbidden? ⇒ Boolean
-
#initialize(required, forbidden, to_s) ⇒ SegmentReq
constructor
A new instance of SegmentReq.
- #inspect ⇒ String
- #optional? ⇒ Boolean
- #pretty_print(q) ⇒ void
- #required? ⇒ Boolean
Constructor Details
#initialize(required, forbidden, to_s) ⇒ SegmentReq
Returns a new instance of SegmentReq.
14 15 16 17 |
# File 'lib/stupidedi/schema/segment_req.rb', line 14 def initialize(required, forbidden, to_s) @required, @forbidden, @to_s = required, forbidden, to_s end |
Instance Method Details
#forbidden? ⇒ Boolean
23 24 25 |
# File 'lib/stupidedi/schema/segment_req.rb', line 23 def forbidden? @forbidden end |
#inspect ⇒ String
37 38 39 |
# File 'lib/stupidedi/schema/segment_req.rb', line 37 def inspect @to_s end |
#optional? ⇒ Boolean
27 28 29 |
# File 'lib/stupidedi/schema/segment_req.rb', line 27 def optional? not (@required or @forbidden) end |
#pretty_print(q) ⇒ void
This method returns an undefined value.
32 33 34 |
# File 'lib/stupidedi/schema/segment_req.rb', line 32 def pretty_print(q) q.text @to_s end |
#required? ⇒ Boolean
19 20 21 |
# File 'lib/stupidedi/schema/segment_req.rb', line 19 def required? @required end |