Module: Opal::Deprecations
- Included in:
- Opal
- Defined in:
- opal/lib/opal/deprecations.rb
Instance Attribute Summary collapse
-
#raise_on_deprecation ⇒ Object
Returns the value of attribute raise_on_deprecation.
Instance Method Summary collapse
Instance Attribute Details
#raise_on_deprecation ⇒ Object
Returns the value of attribute raise_on_deprecation
4 5 6 |
# File 'opal/lib/opal/deprecations.rb', line 4 def raise_on_deprecation @raise_on_deprecation end |
Instance Method Details
#deprecation(message) ⇒ Object
6 7 8 9 10 11 12 13 |
# File 'opal/lib/opal/deprecations.rb', line 6 def deprecation = "DEPRECATION WARNING: #{}" if defined?(@raise_on_deprecation) && @raise_on_deprecation raise else warn end end |