【文件属性】:
文件名称:sober:为模型生成*有些*连贯的文本
文件大小:26KB
文件格式:ZIP
更新时间:2021-06-09 01:36:37
Ruby
清醒
##设置
使用以下命令运行:
gem install sober
irb
require 'sober'
或者将它添加到你的 Gemfile
gem 'sober'
##用法
当前构建的可用命令 (0.0.2)
Sober.sentence (接受参数:medium (默认)、 :long和:short )
Sober.paragraph (接受参数:medium (默认)、 :long和:short )
Sober.sentences (接受数字作为参数。默认为3 )
Sober.paragraphs (接受数字作为参数。默认为3 )
Sober.gender.random(one_letter: false) #=> 'male'
Sober.gender.smart('Ashley Smith') #=> 'female'
还支持生成名字
Sober.n
【文件预览】:
sober-master
----Rakefile(571B)
----.DS_Store(6KB)
----Gemfile(568B)
----Gemfile.lock(2KB)
----.rspec(31B)
----spec()
--------sober.rb(3KB)
--------words_spec.rb(757B)
--------gender_spec.rb(1KB)
--------name_spec.rb(960B)
--------spec_helper.rb(55B)
----.gitignore(146B)
----lib()
--------logic()
--------sober.rb(2KB)
--------words()
--------tasks()
--------.DS_Store(6KB)
--------sober()
----README.md(1KB)
----sober.gemspec(703B)
----MIT-LICENSE(1KB)