class UIHex::CONVERTER
Constants
- COMMANDS
- CONFIG
- CONFIG_FILE_NAME
- COPIES_TO_CLIPBOARD
- FLOATING_POINT_PRECISION
- USES_FLOATING_POINTS
Public Class Methods
getConfigValueFrom(key)
click to toggle source
# File lib/uihex/converter.rb, line 55 def self.getConfigValueFrom(key) return CONFIG[key] end
setConfigValueFor(key, value)
click to toggle source
# File lib/uihex/converter.rb, line 59 def self.setConfigValueFor(key, value) CONFIG[key] = value File.open(CONFIG_FILE_NAME,'w') do |c| c.write CONFIG.to_yaml end end
validateAlphaRange(from, to)
click to toggle source
# File lib/uihex/converter.rb, line 66 def self.validateAlphaRange(from, to) if $options.key?(:alpha) && from.is_a?(Float) && to.is_a?(Float) if $options[:alpha].is_a?(Float) if !$options[:alpha].between?(from, to) STDERR.puts("Argument has to be in a range from " + from.to_s + " to " + to.to_s) exit(false) end end end end