Class: Gemaker::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/gemaker/config.rb

Constant Summary collapse

RUBY_VERSION =
2.3

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfig

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

#authorsObject

Returns the value of attribute authors.



6
7
8
# File 'lib/gemaker/config.rb', line 6

def authors
  @authors
end

#cliObject

Returns the value of attribute cli.



5
6
7
# File 'lib/gemaker/config.rb', line 5

def cli
  @cli
end

#descriptionObject



22
23
24
25
# File 'lib/gemaker/config.rb', line 22

def description
  return summary if @description.blank?
  @description
end

#emailsObject

Returns the value of attribute emails.



6
7
8
# File 'lib/gemaker/config.rb', line 6

def emails
  @emails
end

#engineObject

Returns the value of attribute engine.



5
6
7
# File 'lib/gemaker/config.rb', line 5

def engine
  @engine
end

#gem_nameObject

Returns the value of attribute gem_name.



5
6
7
# File 'lib/gemaker/config.rb', line 5

def gem_name
  @gem_name
end

#homepageObject



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_nameObject



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

#installableObject

Returns the value of attribute installable.



5
6
7
# File 'lib/gemaker/config.rb', line 5

def installable
  @installable
end

#summaryObject

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

Returns:

  • (Boolean)


44
45
46
# File 'lib/gemaker/config.rb', line 44

def cli?
  !!cli
end

#engine?Boolean

Returns:

  • (Boolean)


40
41
42
# File 'lib/gemaker/config.rb', line 40

def engine?
  !!engine
end

#gem_classObject



18
19
20
# File 'lib/gemaker/config.rb', line 18

def gem_class
  gem_name.classify
end

#installable?Boolean

Returns:

  • (Boolean)


48
49
50
# File 'lib/gemaker/config.rb', line 48

def installable?
  !!installable
end