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.
445 446 447 448 |
# File 'lib/spiderfw/model/model.rb', line 445 def initialize(model) @model = model @dependencies = [] end |
Instance Attribute Details
#dependencies ⇒ Object (readonly)
Returns the value of attribute dependencies.
443 444 445 |
# File 'lib/spiderfw/model/model.rb', line 443 def dependencies @dependencies end |
#model ⇒ Object (readonly)
Returns the value of attribute model.
443 444 445 |
# File 'lib/spiderfw/model/model.rb', line 443 def model @model end |
Instance Method Details
#<<(model) ⇒ Object
450 451 452 |
# File 'lib/spiderfw/model/model.rb', line 450 def <<(model) @dependencies << model end |
#eql?(other) ⇒ Boolean
454 455 456 |
# File 'lib/spiderfw/model/model.rb', line 454 def eql?(other) @model == other.model end |
#inspect ⇒ Object
458 459 460 |
# File 'lib/spiderfw/model/model.rb', line 458 def inspect "#{@model.name} -> (#{dependencies.map{|d| d.model.name }.join(', ')})" end |