Sha256: cfe1387f18262f657be6260011c5dd1efbd5ea0682f3051bbd486a62dbd6c874

Contents?: true

Size: 487 Bytes

Versions: 86

Compression:

Stored size: 487 Bytes

Contents

require "style_guide/partial"

module ForeverStyleGuide
  class Partial < StyleGuide::Partial

    def raw_html?
      @raw_html ||= extension.include? "html"
    end

    def extension
      @extension ||= path[/\.(.*)/]
    end

    def title
      @title ||= File.basename(path, extension).titleize.strip
    end

    def render
      @render ||= action_view.render(file: path)
    end

    private

    def action_view
      ApplicationController.new.view_context
    end

  end
end

Version data entries

86 entries across 86 versions & 1 rubygems

Version Path
forever_style_guide-1.2.9 lib/forever_style_guide/partial.rb
forever_style_guide-1.2.8 lib/forever_style_guide/partial.rb
forever_style_guide-1.2.7 lib/forever_style_guide/partial.rb
forever_style_guide-1.2.5 lib/forever_style_guide/partial.rb
forever_style_guide-1.2.4 lib/forever_style_guide/partial.rb
forever_style_guide-1.2.3 lib/forever_style_guide/partial.rb