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

Returns a new instance of Link.

Parameters:

  • loc (String)
  • lastmod (String)


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

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

Instance Attribute Details

#lastmodTime

Returns:

  • (Time)


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

def lastmod
  @lastmod
end

#locString

Returns:

  • (String)


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

def loc
  @loc
end

Instance Method Details

#inspectString

Returns:

  • (String)


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

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