Class: Sketchup::ClassificationSchema

Inherits:
Object
  • Object
show all
Includes:
Comparable
Defined in:
lib/sketchup-api-stubs/stubs/Sketchup/ClassificationSchema.rb

Overview

The ClassificationSchema class represent schemas loaded in the model.

Version:

  • SketchUp 2015

Instance Method Summary collapse

Instance Method Details

#<=>(schema2) ⇒ Object

The <=> method is used to compare two ClassificationSchema objects for sorting. The comparison is done based on the schema name.

Examples:

schema1 = Sketchup.active_model.classifications["IFC 2x3"]
schema2 = Sketchup.active_model.classifications["gbXML"]
# Returns -1
result = schema1 <=> schema2
# Returns an array of sorted schemas.
schemas = Sketchup.active_model.classifications.to_a.sort

Version:

  • SketchUp 2015



34
35
# File 'lib/sketchup-api-stubs/stubs/Sketchup/ClassificationSchema.rb', line 34

def <=>(schema2)
end

#nameObject

The name method returns the name of the schema.

Examples:

Sketchup.active_model.classifications.each { |schema|
  puts schema.name
}

Version:

  • SketchUp 2015



47
48
# File 'lib/sketchup-api-stubs/stubs/Sketchup/ClassificationSchema.rb', line 47

def name
end

#namespaceObject

The namespace method returns the namespace of the schema.

Examples:

Sketchup.active_model.classifications.each { |schema|
  puts schema.namespace
}

Version:

  • SketchUp 2015



60
61
# File 'lib/sketchup-api-stubs/stubs/Sketchup/ClassificationSchema.rb', line 60

def namespace
end