Class: Pubid::Components::Publisher

Inherits:
Lutaml::Model::Serializable
  • Object
show all
Defined in:
lib/pubid/components/publisher.rb

Overview

Publisher ISO, IEC, etc.

Direct Known Subclasses

Bsi::Components::Publisher

Instance Method Summary collapse

Instance Method Details

#eql?(other) ⇒ Boolean

Checks equality with another publisher component

Parameters:

  • other (Object)

    object to compare with

Returns:

  • (Boolean)

    true if equal



29
30
31
32
33
# File 'lib/pubid/components/publisher.rb', line 29

def eql?(other)
  return false unless other.is_a?(self.class)

  body == other.body
end

#hashInteger

Note:

Memoized for performance

Returns hash code for publisher component

Returns:

  • (Integer)

    hash code



22
23
24
# File 'lib/pubid/components/publisher.rb', line 22

def hash
  @hash ||= body.hash
end

#render(context: nil) ⇒ Object



15
16
17
# File 'lib/pubid/components/publisher.rb', line 15

def render(context: nil)
  body
end

#to_sObject



11
12
13
# File 'lib/pubid/components/publisher.rb', line 11

def to_s
  body
end