Class: DuoRuby::Config
- Inherits:
-
Object
- Object
- DuoRuby::Config
- Defined in:
- lib/duoruby/config.rb
Overview
Holds framework-level configuration set by the application’s duoruby.rb.
Instance Attribute Summary collapse
-
#frontend_gems ⇒ Array<String>
Extra gems whose Opal sources are added to the frontend build.
-
#frontend_stubs ⇒ Array<String>
Paths to stub (compile as empty) in the frontend Opal build.
-
#host ⇒ String?
The server host, set by the framework before loading the app.
-
#port ⇒ Integer?
The server port, set by the framework before loading the app.
-
#title ⇒ String
The window title used by duoruby launch.
Instance Method Summary collapse
-
#initialize ⇒ Config
constructor
A new instance of Config.
Constructor Details
#initialize ⇒ Config
Returns a new instance of Config.
26 27 28 29 30 |
# File 'lib/duoruby/config.rb', line 26 def initialize @title = "DuoRuby" @frontend_gems = [] @frontend_stubs = [] end |
Instance Attribute Details
#frontend_gems ⇒ Array<String>
Returns extra gems whose Opal sources are added to the frontend build.
21 22 23 |
# File 'lib/duoruby/config.rb', line 21 def frontend_gems @frontend_gems end |
#frontend_stubs ⇒ Array<String>
Returns paths to stub (compile as empty) in the frontend Opal build.
24 25 26 |
# File 'lib/duoruby/config.rb', line 24 def frontend_stubs @frontend_stubs end |
#host ⇒ String?
Returns the server host, set by the framework before loading the app.
15 16 17 |
# File 'lib/duoruby/config.rb', line 15 def host @host end |
#port ⇒ Integer?
Returns the server port, set by the framework before loading the app.
18 19 20 |
# File 'lib/duoruby/config.rb', line 18 def port @port end |
#title ⇒ String
Returns the window title used by duoruby launch.
12 13 14 |
# File 'lib/duoruby/config.rb', line 12 def title @title end |