Sha256: 83bd3db77dd9d19f7c8136b32e18be8097eb74d9f29fbb00f84816f50874c479

Contents?: true

Size: 711 Bytes

Versions: 23

Compression:

Stored size: 711 Bytes

Contents

# DestructiveMethods tracks the names of all methods that are marked as
# destructive.  This lets us do an optimization where we don't need to
# check any methods with names that aren't here, we can be sure that they
# are not destructive.  If the method is tracked here, we need to check
# it on its current class.
class DestructiveMethods
  @@method_names = {}

  def self.add_method(method_name)
    @@method_names[method_name] = true
  end

  # Check to see if a method might be destructive.  If this returns
  # false, then we can guarentee that it won't be destructive and
  # we can skip a destructive check.
  def self.might_be_destructive?(method_name)
    return @@method_names[method_name]
  end
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
volt-0.7.23 lib/volt/reactive/destructive_methods.rb
volt-0.7.22 lib/volt/reactive/destructive_methods.rb
volt-0.7.21 lib/volt/reactive/destructive_methods.rb
volt-0.7.20 lib/volt/reactive/destructive_methods.rb
volt-0.7.19 lib/volt/reactive/destructive_methods.rb
volt-0.7.18 lib/volt/reactive/destructive_methods.rb
volt-0.7.17 lib/volt/reactive/destructive_methods.rb
volt-0.7.16 lib/volt/reactive/destructive_methods.rb
volt-0.7.15 lib/volt/reactive/destructive_methods.rb
volt-0.7.14 lib/volt/reactive/destructive_methods.rb
volt-0.7.13 lib/volt/reactive/destructive_methods.rb
volt-0.7.12 lib/volt/reactive/destructive_methods.rb
volt-0.7.10 lib/volt/reactive/destructive_methods.rb
volt-0.7.9 lib/volt/reactive/destructive_methods.rb
volt-0.7.8 lib/volt/reactive/destructive_methods.rb
volt-0.7.7 lib/volt/reactive/destructive_methods.rb
volt-0.7.6 lib/volt/reactive/destructive_methods.rb
volt-0.7.5 lib/volt/reactive/destructive_methods.rb
volt-0.7.4 lib/volt/reactive/destructive_methods.rb
volt-0.7.3 lib/volt/reactive/destructive_methods.rb