Class: Urbit::Fact::AddTagFact
Instance Attribute Summary
Attributes inherited from BaseFact
#ack, #channel, #data, #type
Instance Method Summary
collapse
#root_h
Methods inherited from BaseFact
#add_ack, #contents, #create_parser, #for_this_ship?, #graph_update?, #is_acknowledged?, #ship, #to_h, #to_s
Constructor Details
#initialize(channel:, event:) ⇒ AddTagFact
49
50
51
52
|
# File 'lib/urbit/fact/group_fact.rb', line 49
def initialize(channel:, event:)
super channel: channel, event: event
self.channel.ship.groups.add_tag group_path: self.parser.resource, ships: self.parser.ships, tag: self.parser.tag
end
|
Instance Method Details
#parser ⇒ Object
54
55
56
|
# File 'lib/urbit/fact/group_fact.rb', line 54
def parser
Urbit::ChangeTagParser.new(with_json: self.raw_json)
end
|
#raw_json ⇒ Object
58
59
60
|
# File 'lib/urbit/fact/group_fact.rb', line 58
def raw_json
self.root_h["addTag"]
end
|