Overview
For more info: https://github.com/ysmood/nisp
Installation
gem 'nisp'
Quick start
require 'nisp'
puts Nisp.run(
ast: ['+', 1, 2],
env: 1,
sandbox: {
'+' => ->(a, b) { a + b + self }
}
)
# output: 4
Project
For more info: https://github.com/ysmood/nisp
gem 'nisp'
require 'nisp'
puts Nisp.run(
ast: ['+', 1, 2],
env: 1,
sandbox: {
'+' => ->(a, b) { a + b + self }
}
)
# output: 4