Class: Synthra::Types::TextContent::Buzzword

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

Overview

Buzzword type

Constant Summary collapse

BUZZWORDS =
[
  "Synergy", "Paradigm", "Leverage", "Disrupt", "Innovation",
  "Scalable", "Agile", "Cloud", "Big Data", "AI", "Blockchain"
].freeze

Instance Method Summary collapse

Instance Method Details

#generate_edge(rng, context, args) ⇒ Object



27
28
29
# File 'lib/synthra/types/text_content/business.rb', line 27

def generate_edge(rng, context, args)
  ["", "Synergy"].sample(random: rng.instance_variable_get(:@random))
end

#generate_invalid(rng, context, args) ⇒ Object



31
32
33
# File 'lib/synthra/types/text_content/business.rb', line 31

def generate_invalid(rng, context, args)
  [nil, 123, [], {}].sample(random: rng.instance_variable_get(:@random))
end

#generate_random(rng, context, args) ⇒ Object



13
14
15
16
17
18
19
20
21
22
23
24
# File 'lib/synthra/types/text_content/business.rb', line 13

def generate_random(rng, context, args)
  adapter = faker_adapter(context)
  if adapter
    adapter.buzzword

  else
    Faker::Company.buzzword
  end

rescue StandardError
  rng.sample(BUZZWORDS)
end