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.
58 59 60 61 62 63 |
# File 'lib/monet/capture_map.rb', line 58 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.
56 57 58 |
# File 'lib/monet/capture_map.rb', line 56 def type @type end |
Instance Method Details
#type_mapper ⇒ Object
67 68 69 70 71 72 73 74 |
# File 'lib/monet/capture_map.rb', line 67 def type_mapper case @type when :explicit PathCollection when :spider PathSpider end end |