Class: EJSON

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/ejson.rb,
lib/ejson/cli.rb,
lib/ejson/encryption.rb

Defined Under Namespace

Classes: CLI, Data, Encryption

Instance Method Summary collapse

Constructor Details

#initialize(public_key_file, private_key_file = nil) ⇒ EJSON



9
10
11
# File 'lib/ejson.rb', line 9

def initialize(public_key_file, private_key_file = nil)
  @encryption = Encryption.new(public_key_file, private_key_file)
end

Instance Method Details

#load(json_text) ⇒ Object



13
14
15
# File 'lib/ejson.rb', line 13

def load(json_text)
  Data.new(JSON.load(json_text), @encryption)
end