From 653348d107af5390e684ef7f388f5da17b85d553 Mon Sep 17 00:00:00 2001 From: Claas Z <1674349+claasz@users.noreply.github.com> Date: Thu, 14 Jan 2021 12:51:01 +0100 Subject: [PATCH] Added basic "Usage" section Taken from https://github.com/roo-rb/roo-xls/issues/8#issuecomment-424778474 --- README.md | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 72b9fa4..aeed2fc 100644 --- a/README.md +++ b/README.md @@ -37,7 +37,33 @@ Or install it yourself as: ## Usage -TODO: Write usage instructions here +``` +begin + require "bundler/inline" +rescue LoadError => e + $stderr.puts "Bundler version 1.10 or later is required. Please update your Bundler" + raise e +end + +gemfile(true) do + source "https://rubygems.org" + + git_source(:github) { |repo| "https://github.com/#{repo}.git" } + + gem "roo-xls" + gem "minitest" +end + +require "roo-xls" +require "minitest/autorun" + +class BugTest < Minitest::Test + def test_stuff + sheet = Roo::Excel.new('/Users/gturner/downloads/table.xls') + puts sheet.row(1) + end +end +``` ## Contributing