Class: Bueller::Commands::WriteGemspec

Inherits:
Object
  • Object
show all
Defined in:
lib/bueller/commands/write_gemspec.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(bueller) ⇒ WriteGemspec

Returns a new instance of WriteGemspec.



6
7
8
9
10
11
12
# File 'lib/bueller/commands/write_gemspec.rb', line 6

def initialize(bueller)
  self.output = $stdout
  self.base_dir = bueller.base_dir
  self.output = bueller.output
  self.gemspec_helper = bueller.gemspec_helper
  self.version_helper = bueller.version_helper
end

Instance Attribute Details

#base_dirObject

Returns the value of attribute base_dir.



4
5
6
# File 'lib/bueller/commands/write_gemspec.rb', line 4

def base_dir
  @base_dir
end

#gemspec_helperObject

Returns the value of attribute gemspec_helper.



4
5
6
# File 'lib/bueller/commands/write_gemspec.rb', line 4

def gemspec_helper
  @gemspec_helper
end

#outputObject

Returns the value of attribute output.



4
5
6
# File 'lib/bueller/commands/write_gemspec.rb', line 4

def output
  @output
end

#version_helperObject

Returns the value of attribute version_helper.



4
5
6
# File 'lib/bueller/commands/write_gemspec.rb', line 4

def version_helper
  @version_helper
end

Class Method Details

.run_for(bueller) ⇒ Object



21
22
23
24
25
# File 'lib/bueller/commands/write_gemspec.rb', line 21

def self.run_for(bueller)
  command = new(bueller)
  command.run
  command
end

Instance Method Details

#runObject



14
15
16
17
18
19
# File 'lib/bueller/commands/write_gemspec.rb', line 14

def run
  gemspec_helper.set_date
  gemspec_helper.write

  output.puts "Generated: #{gemspec_helper.path}"  
end