class Occi::Core::Renderers::TextRenderer

Implementes components necessary to render all required instance types to `text` or `text`-like format. Currently supported instance types can be queried via `::known_types`. Actual serialization happens in type-specific serializer classes which can be found in `Occi::Core::Renderers::Text`.

@author Boris Parak <parak@cesnet.cz>

Constants

TEXT_FORMATS

Supported formats

Public Class Methods

formats() click to toggle source

Returns a list of formats supported by this renderer. Formats are compliant with method naming restrictions and String-like.

@return [Array] list of formats

# File lib/occi/core/renderers/text_renderer.rb, line 50
def formats
  TEXT_FORMATS
end
known() click to toggle source

Returns a frozen Hash providing mapping information between supported types and supported serializers.

@return [Array] list of known type->serializer mappings

# File lib/occi/core/renderers/text_renderer.rb, line 58
def known
  {
    'Occi::Core::Category'       => Occi::Core::Renderers::Text::Category,
    'Occi::Core::ActionInstance' => Occi::Core::Renderers::Text::ActionInstance,
    'Occi::Core::Collection'     => Occi::Core::Renderers::Text::Collection,
    'Occi::Core::Model'          => Occi::Core::Renderers::Text::Model,
    'Occi::Core::Resource'       => Occi::Core::Renderers::Text::Resource,
    'Occi::Core::Link'           => Occi::Core::Renderers::Text::Link,
    'Occi::Core::Locations'      => Occi::Core::Renderers::Text::Locations
  }
end
renderer?() click to toggle source

Indicates whether this class is a renderer candidate.

@return [TrueClass, FalseClass] renderer flag

# File lib/occi/core/renderers/text_renderer.rb, line 41
def renderer?
  true
end