Class: IRuby::Profile
- Inherits:
-
Object
- Object
- IRuby::Profile
- Defined in:
- lib/iruby/profile.rb
Constant Summary collapse
- IPYTHON_DIR =
`ipython locate`.strip
- PROFILE_CONFIG =
FIXME These should be stored as ERB files
{}
- STATIC_DIR =
File.join(File.dirname(__FILE__), '..', '..', 'static')
Instance Attribute Summary collapse
-
#iruby_name ⇒ Object
Returns the value of attribute iruby_name.
Instance Method Summary collapse
- #create! ⇒ Object
-
#initialize(iruby_name = 'ruby') ⇒ Profile
constructor
A new instance of Profile.
- #name ⇒ Object
- #path ⇒ Object
Constructor Details
#initialize(iruby_name = 'ruby') ⇒ Profile
Returns a new instance of Profile.
27 28 29 |
# File 'lib/iruby/profile.rb', line 27 def initialize(iruby_name='ruby') @iruby_name = iruby_name end |
Instance Attribute Details
#iruby_name ⇒ Object
Returns the value of attribute iruby_name.
3 4 5 |
# File 'lib/iruby/profile.rb', line 3 def iruby_name @iruby_name end |
Instance Method Details
#create! ⇒ Object
39 40 41 42 43 |
# File 'lib/iruby/profile.rb', line 39 def create! run_ipython_create_profile! apply_patches! create_static_symlink! end |
#name ⇒ Object
31 32 33 |
# File 'lib/iruby/profile.rb', line 31 def name "#{@iruby_name}" end |
#path ⇒ Object
35 36 37 |
# File 'lib/iruby/profile.rb', line 35 def path File.join(IPYTHON_DIR, "profile_#{name}") end |