Sha256: f031444d3dbba1d95ff32a9262e526f238824139d0e225506cee4bb0cdd2d8f5
Contents?: true
Size: 438 Bytes
Versions: 1
Compression:
Stored size: 438 Bytes
Contents
module Capigen::Profiles ProfileDir = File.dirname(__FILE__) + "/../../profiles" def recipe_profiles(prefix = "") Dir[ProfileDir + "/#{prefix}*.rb"].collect { |file| File.basename(file)[0...-3] } end def choose_profile(prefix = "") profile = HighLine.new.choose(*recipe_profiles(prefix)) do |menu| menu.header = "Choose recipe profile" end "#{ProfileDir}/#{profile}.rb" end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
capigen-0.1.2 | lib/capigen/profiles.rb |