Class: LocalIdentifier
- Inherits:
-
Object
- Object
- LocalIdentifier
- Defined in:
- lib/cirrocumulus/identifier.rb
Overview
Agent identifier for local agents.
Instance Method Summary collapse
- #==(other) ⇒ Object
- #eql?(other) ⇒ Boolean
- #hash ⇒ Object
-
#initialize(ontology_name) ⇒ LocalIdentifier
constructor
A new instance of LocalIdentifier.
- #to_s ⇒ Object
Constructor Details
#initialize(ontology_name) ⇒ LocalIdentifier
Returns a new instance of LocalIdentifier.
69 70 71 |
# File 'lib/cirrocumulus/identifier.rb', line 69 def initialize(ontology_name) @ontology_name = ontology_name end |
Instance Method Details
#==(other) ⇒ Object
73 74 75 76 77 |
# File 'lib/cirrocumulus/identifier.rb', line 73 def ==(other) return false if other.nil? || !other.is_a?(LocalIdentifier) to_s == other.to_s end |
#eql?(other) ⇒ Boolean
83 84 85 |
# File 'lib/cirrocumulus/identifier.rb', line 83 def eql?(other) self == other end |
#hash ⇒ Object
79 80 81 |
# File 'lib/cirrocumulus/identifier.rb', line 79 def hash to_s.hash end |
#to_s ⇒ Object
87 88 89 |
# File 'lib/cirrocumulus/identifier.rb', line 87 def to_s "local-%s" % @ontology_name end |