Module: AMS
- Defined in:
- RubyExtension/ams_Lib/main.rb,
Documentation/ams.rb,
RubyExtension/ams_Lib.rb,
RubyExtension/ams_Lib/translate.rb,
RubyExtension/ams_Lib/extension_manager.rb
Overview
AMS is a top level namespace of AMS Library. AMS stands for Anton M Synytsia.
Defined Under Namespace
Modules: Cursor, DLL, Geometry, Group, Keyboard, Lib, MIDI, Menu, Registry, Screen, Sketchup, System, Timer, Window Classes: ExtensionManager, MultiLineText, SketchupObserver, Translate
Constant Summary
- IS_PLATFORM_WINDOWS =
(RUBY_PLATFORM =~ /mswin|mingw/i ? true : false)
- IS_PLATFORM_OSX =
(RUBY_PLATFORM =~ /darwin/i ? true : false)
- IS_PLATFORM_LINUX =
(RUBY_PLATFORM =~ /linux/i ? true : false)
- IS_RUBY_VERSION_18 =
(RUBY_VERSION =~ /1.8/ ? true : false)
- IS_RUBY_VERSION_20 =
(RUBY_VERSION =~ /2.0/ ? true : false)
- IS_RUBY_VERSION_22 =
(RUBY_VERSION =~ /2.2/ ? true : false)
- IS_SKETCHUP_64BIT =
((Sketchup.respond_to?('is_64bit?') && Sketchup.is_64bit?) ? true : false)
- IS_SKETCHUP_32BIT =
!IS_SKETCHUP_64BIT
- TEMP_DIR =
dir.freeze
Class Method Summary collapse
-
.clamp(value, min, max) ⇒ Numeric
Clamp value between min and max.
-
.get_entity_by_id(id) ⇒ Sketchup::Entity?
Get entity by entity ID.
-
.get_top_entity_by_id(id) ⇒ Sketchup::Entity?
Get top level entity by entity ID.
-
.inspect_element(item) ⇒ Object
Convert a Ruby object to string that can be evaluated back into the same object.
-
.is_boolean?(object) ⇒ Boolean
(also: is_bool?)
Determine whether an object is a
true
orfalse
. -
.max(a, b) ⇒ Numeric
Get the greatest of two values.
-
.min(a, b) ⇒ Numeric
Get the least of two values.
-
.round(number, precision = 0) ⇒ Numeric
Round a numeric value to a particular number of decimal places.
-
.sign(value) ⇒ Fixnum
Get sign of a numeric value.
-
.validate_type(object, *types) ⇒ void
Validate object type.
Class Method Details
.clamp(value, min, max) ⇒ Numeric
Clamp value between min and max.
.get_entity_by_id(id) ⇒ Sketchup::Entity?
Get entity by entity ID.
.get_top_entity_by_id(id) ⇒ Sketchup::Entity?
Get top level entity by entity ID.
.inspect_element(item) ⇒ Object
Convert a Ruby object to string that can be evaluated back into the same object.
.is_boolean?(object) ⇒ Boolean Also known as: is_bool?
Determine whether an object is a true
or false
.
.max(a, b) ⇒ Numeric
Get the greatest of two values.
.min(a, b) ⇒ Numeric
Get the least of two values.
.round(number, precision = 0) ⇒ Numeric
Round a numeric value to a particular number of decimal places.
.sign(value) ⇒ Fixnum
Get sign of a numeric value.
.validate_type(object, *types) ⇒ void
This method returns an undefined value.
Validate object type.