module SparkComponents

Constants

VERSION

Public Class Methods

component_names() click to toggle source
# File lib/spark_components.rb, line 15
def self.component_names
  return [] unless Dir.exist?(components_path)

  Dir.chdir(components_path) do
    Dir.glob("**/*_component.rb").map { |component| component.chomp("_component.rb") }.sort
  end
end
components_path() click to toggle source
# File lib/spark_components.rb, line 11
def self.components_path
  Rails.root.join("app", "components")
end