Entity

It's a tiny wrapper for OpenStruct

class Company < Entity
  ensure_attributes :name, :address 
end

c = Company.new(name: 'Acme')
c.attributes # => { name: 'Acme', address: nil } 

Installation

gem 'entity'
# or gem 'entity', github: 'redstonelabs/entity'