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
42 43 44 45 46 |
# File 'lib/convenient_service/utils/array/limited_push.rb', line 42 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.
23 24 25 |
# File 'lib/convenient_service/utils/array/limited_push.rb', line 23 def array @array end |
#limit ⇒ Object (readonly)
Returns the value of attribute limit.
35 36 37 |
# File 'lib/convenient_service/utils/array/limited_push.rb', line 35 def limit @limit end |
#object ⇒ Object (readonly)
Returns the value of attribute object.
29 30 31 |
# File 'lib/convenient_service/utils/array/limited_push.rb', line 29 def object @object end |