Module: JSON
- Defined in:
- lib/usamin/overwrite.rb
Defined Under Namespace
Classes: LoadProcCaller
Class Method Summary collapse
- .generate(object, **options) ⇒ Object (also: fast_generate)
- .load(source, proc = nil, **options) ⇒ Object (also: restore)
- .parse(source, **options) ⇒ Object
- .pretty_generate(object, **options) ⇒ Object
Class Method Details
.generate(object, **options) ⇒ Object Also known as: fast_generate
7 8 9 |
# File 'lib/usamin/overwrite.rb', line 7 def self.generate(object, **) [:indent] ? Usamin.pretty_generate(object, indent: [:indent]) : Usamin.generate(object) end |
.load(source, proc = nil, **options) ⇒ Object Also known as: restore
23 24 25 26 27 |
# File 'lib/usamin/overwrite.rb', line 23 def self.load(source, proc = nil, **) ret = Usamin.parse(source, **) LoadProcCaller.load_call_proc(ret, proc) if proc ret end |