Class: ExtraSpace::Link

Inherits:
Object
  • Object
show all
Defined in:
lib/extraspace/link.rb

Overview

A link in a sitemap.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(loc:, lastmod:) ⇒ Link



16
17
18
19
# File 'lib/extraspace/link.rb', line 16

def initialize(loc:, lastmod:)
  @loc = loc
  @lastmod = Time.parse(lastmod) if lastmod
end

Instance Attribute Details

#lastmodTime



12
13
14
# File 'lib/extraspace/link.rb', line 12

def lastmod
  @lastmod
end

#locString



8
9
10
# File 'lib/extraspace/link.rb', line 8

def loc
  @loc
end

Instance Method Details

#inspectString



22
23
24
# File 'lib/extraspace/link.rb', line 22

def inspect
  "#<#{self.class.name} loc=#{@loc.inspect} lastmod=#{@lastmod.inspect}>"
end