Class: WebAssets::ClientInterface
- Inherits:
-
Object
- Object
- WebAssets::ClientInterface
- Defined in:
- lib/web_assets/client_interface.rb
Instance Attribute Summary collapse
-
#api ⇒ Object
readonly
Returns the value of attribute api.
-
#input ⇒ Object
readonly
Returns the value of attribute input.
-
#output ⇒ Object
readonly
Returns the value of attribute output.
Instance Method Summary collapse
-
#initialize(api, options = {}) ⇒ ClientInterface
constructor
A new instance of ClientInterface.
- #listen ⇒ Object
Constructor Details
#initialize(api, options = {}) ⇒ ClientInterface
Returns a new instance of ClientInterface.
9 10 11 12 13 |
# File 'lib/web_assets/client_interface.rb', line 9 def initialize api, = {} @api = api @input = .fetch :input, STDIN @output = .fetch :output, STDOUT end |
Instance Attribute Details
#api ⇒ Object (readonly)
Returns the value of attribute api.
7 8 9 |
# File 'lib/web_assets/client_interface.rb', line 7 def api @api end |
#input ⇒ Object (readonly)
Returns the value of attribute input.
7 8 9 |
# File 'lib/web_assets/client_interface.rb', line 7 def input @input end |
#output ⇒ Object (readonly)
Returns the value of attribute output.
7 8 9 |
# File 'lib/web_assets/client_interface.rb', line 7 def output @output end |
Instance Method Details
#listen ⇒ Object
15 16 17 18 19 20 |
# File 'lib/web_assets/client_interface.rb', line 15 def listen Kernel.receive input, output do |request| WebAssets.logger.debug "ClientInterface#listen: request = #{request.inspect}" process request end end |