class DictClient::Strategies
Public Instance Methods
to_h()
click to toggle source
# File lib/dict_client/responses.rb, line 51 def to_h @table end
to_s()
click to toggle source
# File lib/dict_client/responses.rb, line 55 def to_s max_value = longest @table.values max_key = longest @table.keys print_formatted @table, max_key, max_value end
Private Instance Methods
process_line(line)
click to toggle source
# File lib/dict_client/responses.rb, line 65 def process_line line @table ||= {} if line =~ /^([^\s]+)\s+"(.+?)"/ @table[$1] = $2 end end