lib/brief.rb in brief-1.11.8 vs lib/brief.rb in brief-1.11.9

- old
+ new

@@ -43,11 +43,10 @@ else @briefcase end end - def self.views @views ||= {} end def self.commands @@ -109,9 +108,19 @@ def self.activate_adapter(identifier) require "brief/adapters/#{ identifier }" (Brief::Adapters.const_get(identifier.camelize) rescue nil).tap do |adapter| raise "Invalid adapter: #{ identifier }" unless adapter end + end + + # This can be overridden so that you can generate uri values + # in the renderings that fit within the medium (e.g. website, electron app) + def self.href_builder + @href_builder || ->(o){o} + end + + def self.href_builder= value + @href_builder = value end end require 'brief/core_ext' require 'brief/version'