class RCGTK::Triple
Public Class Methods
host()
click to toggle source
@return [Triple] Object
representing the host architecture, vendor, OS, and environment.
# File lib/rcgtk/triple.rb, line 28 def self.host @host ||= Triple.new(host_string) end
host_string()
click to toggle source
@return [String] String representation of the host architecture, vendor, OS, and environment.
# File lib/rcgtk/triple.rb, line 33 def self.host_string @host_string ||= Bindings.get_default_target_triple end
new(overloaded)
click to toggle source
Create a new triple describing the host architecture, vendor, OS, and (optionally) environment.
@param [FFI::Pointer, String] overloaded
# File lib/rcgtk/triple.rb, line 45 def initialize(overloaded) @ptr, @str = case overloaded when FFI::Pointer then [overloaded, nil] when String then [Bindings.triple_create(overloaded), overloaded] end end
Public Instance Methods
to_s()
click to toggle source
@return [String] String representation of this triple.
# File lib/rcgtk/triple.rb, line 54 def to_s @str ||= Bindings.get_triple_string(@ptr) end