Class: Pubid::Components::Publisher
- Inherits:
-
Lutaml::Model::Serializable
- Object
- Lutaml::Model::Serializable
- Pubid::Components::Publisher
show all
- Defined in:
- lib/pubid/components/publisher.rb
Overview
Publisher ISO, IEC, etc.
Human render: the publisher body (e.g. “ISO”). URN render: lowercase body (e.g. “iso”) per RFC 5141-bis.
Instance Method Summary
collapse
Instance Method Details
#copublished? ⇒ Boolean
24
25
26
|
# File 'lib/pubid/components/publisher.rb', line 24
def copublished?
false
end
|
#eql?(other) ⇒ Boolean
32
33
34
35
36
|
# File 'lib/pubid/components/publisher.rb', line 32
def eql?(other)
return false unless other.is_a?(self.class)
body == other.body
end
|
#hash ⇒ Object
28
29
30
|
# File 'lib/pubid/components/publisher.rb', line 28
def hash
@hash ||= body.hash
end
|
#render(context: nil) ⇒ Object
18
19
20
21
22
|
# File 'lib/pubid/components/publisher.rb', line 18
def render(context: nil)
return body&.downcase if context&.urn?
body
end
|
#to_s ⇒ Object
14
15
16
|
# File 'lib/pubid/components/publisher.rb', line 14
def to_s
body
end
|