Class: RailroadDiagrams::Options
- Inherits:
-
Struct
- Object
- Struct
- RailroadDiagrams::Options
- Defined in:
- lib/railroad_diagrams/options.rb,
sig/generated/railroad_diagrams/options.rbs
Overview
Immutable-by-convention rendering settings used by Diagram output methods.
Instance Attribute Summary collapse
-
#ambiguous_width ⇒ Object
Returns the value of attribute ambiguous_width.
-
#arc_radius ⇒ Object
Returns the value of attribute arc_radius.
-
#char_width ⇒ Object
Returns the value of attribute char_width.
-
#coerce ⇒ Object
Returns the value of attribute coerce.
-
#comment_char_width ⇒ Object
Returns the value of attribute comment_char_width.
-
#debug ⇒ Object
Returns the value of attribute debug.
-
#diagram_class ⇒ Object
Returns the value of attribute diagram_class.
-
#escape_html ⇒ Object
Returns the value of attribute escape_html.
-
#href_mode ⇒ Object
Returns the value of attribute href_mode.
-
#id_prefix ⇒ Object
Returns the value of attribute id_prefix.
-
#inline_styles ⇒ Object
Returns the value of attribute inline_styles.
-
#internal_alignment ⇒ Object
Returns the value of attribute internal_alignment.
-
#link_policy ⇒ Object
Returns the value of attribute link_policy.
-
#link_policy_violation ⇒ Object
Returns the value of attribute link_policy_violation.
-
#link_rel ⇒ Object
Returns the value of attribute link_rel.
-
#link_target ⇒ Object
Returns the value of attribute link_target.
-
#locale ⇒ Object
Returns the value of attribute locale.
-
#max_width ⇒ Object
Returns the value of attribute max_width.
-
#measurer ⇒ Object
Returns the value of attribute measurer.
-
#optimize_paths ⇒ Object
Returns the value of attribute optimize_paths.
-
#precision ⇒ Object
Returns the value of attribute precision.
-
#show_end ⇒ Object
Returns the value of attribute show_end.
-
#show_start ⇒ Object
Returns the value of attribute show_start.
-
#stroke_odd_pixel_length ⇒ Object
Returns the value of attribute stroke_odd_pixel_length.
-
#text_charset ⇒ Object
Returns the value of attribute text_charset.
-
#theme ⇒ Object
Returns the value of attribute theme.
-
#vertical_separation ⇒ Object
Returns the value of attribute vertical_separation.
Class Method Summary collapse
Instance Method Summary collapse
-
#merge(**overrides) ⇒ Object
Return a copy with validated overrides.
Instance Attribute Details
#ambiguous_width ⇒ Object
Returns the value of attribute ambiguous_width
8 9 10 |
# File 'lib/railroad_diagrams/options.rb', line 8 def ambiguous_width @ambiguous_width end |
#arc_radius ⇒ Object
Returns the value of attribute arc_radius
8 9 10 |
# File 'lib/railroad_diagrams/options.rb', line 8 def arc_radius @arc_radius end |
#char_width ⇒ Object
Returns the value of attribute char_width
8 9 10 |
# File 'lib/railroad_diagrams/options.rb', line 8 def char_width @char_width end |
#coerce ⇒ Object
Returns the value of attribute coerce
8 9 10 |
# File 'lib/railroad_diagrams/options.rb', line 8 def coerce @coerce end |
#comment_char_width ⇒ Object
Returns the value of attribute comment_char_width
8 9 10 |
# File 'lib/railroad_diagrams/options.rb', line 8 def comment_char_width @comment_char_width end |
#debug ⇒ Object
Returns the value of attribute debug
8 9 10 |
# File 'lib/railroad_diagrams/options.rb', line 8 def debug @debug end |
#diagram_class ⇒ Object
Returns the value of attribute diagram_class
8 9 10 |
# File 'lib/railroad_diagrams/options.rb', line 8 def diagram_class @diagram_class end |
#escape_html ⇒ Object
Returns the value of attribute escape_html
8 9 10 |
# File 'lib/railroad_diagrams/options.rb', line 8 def escape_html @escape_html end |
#href_mode ⇒ Object
Returns the value of attribute href_mode
8 9 10 |
# File 'lib/railroad_diagrams/options.rb', line 8 def href_mode @href_mode end |
#id_prefix ⇒ Object
Returns the value of attribute id_prefix
8 9 10 |
# File 'lib/railroad_diagrams/options.rb', line 8 def id_prefix @id_prefix end |
#inline_styles ⇒ Object
Returns the value of attribute inline_styles
8 9 10 |
# File 'lib/railroad_diagrams/options.rb', line 8 def inline_styles @inline_styles end |
#internal_alignment ⇒ Object
Returns the value of attribute internal_alignment
8 9 10 |
# File 'lib/railroad_diagrams/options.rb', line 8 def internal_alignment @internal_alignment end |
#link_policy ⇒ Object
Returns the value of attribute link_policy
8 9 10 |
# File 'lib/railroad_diagrams/options.rb', line 8 def link_policy @link_policy end |
#link_policy_violation ⇒ Object
Returns the value of attribute link_policy_violation
8 9 10 |
# File 'lib/railroad_diagrams/options.rb', line 8 def link_policy_violation @link_policy_violation end |
#link_rel ⇒ Object
Returns the value of attribute link_rel
8 9 10 |
# File 'lib/railroad_diagrams/options.rb', line 8 def link_rel @link_rel end |
#link_target ⇒ Object
Returns the value of attribute link_target
8 9 10 |
# File 'lib/railroad_diagrams/options.rb', line 8 def link_target @link_target end |
#locale ⇒ Object
Returns the value of attribute locale
8 9 10 |
# File 'lib/railroad_diagrams/options.rb', line 8 def locale @locale end |
#max_width ⇒ Object
Returns the value of attribute max_width
8 9 10 |
# File 'lib/railroad_diagrams/options.rb', line 8 def max_width @max_width end |
#measurer ⇒ Object
Returns the value of attribute measurer
8 9 10 |
# File 'lib/railroad_diagrams/options.rb', line 8 def measurer @measurer end |
#optimize_paths ⇒ Object
Returns the value of attribute optimize_paths
8 9 10 |
# File 'lib/railroad_diagrams/options.rb', line 8 def optimize_paths @optimize_paths end |
#precision ⇒ Object
Returns the value of attribute precision
8 9 10 |
# File 'lib/railroad_diagrams/options.rb', line 8 def precision @precision end |
#show_end ⇒ Object
Returns the value of attribute show_end
8 9 10 |
# File 'lib/railroad_diagrams/options.rb', line 8 def show_end @show_end end |
#show_start ⇒ Object
Returns the value of attribute show_start
8 9 10 |
# File 'lib/railroad_diagrams/options.rb', line 8 def show_start @show_start end |
#stroke_odd_pixel_length ⇒ Object
Returns the value of attribute stroke_odd_pixel_length
8 9 10 |
# File 'lib/railroad_diagrams/options.rb', line 8 def stroke_odd_pixel_length @stroke_odd_pixel_length end |
#text_charset ⇒ Object
Returns the value of attribute text_charset
8 9 10 |
# File 'lib/railroad_diagrams/options.rb', line 8 def text_charset @text_charset end |
#theme ⇒ Object
Returns the value of attribute theme
8 9 10 |
# File 'lib/railroad_diagrams/options.rb', line 8 def theme @theme end |
#vertical_separation ⇒ Object
Returns the value of attribute vertical_separation
8 9 10 |
# File 'lib/railroad_diagrams/options.rb', line 8 def vertical_separation @vertical_separation end |
Class Method Details
.new(vertical_separation:, arc_radius:, diagram_class:, stroke_odd_pixel_length:, internal_alignment:, char_width:, comment_char_width:, ambiguous_width:, measurer:, text_charset:, escape_html:, precision:, optimize_paths:, href_mode:, link_policy:, link_policy_violation:, link_target:, link_rel:, id_prefix:, debug:, locale:, theme:, inline_styles:, max_width:, show_start:, show_end:, coerce:) ⇒ instance .new(arg0) ⇒ instance
62 63 |
# File 'sig/generated/railroad_diagrams/options.rbs', line 62
def self.new: (?vertical_separation: untyped, ?arc_radius: untyped, ?diagram_class: untyped, ?stroke_odd_pixel_length: untyped, ?internal_alignment: untyped, ?char_width: untyped, ?comment_char_width: untyped, ?ambiguous_width: untyped, ?measurer: untyped, ?text_charset: untyped, ?escape_html: untyped, ?precision: untyped, ?optimize_paths: untyped, ?href_mode: untyped, ?link_policy: untyped, ?link_policy_violation: untyped, ?link_target: untyped, ?link_rel: untyped, ?id_prefix: untyped, ?debug: untyped, ?locale: untyped, ?theme: untyped, ?inline_styles: untyped, ?max_width: untyped, ?show_start: untyped, ?show_end: untyped, ?coerce: untyped) -> instance
| ({ ?vertical_separation: untyped, ?arc_radius: untyped, ?diagram_class: untyped, ?stroke_odd_pixel_length: untyped, ?internal_alignment: untyped, ?char_width: untyped, ?comment_char_width: untyped, ?ambiguous_width: untyped, ?measurer: untyped, ?text_charset: untyped, ?escape_html: untyped, ?precision: untyped, ?optimize_paths: untyped, ?href_mode: untyped, ?link_policy: untyped, ?link_policy_violation: untyped, ?link_target: untyped, ?link_rel: untyped, ?id_prefix: untyped, ?debug: untyped, ?locale: untyped, ?theme: untyped, ?inline_styles: untyped, ?max_width: untyped, ?show_start: untyped, ?show_end: untyped, ?coerce: untyped }) -> instance
|
Instance Method Details
#merge(**overrides) ⇒ Object
Return a copy with validated overrides.
19 20 21 22 23 24 |
# File 'lib/railroad_diagrams/options.rb', line 19 def merge(**overrides) unknown = overrides.keys - members raise InvalidArgument, "unknown option(s): #{unknown.join(', ')}" unless unknown.empty? self.class.new(**to_h.merge(overrides)).freeze # rubocop:disable Style/KeywordArgumentsMerging end |