class Twine::TwineDefinition
Attributes
comment[RW]
key[R]
reference[RW]
reference_key[RW]
translations[R]
Public Class Methods
new(key)
click to toggle source
# File lib/twine/twine_file.rb, line 10 def initialize(key) @key = key @comment = nil @tags = nil @translations = {} end
Public Instance Methods
raw_comment()
click to toggle source
# File lib/twine/twine_file.rb, line 21 def raw_comment @comment end
translation_for_lang(lang)
click to toggle source
# File lib/twine/twine_file.rb, line 46 def translation_for_lang(lang) translation = [lang].flatten.map { |l| @translations[l] }.first translation = reference.translation_for_lang(lang) if translation.nil? && reference return translation end