Class: Synthra::Types::TextContent::EmptyArray

Inherits:
Base
  • Object
show all
Defined in:
lib/synthra/types/text_content/text_generation.rb

Overview

Empty array type for entities

Always returns an empty array. Useful for API responses that have optional array fields.

Instance Method Summary collapse

Instance Method Details

#generate_edge(_rng, _context, _args) ⇒ Object



426
427
428
# File 'lib/synthra/types/text_content/text_generation.rb', line 426

def generate_edge(_rng, _context, _args)
  []
end

#generate_invalid(rng, _context, _args) ⇒ Object



430
431
432
# File 'lib/synthra/types/text_content/text_generation.rb', line 430

def generate_invalid(rng, _context, _args)
  rng.sample([nil, "", {}, "[]"])
end

#generate_random(_rng, _context, _args) ⇒ Object



422
423
424
# File 'lib/synthra/types/text_content/text_generation.rb', line 422

def generate_random(_rng, _context, _args)
  []
end