Sha256: d05ee204521afb614277e9d692ceedc05420f39e1d334f424a253dc1f8a09518
Contents?: true
Size: 449 Bytes
Versions: 7
Compression:
Stored size: 449 Bytes
Contents
# frozen_string_literal: true module Playbook module PbSampleHelper def has_sample_type?(sample, type) type ||= "rails" if type == "rails" Dir["../../views/playbook/samples/#{sample}/*.html.erb"].empty? elsif type == "react" Dir["../../views/playbook/samples/#{sample}/*.jsx"].empty? end end def pb_sample(sample: "", type: "rails") @type = type @sample = sample end end end
Version data entries
7 entries across 7 versions & 1 rubygems