Module: BallGag

Extended by:
Cloak, Disable::ClassMethods, Engine::ClassMethods
Defined in:
lib/ball_gag/gag.rb,
lib/ball_gag/cloak.rb,
lib/ball_gag/engine.rb,
lib/ball_gag/errors.rb,
lib/ball_gag/disable.rb,
lib/ball_gag/version.rb

Defined Under Namespace

Modules: ClassMethods, Cloak, Disable, Engine Classes: BadResultsMappingError, NoEngineConfiguredError

Constant Summary collapse

VERSION =
'0.0.6'

Instance Attribute Summary

Attributes included from Engine::ClassMethods

#engine, #only_validate_on_attribute_changed

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Cloak

negative_preterite=, preterite, preterite=, preterite_negative?, verb, verb=

Methods included from Disable::ClassMethods

disable!, enable!, enabled?

Class Method Details

.included(base) ⇒ Object



2
3
4
5
6
7
8
# File 'lib/ball_gag/gag.rb', line 2

def self.included base
  @gagged_inclusions ||= {}
  if !@gagged_inclusions[base]
    @gagged_inclusions[base] = true
    base.extend ClassMethods
  end
end

Instance Method Details

#invalidate_gag_cache(attributes) ⇒ Object



10
11
12
# File 'lib/ball_gag/gag.rb', line 10

def invalidate_gag_cache attributes
  @gagged_attribute_results.delete(attributes)
end