Class: Typelizer::RouteConfig
- Inherits:
-
Struct
- Object
- Struct
- Typelizer::RouteConfig
- Defined in:
- lib/typelizer/route_config.rb,
lib/typelizer/route_config.rb
Instance Attribute Summary collapse
-
#camel_case ⇒ Object
Returns the value of attribute camel_case.
-
#enabled ⇒ Object
Returns the value of attribute enabled.
-
#exclude ⇒ Object
Returns the value of attribute exclude.
-
#format ⇒ Object
Returns the value of attribute format.
-
#include ⇒ Object
Returns the value of attribute include.
-
#output_dir ⇒ Object
Returns the value of attribute output_dir.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#camel_case ⇒ Object
Returns the value of attribute camel_case
4 5 6 |
# File 'lib/typelizer/route_config.rb', line 4 def camel_case @camel_case end |
#enabled ⇒ Object
Returns the value of attribute enabled
4 5 6 |
# File 'lib/typelizer/route_config.rb', line 4 def enabled @enabled end |
#exclude ⇒ Object
Returns the value of attribute exclude
4 5 6 |
# File 'lib/typelizer/route_config.rb', line 4 def exclude @exclude end |
#format ⇒ Object
Returns the value of attribute format
4 5 6 |
# File 'lib/typelizer/route_config.rb', line 4 def format @format end |
#include ⇒ Object
Returns the value of attribute include
4 5 6 |
# File 'lib/typelizer/route_config.rb', line 4 def include @include end |
#output_dir ⇒ Object
Returns the value of attribute output_dir
4 5 6 |
# File 'lib/typelizer/route_config.rb', line 4 def output_dir @output_dir end |
Class Method Details
.build(**overrides) ⇒ Object
38 39 40 |
# File 'lib/typelizer/route_config.rb', line 38 def self.build(**overrides) new(**defaults.merge(overrides)) end |
.defaults ⇒ Object
15 16 17 18 19 20 21 22 23 24 |
# File 'lib/typelizer/route_config.rb', line 15 def self.defaults { enabled: false, output_dir: nil, include: nil, exclude: nil, camel_case: true, format: :ts } end |
Instance Method Details
#file_ext ⇒ Object
34 35 36 |
# File 'lib/typelizer/route_config.rb', line 34 def file_ext js? ? "js" : "ts" end |
#js? ⇒ Boolean
30 31 32 |
# File 'lib/typelizer/route_config.rb', line 30 def js? format == :js end |
#ts? ⇒ Boolean
26 27 28 |
# File 'lib/typelizer/route_config.rb', line 26 def ts? format != :js end |