Sha256: dd32e671cf8237fc7b40d576ca5ff18aecd29670a9239f0e568f9a64339bf748

Contents?: true

Size: 468 Bytes

Versions: 7

Compression:

Stored size: 468 Bytes

Contents

module RelatonBib
  class ICS
    # @return [String]
    attr_reader :code, :text

    # @param code [String]
    # @param text [String]
    def initialize(code:, text:)
      @code = code
      @text = text
    end

    # @param builder [Nokogiri::XML::Builder]
    def to_xml(builder)
      builder.ics do |b|
        b.code code
        b.text_ text
      end
    end

    # @return [Hash]
    def to_hash
      { "code" => code, "text" => text }
    end
  end
end

Version data entries

7 entries across 7 versions & 2 rubygems

Version Path
metanorma-cli-1.3.4 gems/ruby/2.6.0/gems/relaton-bib-1.2.4/lib/relaton_bib/ics.rb
metanorma-cli-1.3.3.1 gems/ruby/2.6.0/gems/relaton-bib-1.2.4/lib/relaton_bib/ics.rb
relaton-bib-1.2.4 lib/relaton_bib/ics.rb
relaton-bib-1.2.2 lib/relaton_bib/ics.rb
relaton-bib-1.2.1 lib/relaton_bib/ics.rb
relaton-bib-1.2.0 lib/relaton_bib/ics.rb
relaton-bib-1.1.1 lib/relaton_bib/ics.rb