Class: Jekyll::Geolexica::ConceptPage

Inherits:
PageWithoutAFile
  • Object
show all
Defined in:
lib/jekyll/geolexica/concept_page.rb

Direct Known Subclasses

HTML, JSON, JSONLD, TBX, Turtle, YAML

Defined Under Namespace

Classes: HTML, JSON, JSONLD, TBX, Turtle, YAML

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(site, concept) ⇒ ConceptPage

Returns a new instance of ConceptPage.



9
10
11
12
13
14
# File 'lib/jekyll/geolexica/concept_page.rb', line 9

def initialize(site, concept)
  @concept = concept
  @data = default_data.merge(concept.data)

  super(site, site.source, "concepts", page_name)
end

Instance Attribute Details

#conceptObject (readonly)

Returns the value of attribute concept.



7
8
9
# File 'lib/jekyll/geolexica/concept_page.rb', line 7

def concept
  @concept
end

Instance Method Details

#termidObject



16
17
18
# File 'lib/jekyll/geolexica/concept_page.rb', line 16

def termid
  concept.termid
end

#typeObject



20
21
22
# File 'lib/jekyll/geolexica/concept_page.rb', line 20

def type
  self.collection_name.to_sym
end