Class: Geoblacklight::Reference

Inherits:
Object
  • Object
show all
Defined in:
lib/geoblacklight/reference.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(reference) ⇒ Reference

Returns a new instance of Reference.


5
6
7
# File 'lib/geoblacklight/reference.rb', line 5

def initialize(reference)
  @reference = reference
end

Instance Attribute Details

#referenceObject (readonly)

Returns the value of attribute reference


3
4
5
# File 'lib/geoblacklight/reference.rb', line 3

def reference
  @reference
end

Instance Method Details

#endpointObject


9
10
11
# File 'lib/geoblacklight/reference.rb', line 9

def endpoint
  @reference[1]
end

#to_hashObject


17
18
19
# File 'lib/geoblacklight/reference.rb', line 17

def to_hash
  { type => endpoint }
end

#typeObject


13
14
15
# File 'lib/geoblacklight/reference.rb', line 13

def type
  Geoblacklight::Constants::URI.key(@reference[0])
end