Class: Gemaker::Config
- Inherits:
-
Object
- Object
- Gemaker::Config
- Defined in:
- lib/gemaker/config.rb
Constant Summary collapse
- RUBY_VERSION =
2.3
Instance Attribute Summary collapse
-
#authors ⇒ Object
Returns the value of attribute authors.
-
#cli ⇒ Object
Returns the value of attribute cli.
- #description ⇒ Object
-
#emails ⇒ Object
Returns the value of attribute emails.
-
#engine ⇒ Object
Returns the value of attribute engine.
-
#gem_name ⇒ Object
Returns the value of attribute gem_name.
- #homepage ⇒ Object
- #human_gem_name ⇒ Object
-
#installable ⇒ Object
Returns the value of attribute installable.
-
#summary ⇒ Object
Returns the value of attribute summary.
Instance Method Summary collapse
- #cli? ⇒ Boolean
- #engine? ⇒ Boolean
- #gem_class ⇒ Object
-
#initialize ⇒ Config
constructor
A new instance of Config.
- #installable? ⇒ Boolean
Constructor Details
#initialize ⇒ Config
Returns a new instance of Config.
9 10 11 |
# File 'lib/gemaker/config.rb', line 9 def initialize self.engine = :normal end |
Instance Attribute Details
#authors ⇒ Object
Returns the value of attribute authors.
6 7 8 |
# File 'lib/gemaker/config.rb', line 6 def end |
#cli ⇒ Object
Returns the value of attribute cli.
5 6 7 |
# File 'lib/gemaker/config.rb', line 5 def cli @cli end |
#description ⇒ Object
22 23 24 25 |
# File 'lib/gemaker/config.rb', line 22 def description return summary if @description.blank? @description end |
#emails ⇒ Object
Returns the value of attribute emails.
6 7 8 |
# File 'lib/gemaker/config.rb', line 6 def emails @emails end |
#engine ⇒ Object
Returns the value of attribute engine.
5 6 7 |
# File 'lib/gemaker/config.rb', line 5 def engine @engine end |
#gem_name ⇒ Object
Returns the value of attribute gem_name.
5 6 7 |
# File 'lib/gemaker/config.rb', line 5 def gem_name @gem_name end |
#homepage ⇒ Object
27 28 29 30 |
# File 'lib/gemaker/config.rb', line 27 def homepage return "https://github.com/platanus/#{gem_name}/master" if @homepage.blank? @homepage end |
#human_gem_name ⇒ Object
13 14 15 16 |
# File 'lib/gemaker/config.rb', line 13 def human_gem_name return gem_name.titleize if @human_gem_name.blank? @human_gem_name end |
#installable ⇒ Object
Returns the value of attribute installable.
5 6 7 |
# File 'lib/gemaker/config.rb', line 5 def installable @installable end |
#summary ⇒ Object
Returns the value of attribute summary.
5 6 7 |
# File 'lib/gemaker/config.rb', line 5 def summary @summary end |
Instance Method Details
#cli? ⇒ Boolean
44 45 46 |
# File 'lib/gemaker/config.rb', line 44 def cli? !!cli end |
#engine? ⇒ Boolean
40 41 42 |
# File 'lib/gemaker/config.rb', line 40 def engine? !!engine end |
#gem_class ⇒ Object
18 19 20 |
# File 'lib/gemaker/config.rb', line 18 def gem_class gem_name.classify end |
#installable? ⇒ Boolean
48 49 50 |
# File 'lib/gemaker/config.rb', line 48 def installable? !!installable end |