Class: Fleek::Server
- Inherits:
-
ActionCable::Server::Base
- Object
- ActionCable::Server::Base
- Fleek::Server
- Defined in:
- lib/fleek/server.rb,
lib/fleek/server/configuration.rb
Defined Under Namespace
Classes: Configuration
Instance Attribute Summary collapse
-
#helpers ⇒ Object
readonly
Returns the value of attribute helpers.
Class Method Summary collapse
Instance Method Summary collapse
- #config ⇒ Object
-
#initialize(env) ⇒ Server
constructor
A new instance of Server.
- #rebuild ⇒ Object
Constructor Details
#initialize(env) ⇒ Server
Returns a new instance of Server.
9 10 11 12 13 14 15 16 17 |
# File 'lib/fleek/server.rb', line 9 def initialize(env) super() @env = env @helpers = Fleek::Helpers.new(env) @listener = Listen.to(*@env.paths, latency: 0.1, wait_for_delay: 0.1) do |modified, added, removed| rebuild end @listener.start end |
Instance Attribute Details
#helpers ⇒ Object (readonly)
Returns the value of attribute helpers.
7 8 9 |
# File 'lib/fleek/server.rb', line 7 def helpers @helpers end |
Class Method Details
.config ⇒ Object
19 20 21 |
# File 'lib/fleek/server.rb', line 19 def self.config Fleek::Server::Configuration end |
Instance Method Details
#config ⇒ Object
23 24 25 |
# File 'lib/fleek/server.rb', line 23 def config self.class.config end |
#rebuild ⇒ Object
27 28 29 30 31 |
# File 'lib/fleek/server.rb', line 27 def rebuild connections.map do |connection| connection.send_async(:check_assets) end end |