Class: OpenBEL::Routes::Language

Inherits:
Base
  • Object
show all
Defined in:
app/openbel/api/routes/language.rb

Overview

Language defines and implements the /api/language routes to expose BEL functions, relationships, and version configured for the API.

Constant Summary collapse

JSON =
Rack::Mime.mime_type('.json')
TEXT =
Rack::Mime.mime_type('.txt')
ACCEPTED_TYPES =
{'json' => JSON, 'text' => TEXT}
DEFAULT_TYPE =
TEXT

Constants inherited from Base

Base::DEFAULT_CONTENT_TYPE, Base::DEFAULT_CONTENT_TYPE_ID, Base::RESOURCE_SERIALIZERS, Base::SCHEMA_BASE_URL, Base::SPOKEN_CONTENT_TYPES

Constants included from Schemas

Schemas::COMPILED_SCHEMAS, Schemas::SCHEMA_DIR, Schemas::SUFFIX

Constants included from OpenBEL::Resource::Namespaces

OpenBEL::Resource::Namespaces::VOCABULARY_RDF

Constants included from OpenBEL::Resource::Annotations

OpenBEL::Resource::Annotations::VOCABULARY_RDF

Instance Method Summary collapse

Methods included from Schemas

#validate

Constructor Details

#initialize(app) ⇒ Language

Returns a new instance of Language.



15
16
17
18
19
# File 'app/openbel/api/routes/language.rb', line 15

def initialize(app)
  super
  bel_version = OpenBEL::Settings[:bel][:version]
  @spec       = BELParser::Language.specification(bel_version)
end