Skip to content

Commit

Permalink
feat: add executable ckb-console
Browse files Browse the repository at this point in the history
  • Loading branch information
doitian committed May 24, 2019
1 parent 3e59277 commit 80a915f
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
14 changes: 13 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ And then execute:

$ bundle install

Or if you just want to use it in a console:
If you just want to use it in a console:

```
git clone https://github.com/nervosnetwork/ckb-sdk-ruby.git
Expand All @@ -44,6 +44,18 @@ bundle install
bundle exec bin/console
```

It is also possible to install this gem into system:

```
bundle exec rake install
```

Now you should be able to run a console using the command:

```
ckb-console
```

## Usage

RPC interface returns parsed `JSON` object
Expand Down
11 changes: 11 additions & 0 deletions exe/ckb-console
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/usr/bin/env ruby

require "ckb"

begin
require "pry"
Pry.start
rescue LoadError
require "irb"
IRB.start
end

0 comments on commit 80a915f

Please sign in to comment.