lib/wrap_it/base.rb in wrap_it-1.0.0 vs lib/wrap_it/base.rb in wrap_it-1.0.1

- old
+ new

@@ -184,15 +184,14 @@ omit_content? || self[:content] << captured end end end - def render_sections(*sections) - opts = sections.extract_options! + def render_sections(*sections, except: nil) sections.empty? && sections = self.class.sections - if opts.key?(:except) - opts[:except].is_a?(Array) || opts[:except] = [opts[:except]] - sections.reject! { |s| opts[:except].include?(s) } + unless except.nil? + except.is_a?(Array) || except = [except] + sections.reject! { |s| except.include?(s) } end # glew sections self.class.placement .select { |s| sections.include?(s) } .reduce(empty_html) do |a, e|