Class: Rosetta::Phrase

Inherits:
Object
  • Object
show all
Defined in:
lib/rosetta/phrase.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(keys, text, repository_link) ⇒ Phrase

Returns a new instance of Phrase.



6
7
8
9
10
# File 'lib/rosetta/phrase.rb', line 6

def initialize(keys, text, repository_link)
  @keys = keys
  @text = text
  @repository_link = repository_link
end

Instance Attribute Details

#keysObject (readonly)

Returns the value of attribute keys.



4
5
6
# File 'lib/rosetta/phrase.rb', line 4

def keys
  @keys
end

Returns the value of attribute repository_link.



4
5
6
# File 'lib/rosetta/phrase.rb', line 4

def repository_link
  @repository_link
end

#textObject (readonly)

Returns the value of attribute text.



4
5
6
# File 'lib/rosetta/phrase.rb', line 4

def text
  @text
end

Instance Method Details

#codeObject



12
13
14
# File 'lib/rosetta/phrase.rb', line 12

def code
  @keys.join('.')
end