Class: Stratagem::Crawler::Edge
- Defined in:
- lib/stratagem/crawler/site_model.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.
53 54 55 56 57 |
# File 'lib/stratagem/crawler/site_model.rb', line 53 def initialize(from, to, type) @from = from @to = to @type = type end |
Instance Attribute Details
#from ⇒ Object
type -> :link, :redirect,
51 52 53 |
# File 'lib/stratagem/crawler/site_model.rb', line 51 def from @from end |
#to ⇒ Object
type -> :link, :redirect,
51 52 53 |
# File 'lib/stratagem/crawler/site_model.rb', line 51 def to @to end |
#type ⇒ Object
type -> :link, :redirect,
51 52 53 |
# File 'lib/stratagem/crawler/site_model.rb', line 51 def type @type end |
Instance Method Details
#export ⇒ Object
59 60 61 62 63 64 65 |
# File 'lib/stratagem/crawler/site_model.rb', line 59 def export { :from => from.object_id, :to => to.object_id, :relation_type => type } end |