Class: Profile

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

Overview

Session or Profile class Allow to switch easily between different configurations.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(terminal_options, vte_options) ⇒ Profile

Returns a new instance of Profile.



24
25
26
27
# File 'lib/profile.rb', line 24

def initialize(terminal_options, vte_options)
  @terminal_options = terminal_options
  @vte_options = vte_options
end

Instance Attribute Details

#nameObject

Returns the value of attribute name.



21
22
23
# File 'lib/profile.rb', line 21

def name
  @name
end

#terminal_optionsObject

Returns the value of attribute terminal_options.



21
22
23
# File 'lib/profile.rb', line 21

def terminal_options
  @terminal_options
end

#vte_optionsObject

Returns the value of attribute vte_options.



21
22
23
# File 'lib/profile.rb', line 21

def vte_options
  @vte_options
end

Instance Method Details

#loadObject



36
37
38
39
40
41
42
# File 'lib/profile.rb', line 36

def load
  # File.open("#{DATA_HOME_DIR}/#{@name}") do |f|
  #   session = Marshal.load(f)
  #   @terminal_options = session.terminal_options
  #   @vte_options = session.vte_options
  # end
end

#saveObject

TODO : use json



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

def save
  # File.open("#{DATA_HOME_DIR}/#{@name}", 'w+') do |f|
  #   Marshal.dump(self, f)
  # end
end