Class: TwitterCldr::Formatters::Rbnf::ImproperFractionRuleFormatter
- Inherits:
-
MasterRuleFormatter
- Object
- NormalRuleFormatter
- MasterRuleFormatter
- TwitterCldr::Formatters::Rbnf::ImproperFractionRuleFormatter
- Defined in:
- lib/twitter_cldr/formatters/numbers/rbnf/formatters.rb
Instance Attribute Summary
Attributes inherited from NormalRuleFormatter
#is_fractional, #locale, #omit, #rule_group, #rule_set
Instance Method Summary collapse
Methods inherited from MasterRuleFormatter
#close_bracket, #left_arrow, #right_arrow
Methods inherited from NormalRuleFormatter
#close_bracket, #decimal, #equals, #format, #generate_replacement, #initialize, #left_arrow, #plaintext, #plural, #right_arrow, #semicolon
Constructor Details
This class inherits a constructor from TwitterCldr::Formatters::Rbnf::NormalRuleFormatter
Instance Method Details
#open_bracket(number, rule, token) ⇒ Object
230 231 232 233 234 |
# File 'lib/twitter_cldr/formatters/numbers/rbnf/formatters.rb', line 230 def open_bracket(number, rule, token) # Omit the optional text if the number is between 0 and 1 (same as specifying both an x.x rule and a 0.x rule) @omit = number > 0 && number < 1 "" end |