
Security News
Astral Launches pyx: A Python-Native Package Registry
Astral unveils pyx, a Python-native package registry in beta, designed to speed installs, enhance security, and integrate deeply with uv.
kj is a simple rubygem for accessing the King James Bible. It uses an embedded sqlite data store.
gem install kj
require 'kj'
bible = Kj::Bible.new
All return an array of Book objects.
books = bible.books
books = bible.books(1)
books = bible.books(:genesis)
books = bible.books('Gen')
books = bible.books(:genesis, 2, 'Levit')
romans = bible.book(45)
romans = bible.book(:romans)
romans = bible.book('Rom')
puts romans.name
=> "Romans"
All return an array of Chapter objects for the book.
genesis = bible.book(:genesis)
chapters = genesis.chapters
chapters = genesis.chapters(1, 2, (3..10).to_a)
genesis = bible.book(:genesis)
chapter = genesis.chapter(1)
puts chapter.book_name
=> "Genesis"
puts chapter.number
=> 1
puts chapter.title
=> "Genesis 1"
chapter.next # returns the next Chapter
chapter.prev # returns the previous Chapter
All return an array of Verse objects.
genesis = bible.book(:genesis)
verses = genesis.chapter(1).verses
verse = genesis.chapter(1).verses(1, 2, (3..10).to_a)
genesis = bible.book(:genesis)
verse = genesis.chapter(1).verse(1)
puts verse.title
=> "Genesis 1:1"
puts verse.text
=> "In the beginning God..."
verse.next # returns the next Verse
verse.prev # returns the previous Verse
bible.random_book #returns a random Kj::Book
bible.random_chapter #returns a random Kj::Chapter
bible.random_verse #returns a random Kj::Verse
puts bible.random_verse.text
=> "But woe unto you, scribes and Pharisees, hypocrites! for ye shut up the kingdom of heaven against men: for ye neither go in yourselves, neither suffer ye them that are entering to go in."
# Locate Verse objects by their decimal percent between 0 and 1
verse = bible.percent(0.5)
puts verse.title
=> "Psalms 103:1"
# Locate Verse objects for a particular page (1-1609)
verses = bible.page(777)
puts verses.first.title
=> "Psalms 22:26"
Kj will raise a Kj::Iniquity when it can't find what you're looking for.
bible.book(:tobit)
# Kj::Iniquity: Not found
As you can see, kj is a protestant gem.
Q. Why only King James? Are you one of those 'King James only' nuts?
A. Yes
Copyright (c) 2015 David John. See LICENSE.txt for further details.
FAQs
Unknown package
We found that kj demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
Astral unveils pyx, a Python-native package registry in beta, designed to speed installs, enhance security, and integrate deeply with uv.
Security News
The Latio podcast explores how static and runtime reachability help teams prioritize exploitable vulnerabilities and streamline AppSec workflows.
Security News
The latest Opengrep releases add Apex scanning, precision rule tuning, and performance gains for open source static code analysis.