class Halibut::LinkRelation

Domain object that represents a Relation

spec spec spec.

Attributes

curie[RW]
name[RW]

Public Class Methods

new(name) click to toggle source
# File lib/halibut/link_relation.rb, line 9
def initialize(name)
  splits = name.to_s.split(":")

  splits.size < 2 ? @name = splits.first : (@curie, @name = splits)
end

Public Instance Methods

eql?(other) click to toggle source
# File lib/halibut/link_relation.rb, line 15
def eql?(other)
  hash == other.hash
end
hash() click to toggle source
# File lib/halibut/link_relation.rb, line 19
def hash
  instance_variables.hash
end
to_s() click to toggle source
# File lib/halibut/link_relation.rb, line 23
def to_s
  @curie and "#{@curie}:#{@name}" or @name
end