Class: Jcsv::DFSymbols
- Inherits:
-
Object
- Object
- Jcsv::DFSymbols
- Defined in:
- lib/locale.rb
Class Attribute Summary collapse
-
.available_locs ⇒ Object
Returns the value of attribute available_locs.
Instance Attribute Summary collapse
-
#decimal_format_symbols ⇒ Object
Returns the value of attribute decimal_format_symbols.
Class Method Summary collapse
-
.available_locales ⇒ Object
—————————————————————————————.
-
.method_missing(symbol, *args) ⇒ Object
—————————————————————————————.
Instance Method Summary collapse
-
#initialize(locale = nil) ⇒ DFSymbols
constructor
—————————————————————————————.
-
#method_missing(symbol, *args) ⇒ Object
—————————————————————————————.
Constructor Details
#initialize(locale = nil) ⇒ DFSymbols
176 177 178 179 |
# File 'lib/locale.rb', line 176 def initialize(locale = nil) @decimal_format_symbols = (locale.nil?)? java.text.DecimalFormatSymbols.new() : java.text.DecimalFormatSymbols.new(locale.locale) end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(symbol, *args) ⇒ Object
185 186 187 |
# File 'lib/locale.rb', line 185 def method_missing(symbol, *args) @decimal_format_symbols.send(symbol, *args) end |
Class Attribute Details
.available_locs ⇒ Object
Returns the value of attribute available_locs.
143 144 145 |
# File 'lib/locale.rb', line 143 def available_locs @available_locs end |
Instance Attribute Details
#decimal_format_symbols ⇒ Object
Returns the value of attribute decimal_format_symbols.
140 141 142 |
# File 'lib/locale.rb', line 140 def decimal_format_symbols @decimal_format_symbols end |
Class Method Details
.available_locales ⇒ Object
152 153 154 155 156 157 158 159 160 161 162 |
# File 'lib/locale.rb', line 152 def self.available_locales if (@available_locs.size == 0) java.text.DecimalFormatSymbols.available_locales.each do |loc| @available_locs << Locale.new(loc) end end @available_locs end |
.method_missing(symbol, *args) ⇒ Object
168 169 170 |
# File 'lib/locale.rb', line 168 def self.method_missing(symbol, *args) java.text.DecimalFormatSymbols.send(symbol, *args) end |