Class: Interscript::Mapping
- Inherits:
-
Object
- Object
- Interscript::Mapping
- Defined in:
- lib/interscript/mapping.rb
Instance Attribute Summary collapse
-
#authority_id ⇒ Object
readonly
Returns the value of attribute authority_id.
-
#chain ⇒ Object
readonly
Returns the value of attribute chain.
-
#character_separator ⇒ Object
readonly
Returns the value of attribute character_separator.
-
#characters ⇒ Object
readonly
Returns the value of attribute characters.
-
#characters_hash ⇒ Object
readonly
Returns the value of attribute characters_hash.
-
#creation_date ⇒ Object
readonly
Returns the value of attribute creation_date.
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#destination_script ⇒ Object
readonly
Returns the value of attribute destination_script.
-
#dictionary ⇒ Object
readonly
Returns the value of attribute dictionary.
-
#dictionary_hash ⇒ Object
readonly
Returns the value of attribute dictionary_hash.
-
#dictionary_trie ⇒ Object
readonly
Returns the value of attribute dictionary_trie.
-
#downcase ⇒ Object
readonly
Returns the value of attribute downcase.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#language ⇒ Object
readonly
Returns the value of attribute language.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#notes ⇒ Object
readonly
Returns the value of attribute notes.
-
#postrules ⇒ Object
readonly
Returns the value of attribute postrules.
-
#rules ⇒ Object
readonly
Returns the value of attribute rules.
-
#segmentation ⇒ Object
readonly
Returns the value of attribute segmentation.
-
#source_script ⇒ Object
readonly
Returns the value of attribute source_script.
-
#tests ⇒ Object
readonly
Returns the value of attribute tests.
-
#title_case ⇒ Object
readonly
Returns the value of attribute title_case.
-
#transcription ⇒ Object
readonly
Returns the value of attribute transcription.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
-
#word_separator ⇒ Object
readonly
Returns the value of attribute word_separator.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(system_code, options = {}) ⇒ Mapping
constructor
A new instance of Mapping.
- #load_and_serialize_system_mappings ⇒ Object
Constructor Details
#initialize(system_code, options = {}) ⇒ Mapping
Returns a new instance of Mapping.
36 37 38 39 40 41 42 43 44 45 |
# File 'lib/interscript/mapping.rb', line 36 def initialize(system_code, = {}) @system_code = system_code @depth = .fetch(:depth, 0).to_i unless RUBY_ENGINE == 'opal' @system_path = .fetch(:system_code, default_path) end load_and_serialize_system_mappings end |
Instance Attribute Details
#authority_id ⇒ Object (readonly)
Returns the value of attribute authority_id.
8 9 10 |
# File 'lib/interscript/mapping.rb', line 8 def @authority_id end |
#chain ⇒ Object (readonly)
Returns the value of attribute chain.
8 9 10 |
# File 'lib/interscript/mapping.rb', line 8 def chain @chain end |
#character_separator ⇒ Object (readonly)
Returns the value of attribute character_separator.
8 9 10 |
# File 'lib/interscript/mapping.rb', line 8 def character_separator @character_separator end |
#characters ⇒ Object (readonly)
Returns the value of attribute characters.
8 9 10 |
# File 'lib/interscript/mapping.rb', line 8 def characters @characters end |
#characters_hash ⇒ Object (readonly)
Returns the value of attribute characters_hash.
8 9 10 |
# File 'lib/interscript/mapping.rb', line 8 def characters_hash @characters_hash end |
#creation_date ⇒ Object (readonly)
Returns the value of attribute creation_date.
8 9 10 |
# File 'lib/interscript/mapping.rb', line 8 def creation_date @creation_date end |
#description ⇒ Object (readonly)
Returns the value of attribute description.
8 9 10 |
# File 'lib/interscript/mapping.rb', line 8 def description @description end |
#destination_script ⇒ Object (readonly)
Returns the value of attribute destination_script.
8 9 10 |
# File 'lib/interscript/mapping.rb', line 8 def destination_script @destination_script end |
#dictionary ⇒ Object (readonly)
Returns the value of attribute dictionary.
8 9 10 |
# File 'lib/interscript/mapping.rb', line 8 def dictionary @dictionary end |
#dictionary_hash ⇒ Object (readonly)
Returns the value of attribute dictionary_hash.
8 9 10 |
# File 'lib/interscript/mapping.rb', line 8 def dictionary_hash @dictionary_hash end |
#dictionary_trie ⇒ Object (readonly)
Returns the value of attribute dictionary_trie.
8 9 10 |
# File 'lib/interscript/mapping.rb', line 8 def dictionary_trie @dictionary_trie end |
#downcase ⇒ Object (readonly)
Returns the value of attribute downcase.
8 9 10 |
# File 'lib/interscript/mapping.rb', line 8 def downcase @downcase end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
8 9 10 |
# File 'lib/interscript/mapping.rb', line 8 def id @id end |
#language ⇒ Object (readonly)
Returns the value of attribute language.
8 9 10 |
# File 'lib/interscript/mapping.rb', line 8 def language @language end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
8 9 10 |
# File 'lib/interscript/mapping.rb', line 8 def name @name end |
#notes ⇒ Object (readonly)
Returns the value of attribute notes.
8 9 10 |
# File 'lib/interscript/mapping.rb', line 8 def notes @notes end |
#postrules ⇒ Object (readonly)
Returns the value of attribute postrules.
8 9 10 |
# File 'lib/interscript/mapping.rb', line 8 def postrules @postrules end |
#rules ⇒ Object (readonly)
Returns the value of attribute rules.
8 9 10 |
# File 'lib/interscript/mapping.rb', line 8 def rules @rules end |
#segmentation ⇒ Object (readonly)
Returns the value of attribute segmentation.
8 9 10 |
# File 'lib/interscript/mapping.rb', line 8 def segmentation @segmentation end |
#source_script ⇒ Object (readonly)
Returns the value of attribute source_script.
8 9 10 |
# File 'lib/interscript/mapping.rb', line 8 def source_script @source_script end |
#tests ⇒ Object (readonly)
Returns the value of attribute tests.
8 9 10 |
# File 'lib/interscript/mapping.rb', line 8 def tests @tests end |
#title_case ⇒ Object (readonly)
Returns the value of attribute title_case.
8 9 10 |
# File 'lib/interscript/mapping.rb', line 8 def title_case @title_case end |
#transcription ⇒ Object (readonly)
Returns the value of attribute transcription.
8 9 10 |
# File 'lib/interscript/mapping.rb', line 8 def transcription @transcription end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
8 9 10 |
# File 'lib/interscript/mapping.rb', line 8 def url @url end |
#word_separator ⇒ Object (readonly)
Returns the value of attribute word_separator.
8 9 10 |
# File 'lib/interscript/mapping.rb', line 8 def word_separator @word_separator end |
Class Method Details
.for(system_code, options = {}) ⇒ Object
47 48 49 |
# File 'lib/interscript/mapping.rb', line 47 def self.for(system_code, = {}) new(system_code, ) end |
Instance Method Details
#load_and_serialize_system_mappings ⇒ Object
51 52 53 54 55 56 |
# File 'lib/interscript/mapping.rb', line 51 def load_and_serialize_system_mappings return if depth >= 5 mappings = load_system_mappings serialize_system_mappings(mappings) end |