Sha256: ab50f16f00b58bac9ee5bbf0ac67572665b4197fe087a17dd0f0aac30832091c

Contents?: true

Size: 579 Bytes

Versions: 3

Compression:

Stored size: 579 Bytes

Contents

# frozen_string_literal: true

module HS
  module TextInitializers
    private

    def initialize_header(data)
      HS::Header.new(get_params(data, %i[level class_name style]))
    end

    def initialize_text(data)
      HS::Text.new(text: data[:text])
    end

    def initialize_p(data)
      HS::Paragraph.new(get_params(data))
    end

    def initialize_em(data)
      HS::Emphasize.new(get_params(data))
    end

    def initialize_strong(data)
      HS::Strong.new(get_params(data))
    end

    def initialize_br(_data)
      HS::Br.new # no params!
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
hs-cli-0.3.3 lib/hs/loaders/initializers/text_initializers.rb
hs-cli-0.3.2 lib/hs/loaders/initializers/text_initializers.rb
hs-cli-0.3.1 lib/hs/loaders/initializers/text_initializers.rb