Class Index [+]

Quicksearch

Flt::Support

Public Instance Methods

FlagValues(*params) click to toggle source

Constructor for FlagValues

     # File lib/flt/support.rb, line 321
321:     def FlagValues(*params)
322:       if params.size==1 && params.first.kind_of?(FlagValues)
323:         params.first
324:       else
325:         FlagValues.new(*params)
326:       end
327:     end
Flags(*params) click to toggle source

Constructor for Flags

     # File lib/flt/support.rb, line 330
330:     def Flags(*params)
331:       if params.size==1 && params.first.kind_of?(Flags)
332:         params.first
333:       else
334:         Flags.new(*params)
335:       end
336:     end
simplified_round_mode(round_mode, negative) click to toggle source

replace :ceiling and :floor rounding modes by :up/:down (depending on sign of the number to be rounded)

     # File lib/flt/support.rb, line 340
340:     def simplified_round_mode(round_mode, negative)
341:       if negative
342:         if round_mode == :ceiling
343:           round_mode = :floor
344:         elsif round_mode == :floor
345:           round_mode = :ceiling
346:         end
347:       end
348:       if round_mode == :ceiling
349:         round_mode = :up
350:       elsif round_mode == :floor
351:         round_mode = :down
352:       end
353:       round_mode
354:     end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.