Sha256: 189f5300ae1f7fe96f8e067d5d4d6b041293244b24611bf350f85502c5bfae21

Contents?: true

Size: 277 Bytes

Versions: 14

Compression:

Stored size: 277 Bytes

Contents

# frozen_string_literal: true

module ViewHelper
  def self.extended(parent)
    parent.class_exec do
      let(:output) { example.call }
      let(:example) { view.new }
    end
  end

  def view(&block)
    let :view do
      Class.new(Phlex::HTML, &block)
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
phlexible-2.0.0 config/view_helper.rb
phlexible-1.0.0 config/view_helper.rb
phlexible-1.0.0.beta.1 config/view_helper.rb
phlexible-0.7.0 config/view_helper.rb
phlexible-0.6.2 config/view_helper.rb
phlexible-0.6.1 config/view_helper.rb
phlexible-0.6.0 config/view_helper.rb
phlexible-0.5.0 config/view_helper.rb
phlexible-0.4.2 config/view_helper.rb
phlexible-0.4.1 config/view_helper.rb
phlexible-0.4.0 config/view_helper.rb
phlexible-0.3.0 config/view_helper.rb
phlexible-0.2.0 config/view_helper.rb
phlexible-0.1.0 config/view_helper.rb