Class: ConvenientService::Utils::Array::LimitedPush
- Inherits:
-
Support::Command
- Object
- Support::Command
- ConvenientService::Utils::Array::LimitedPush
- Defined in:
- lib/convenient_service/utils/array/limited_push.rb
Defined Under Namespace
Modules: Constants
Instance Attribute Summary collapse
-
#array ⇒ Object
readonly
Returns the value of attribute array.
-
#limit ⇒ Object
readonly
Returns the value of attribute limit.
-
#object ⇒ Object
readonly
Returns the value of attribute object.
Instance Method Summary collapse
- #call ⇒ Array<Object>
- #initialize(array, object, limit: Constants::DEFAULT_LIMIT) ⇒ void constructor
Methods inherited from Support::Command
Constructor Details
#initialize(array, object, limit: Constants::DEFAULT_LIMIT) ⇒ void
37 38 39 40 41 |
# File 'lib/convenient_service/utils/array/limited_push.rb', line 37 def initialize(array, object, limit: Constants::DEFAULT_LIMIT) @array = array @object = object @limit = limit end |
Instance Attribute Details
#array ⇒ Object (readonly)
Returns the value of attribute array.
18 19 20 |
# File 'lib/convenient_service/utils/array/limited_push.rb', line 18 def array @array end |
#limit ⇒ Object (readonly)
Returns the value of attribute limit.
30 31 32 |
# File 'lib/convenient_service/utils/array/limited_push.rb', line 30 def limit @limit end |
#object ⇒ Object (readonly)
Returns the value of attribute object.
24 25 26 |
# File 'lib/convenient_service/utils/array/limited_push.rb', line 24 def object @object end |