Class: Uniword::Wordprocessingml::StyleName

Inherits:
Lutaml::Model::Serializable
  • Object
show all
Defined in:
lib/uniword/wordprocessingml/style_name.rb

Overview

Style name

Generated from OOXML schema: wordprocessingml.yml Element: <w:name>

Instance Method Summary collapse

Instance Method Details

#==(other) ⇒ Object Also known as: eql?

Compare with another StyleName or a string



22
23
24
25
26
27
28
29
30
# File 'lib/uniword/wordprocessingml/style_name.rb', line 22

def ==(other)
  if other.is_a?(StyleName)
    val == other.val
  elsif other.is_a?(String)
    val == other
  else
    super
  end
end

#hashObject

For hash key compatibility



40
41
42
# File 'lib/uniword/wordprocessingml/style_name.rb', line 40

def hash
  val.hash
end

#to_sObject

For string interpolation and general string-like behavior



35
36
37
# File 'lib/uniword/wordprocessingml/style_name.rb', line 35

def to_s
  val.to_s
end