Sha256: 5ed0eebf8d2dc4717aab877aa9b5dfd7d56d84ee12dd456d0cd3f640893edb3d
Contents?: true
Size: 399 Bytes
Versions: 2
Compression:
Stored size: 399 Bytes
Contents
# frozen_string_literal: true module Lite module Component def self.names components_ext = '_component.rb' components_dir = "#{path}/" components_glob = path.join("**/*#{components_ext}") Dir.glob(components_glob).map { |name| name.sub(components_dir, '').chomp(components_ext) } end def self.path Rails.root.join('app/components') end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
lite-component-1.0.1 | lib/lite/component/application.rb |
lite-component-1.0.0 | lib/lite/component/application.rb |