Class: Squib::Args::Coords
- Inherits:
-
Object
- Object
- Squib::Args::Coords
- Includes:
- ArgLoader, XYWHShorthands
- Defined in:
- lib/squib/args/coords.rb
Constant Summary
Constants included from XYWHShorthands
XYWHShorthands::DECK_DIV_REGEX, XYWHShorthands::DECK_MINUS_REGEX, XYWHShorthands::DECK_ONLY, XYWHShorthands::DECK_PLUS_REGEX, XYWHShorthands::MIDDLE_MINUS_REGEX, XYWHShorthands::MIDDLE_ONLY, XYWHShorthands::MIDDLE_PLUS_REGEX
Class Method Summary collapse
Instance Method Summary collapse
- #validate_cx1(arg, i) ⇒ Object
- #validate_cx2(arg, i) ⇒ Object
- #validate_cy1(arg, _i) ⇒ Object
- #validate_cy2(arg, _i) ⇒ Object
- #validate_x(arg, i) ⇒ Object
- #validate_x1(arg, i) ⇒ Object
- #validate_x2(arg, i) ⇒ Object
- #validate_x3(arg, i) ⇒ Object
- #validate_y(arg, _i) ⇒ Object
- #validate_y1(arg, _i) ⇒ Object
- #validate_y2(arg, _i) ⇒ Object
- #validate_y3(arg, _i) ⇒ Object
Methods included from XYWHShorthands
Methods included from ArgLoader
#[], #convert_units, #defaultify, #expand_and_set_and_defaultify, #expandable_singleton?, #extract!, #load!, #prep_layout_args, #validate
Class Method Details
.expanding_parameters ⇒ Object
27 28 29 |
# File 'lib/squib/args/coords.rb', line 27 def self. parameters.keys # all of them end |
.parameters ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/squib/args/coords.rb', line 13 def self.parameters { x: 0, y: 0, x1: 100, y1: 100, x2: 150, y2: 150, x3: 100, y3: 150, cx1: 0 , cy1: 0, cx2: 0 , cy2: 0, inner_radius: 50, outer_radius: 100, radius: 100, n: 5, arc_start: 0, arc_end: 2 * Math::PI, arc_direction: :clockwise, arc_close: false, } end |
.params_with_units ⇒ Object
31 32 33 |
# File 'lib/squib/args/coords.rb', line 31 def self.params_with_units parameters.keys # all of them end |
Instance Method Details
#validate_cx1(arg, i) ⇒ Object
43 |
# File 'lib/squib/args/coords.rb', line 43 def validate_cx1(arg, i) apply_shorthands(arg, @deck, axis: :x) end |
#validate_cx2(arg, i) ⇒ Object
45 |
# File 'lib/squib/args/coords.rb', line 45 def validate_cx2(arg, i) apply_shorthands(arg, @deck, axis: :x) end |
#validate_cy1(arg, _i) ⇒ Object
44 |
# File 'lib/squib/args/coords.rb', line 44 def validate_cy1(arg,_i) apply_shorthands(arg, @deck, axis: :y) end |
#validate_cy2(arg, _i) ⇒ Object
46 |
# File 'lib/squib/args/coords.rb', line 46 def validate_cy2(arg,_i) apply_shorthands(arg, @deck, axis: :y) end |
#validate_x(arg, i) ⇒ Object
35 |
# File 'lib/squib/args/coords.rb', line 35 def validate_x(arg, i) apply_shorthands(arg, @deck, axis: :x) end |
#validate_x1(arg, i) ⇒ Object
37 |
# File 'lib/squib/args/coords.rb', line 37 def validate_x1(arg, i) apply_shorthands(arg, @deck, axis: :x) end |
#validate_x2(arg, i) ⇒ Object
39 |
# File 'lib/squib/args/coords.rb', line 39 def validate_x2(arg, i) apply_shorthands(arg, @deck, axis: :x) end |
#validate_x3(arg, i) ⇒ Object
41 |
# File 'lib/squib/args/coords.rb', line 41 def validate_x3(arg, i) apply_shorthands(arg, @deck, axis: :x) end |
#validate_y(arg, _i) ⇒ Object
36 |
# File 'lib/squib/args/coords.rb', line 36 def validate_y(arg,_i) apply_shorthands(arg, @deck, axis: :y) end |
#validate_y1(arg, _i) ⇒ Object
38 |
# File 'lib/squib/args/coords.rb', line 38 def validate_y1(arg,_i) apply_shorthands(arg, @deck, axis: :y) end |
#validate_y2(arg, _i) ⇒ Object
40 |
# File 'lib/squib/args/coords.rb', line 40 def validate_y2(arg,_i) apply_shorthands(arg, @deck, axis: :y)end |
#validate_y3(arg, _i) ⇒ Object
42 |
# File 'lib/squib/args/coords.rb', line 42 def validate_y3(arg,_i) apply_shorthands(arg, @deck, axis: :y) end |