File: SourcePage.rb

package info (click to toggle)
amrita 1.0.2-8
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 1,884 kB
  • ctags: 1,362
  • sloc: ruby: 9,159; xml: 978; makefile: 110
file content (26 lines) | stat: -rw-r--r-- 409 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/usr/local/bin/ruby

class SourcePage < CKComponent
	attr_accessor :source

	def _body( suffix )
		if application.locale == 'ja' and suffix == 'html' then
			file = "./#@source/#@source\_ja.#{suffix}"
		else
			file = "./#@source/#@source.#{suffix}"
		end
		File.new( file ).readlines.join
	end

	def htmlFile
		_body "html"
	end

	def definitionFile
		_body "ckd"
	end

	def rubyFile
		_body "rb"
	end
end