class Lookbook::Engine
def mounted_path
def mounted_path Lookbook::Engine.routes.find_script_name({}) end
def parser
def parser @parser ||= Lookbook::Parser.new(config.lookbook.preview_paths) end
def websocket
def websocket if config.lookbook.auto_refresh @websocket ||= if Rails.version.to_f >= 6.0 ActionCable::Server::Base.new(config: config.lookbook.cable) else websocket ||= ActionCable::Server::Base.new websocket.config = config.lookbook.cable websocket end end end
def websocket_mount_path
def websocket_mount_path "#{mounted_path}#{config.lookbook.cable.mount_path}" if websocket end