Sha256: ede4b9033634441d2db328fdd89ccfc008744327fc0ee8a4079a9d085104723f

Contents?: true

Size: 1.01 KB

Versions: 1

Compression:

Stored size: 1.01 KB

Contents

require 'styleus_helper'

module ExternalHelper
  def index_documentation(&block)
    content_tag('section', class: '__index_documentation', &block).html_safe
  end

  def documentation(&block)
    content_for :documentation, _styleus_documentation_wrap(&block)
  end

  def display(&block)
    content_for :representation, capture(&block)
  end

  def html(&block)
    content_for :html, _html_representation(&block)
  end

  def helper(&block)
    content_for :helper, _helper_representation(&block)
  end

  def styleus_page(&block)
    index         = styleus_index
    components    = styleus_components
    documentation = ''
    documentation = index_documentation(&block) if block_given?
    index.concat(documentation).concat(components)
  end

  def styleus_components
    _build_view_components
    @component_list = @components.map { |component| _wrap_component component }
    @component_list.join.html_safe
  end

  def styleus_index
    _build_view_components
    _component_index(components_category, @components)
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
styleus-0.0.11 app/helpers/external_helper.rb