Class: XRBP::Model::Parsers::AccountUsername

Inherits:
PluginBase
  • Object
show all
Defined in:
lib/xrbp/model/parsers/account.rb

Overview

Account Username data parser

Instance Attribute Summary

Attributes inherited from PluginBase

#connection

Instance Method Summary collapse

Methods inherited from PluginBase

#initialize

Constructor Details

This class inherits a constructor from XRBP::PluginBase

Instance Method Details

#parse_result(res, req) ⇒ Object



36
37
38
39
40
# File 'lib/xrbp/model/parsers/account.rb', line 36

def parse_result(res, req)
  j = JSON.parse(res)
  # return res unless j.key?("exists")
  j["exists"] ? j["username"] : nil
end

#parser_priorityObject



32
33
34
# File 'lib/xrbp/model/parsers/account.rb', line 32

def parser_priority
  0
end