Sha256: 982e8555ed3454302555504a5476d18f18939491da1635a480ff028d48372e5e

Contents?: true

Size: 229 Bytes

Versions: 5

Compression:

Stored size: 229 Bytes

Contents

module ElementFactory
  module Elements
    class TextElement
      attr_accessor :string

      def initialize(string)
        @string = string
      end

      def to_html
        ERB::Util.h(string)
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
element_factory-0.1.4 lib/element_factory/elements/text_element.rb
element_factory-0.1.3 lib/element_factory/elements/text_element.rb
element_factory-0.1.2 lib/element_factory/elements/text_element.rb
element_factory-0.1.1 lib/element_factory/elements/text_element.rb
element_factory-0.1.0 lib/element_factory/elements/text_element.rb