Class: Urbit::Fact::SuccessFact

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

#codeObject



80
81
82
# File 'lib/urbit/fact/base_fact.rb', line 80

def code
  self.contents["ok"]
end

#responseObject



84
85
86
# File 'lib/urbit/fact/base_fact.rb', line 84

def response
  self.contents["response"]
end

#to_hObject



88
89
90
91
92
93
# File 'lib/urbit/fact/base_fact.rb', line 88

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