class Ryodo::SuffixList
Attributes
list[R]
suffix_data[R]
Public Class Methods
SuffixList(suffix_file = Ryodo::PUBLIC_SUFFIX_STORE)
click to toggle source
rubocop:disable Style/MethodName
# File lib/ryodo/suffix_list.rb, line 30 def SuffixList(suffix_file = Ryodo::PUBLIC_SUFFIX_STORE) instance(suffix_file) end
instance()
click to toggle source
# File lib/ryodo/suffix_list.rb, line 39 def instance @instance ||= new end
reload(suffix_file = Ryodo::PUBLIC_SUFFIX_STORE)
click to toggle source
rubocop:enable Style/MethodName
# File lib/ryodo/suffix_list.rb, line 35 def reload(suffix_file = Ryodo::PUBLIC_SUFFIX_STORE) instance.load_file(suffix_file) && true end
Private Class Methods
new(suffix_file = Ryodo::PUBLIC_SUFFIX_STORE)
click to toggle source
# File lib/ryodo/suffix_list.rb, line 7 def initialize(suffix_file = Ryodo::PUBLIC_SUFFIX_STORE) load_file(suffix_file) end
Public Instance Methods
inspect()
click to toggle source
# File lib/ryodo/suffix_list.rb, line 22 def inspect "#<#{self.class} FILE:#{@suffix_file} ENTRIES:#{@suffix_data.size}>" end
load_file(suffix_file = Ryodo::PUBLIC_SUFFIX_STORE)
click to toggle source
# File lib/ryodo/suffix_list.rb, line 15 def load_file(suffix_file = Ryodo::PUBLIC_SUFFIX_STORE) @suffix_file = suffix_file @suffix_data = parse_data << ["example"] end
parse_data()
click to toggle source
# File lib/ryodo/suffix_list.rb, line 11 def parse_data File.readlines(@suffix_file).map { |line| line.strip.split(".") } end