Class: Subscene::SubtitleResultSet
- Inherits:
-
Object
- Object
- Subscene::SubtitleResultSet
- Defined in:
- lib/subscene/subtitle_result_set.rb
Instance Attribute Summary collapse
-
#instances ⇒ Object
readonly
Returns the value of attribute instances.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(attributes) ⇒ SubtitleResultSet
constructor
A new instance of SubtitleResultSet.
Constructor Details
#initialize(attributes) ⇒ SubtitleResultSet
Returns a new instance of SubtitleResultSet.
6 7 8 |
# File 'lib/subscene/subtitle_result_set.rb', line 6 def initialize(attributes) @instances = attributes[:instances] end |
Instance Attribute Details
#instances ⇒ Object (readonly)
Returns the value of attribute instances.
4 5 6 |
# File 'lib/subscene/subtitle_result_set.rb', line 4 def instances @instances end |
Class Method Details
.build(html) ⇒ Object
10 11 12 13 14 15 16 17 18 |
# File 'lib/subscene/subtitle_result_set.rb', line 10 def self.build(html) instances = html.css("tbody > tr").collect do |item| Subscene::SubtitleResult.build(item) end new({ instances: instances }) end |