Module: Foobara::CommandPatternImplementation::Concerns::CommandData::ClassMethods
- Defined in:
- foobara-0.5.8/projects/command/src/command_pattern_implementation/concerns/command_data.rb
Instance Method Summary collapse
- #description(*args) ⇒ Object
- #is_query ⇒ Object
-
#query? ⇒ Boolean
rubocop:disable Naming/MemoizedInstanceVariableName.
Instance Method Details
#description(*args) ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 |
# File 'projects/command/src/command_pattern_implementation/concerns/command_data.rb', line 8 def description(*args) if args.empty? @description elsif args.size == 1 @description = args.first else # :nocov: raise ArgumentError, "wrong number of arguments (#{args.size} for 0 or 1)" # :nocov: end end |
#is_query ⇒ Object
20 21 22 |
# File 'projects/command/src/command_pattern_implementation/concerns/command_data.rb', line 20 def is_query @is_query = true end |
#query? ⇒ Boolean
rubocop:disable Naming/MemoizedInstanceVariableName
25 26 27 28 29 30 31 |
# File 'projects/command/src/command_pattern_implementation/concerns/command_data.rb', line 25 def query? return @is_query if defined?(@is_query) @is_query = if superclass.respond_to?(:query?) superclass.query? end end |