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-3.0.13 lib/forever_style_guide/partial.rb
forever_style_guide-3.0.12 lib/forever_style_guide/partial.rb
forever_style_guide-3.0.11 lib/forever_style_guide/partial.rb
forever_style_guide-3.0.10 lib/forever_style_guide/partial.rb
forever_style_guide-3.0.9 lib/forever_style_guide/partial.rb
forever_style_guide-3.0.8 lib/forever_style_guide/partial.rb
forever_style_guide-3.0.7 lib/forever_style_guide/partial.rb
forever_style_guide-3.0.6 lib/forever_style_guide/partial.rb
forever_style_guide-3.0.5 lib/forever_style_guide/partial.rb
forever_style_guide-3.0.4 lib/forever_style_guide/partial.rb
forever_style_guide-3.0.3 lib/forever_style_guide/partial.rb
forever_style_guide-3.0.2 lib/forever_style_guide/partial.rb
forever_style_guide-3.0.1 lib/forever_style_guide/partial.rb
forever_style_guide-3.0.0 lib/forever_style_guide/partial.rb
forever_style_guide-2.0.3 lib/forever_style_guide/partial.rb
forever_style_guide-2.0.2 lib/forever_style_guide/partial.rb
forever_style_guide-2.0.1 lib/forever_style_guide/partial.rb
forever_style_guide-2.0.0 lib/forever_style_guide/partial.rb
forever_style_guide-1.2.11 lib/forever_style_guide/partial.rb
forever_style_guide-1.2.10 lib/forever_style_guide/partial.rb