Class: Monet::CaptureMap
- Inherits:
-
Object
- Object
- Monet::CaptureMap
- Extended by:
- Forwardable
- Defined in:
- lib/monet/capture_map.rb
Defined Under Namespace
Classes: PathCollection, PathSpider
Instance Attribute Summary collapse
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(root_uri, type = :explicit) {|@path_helper| ... } ⇒ CaptureMap
constructor
A new instance of CaptureMap.
- #type_mapper ⇒ Object
Constructor Details
#initialize(root_uri, type = :explicit) {|@path_helper| ... } ⇒ CaptureMap
Returns a new instance of CaptureMap.
67 68 69 70 71 72 |
# File 'lib/monet/capture_map.rb', line 67 def initialize(root_uri, type=:explicit, &block) @type = type @path_helper = type_mapper.new root_uri yield(@path_helper) if block_given? end |
Instance Attribute Details
#type ⇒ Object (readonly)
Returns the value of attribute type.
65 66 67 |
# File 'lib/monet/capture_map.rb', line 65 def type @type end |
Instance Method Details
#type_mapper ⇒ Object
76 77 78 79 80 81 82 83 |
# File 'lib/monet/capture_map.rb', line 76 def type_mapper case @type when :explicit PathCollection when :spider PathSpider end end |