Exception: Para::Exporter::MissingExporterError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/para/exporter.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(model_name, format, exporter_name) ⇒ MissingExporterError

Returns a new instance of MissingExporterError.



6
7
8
9
10
# File 'lib/para/exporter.rb', line 6

def initialize(model_name, format, exporter_name)
  @model_name = model_name
  @format = format
  @exporter_name = exporter_name
end

Instance Attribute Details

#exporter_nameObject

Returns the value of attribute exporter_name.



4
5
6
# File 'lib/para/exporter.rb', line 4

def exporter_name
  @exporter_name
end

#formatObject

Returns the value of attribute format.



4
5
6
# File 'lib/para/exporter.rb', line 4

def format
  @format
end

#model_nameObject

Returns the value of attribute model_name.



4
5
6
# File 'lib/para/exporter.rb', line 4

def model_name
  @model_name
end

Instance Method Details

#messageObject



12
13
14
15
16
17
# File 'lib/para/exporter.rb', line 12

def message
  "No exporter found for model \"#{ model_name }\" and format " +
  "\"#{ format }\". Please create the #{ exporter_name } class " +
  "manually or with the following command : " +
  "`rails g para:exporter #{ model_name.underscore } #{ format }"
end