lib/world-flags.rb in world-flags-0.4.3 vs lib/world-flags.rb in world-flags-0.4.4

- old
+ new

@@ -13,9 +13,13 @@ include Util attr_writer :active_locales attr_writer :locale_flag_map + def config &block + (block_given? && block.arity == 1) ? yield(self) : instance_eval(&block) + end + def label code = :us, options = {:language => :en} locale = extract_locale!(options) || default_locale_used || :en options[:country] ? country_label(code, locale) : language_label(code, locale) end