Class: Trifle::Docs::Harvester::Conveyor
- Inherits:
-
Object
- Object
- Trifle::Docs::Harvester::Conveyor
- Defined in:
- lib/trifle/docs/harvester.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#cache ⇒ Object
readonly
Returns the value of attribute cache.
-
#file ⇒ Object
readonly
Returns the value of attribute file.
-
#namespace ⇒ Object
readonly
Returns the value of attribute namespace.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
Instance Method Summary collapse
- #data ⇒ Object
-
#initialize(file:, url:, namespace:, cache:) ⇒ Conveyor
constructor
A new instance of Conveyor.
Constructor Details
#initialize(file:, url:, namespace:, cache:) ⇒ Conveyor
Returns a new instance of Conveyor.
87 88 89 90 91 92 |
# File 'lib/trifle/docs/harvester.rb', line 87 def initialize(file:, url:, namespace:, cache:) @file = file @url = url @namespace = namespace @cache = cache end |
Instance Attribute Details
#cache ⇒ Object (readonly)
Returns the value of attribute cache.
85 86 87 |
# File 'lib/trifle/docs/harvester.rb', line 85 def cache @cache end |
#file ⇒ Object (readonly)
Returns the value of attribute file.
85 86 87 |
# File 'lib/trifle/docs/harvester.rb', line 85 def file @file end |
#namespace ⇒ Object (readonly)
Returns the value of attribute namespace.
85 86 87 |
# File 'lib/trifle/docs/harvester.rb', line 85 def namespace @namespace end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
85 86 87 |
# File 'lib/trifle/docs/harvester.rb', line 85 def url @url end |
Instance Method Details
#data ⇒ Object
94 95 96 97 98 |
# File 'lib/trifle/docs/harvester.rb', line 94 def data @data = nil unless cache @data ||= ::File.read(file) end |