Class: Carta::CLI::Book
- Inherits:
-
Object
- Object
- Carta::CLI::Book
- Defined in:
- lib/carta/cli/book.rb
Overview
This is our book generator
Instance Attribute Summary collapse
-
#book_name ⇒ Object
readonly
Returns the value of attribute book_name.
-
#meta ⇒ Object
readonly
Returns the value of attribute meta.
-
#thor ⇒ Object
readonly
Returns the value of attribute thor.
Instance Method Summary collapse
-
#initialize(thor, meta) ⇒ Book
constructor
A new instance of Book.
- #run ⇒ Object
Constructor Details
#initialize(thor, meta) ⇒ Book
Returns a new instance of Book.
6 7 8 9 10 |
# File 'lib/carta/cli/book.rb', line 6 def initialize(thor, ) @thor = thor @meta = @book_name = ([:title].is_a? String) ? [:title] : [:title].join(' ') end |
Instance Attribute Details
#book_name ⇒ Object (readonly)
Returns the value of attribute book_name.
4 5 6 |
# File 'lib/carta/cli/book.rb', line 4 def book_name @book_name end |
#meta ⇒ Object (readonly)
Returns the value of attribute meta.
4 5 6 |
# File 'lib/carta/cli/book.rb', line 4 def @meta end |
#thor ⇒ Object (readonly)
Returns the value of attribute thor.
4 5 6 |
# File 'lib/carta/cli/book.rb', line 4 def thor @thor end |