Class: Chemicalml::Cli::ElementsCommand

Inherits:
Command
  • Object
show all
Defined in:
lib/chemicalml/cli/elements_command.rb

Overview

chemicalml elements — list every CML wire class registered in Schema3 with its XML element name.

Instance Attribute Summary

Attributes inherited from Command

#logger

Instance Method Summary collapse

Methods inherited from Command

#initialize, run

Constructor Details

This class inherits a constructor from Chemicalml::Cli::Command

Instance Method Details

#run(_options = {}) ⇒ Object



8
9
10
11
12
13
14
# File 'lib/chemicalml/cli/elements_command.rb', line 8

def run(_options = {})
  Chemicalml::Cml::Schema3::Configuration.ensure_registered!
  Chemicalml::Cml::Elements::ALL.sort.each do |cls, xml_id|
    puts "#{cls.to_s.ljust(25)} → <#{xml_id}>"
  end
  0
end