Sha256: 84005e29a911d0a58e034bb7d52c14f93bf68dd5686223a49dcb8a94f04fa060
Contents?: true
Size: 761 Bytes
Versions: 8
Compression:
Stored size: 761 Bytes
Contents
module Bivouac @@_plugins_view_helpers = [] def files( xPath, *options, &block ) path = File.dirname($0) + "/" + xPath.to_s + "/*.rb" if ENV['BIVOUAC_ROOT'] path = ENV['BIVOUAC_ROOT'] + "/app/" + xPath.to_s + "/*.rb" end Dir[path].each do |file| if options[0] if options[0].keys.include?( :except ) if options[0][:except].include?(File.basename(file)) == false yield( file ) end end else yield( file ) end end end def addViewHelperModule( m ) @@_plugins_view_helpers << m end def viewHelperModule @@_plugins_view_helpers end def filePath( from, *data ) File.join File.expand_path(File.dirname(from)), data end end
Version data entries
8 entries across 8 versions & 1 rubygems