Sha256: 8079724b225efdd1107c439ebeadd6411a4aee52c7c693cf2c820645f31c7e51

Contents?: true

Size: 354 Bytes

Versions: 3

Compression:

Stored size: 354 Bytes

Contents

module SharedHelper
  def copyright(who)
    "© #{Time.new.year} by #{who}"
  end

  def select_partials(dir='*', &block)
    folder = "#{@input_folder}/partials/#{dir}"
    Dir.glob("#{folder}").each do |partial|
      partial = partial.sub("#{@input_folder}/partials/", '').sub('.haml', '')
      block.call(partial) if block_given?
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
easy_html_creator-1.3.2 dev_root/shared/helper/shared_helper.rb
easy_html_creator-1.3.1 dev_root/shared/helper/shared_helper.rb
easy_html_creator-1.3.0 dev_root/shared/helper/shared_helper.rb