Class: Urbit::Fact::ErrorFact

Inherits:
BaseFact
  • Object
show all
Defined in:
lib/urbit/fact/base_fact.rb

Instance Attribute Summary

Attributes inherited from BaseFact

#ack, #channel, #data, #type

Instance Method Summary collapse

Methods inherited from BaseFact

#add_ack, #contents, #create_parser, #for_this_ship?, #graph_update?, #initialize, #is_acknowledged?, #raw_json, #ship, #to_s

Constructor Details

This class inherits a constructor from Urbit::Fact::BaseFact

Instance Method Details

#errorObject



63
64
65
# File 'lib/urbit/fact/base_fact.rb', line 63

def error
  self.contents["err"]
end

#responseObject



67
68
69
# File 'lib/urbit/fact/base_fact.rb', line 67

def response
  self.contents["response"]
end

#to_hObject



71
72
73
74
75
76
# File 'lib/urbit/fact/base_fact.rb', line 71

def to_h
  super.merge!({
    error:    self.error,
    response: self.response,
  })
end