Sha256: 48b9013cec1785318c47c5179c68c03aa87a6d808127df894932dcc056f5c5be
Contents?: true
Size: 654 Bytes
Versions: 18
Compression:
Stored size: 654 Bytes
Contents
module BasicBlock class Stem TYPES = %w[MathML AsciiMath].freeze # @return [String] attr_reader :type # # @param [String] type # @param [Array<#to_xml>] content any element # def initialize(type:, content: []) unless TYPES.include? type warn "[relaton-iec] WARNING: invalud type \"#{type}\"" warn "[relaton-iec] allowed types are: #{TYPES.join ', '}" end @type = type @content = content end # # @param [Nokogiri::XML::Builder] builder # def to_xml(builder) builder.stem(type) do |b| content.each { |c| c.to_xml b } end end end end
Version data entries
18 entries across 18 versions & 1 rubygems