Class: ExchangeRatesGenerator::Formatters::Javascript

Inherits:
Base
  • Object
show all
Defined in:
lib/exchange-rates-generator/formatters/javascript.rb

Instance Attribute Summary

Attributes inherited from Base

#currency, #rates

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Base

formatters, inherited, #to_s

Constructor Details

#initialize(currency, rates) ⇒ Javascript

Returns a new instance of Javascript.



4
5
6
# File 'lib/exchange-rates-generator/formatters/javascript.rb', line 4

def initialize(currency, rates)
  super(currency, rates)
end

Class Method Details

.default_extensionObject



17
18
19
# File 'lib/exchange-rates-generator/formatters/javascript.rb', line 17

def default_extension
  :js
end

.descriptionObject



21
22
23
# File 'lib/exchange-rates-generator/formatters/javascript.rb', line 21

def description
  "Javascript Formatter"
end

Instance Method Details

#default_extensionObject



8
9
10
# File 'lib/exchange-rates-generator/formatters/javascript.rb', line 8

def default_extension
  self.class.default_extension
end

#descriptionObject



12
13
14
# File 'lib/exchange-rates-generator/formatters/javascript.rb', line 12

def description
  self.class.description
end