Class: GsImgFetcher::EntrySet
- Inherits:
-
Object
- Object
- GsImgFetcher::EntrySet
- Defined in:
- lib/gs_img_fetcher/entry_set.rb
Instance Attribute Summary collapse
-
#entries ⇒ Object
readonly
Returns the value of attribute entries.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(entries) ⇒ EntrySet
constructor
A new instance of EntrySet.
- #invalid_entries ⇒ Object
- #valid_entries ⇒ Object
Constructor Details
#initialize(entries) ⇒ EntrySet
Returns a new instance of EntrySet.
19 20 21 |
# File 'lib/gs_img_fetcher/entry_set.rb', line 19 def initialize(entries) @entries = entries end |
Instance Attribute Details
#entries ⇒ Object (readonly)
Returns the value of attribute entries.
17 18 19 |
# File 'lib/gs_img_fetcher/entry_set.rb', line 17 def entries @entries end |
Class Method Details
Instance Method Details
#invalid_entries ⇒ Object
27 28 29 |
# File 'lib/gs_img_fetcher/entry_set.rb', line 27 def invalid_entries @invalid_entries ||= entries.reject(&:valid?) end |
#valid_entries ⇒ Object
23 24 25 |
# File 'lib/gs_img_fetcher/entry_set.rb', line 23 def valid_entries @valid_entries ||= entries.select(&:valid?) end |