lib/prawn/graphics/cap_style.rb in prawn-2.1.0 vs lib/prawn/graphics/cap_style.rb in prawn-2.2.0
- old
+ new
@@ -1,7 +1,5 @@
-# encoding: utf-8
-
# cap_style.rb : Implements stroke cap styling
#
# Contributed by Daniel Nelson. October, 2009
#
# This is free software. Please see the LICENSE and COPYING files for details.
@@ -9,11 +7,11 @@
module Prawn
module Graphics
module CapStyle
# @group Stable API
- CAP_STYLES = { :butt => 0, :round => 1, :projecting_square => 2 }
+ CAP_STYLES = { butt: 0, round: 1, projecting_square: 2 }.freeze
# Sets the cap style for stroked lines and curves
#
# style is one of :butt, :round, or :projecting_square
#
@@ -25,10 +23,10 @@
self.current_cap_style = style
write_stroke_cap_style
end
- alias_method :cap_style=, :cap_style
+ alias cap_style= cap_style
private
def current_cap_style
graphic_state.cap_style