lib/squib/deck.rb in squib-0.9.0 vs lib/squib/deck.rb in squib-0.10.0

- old
+ new

@@ -1,16 +1,16 @@ require 'forwardable' require 'pp' -require 'squib' -require 'squib/args/unit_conversion' -require 'squib/card' -require 'squib/conf' -require 'squib/constants' -require 'squib/graphics/hand' -require 'squib/graphics/showcase' -require 'squib/layout_parser' -require 'squib/progress' +require_relative '../squib' +require_relative 'args/unit_conversion' +require_relative 'card' +require_relative 'conf' +require_relative 'constants' +require_relative 'graphics/hand' +require_relative 'graphics/showcase' +require_relative 'layout_parser' +require_relative 'progress' # The project module # # @api public @@ -66,11 +66,12 @@ @progress_bar = Progress.new(@conf.progress_bars) # FIXME this is evil. Using something different with @ and non-@ show_info(config, layout) @width = Args::UnitConversion.parse width, dpi @height = Args::UnitConversion.parse height, dpi cards.times{ |i| @cards << Squib::Card.new(self, @width, @height, i) } - @layout = LayoutParser.load_layout(layout) + @layout = LayoutParser.load_layout(layout) + enable_groups_from_env! if block_given? instance_eval(&block) # here we go. wheeeee! end end @@ -98,16 +99,17 @@ end ################## ### PUBLIC API ### ################## - require 'squib/api/background' - require 'squib/api/data' - require 'squib/api/image' - require 'squib/api/save' - require 'squib/api/settings' - require 'squib/api/shapes' - require 'squib/api/text' - require 'squib/api/units' + require_relative 'api/background' + require_relative 'api/data' + require_relative 'api/groups' + require_relative 'api/image' + require_relative 'api/save' + require_relative 'api/settings' + require_relative 'api/shapes' + require_relative 'api/text' + require_relative 'api/units' end end