Class: Squib::Args::SvgSpecial
- Inherits:
-
Object
- Object
- Squib::Args::SvgSpecial
show all
- Includes:
- ArgLoader
- Defined in:
- lib/squib/args/svg_special.rb
Class Method Summary
collapse
Instance Method Summary
collapse
Methods included from ArgLoader
#[], #convert_units, #deck_conf, #defaultify, #expand_and_set_and_defaultify, #expandable_singleton?, #extract!, #load!, #prep_layout_args, #validate
Class Method Details
.expanding_parameters ⇒ Object
15
16
17
|
# File 'lib/squib/args/svg_special.rb', line 15
def self.expanding_parameters
parameters.keys end
|
.parameters ⇒ Object
11
12
13
|
# File 'lib/squib/args/svg_special.rb', line 11
def self.parameters
{ data: nil, id: nil, force_id: false }
end
|
.params_with_units ⇒ Object
19
20
21
|
# File 'lib/squib/args/svg_special.rb', line 19
def self.params_with_units
[]
end
|
Instance Method Details
#render?(i) ⇒ Boolean
Only render if we have an ID specified, or we are forcing an ID
30
31
32
33
|
# File 'lib/squib/args/svg_special.rb', line 30
def render?(i)
return false if force_id[i] && id[i].to_s.empty?
return true
end
|
#validate_id(arg, _i) ⇒ Object
23
24
25
26
27
|
# File 'lib/squib/args/svg_special.rb', line 23
def validate_id(arg, _i)
return nil if arg.to_s.empty?
arg = '#' << arg unless arg.start_with? '#'
arg
end
|