lib/simplec.rb in simplec-0.4.4 vs lib/simplec.rb in simplec-0.5.0
- old
+ new
@@ -7,7 +7,31 @@
# Configuration details will go here.
#
# @!visibility public
module Simplec
- # TODO configuration options
+
+ # Get application view helpers.
+ #
+ # @example append helper
+ # Simplec.helpers << ::ApplicationHelper
+ #
+ # @return [Array]
+ # of view helpers
+ def self.helpers
+ @helpers ||= Array.new
+ end
+
+ # Set the helpers to be included.
+ #
+ # @example set a single helper
+ # Simplec.helpers = ::ApplicationHelper
+ #
+ # @example append helpers
+ # Simplec.helpers += [::ApplicationHelper]
+ #
+ # @param helpers [Array, Class]
+ # either a single helper or an array of helpers
+ def self.helpers=(helpers)
+ @helpers = Array(helpers)
+ end
end