Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

hypostasis-object

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hypostasis-object

  • 0.0.1
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

Hypostasis::Object

Build Status Code Climate Code Coverage

Hypostasis::Object is an OODB-style layer for FoundationDB and is part of the broader Hypostasis project. The Hypostasis project aims to provide a collection of data models for Ruby, built on top of FoundationDB.

Installation

Add this line to your application's Gemfile:

gem 'hypostasis-object'

And then execute:

$ bundle

Or install it yourself as:

$ gem install hypostasis-object

Usage

require 'hypostasis/object'

class Employee
  include Hypostasis::Object

  attr_accessor :name, :title, :salary
end

john = Employee.new
john.name   = 'John Doe'
john.title  = 'Patent Clerk'
john.salary = 42000

john.persist

The above example is a simple demonstration of working with Hypostasis::Object. Hypostasis::Object adds two public methods for handling persistence: persist and persist!. The latter raises an error when certain kinds of things go wrong. Behind the scenes Hypostasis::Object gathers the state of the object and atomically commits it to FoundationDB. In the process, it will also generate a unique id for the object, accessible via the id attribute. This is the most basic example of working with Hypostasis::Object. Please refer to the Wiki for more detailed examples and other feature details.

Contributing

  1. Fork it ( http://github.com//hypostasis-object/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

FAQs

Package last updated on 23 Mar 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc