Class: Appsignal::Extension::Jruby::Data Private

Inherits:
Object
  • Object
show all
Includes:
StringHelpers
Defined in:
lib/appsignal/extension/jruby.rb

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from StringHelpers

#make_appsignal_string, #make_ruby_string

Constructor Details

#initialize(pointer) ⇒ Data

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of Data.



551
552
553
554
555
556
# File 'lib/appsignal/extension/jruby.rb', line 551

def initialize(pointer)
  @pointer = FFI::AutoPointer.new(
    pointer,
    Extension.method(:appsignal_free_data)
  )
end

Instance Attribute Details

#pointerObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



549
550
551
# File 'lib/appsignal/extension/jruby.rb', line 549

def pointer
  @pointer
end

Instance Method Details

#==(other) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



632
633
634
# File 'lib/appsignal/extension/jruby.rb', line 632

def ==(other)
  Extension.appsignal_data_equal(pointer, other.pointer)
end

#append_boolean(value) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



620
621
622
# File 'lib/appsignal/extension/jruby.rb', line 620

def append_boolean(value)
  Extension.appsignal_data_array_append_boolean(pointer, value)
end

#append_data(value) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



628
629
630
# File 'lib/appsignal/extension/jruby.rb', line 628

def append_data(value)
  Extension.appsignal_data_array_append_data(pointer, value.pointer)
end

#append_float(value) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



616
617
618
# File 'lib/appsignal/extension/jruby.rb', line 616

def append_float(value)
  Extension.appsignal_data_array_append_float(pointer, value)
end

#append_integer(value) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



612
613
614
# File 'lib/appsignal/extension/jruby.rb', line 612

def append_integer(value)
  Extension.appsignal_data_array_append_integer(pointer, value)
end

#append_nilObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



624
625
626
# File 'lib/appsignal/extension/jruby.rb', line 624

def append_nil
  Extension.appsignal_data_array_append_null(pointer)
end

#append_string(value) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



605
606
607
608
609
610
# File 'lib/appsignal/extension/jruby.rb', line 605

def append_string(value)
  Extension.appsignal_data_array_append_string(
    pointer,
    make_appsignal_string(value)
  )
end

#set_boolean(key, value) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



582
583
584
585
586
587
588
# File 'lib/appsignal/extension/jruby.rb', line 582

def set_boolean(key, value)
  Extension.appsignal_data_map_set_boolean(
    pointer,
    make_appsignal_string(key),
    value
  )
end

#set_data(key, value) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



597
598
599
600
601
602
603
# File 'lib/appsignal/extension/jruby.rb', line 597

def set_data(key, value)
  Extension.appsignal_data_map_set_data(
    pointer,
    make_appsignal_string(key),
    value.pointer
  )
end

#set_float(key, value) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



574
575
576
577
578
579
580
# File 'lib/appsignal/extension/jruby.rb', line 574

def set_float(key, value)
  Extension.appsignal_data_map_set_float(
    pointer,
    make_appsignal_string(key),
    value
  )
end

#set_integer(key, value) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



566
567
568
569
570
571
572
# File 'lib/appsignal/extension/jruby.rb', line 566

def set_integer(key, value)
  Extension.appsignal_data_map_set_integer(
    pointer,
    make_appsignal_string(key),
    value
  )
end

#set_nil(key) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

rubocop:disable Naming/AccessorMethodName



590
591
592
593
594
595
# File 'lib/appsignal/extension/jruby.rb', line 590

def set_nil(key) # rubocop:disable Naming/AccessorMethodName
  Extension.appsignal_data_map_set_null(
    pointer,
    make_appsignal_string(key)
  )
end

#set_string(key, value) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



558
559
560
561
562
563
564
# File 'lib/appsignal/extension/jruby.rb', line 558

def set_string(key, value)
  Extension.appsignal_data_map_set_string(
    pointer,
    make_appsignal_string(key),
    make_appsignal_string(value)
  )
end

#to_sObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



636
637
638
# File 'lib/appsignal/extension/jruby.rb', line 636

def to_s
  make_ruby_string Extension.appsignal_data_to_json(pointer)
end