Class: Intent::Commands::Base
- Inherits:
-
Object
- Object
- Intent::Commands::Base
- Defined in:
- lib/intent/commands/base.rb
Instance Attribute Summary collapse
-
#documents ⇒ Object
readonly
Returns the value of attribute documents.
-
#identity ⇒ Object
readonly
Returns the value of attribute identity.
Instance Method Summary collapse
- #generate_id ⇒ Object
-
#initialize ⇒ Base
constructor
A new instance of Base.
- #print_help(output) ⇒ Object
Constructor Details
Instance Attribute Details
#documents ⇒ Object (readonly)
Returns the value of attribute documents.
5 6 7 |
# File 'lib/intent/commands/base.rb', line 5 def documents @documents end |
#identity ⇒ Object (readonly)
Returns the value of attribute identity.
4 5 6 |
# File 'lib/intent/commands/base.rb', line 4 def identity @identity end |
Instance Method Details
#generate_id ⇒ Object
16 17 18 |
# File 'lib/intent/commands/base.rb', line 16 def generate_id Nanoid.generate(size: 8, alphabet: ID_ALPHABET) end |
#print_help(output) ⇒ Object
12 13 14 |
# File 'lib/intent/commands/base.rb', line 12 def print_help(output) output.puts(File.read(help_txt_path)) end |