Method: Reight::Index#initialize
- Defined in:
- lib/reight/index.rb
#initialize(index = 0, min: 0, max: nil, &changed) ⇒ Index
Returns a new instance of Index.
10 11 12 13 14 15 16 17 18 |
# File 'lib/reight/index.rb', line 10 def initialize(index = 0, min: 0, max: nil, &changed) hook :changed super() @min, @max = min, max self.changed(&changed) if changed self.index = index end |