class RailsAiAdmin::Templates::Catalog
Explicit public presentation paths. Revision changes track context/locals compatibility even when the template bytes themselves do not change.
Constants
- DEFINITIONS
- ENTRIES
- Entry
Public Class Methods
Source
# File lib/rails_ai_admin/templates/catalog.rb, line 72 def initialize(source_root: Engine.root.join("app/views"), entries: ENTRIES) @source_root = Pathname.new(source_root).expand_path @entries = entries.freeze end
Public Instance Methods
Source
# File lib/rails_ai_admin/templates/catalog.rb, line 77 def entries = @entries def fetch(key) = entries.find { |entry| entry.key == key.to_s } || raise(ConfigurationError, "Unknown override key; use --list") def for_path(path) = entries.find { |entry| entry.path == path } def source_path(entry) = @source_root.join(entry.path) def source_digest(entry) = Digest::SHA256.file(source_path(entry)).hexdigest end
Source
# File lib/rails_ai_admin/templates/catalog.rb, line 78 def fetch(key) = entries.find { |entry| entry.key == key.to_s } || raise(ConfigurationError, "Unknown override key; use --list") def for_path(path) = entries.find { |entry| entry.path == path } def source_path(entry) = @source_root.join(entry.path) def source_digest(entry) = Digest::SHA256.file(source_path(entry)).hexdigest end end
Source
# File lib/rails_ai_admin/templates/catalog.rb, line 79 def for_path(path) = entries.find { |entry| entry.path == path } def source_path(entry) = @source_root.join(entry.path) def source_digest(entry) = Digest::SHA256.file(source_path(entry)).hexdigest end end end
Source
# File lib/rails_ai_admin/templates/catalog.rb, line 81 def source_digest(entry) = Digest::SHA256.file(source_path(entry)).hexdigest end
Source
# File lib/rails_ai_admin/templates/catalog.rb, line 80 def source_path(entry) = @source_root.join(entry.path) def source_digest(entry) = Digest::SHA256.file(source_path(entry)).hexdigest end end