Module: Volt::Modes

Included in:
Volt, Model
Defined in:
lib/volt/utils/modes.rb

Overview

Modes provide a way to effect the state inside of a block that can be checked from elsewhere. This is very useful if you have some flag you may want to change without needing to pass all of the way through some other code.

Defined Under Namespace

Modules: ClassMethods

Class Method Summary collapse

Class Method Details

.included(base) ⇒ Object



48
49
50
# File 'lib/volt/utils/modes.rb', line 48

def self.included(base)
  base.send :extend, ClassMethods
end