Class: When::BasicTypes::Code

Inherits:
String
  • Object
show all
Defined in:
lib/when_exe/basictypes.rb

Overview

コード

当該コードを定義している辞書, シソーラスまたは機関への参照を オプショナルな codeSpace 属性に保持することができる文字列

see gml schema

Direct Known Subclasses

M17n

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from String

#^, #calendar, #calendar_era, #calendar_note, #encode, #era, #ideographic_unification, #m17n, #ord, #resource, #to_m17n, #to_month_name, #to_pair, #to_r, #to_residue, #translate, #when?

Constructor Details

#initialize(code, namespace = nil) ⇒ Code

オブジェクトの生成

Parameters:

  • code (String)

    Text token

  • namespace (String) (defaults to: nil)

    code を定義している authority の URI



367
368
369
370
# File 'lib/when_exe/basictypes.rb', line 367

def initialize(code, namespace=nil)
  @code_space = namespace
  self[0..-1] = code
end

Instance Attribute Details

#code_spaceString (readonly) Also known as: codeSpace

an optional codeSpace

Returns:

  • (String)

    anyURI (Optional)



359
360
361
# File 'lib/when_exe/basictypes.rb', line 359

def code_space
  @code_space
end