class FbErrorMachine::GraphApiError
Attributes
description[RW]
error_code[RW]
instructions[RW]
Public Class Methods
all()
click to toggle source
# File lib/fb_error_machine/graph_api_error.rb, line 7 def self.all @_errors ||= begin YAML.load_file(File.join(File.dirname(__FILE__), "graph_api_errors.yml")).map do |entry| GraphApiError.new(entry) end rescue Psych::SyntaxError, Errno::EACCES, Errno::ENOENT {} end end
find(error_code)
click to toggle source
# File lib/fb_error_machine/graph_api_error.rb, line 17 def self.find(error_code) GraphApiError.all.detect { |e| e.error_code == error_code.to_s } end