Sha256: 0a6cfa04860a95a477842f96af2185d4d48801b0d53dd1668c6469722493a7e5

Contents?: true

Size: 1.87 KB

Versions: 16

Compression:

Stored size: 1.87 KB

Contents

/**
 * @file
 * Declares the Ruby Facter::Util::Resolution class.
 */
#pragma once

#include "resolution.hpp"

namespace facter { namespace ruby {

    /**
     * Represents the Ruby Facter::Util::Resolution class.
     */
    struct simple_resolution : resolution
    {
        /**
         * Defines the Facter::Util::Resolution class.
         * @return Returns theFacter::Util::Resolution class.
         */
        static leatherman::ruby::VALUE define();

        /**
         * Creates an instance of the Facter::Util::Resolution class.
         * @return Returns the new instance.
         */
        static leatherman::ruby::VALUE create();

        /**
         * Gets the value of the resolution.
         * @return Returns the value of the resolution or nil if the value did not resolve.
         */
        virtual leatherman::ruby::VALUE value();

     private:
        // Construction and assignment
        simple_resolution();
        simple_resolution(simple_resolution const&) = delete;
        simple_resolution& operator=(simple_resolution const&) = delete;
        simple_resolution(simple_resolution&& other) = delete;
        simple_resolution& operator=(simple_resolution&& other) = delete;

        // Ruby lifecycle functions
        static leatherman::ruby::VALUE alloc(leatherman::ruby::VALUE klass);
        static void mark(void* data);
        static void free(void* data);

        static leatherman::ruby::VALUE ruby_setcode(int argc, leatherman::ruby::VALUE* argv, leatherman::ruby::VALUE self);
        static leatherman::ruby::VALUE ruby_which(leatherman::ruby::VALUE self, leatherman::ruby::VALUE binary);
        static leatherman::ruby::VALUE ruby_exec(leatherman::ruby::VALUE self, leatherman::ruby::VALUE command);

        leatherman::ruby::VALUE _self;
        leatherman::ruby::VALUE _block;
        leatherman::ruby::VALUE _command;
    };

}}  // namespace facter::ruby

Version data entries

16 entries across 16 versions & 2 rubygems

Version Path
facter-3.12.2.cfacter.20181217 ext/facter/facter/lib/inc/internal/ruby/simple_resolution.hpp
facter-3.12.1.cfacter.20181031 ext/facter/facter/lib/inc/internal/ruby/simple_resolution.hpp
facter-3.11.6.cfacter.20181031 ext/facter/facter/lib/inc/internal/ruby/simple_resolution.hpp
facter-3.12.1.cfacter.20181023 ext/facter/facter/lib/inc/internal/ruby/simple_resolution.hpp
facter-3.11.5.cfacter.20181022 ext/facter/facter/lib/inc/internal/ruby/simple_resolution.hpp
facter-3.12.0.cfacter.20181004 ext/facter/facter/lib/inc/internal/ruby/simple_resolution.hpp
facter-3.12.0.cfacter.20181001 ext/facter/facter/lib/inc/internal/ruby/simple_resolution.hpp
facter-3.12.0.cfacter.20180918 ext/facter/facter/lib/inc/internal/ruby/simple_resolution.hpp
facter-3.11.4.cfacter.20180821 ext/facter/facter/lib/inc/internal/ruby/simple_resolution.hpp
facter-3.11.3.cfacter.20180716 ext/facter/facter/lib/inc/internal/ruby/simple_resolution.hpp
facter-3.11.2.cfacter.20180612 ext/facter/facter/lib/inc/internal/ruby/simple_resolution.hpp
facter-3.9.6.cfacter.20180612 ext/facter/facter/lib/inc/internal/ruby/simple_resolution.hpp
facter-3.11.2.cfacter.20180606 ext/facter/facter/lib/inc/internal/ruby/simple_resolution.hpp
facter-3.9.6.cfacter.20180606 ext/facter/facter/lib/inc/internal/ruby/simple_resolution.hpp
facter-3.11.0.cfacter.20180319 ext/facter/facter/lib/inc/internal/ruby/simple_resolution.hpp
cfacter-3.11.0.rc.20180314 ext/facter/facter/lib/inc/internal/ruby/simple_resolution.hpp