Class: Amiba::Source::LimitScope
- Inherits:
-
Object
- Object
- Amiba::Source::LimitScope
- Defined in:
- lib/amiba/source/entry_finder.rb
Instance Method Summary collapse
- #apply(entries) ⇒ Object
-
#initialize(limit = -1)) ⇒ LimitScope
constructor
A new instance of LimitScope.
Constructor Details
#initialize(limit = -1)) ⇒ LimitScope
Returns a new instance of LimitScope.
138 139 140 |
# File 'lib/amiba/source/entry_finder.rb', line 138 def initialize(limit = -1) @limit = (limit == -1 ? -1 : limit - 1) end |
Instance Method Details
#apply(entries) ⇒ Object
141 142 143 |
# File 'lib/amiba/source/entry_finder.rb', line 141 def apply(entries) entries[0..@limit] end |