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.33 lib/forever_style_guide/partial.rb
forever_style_guide-3.0.32 lib/forever_style_guide/partial.rb
forever_style_guide-3.0.31 lib/forever_style_guide/partial.rb
forever_style_guide-3.0.30 lib/forever_style_guide/partial.rb
forever_style_guide-3.0.29 lib/forever_style_guide/partial.rb
forever_style_guide-3.0.28 lib/forever_style_guide/partial.rb
forever_style_guide-3.0.27 lib/forever_style_guide/partial.rb
forever_style_guide-3.0.26 lib/forever_style_guide/partial.rb
forever_style_guide-3.0.25 lib/forever_style_guide/partial.rb
forever_style_guide-3.0.24 lib/forever_style_guide/partial.rb
forever_style_guide-3.0.23 lib/forever_style_guide/partial.rb
forever_style_guide-3.0.22 lib/forever_style_guide/partial.rb
forever_style_guide-3.0.21 lib/forever_style_guide/partial.rb
forever_style_guide-3.0.20 lib/forever_style_guide/partial.rb
forever_style_guide-3.0.19 lib/forever_style_guide/partial.rb
forever_style_guide-3.0.18 lib/forever_style_guide/partial.rb
forever_style_guide-3.0.17 lib/forever_style_guide/partial.rb
forever_style_guide-3.0.16 lib/forever_style_guide/partial.rb
forever_style_guide-3.0.15 lib/forever_style_guide/partial.rb
forever_style_guide-3.0.14 lib/forever_style_guide/partial.rb