Sha256: 247bc2c3ec29ccda6fb2ad89349d526bcc52331aec3988c03271744b09295a45

Contents?: true

Size: 745 Bytes

Versions: 18

Compression:

Stored size: 745 Bytes

Contents

module RelatonIec
  def self.respond_to_missing?(method, _include_private)
    method == "ReferenceFormat"
  end

  def self.method_missing(_method, *args)
    ReferenceFormat.new *args
  end

  class ReferenceFormat
    FORMATS = %w[external inline footnote callout].freeze

    #
    # @param [String] format
    #
    def initialize(format)
      unless FORMATS.include? format
        warn "[relaton-iec] WARNING: invalid reference format \"#{format}\""
        warn "[relaton-iec] alloved reference formats are: #{FORMATS.join ', '}"
      end
      @format = format
    end

    #
    # @return [String]
    #
    def to_s
      @format
    end

    #
    # @return [Sting] <description>
    #
    def inspect
      to_s
    end
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
relaton-iec-1.16.1 lib/relaton_iec/basic_block/reference_format.rb
relaton-iec-1.16.0 lib/relaton_iec/basic_block/reference_format.rb
relaton-iec-1.14.4 lib/relaton_iec/basic_block/reference_format.rb
relaton-iec-1.14.3 lib/relaton_iec/basic_block/reference_format.rb
relaton-iec-1.14.2 lib/relaton_iec/basic_block/reference_format.rb
relaton-iec-1.14.1 lib/relaton_iec/basic_block/reference_format.rb
relaton-iec-1.14.0 lib/relaton_iec/basic_block/reference_format.rb
relaton-iec-1.13.0 lib/relaton_iec/basic_block/reference_format.rb
relaton-iec-1.12.0 lib/relaton_iec/basic_block/reference_format.rb
relaton-iec-1.11.4 lib/relaton_iec/basic_block/reference_format.rb
relaton-iec-1.11.3 lib/relaton_iec/basic_block/reference_format.rb
relaton-iec-1.11.2 lib/relaton_iec/basic_block/reference_format.rb
relaton-iec-1.11.1 lib/relaton_iec/basic_block/reference_format.rb
relaton-iec-1.11.0 lib/relaton_iec/basic_block/reference_format.rb
relaton-iec-1.10.1 lib/relaton_iec/basic_block/reference_format.rb
relaton-iec-1.10.0 lib/relaton_iec/basic_block/reference_format.rb
relaton-iec-1.9.0 lib/relaton_iec/basic_block/reference_format.rb
relaton-iec-1.8.0 lib/relaton_iec/basic_block/reference_format.rb