Class: Graphomaton::ExporterRegistry::Entry

Inherits:
Data
  • Object
show all
Defined in:
lib/graphomaton/exporter_registry.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#aliasesObject (readonly)

Returns the value of attribute aliases

Returns:

  • (Object)

    the current value of aliases



5
6
7
# File 'lib/graphomaton/exporter_registry.rb', line 5

def aliases
  @aliases
end

#binaryObject (readonly)

Returns the value of attribute binary

Returns:

  • (Object)

    the current value of binary



5
6
7
# File 'lib/graphomaton/exporter_registry.rb', line 5

def binary
  @binary
end

#capabilitiesObject (readonly)

Returns the value of attribute capabilities

Returns:

  • (Object)

    the current value of capabilities



5
6
7
# File 'lib/graphomaton/exporter_registry.rb', line 5

def capabilities
  @capabilities
end

#extensionsObject (readonly)

Returns the value of attribute extensions

Returns:

  • (Object)

    the current value of extensions



5
6
7
# File 'lib/graphomaton/exporter_registry.rb', line 5

def extensions
  @extensions
end

#loaderObject (readonly)

Returns the value of attribute loader

Returns:

  • (Object)

    the current value of loader



5
6
7
# File 'lib/graphomaton/exporter_registry.rb', line 5

def loader
  @loader
end

#nameObject (readonly)

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



5
6
7
# File 'lib/graphomaton/exporter_registry.rb', line 5

def name
  @name
end

Instance Method Details

#exporterObject

Raises:

  • (ArgumentError)


6
7
8
9
10
11
# File 'lib/graphomaton/exporter_registry.rb', line 6

def exporter
  resolved = loader.call
  return resolved if resolved.respond_to?(:new)

  raise ArgumentError, "Exporter #{name.inspect} loader must return a class"
end