Class: Pry::CInternals::RubySourceInstaller

Inherits:
Object
  • Object
show all
Defined in:
lib/pry-doc/pry_ext/show_source_with_c_internals/ruby_source_installer.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(ruby_version, ruby_source_folder) ⇒ RubySourceInstaller

Returns a new instance of RubySourceInstaller.



10
11
12
13
14
15
# File 'lib/pry-doc/pry_ext/show_source_with_c_internals/ruby_source_installer.rb', line 10

def initialize(ruby_version, ruby_source_folder)
  @ruby_version = ruby_version
  @ruby_source_folder = ruby_source_folder

  set_platform_specific_commands
end

Instance Attribute Details

#curl_cmdObject

Returns the value of attribute curl_cmd.



6
7
8
# File 'lib/pry-doc/pry_ext/show_source_with_c_internals/ruby_source_installer.rb', line 6

def curl_cmd
  @curl_cmd
end

#etag_binaryObject

Returns the value of attribute etag_binary.



7
8
9
# File 'lib/pry-doc/pry_ext/show_source_with_c_internals/ruby_source_installer.rb', line 7

def etag_binary
  @etag_binary
end

#etag_cmdObject

Returns the value of attribute etag_cmd.



8
9
10
# File 'lib/pry-doc/pry_ext/show_source_with_c_internals/ruby_source_installer.rb', line 8

def etag_cmd
  @etag_cmd
end

#ruby_source_folderObject (readonly)

Returns the value of attribute ruby_source_folder.



4
5
6
# File 'lib/pry-doc/pry_ext/show_source_with_c_internals/ruby_source_installer.rb', line 4

def ruby_source_folder
  @ruby_source_folder
end

#ruby_versionObject (readonly)

Returns the value of attribute ruby_version.



3
4
5
# File 'lib/pry-doc/pry_ext/show_source_with_c_internals/ruby_source_installer.rb', line 3

def ruby_version
  @ruby_version
end

Instance Method Details

#installObject



17
18
19
20
21
22
23
# File 'lib/pry-doc/pry_ext/show_source_with_c_internals/ruby_source_installer.rb', line 17

def install
  ask_for_install
  puts "Downloading and setting up Ruby #{ruby_version} source..."
  download_ruby
  generate_tagfile
  puts "...Finished!"
end