Class: RelatonIec::ReferenceFormat
- Inherits:
-
Object
- Object
- RelatonIec::ReferenceFormat
- Defined in:
- lib/relaton_iec/basic_block/reference_format.rb
Constant Summary collapse
- FORMATS =
%w[external inline footnote callout].freeze
Instance Method Summary collapse
-
#initialize(format) ⇒ ReferenceFormat
constructor
A new instance of ReferenceFormat.
-
#inspect ⇒ Sting
<description>.
- #to_s ⇒ String
Constructor Details
#initialize(format) ⇒ ReferenceFormat
Returns a new instance of ReferenceFormat.
16 17 18 19 20 21 22 |
# File 'lib/relaton_iec/basic_block/reference_format.rb', line 16 def initialize(format) unless FORMATS.include? format Util.warn "Invalid reference format: `#{format}`\n" \ "Alloved reference formats are: `#{FORMATS.join '`, `'}`" end @format = format end |
Instance Method Details
#inspect ⇒ Sting
Returns <description>.
34 35 36 |
# File 'lib/relaton_iec/basic_block/reference_format.rb', line 34 def inspect to_s end |
#to_s ⇒ String
27 28 29 |
# File 'lib/relaton_iec/basic_block/reference_format.rb', line 27 def to_s @format end |