Class: BitClust::TemplateScreen

Inherits:
Screen show all
Includes:
HTMLUtils, Translatable
Defined in:
lib/bitclust/screen.rb

Constant Summary

Constants included from NameUtils

NameUtils::CHAR_TO_MARK, NameUtils::CHAR_TO_NAME, NameUtils::CLASS_NAME_RE, NameUtils::CLASS_PATH_RE, NameUtils::CONST_PATH_RE, NameUtils::CONST_RE, NameUtils::GVAR_RE, NameUtils::LIBNAME_RE, NameUtils::MARK_TO_CHAR, NameUtils::MARK_TO_NAME, NameUtils::METHOD_NAME_RE, NameUtils::METHOD_SPEC_RE, NameUtils::MID, NameUtils::NAME_TO_CHAR, NameUtils::NAME_TO_MARK, NameUtils::TYPEMARK_RE

Instance Method Summary collapse

Methods included from NameUtils

build_method_id, classid2name, classname2id, classname?, decodeid, decodename_fs, decodename_url, encodeid, encodename_fs, encodename_rdocurl, encodename_url, functionname?, gvarname?, html_filename, libid2name, libname2id, libname?, method_spec?, methodid2classid, methodid2libid, methodid2mname, methodid2specparts, methodid2specstring, methodid2typechar, methodid2typemark, methodid2typename, methodname?, split_method_id, split_method_spec, typechar2mark, typechar2name, typechar?, typemark2char, typemark2name, typemark?, typename2char, typename2mark, typename?

Methods inherited from Screen

for_entry, #response, #status

Constructor Details

#initialize(h) ⇒ TemplateScreen

Returns a new instance of TemplateScreen.


261
262
263
264
265
266
267
268
# File 'lib/bitclust/screen.rb', line 261

def initialize(h)
  @urlmapper = h[:urlmapper]
  @template_repository = h[:template_repository]
  @default_encoding = h[:default_encoding] || h[:database].propget('encoding')
  @target_version = h[:target_version] || h[:database].propget('version')
  init_message_catalog h[:message_catalog]
  @conf = h
end

Instance Method Details

#content_typeObject


270
271
272
# File 'lib/bitclust/screen.rb', line 270

def content_type
  "text/html; charset=#{encoding()}"
end

#encodingObject


274
275
276
# File 'lib/bitclust/screen.rb', line 274

def encoding
  default_encoding()
end

#ruby_versionObject


278
279
280
# File 'lib/bitclust/screen.rb', line 278

def ruby_version
  @target_version || 'unknown'
end