Class: Pukiwiki2md::AttachmentURL
- Inherits:
-
Object
- Object
- Pukiwiki2md::AttachmentURL
- Defined in:
- lib/pukiwiki2md/transform.rb
Instance Attribute Summary collapse
-
#url ⇒ Object
readonly
Returns the value of attribute url.
Instance Method Summary collapse
- #basename ⇒ Object
-
#initialize(url) ⇒ AttachmentURL
constructor
A new instance of AttachmentURL.
Constructor Details
#initialize(url) ⇒ AttachmentURL
6 7 8 |
# File 'lib/pukiwiki2md/transform.rb', line 6 def initialize(url) @url = url end |
Instance Attribute Details
#url ⇒ Object (readonly)
Returns the value of attribute url.
4 5 6 |
# File 'lib/pukiwiki2md/transform.rb', line 4 def url @url end |
Instance Method Details
#basename ⇒ Object
10 11 12 |
# File 'lib/pukiwiki2md/transform.rb', line 10 def basename File.basename(URI.parse(@url).path) end |