Class: Urbit::Fact::SettingsEventPutBucketFact
Instance Attribute Summary
Attributes inherited from BaseFact
#ack, #channel, #data, #type
Instance Method Summary
collapse
#base_contents, #bucket, #bucket_key, #desk, #desk_name, #initialize
Methods inherited from BaseFact
#add_ack, #create_parser, #for_this_ship?, #graph_update?, #initialize, #is_acknowledged?, #raw_json, #ship, #to_s
Instance Method Details
#accept ⇒ Object
69
70
71
72
73
74
|
# File 'lib/urbit/fact/settings_fact.rb', line 69
def accept
s = channel.ship.settings[desk: self.desk_name]
s.buckets << Bucket.new(setting: s, name: self.bucket_key, entries: self.entries)
nil
end
|
#contents ⇒ Object
76
77
78
|
# File 'lib/urbit/fact/settings_fact.rb', line 76
def contents
self.base_contents["put-bucket"]
end
|
#entries ⇒ Object
80
81
82
|
# File 'lib/urbit/fact/settings_fact.rb', line 80
def entries
self.contents["bucket"]
end
|
#to_h ⇒ Object
84
85
86
87
88
|
# File 'lib/urbit/fact/settings_fact.rb', line 84
def to_h
super.merge!({
entries: self.entries
})
end
|