Class: Favidenticon::CLI
- Inherits:
-
Thor
- Object
- Thor
- Favidenticon::CLI
- Defined in:
- lib/favidenticon/cli.rb
Instance Method Summary collapse
Instance Method Details
#generate(identity = SecureRandom.hex) ⇒ Object
17 18 19 20 21 22 |
# File 'lib/favidenticon/cli.rb', line 17 def generate(identity = SecureRandom.hex) size = [:size] || 16 grid = [:grid] || 5 blob = Generator.generate(identity, size, grid) File.open("favicon.ico", "wb") { |f| f.write(blob) } end |
#version ⇒ Object
9 10 11 |
# File 'lib/favidenticon/cli.rb', line 9 def version puts Favidenticon::VERSION end |