Class: Urbit::Fact::AddGroupMemberFact
- Inherits:
-
GroupUpdateFact
- Object
- BaseFact
- GroupUpdateFact
- Urbit::Fact::AddGroupMemberFact
- Defined in:
- lib/urbit/fact/group_fact.rb
Instance Attribute Summary
Attributes inherited from BaseFact
Instance Method Summary collapse
-
#initialize(channel:, event:) ⇒ AddGroupMemberFact
constructor
A new instance of AddGroupMemberFact.
- #parser ⇒ Object
- #raw_json ⇒ Object
Methods inherited from GroupUpdateFact
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:) ⇒ AddGroupMemberFact
Returns a new instance of AddGroupMemberFact.
34 35 36 37 |
# File 'lib/urbit/fact/group_fact.rb', line 34 def initialize(channel:, event:) super channel: channel, event: event self.channel.ship.groups.add_members group_path: self.parser.resource, ships: self.parser.ships end |
Instance Method Details
#parser ⇒ Object
39 40 41 |
# File 'lib/urbit/fact/group_fact.rb', line 39 def parser Urbit::ChangeMemberParser.new(with_json: self.raw_json) end |
#raw_json ⇒ Object
43 44 45 |
# File 'lib/urbit/fact/group_fact.rb', line 43 def raw_json self.root_h["addMembers"] end |