class CutePrint::Values

@api private

Public Class Methods

new(args, block) click to toggle source
# File lib/cute_print/values.rb, line 11
def initialize(args, block)
  if !args.empty? && block
    raise ArgumentError, "arguments and block are mutually exclusive"
  end
  @args = args
  @block = block
end

Private Instance Methods

values() click to toggle source
# File lib/cute_print/values.rb, line 24
def values
  if @block
    [@block.call]
  else
    @args
  end
end