Module: FuzzyRuby
- Defined in:
- lib/fuzzy-ruby/api.rb,
lib/fuzzy-ruby/version.rb
Constant Summary collapse
- VALID_MODES =
[:autocorrect, :autocorrect_with_warning, :warn_only]
- VERSION =
"0.1.0"
Class Attribute Summary collapse
-
.mode ⇒ Object
Returns the value of attribute mode.
Class Method Summary collapse
Class Attribute Details
.mode ⇒ Object
Returns the value of attribute mode.
40 41 42 |
# File 'lib/fuzzy-ruby/api.rb', line 40 def mode @mode end |
Class Method Details
.enabled? ⇒ Boolean
36 37 38 |
# File 'lib/fuzzy-ruby/api.rb', line 36 def enabled? @enabled end |
.install ⇒ Object
19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/fuzzy-ruby/api.rb', line 19 def install # Enable automatic autocorrection @enabled = true if block_given? begin return yield ensure uninstall end end end |
.uninstall ⇒ Object
32 33 34 |
# File 'lib/fuzzy-ruby/api.rb', line 32 def uninstall @enabled = false end |