Class: Spider::Model::SortTask
Overview
Helper class for sorting models
Instance Attribute Summary collapse
-
#dependencies ⇒ Object
readonly
Returns the value of attribute dependencies.
-
#model ⇒ Object
readonly
Returns the value of attribute model.
Instance Method Summary collapse
- #<<(model) ⇒ Object
- #eql?(other) ⇒ Boolean
-
#initialize(model) ⇒ SortTask
constructor
A new instance of SortTask.
- #inspect ⇒ Object
Constructor Details
#initialize(model) ⇒ SortTask
Returns a new instance of SortTask.
444 445 446 447 |
# File 'lib/spiderfw/model/model.rb', line 444 def initialize(model) @model = model @dependencies = [] end |
Instance Attribute Details
#dependencies ⇒ Object (readonly)
Returns the value of attribute dependencies.
442 443 444 |
# File 'lib/spiderfw/model/model.rb', line 442 def dependencies @dependencies end |
#model ⇒ Object (readonly)
Returns the value of attribute model.
442 443 444 |
# File 'lib/spiderfw/model/model.rb', line 442 def model @model end |
Instance Method Details
#<<(model) ⇒ Object
449 450 451 |
# File 'lib/spiderfw/model/model.rb', line 449 def <<(model) @dependencies << model end |
#eql?(other) ⇒ Boolean
453 454 455 |
# File 'lib/spiderfw/model/model.rb', line 453 def eql?(other) @model == other.model end |
#inspect ⇒ Object
457 458 459 |
# File 'lib/spiderfw/model/model.rb', line 457 def inspect "#{@model.name} -> (#{dependencies.map{|d| d.model.name }.join(', ')})" end |