Class: NilClass

Inherits:
Object show all
Defined in:
lib/ffi_yajl/json_gem.rb,
lib/ffi_yajl/ffi/encoder.rb

Instance Method Summary collapse

Instance Method Details

#ffi_yajl(rb_yajl_gen, state) ⇒ Object



120
121
122
123
124
# File 'ext/ffi_yajl/ext/encoder/encoder.c', line 120

def ffi_yajl(yajl_gen, state)
  if ( status = FFI_Yajl.yajl_gen_null(yajl_gen) ) != 0
    FFI_Yajl::Encoder.raise_error_for_status(status)
  end
end

#to_json(*opts, &block) ⇒ Object



99
100
101
# File 'lib/ffi_yajl/json_gem.rb', line 99

def to_json(*opts, &block)
  FFI_Yajl::Encoder.encode(self, *opts)
end