User attr_reader instead accessor, attributes are read only
Resolve endpoint automatically
Cut down a fill lines with shoter ternary operator