Class: Appraisal::Customize

Inherits:
Object
  • Object
show all
Defined in:
lib/appraisal/customize.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Customize

Returns a new instance of Customize.



5
6
7
8
9
10
# File 'lib/appraisal/customize.rb', line 5

def initialize(options = {})
  heading = options.fetch(:heading, nil)
  single_quotes = options.fetch(:single_quotes, false)
  @@heading = !heading.nil? && heading.chomp
  @@single_quotes = single_quotes
end

Class Method Details

.heading(gemfile = nil) ⇒ Object



12
13
14
15
16
17
# File 'lib/appraisal/customize.rb', line 12

def self.heading(gemfile = nil)
  @@heading ||= nil
  return @@heading unless gemfile

  customize(@@heading, gemfile)
end

.single_quotesObject



19
20
21
# File 'lib/appraisal/customize.rb', line 19

def self.single_quotes
  @@single_quotes ||= false
end