Skip to content

Instantly share code, notes, and snippets.

@mmyoji
Created July 11, 2018 06:36
Show Gist options
  • Save mmyoji/affbd89361908148f45fe17abe45b02b to your computer and use it in GitHub Desktop.
Save mmyoji/affbd89361908148f45fe17abe45b02b to your computer and use it in GitHub Desktop.
bundler/inline usage
# frozen_string_literal: true
require "bundler/inline"
gemfile do
source "https://rubygems.org"
gem "virtus"
end
class User
include Virtus.model
attribute :name, String
attribute :age, Integer
end
user = User.new name: "mmyoji", age: 28
puts user.attributes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment