Class: ConvenientService::Support::Arguments
- Inherits:
-
Object
- Object
- ConvenientService::Support::Arguments
- Defined in:
- lib/convenient_service/support/arguments.rb,
lib/convenient_service/support/arguments/null_arguments.rb
Direct Known Subclasses
Defined Under Namespace
Classes: NullArguments
Instance Attribute Summary collapse
-
#args ⇒ Object
readonly
Returns the value of attribute args.
-
#block ⇒ Object
readonly
Returns the value of attribute block.
-
#kwargs ⇒ Object
readonly
Returns the value of attribute kwargs.
Class Method Summary collapse
Instance Method Summary collapse
- #==(other) ⇒ Boolean
- #any? ⇒ Booleam
- #initialize(*args, **kwargs, &block) ⇒ void constructor
- #none? ⇒ Booleam
- #null_arguments? ⇒ Boolean
Constructor Details
#initialize(*args, **kwargs, &block) ⇒ void
32 33 34 35 36 |
# File 'lib/convenient_service/support/arguments.rb', line 32 def initialize(*args, **kwargs, &block) @args = args @kwargs = kwargs @block = block end |
Instance Attribute Details
#args ⇒ Object (readonly)
Returns the value of attribute args.
12 13 14 |
# File 'lib/convenient_service/support/arguments.rb', line 12 def args @args end |
#block ⇒ Object (readonly)
Returns the value of attribute block.
24 25 26 |
# File 'lib/convenient_service/support/arguments.rb', line 24 def block @block end |
#kwargs ⇒ Object (readonly)
Returns the value of attribute kwargs.
18 19 20 |
# File 'lib/convenient_service/support/arguments.rb', line 18 def kwargs @kwargs end |
Class Method Details
.null_arguments ⇒ ConvenientService::Support::Arguments::NullArguments
42 43 44 |
# File 'lib/convenient_service/support/arguments.rb', line 42 def null_arguments @null_arguments ||= Support::Arguments::NullArguments.new end |
Instance Method Details
#==(other) ⇒ Boolean
76 77 78 79 80 81 82 83 84 |
# File 'lib/convenient_service/support/arguments.rb', line 76 def ==(other) return unless other.instance_of?(self.class) return false if args != other.args return false if kwargs != other.kwargs return false if block != other.block true end |
#any? ⇒ Booleam
57 58 59 60 61 62 63 |
# File 'lib/convenient_service/support/arguments.rb', line 57 def any? return true if args.any? return true if kwargs.any? return true if block false end |
#none? ⇒ Booleam
68 69 70 |
# File 'lib/convenient_service/support/arguments.rb', line 68 def none? !any? end |
#null_arguments? ⇒ Boolean
50 51 52 |
# File 'lib/convenient_service/support/arguments.rb', line 50 def null_arguments? false end |