Class: ConvenientService::Support::Arguments
- Inherits:
-
Object
- Object
- ConvenientService::Support::Arguments
show all
- Defined in:
- lib/convenient_service/support/arguments.rb,
lib/convenient_service/support/arguments/exceptions.rb,
lib/convenient_service/support/arguments/null_arguments.rb
Defined Under Namespace
Modules: Exceptions
Classes: NullArguments
Instance Attribute Summary collapse
Class Method Summary
collapse
Instance Method Summary
collapse
Constructor Details
#initialize(*args, **kwargs, &block) ⇒ void
33
34
35
36
37
|
# File 'lib/convenient_service/support/arguments.rb', line 33
def initialize(*args, **kwargs, &block)
@args = args
@kwargs = kwargs
@block = block
end
|
Instance Attribute Details
#args ⇒ Object
Returns the value of attribute args.
13
14
15
|
# File 'lib/convenient_service/support/arguments.rb', line 13
def args
@args
end
|
#block ⇒ Object
Returns the value of attribute block.
25
26
27
|
# File 'lib/convenient_service/support/arguments.rb', line 25
def block
@block
end
|
#kwargs ⇒ Object
Returns the value of attribute kwargs.
19
20
21
|
# File 'lib/convenient_service/support/arguments.rb', line 19
def kwargs
@kwargs
end
|
Instance Method Details
#==(other) ⇒ Boolean
88
89
90
91
92
93
94
95
96
|
# File 'lib/convenient_service/support/arguments.rb', line 88
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
58
59
60
61
62
63
64
|
# File 'lib/convenient_service/support/arguments.rb', line 58
def any?
return true if args.any?
return true if kwargs.any?
return true if block
false
end
|
#none? ⇒ Booleam
69
70
71
|
# File 'lib/convenient_service/support/arguments.rb', line 69
def none?
!any?
end
|
#null_arguments? ⇒ Boolean
51
52
53
|
# File 'lib/convenient_service/support/arguments.rb', line 51
def null_arguments?
false
end
|