Class: Trifle::Docs::Operations::Meta

Inherits:
Object
  • Object
show all
Defined in:
lib/trifle/docs/operations/meta.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**keywords) ⇒ Meta

Returns a new instance of Meta.



9
10
11
12
# File 'lib/trifle/docs/operations/meta.rb', line 9

def initialize(**keywords)
  @url = keywords.fetch(:url)
  @config = keywords[:config]
end

Instance Attribute Details

#urlObject (readonly)

Returns the value of attribute url.



7
8
9
# File 'lib/trifle/docs/operations/meta.rb', line 7

def url
  @url
end

Instance Method Details

#configObject



14
15
16
# File 'lib/trifle/docs/operations/meta.rb', line 14

def config
  @config || Trifle::Docs.default
end

#performObject



18
19
20
# File 'lib/trifle/docs/operations/meta.rb', line 18

def perform
  config.harvester.meta_for(url: url)
end