Interface creation and validation in Ruby