Class: VER::Status::BufferPosition

Inherits:
Label
  • Object
show all
Defined in:
lib/ver/status/buffer_position.rb

Instance Attribute Summary

Attributes inherited from Label

#column, #format, #row, #status, #sticky, #variable, #weight

Instance Method Summary collapse

Methods inherited from Label

#buffer, #destroyed?, #initialize, #on_destroy, #register, #style=, #update

Methods included from LabelToggle

#toggle

Constructor Details

This class inherits a constructor from VER::Status::Label

Instance Method Details

#setupObject



4
5
6
# File 'lib/ver/status/buffer_position.rb', line 4

def setup
  register :position
end

#to_sObject



8
9
10
11
12
13
14
# File 'lib/ver/status/buffer_position.rb', line 8

def to_s
  buffers = VER.buffers.to_a
  format % [
    buffers.index(buffer).to_i + 1,
    buffers.size
  ]
end