lib/sugarcube.rb in sugarcube-1.7.0 vs lib/sugarcube.rb in sugarcube-2.0.0

- old
+ new

@@ -1,18 +1,36 @@ -require File.join(File.dirname(__FILE__), "sugarcube-core.rb") +require File.join(File.dirname(__FILE__), 'sugarcube-core.rb') + + +module SugarCube + module_function + + def ios_only!(package) + unless App.template == :ios + raise "The '\033[0;1msugarcube-#{package}\033[0m' package is only available on iOS." + end + end + + def osx_only!(package) + unless App.template == :osx + raise "The '\033[0;1msugarcube-#{package}\033[0m' package is only available on OS X." + end + end + +end