root/lang/ruby/Chemr/ChemrConfig.rb

Revision 852, 396 bytes (checked in by cho45, 13 months ago)

lang/ruby/Chemr/CHMBundle.rb,
lang/ruby/Chemr/AppController.rb,
lang/ruby/Chemr/CHMDocument.rb,
lang/ruby/Chemr/Chemr.xcodeproj/cho45.mode1,
lang/ruby/Chemr/Chemr.xcodeproj/project.pbxproj,
lang/ruby/Chemr/Chemr.xcodeproj/cho45.pbxuser:

設定ファイルをよむように

  • Property svn:executable set to *
Line 
1#!/usr/bin/env ruby
2
3
4require "pathname"
5require "singleton"
6
7class ChemrConfig
8        include Singleton
9
10        PATH = Pathname.new("#{ENV["HOME"]}/.chemr")
11
12        @@instance = nil
13
14
15        def initialize
16        end
17
18        def userstyle
19                (PATH + "userstyle.css").to_s
20        end
21
22        def keybinds
23                (PATH + "keybinds.rb").read
24        rescue Errno::ENOENT
25                ""
26        end
27
28        def initrc
29                (PATH + "initrc.rb").read
30        rescue Errno::ENOENT
31                ""
32        end
33end
34
Note: See TracBrowser for help on using the browser.