require 'prototype' DB = Prototype.new{ host 'localhost' port 4242 conn_string [host, port].join(':') def connect() p [host, port] end } p DB p DB.host p DB.port p DB.conn_string DB.connect