Class: Symgate::Cml::Symbol
Overview
defines the cml symbol information for a concept
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from Type
#==, hash_value_with_optional_namespace, #initialize
Constructor Details
This class inherits a constructor from Symgate::Type
Class Method Details
.from_soap(hash) ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/symgate/cml/symbol.rb', line 7 def self.from_soap(hash) Symgate::Cml::Symbol.new( symset: hash_value_with_optional_namespace(:cml, :symset, hash), main: hash_value_with_optional_namespace(:cml, :main, hash), top_left: hash_value_with_optional_namespace(:cml, :top_left, hash), top_right: hash_value_with_optional_namespace(:cml, :top_right, hash), bottom_left: hash_value_with_optional_namespace(:cml, :bottom_left, hash), bottom_right: hash_value_with_optional_namespace(:cml, :bottom_right, hash), full_left: hash_value_with_optional_namespace(:cml, :full_left, hash), full_right: hash_value_with_optional_namespace(:cml, :full_right, hash), top: hash_value_with_optional_namespace(:cml, :top, hash), extra: hash_value_with_optional_namespace(:cml, :extra, hash) ) end |
Instance Method Details
#to_s ⇒ Object
37 38 39 |
# File 'lib/symgate/cml/symbol.rb', line 37 def to_s "Symbol: #{@main}" end |
#to_soap ⇒ Object
22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/symgate/cml/symbol.rb', line 22 def to_soap { 'cml:symset': symset, 'cml:main': main, 'cml:top_left': top_left, 'cml:top_right': top_right, 'cml:bottom_left': bottom_left, 'cml:bottom_right': bottom_right, 'cml:full_left': full_left, 'cml:full_right': full_right, 'cml:top': top, 'cml:extra': extra }.delete_if { |_, v| v.nil? } end |