Class: Stratagem::Crawler::SiteModel::Edge
- Defined in:
- lib/stratagem/crawler/site_model/edge.rb
Instance Attribute Summary collapse
-
#from ⇒ Object
type -> :link, :redirect,.
-
#to ⇒ Object
type -> :link, :redirect,.
-
#type ⇒ Object
type -> :link, :redirect,.
Instance Method Summary collapse
- #export ⇒ Object
-
#initialize(from, to, type) ⇒ Edge
constructor
A new instance of Edge.
Constructor Details
#initialize(from, to, type) ⇒ Edge
Returns a new instance of Edge.
6 7 8 9 10 |
# File 'lib/stratagem/crawler/site_model/edge.rb', line 6 def initialize(from, to, type) @from = from @to = to @type = type end |
Instance Attribute Details
#from ⇒ Object
type -> :link, :redirect,
4 5 6 |
# File 'lib/stratagem/crawler/site_model/edge.rb', line 4 def from @from end |
#to ⇒ Object
type -> :link, :redirect,
4 5 6 |
# File 'lib/stratagem/crawler/site_model/edge.rb', line 4 def to @to end |
#type ⇒ Object
type -> :link, :redirect,
4 5 6 |
# File 'lib/stratagem/crawler/site_model/edge.rb', line 4 def type @type end |
Instance Method Details
#export ⇒ Object
12 13 14 15 16 17 18 |
# File 'lib/stratagem/crawler/site_model/edge.rb', line 12 def export { :from_page_external_id => from.object_id, :to_page_external_id => to.object_id, :relation_type => type } end |