Class: Toptranslation::Resource::String
- Inherits:
-
Object
- Object
- Toptranslation::Resource::String
- Defined in:
- lib/toptranslation/resource/string.rb
Instance Attribute Summary collapse
-
#array_index ⇒ Object
Returns the value of attribute array_index.
-
#comment ⇒ Object
Returns the value of attribute comment.
-
#context ⇒ Object
Returns the value of attribute context.
-
#created_at ⇒ Object
readonly
Returns the value of attribute created_at.
-
#document_identifier ⇒ Object
Returns the value of attribute document_identifier.
-
#identifier ⇒ Object
readonly
Returns the value of attribute identifier.
-
#key ⇒ Object
Returns the value of attribute key.
-
#locale_code ⇒ Object
Returns the value of attribute locale_code.
-
#plural_form ⇒ Object
Returns the value of attribute plural_form.
-
#project_identifier ⇒ Object
Returns the value of attribute project_identifier.
-
#state ⇒ Object
Returns the value of attribute state.
-
#updated_at ⇒ Object
readonly
Returns the value of attribute updated_at.
-
#value ⇒ Object
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(connection, options = {}) ⇒ String
constructor
A new instance of String.
- #save ⇒ Object
Constructor Details
#initialize(connection, options = {}) ⇒ String
Returns a new instance of String.
6 7 8 9 10 11 |
# File 'lib/toptranslation/resource/string.rb', line 6 def initialize(connection, = {}) @connection = connection @options = update_from_response() end |
Instance Attribute Details
#array_index ⇒ Object
Returns the value of attribute array_index.
4 5 6 |
# File 'lib/toptranslation/resource/string.rb', line 4 def array_index @array_index end |
#comment ⇒ Object
Returns the value of attribute comment.
4 5 6 |
# File 'lib/toptranslation/resource/string.rb', line 4 def comment @comment end |
#context ⇒ Object
Returns the value of attribute context.
4 5 6 |
# File 'lib/toptranslation/resource/string.rb', line 4 def context @context end |
#created_at ⇒ Object (readonly)
Returns the value of attribute created_at.
3 4 5 |
# File 'lib/toptranslation/resource/string.rb', line 3 def created_at @created_at end |
#document_identifier ⇒ Object
Returns the value of attribute document_identifier.
4 5 6 |
# File 'lib/toptranslation/resource/string.rb', line 4 def document_identifier @document_identifier end |
#identifier ⇒ Object (readonly)
Returns the value of attribute identifier.
3 4 5 |
# File 'lib/toptranslation/resource/string.rb', line 3 def identifier @identifier end |
#key ⇒ Object
Returns the value of attribute key.
4 5 6 |
# File 'lib/toptranslation/resource/string.rb', line 4 def key @key end |
#locale_code ⇒ Object
Returns the value of attribute locale_code.
4 5 6 |
# File 'lib/toptranslation/resource/string.rb', line 4 def locale_code @locale_code end |
#plural_form ⇒ Object
Returns the value of attribute plural_form.
4 5 6 |
# File 'lib/toptranslation/resource/string.rb', line 4 def plural_form @plural_form end |
#project_identifier ⇒ Object
Returns the value of attribute project_identifier.
4 5 6 |
# File 'lib/toptranslation/resource/string.rb', line 4 def project_identifier @project_identifier end |
#state ⇒ Object
Returns the value of attribute state.
4 5 6 |
# File 'lib/toptranslation/resource/string.rb', line 4 def state @state end |
#updated_at ⇒ Object (readonly)
Returns the value of attribute updated_at.
3 4 5 |
# File 'lib/toptranslation/resource/string.rb', line 3 def updated_at @updated_at end |
#value ⇒ Object
Returns the value of attribute value.
4 5 6 |
# File 'lib/toptranslation/resource/string.rb', line 4 def value @value end |
Instance Method Details
#save ⇒ Object
13 14 15 16 |
# File 'lib/toptranslation/resource/string.rb', line 13 def save response = @identifier ? update_remote_string : create_remote_string update_and_return_from_response(response) end |