Module: BaconIpsum

Defined in:
lib/bacon_ipsum.rb,
lib/bacon_ipsum/parser.rb,
lib/bacon_ipsum/version.rb,
lib/bacon_ipsum/http_client.rb

Overview

main module with generation function

Defined Under Namespace

Classes: HttpClient, Parser

Constant Summary collapse

VERSION =
'0.1.4'

Class Method Summary collapse

Class Method Details

.generate(paras: 5, sentences: nil, type: 'meat-and-filler', start_with_lorem: nil, format: 'json') ⇒ Object



10
11
12
13
14
15
16
17
18
# File 'lib/bacon_ipsum.rb', line 10

def generate(paras: 5,
             sentences: nil,
             type: 'meat-and-filler',
             start_with_lorem: nil,
             format: 'json')

  response = HttpClient.new(paras, sentences, type, start_with_lorem, format)
  Parser.new(response.get, format).parse
end