use ruby meta magic to define access restriction