Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
A useful struct class
Ruby
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib
spec
.gitignore
Gemfile
Gemfile.lock
README.md
Rakefile
entity.gemspec
init.rb

README.md

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'
Something went wrong with that request. Please try again.