Method: Coco::Svg#read_svg
- Defined in:
- app/components/coco/images/svg/svg.rb
#read_svg ⇒ Object
17 18 19 20 21 22 23 |
# File 'app/components/coco/images/svg/svg.rb', line 17 def read_svg File.read(full_path).html_safe rescue if Rails.env.development? || Rails.env.test? raise InvalidSvgError, "The SVG `#{full_path}` was not found" end end |