Module: EideticRML::Styles::HasWidth

Included in:
BulletStyle, PenStyle
Defined in:
lib/erml_styles.rb

Instance Method Summary collapse

Instance Method Details

#units(value = nil) ⇒ Object



32
33
34
35
# File 'lib/erml_styles.rb', line 32

def units(value=nil)
  return @units || :pt if value.nil?
  @units = value.to_sym
end

#width(value = nil, units = nil) ⇒ Object



26
27
28
29
30
# File 'lib/erml_styles.rb', line 26

def width(value=nil, units=nil)
  return @width || 0 if value.nil?
  return from_points(@width, value) if value.is_a?(Symbol)
  @width = parse_measurement_pts(value, units || self.units)
end