ModraUp Ruby API Documentation Ruby API Reference

Module: ModraUp::Licensing

Overview

Extended License. This host does not have Trimble Extension Warehouse access and is considered licensed.

Note: ModraUp extension. ModraUp::Licensing.licensed? is a module method to avoid NameError.

Examples:

ModraUp::Licensing.licensed?
ModraUp::Licensing.get_extension_license("com.example.ext").licensed?

Defined Under Namespace

Classes: ExtensionLicense

Constants # collapse

ModraUp::Licensing::LICENSED

ModraUp::Licensing::LICENSED = 0

ModraUp::Licensing::ExtensionLicense#state: Authorized.

Returns:

  • (Integer)

Examples:

ModraUp::Licensing::LICENSED  #=> 0
ModraUp::Licensing::EXPIRED

ModraUp::Licensing::EXPIRED = 1

License expired.

Returns:

  • (Integer)

Examples:

ModraUp::Licensing::EXPIRED  #=> 1
ModraUp::Licensing::TRIAL

ModraUp::Licensing::TRIAL = 2

Trial mode.

Returns:

  • (Integer)

Examples:

ModraUp::Licensing::TRIAL  #=> 2
ModraUp::Licensing::TRIAL_EXPIRED

ModraUp::Licensing::TRIAL_EXPIRED = 3

Trial expired.

Returns:

  • (Integer)

Examples:

ModraUp::Licensing::TRIAL_EXPIRED  #=> 3
ModraUp::Licensing::NOT_LICENSED

ModraUp::Licensing::NOT_LICENSED = 4

Returns:

  • (Integer)

Examples:

ModraUp::Licensing::NOT_LICENSED  #=> 4

Class Method Summary # collapse

Class Method Details

ModraUp::Licensing.licensed? ⇒ Boolean

The host is always true.

Returns:

  • (Boolean)
Note: ModraUp extension. SketchUp only inquires about licensing through ModraUp::Licensing::ExtensionLicense#licensed?.

Examples:

ModraUp::Licensing.licensed?  #=> true

ModraUp::Licensing.get_extension_license(ext_id) ⇒ ModraUp::Licensing::ExtensionLicense

Query extension authorization. Any ext_id returns the authorized object.

Parameters:

  • ext_id (String)

Returns:

  • (ModraUp::Licensing::ExtensionLicense)

Examples:

ModraUp::Licensing.get_extension_license("com.example.ext").licensed?