Class: Urbit::Fact::InitialGroupGroupFact
- Inherits:
-
GroupUpdateFact
- Object
- BaseFact
- GroupUpdateFact
- Urbit::Fact::InitialGroupGroupFact
- Defined in:
- lib/urbit/fact/group_fact.rb
Instance Attribute Summary
Attributes inherited from BaseFact
Instance Method Summary collapse
-
#initialize(channel:, event:) ⇒ InitialGroupGroupFact
constructor
A new instance of InitialGroupGroupFact.
- #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:) ⇒ InitialGroupGroupFact
Returns a new instance of InitialGroupGroupFact.
79 80 81 82 |
# File 'lib/urbit/fact/group_fact.rb', line 79 def initialize(channel:, event:) super channel: channel, event: event self.channel.ship.groups.add(self.parser.group) end |
Instance Method Details
#parser ⇒ Object
84 85 86 |
# File 'lib/urbit/fact/group_fact.rb', line 84 def parser Urbit::InitialGroupGroupParser.new(with_json: self.raw_json) end |
#raw_json ⇒ Object
88 89 90 |
# File 'lib/urbit/fact/group_fact.rb', line 88 def raw_json self.root_h["initialGroup"] end |