adds documentation to device.rb

## motivation

This class deserves documentation.

## todo

- [ ] @krukow needs after review

Merge at will.