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

#aliases ⇒ Object (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

#binary ⇒ Object (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

#capabilities ⇒ Object (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

#extensions ⇒ Object (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

#loader ⇒ Object (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

#name ⇒ Object (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

#exporter ⇒ Object

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