lib/bluepine/attributes/object_attribute.rb
# Apply default options to all attributes
#
# group if: :deleted? { ... }
# group unless: :deleted? { ... }
# group if: ->{ @user.deleted? } { ... }
Apply default options to all attributes
group if: :deleted.
Apply default options to all attributes group if : : deleted .
def group(options, &block)
        return unless block_given?
        self.class.stacks << Attribute.options
        Attribute.options = options
        instance_exec(&block)
        Attribute.options = self.class.stacks.pop
      end
def group ( options , & block ) return unless block_given? self . class . stacks << Attribute . options Attribute . options = options instance_exec ( & block ) Attribute . options = self . class . stacks . pop end
Apply default options to all attributes
group if: :deleted?
Apply default options to all attributes group if : : deleted?
# Use stacks to allow nested conditions # restore options
options
block