Class: Six::Query::Base

Inherits:
Object show all
Extended by:
ActionView::Helpers::SanitizeHelper::ClassMethods
Includes:
ActionView::Helpers::SanitizeHelper, ActionView::Helpers::TextHelper
Defined in:
lib/six-updater-web/vendor/plugins/six-query/lib/six/query/base.rb

Direct Known Subclasses

Gamespy, GamespyMaster

Defined Under Namespace

Classes: TimeoutError

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#icObject (readonly)

Returns the value of attribute ic.



10
11
12
# File 'lib/six-updater-web/vendor/plugins/six-query/lib/six/query/base.rb', line 10

def ic
  @ic
end

Instance Method Details

#clean(value) ⇒ Object



25
26
27
28
29
30
31
32
33
34
# File 'lib/six-updater-web/vendor/plugins/six-query/lib/six/query/base.rb', line 25

def clean(value)
  case value
    when /\A-?[0-9][0-9]*\.[0-9]*\Z/
      value.to_f
    when /\A-?[0-9][0-9]*\Z/
      value.to_i
    else
      strip_tags(ic.iconv(value + ' ')[0..-2])
  end
end

#loggerObject

def strip_tagsĀ©; c.strip; end



17
18
19
# File 'lib/six-updater-web/vendor/plugins/six-query/lib/six/query/base.rb', line 17

def logger
  ActionController::Base.logger
end