Sha256: a187ccdd6093429cb027974b237d57fb5b85483c0c5fe837cf6b8ea044b3861f

Contents?: true

Size: 672 Bytes

Versions: 3

Compression:

Stored size: 672 Bytes

Contents

# frozen_string_literal: true
# encoding: UTF-8

module FFaker
  module LoremIE
    extend ModuleUtils
    extend self

    def word
      fetch_sample(WORDS)
    end

    def words(num = 3)
      fetch_sample(WORDS, count: num)
    end

    def sentence
      fetch_sample(SENTENCES)
    end

    alias phrase sentence

    def sentences(sentence_count = 3)
      (1..sentence_count).map { fetch_sample(SENTENCES) }
    end

    alias phrases sentences

    def paragraph
      fetch_sample(PARAGRAPHS)
    end

    def paragraphs(paragraph_count = 3)
      (1..paragraph_count).map { paragraph }
    end

    def question
      fetch_sample(QUESTIONS)
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
ffaker-2.11.0 lib/ffaker/lorem_ie.rb
ffaker-2.10.0 lib/ffaker/lorem_ie.rb
ffaker-2.9.0 lib/ffaker/lorem_ie.rb