Class: IRuby::Profile

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

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_nameObject

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

#nameObject



31
32
33
# File 'lib/iruby/profile.rb', line 31

def name
  "#{@iruby_name}"
end

#pathObject



35
36
37
# File 'lib/iruby/profile.rb', line 35

def path
  File.join(IPYTHON_DIR, "profile_#{name}")
end