Class: Prawn::SVG::FuncIRI

Inherits:
Struct
  • Object
show all
Defined in:
lib/prawn/svg/funciri.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#urlObject

Returns the value of attribute url

Returns:

  • (Object)

    the current value of url



1
2
3
# File 'lib/prawn/svg/funciri.rb', line 1

def url
  @url
end

Class Method Details

.parse(value) ⇒ Object



2
3
4
5
6
7
8
9
# File 'lib/prawn/svg/funciri.rb', line 2

def self.parse(value)
  case Prawn::SVG::CSS::ValuesParser.parse(value)
  in [['url', [url]]]
    new(url.strip)
  else
    nil
  end
end

Instance Method Details

#to_sObject



11
12
13
# File 'lib/prawn/svg/funciri.rb', line 11

def to_s
  "url(#{url})"
end