Class: Interfacets::Server::Bus
- Inherits:
-
Object
- Object
- Interfacets::Server::Bus
- Defined in:
- lib/interfacets/server/bus.rb
Instance Attribute Summary collapse
-
#asset_paths ⇒ Object
readonly
Returns the value of attribute asset_paths.
-
#root_url ⇒ Object
readonly
Returns the value of attribute root_url.
Instance Method Summary collapse
- #build(name:, store:) ⇒ Object
- #client_system_json(only_facets: false) ⇒ Object
- #handle(name:, id:, event:) ⇒ Object
-
#initialize(root_url:, asset_paths:) ⇒ Bus
constructor
A new instance of Bus.
Constructor Details
Instance Attribute Details
#asset_paths ⇒ Object (readonly)
Returns the value of attribute asset_paths.
6 7 8 |
# File 'lib/interfacets/server/bus.rb', line 6 def asset_paths @asset_paths end |
#root_url ⇒ Object (readonly)
Returns the value of attribute root_url.
6 7 8 |
# File 'lib/interfacets/server/bus.rb', line 6 def root_url @root_url end |
Instance Method Details
#build(name:, store:) ⇒ Object
25 26 27 |
# File 'lib/interfacets/server/bus.rb', line 25 def build(name:, store:) registry.build(name, store) end |
#client_system_json(only_facets: false) ⇒ Object
18 19 20 21 22 23 |
# File 'lib/interfacets/server/bus.rb', line 18 def client_system_json(only_facets: false) { assets: Assets.bundle(dirs: asset_paths, registry:, only_facets:), root_url: } end |
#handle(name:, id:, event:) ⇒ Object
29 30 31 |
# File 'lib/interfacets/server/bus.rb', line 29 def handle(name:, id:, event:) registry.load(name, id).handle(event) end |