Class: Segment
- Inherits:
-
Object
- Object
- Segment
- Defined in:
- lib/localio/segment.rb
Instance Attribute Summary collapse
-
#key ⇒ Object
Returns the value of attribute key.
-
#language ⇒ Object
Returns the value of attribute language.
-
#translation ⇒ Object
Returns the value of attribute translation.
Instance Method Summary collapse
-
#initialize(key, translation, language) ⇒ Segment
constructor
A new instance of Segment.
- #is_comment? ⇒ Boolean
Constructor Details
#initialize(key, translation, language) ⇒ Segment
Returns a new instance of Segment.
5 6 7 8 9 |
# File 'lib/localio/segment.rb', line 5 def initialize(key, translation, language) @key = key @translation = translation.replace_escaped @language = language end |
Instance Attribute Details
#key ⇒ Object
Returns the value of attribute key.
3 4 5 |
# File 'lib/localio/segment.rb', line 3 def key @key end |
#language ⇒ Object
Returns the value of attribute language.
3 4 5 |
# File 'lib/localio/segment.rb', line 3 def language @language end |
#translation ⇒ Object
Returns the value of attribute translation.
3 4 5 |
# File 'lib/localio/segment.rb', line 3 def translation @translation end |
Instance Method Details
#is_comment? ⇒ Boolean
11 12 13 |
# File 'lib/localio/segment.rb', line 11 def is_comment? @key == nil end |