Class: OneApi::LastPartOfUrlFieldConversionRule
- Inherits:
-
FieldConversionRule
- Object
- FieldConversionRule
- OneApi::LastPartOfUrlFieldConversionRule
- Defined in:
- lib/oneapi-ruby/objects.rb
Instance Attribute Summary
Attributes inherited from FieldConversionRule
#json_field_name, #object_field_name
Instance Method Summary collapse
- #from_json(value) ⇒ Object
-
#initialize(json_field_name = nil) ⇒ LastPartOfUrlFieldConversionRule
constructor
A new instance of LastPartOfUrlFieldConversionRule.
- #to_json(value) ⇒ Object
Constructor Details
#initialize(json_field_name = nil) ⇒ LastPartOfUrlFieldConversionRule
Returns a new instance of LastPartOfUrlFieldConversionRule.
81 82 83 |
# File 'lib/oneapi-ruby/objects.rb', line 81 def initialize(json_field_name=nil) super(json_field_name) end |
Instance Method Details
#from_json(value) ⇒ Object
85 86 87 88 89 90 91 92 93 |
# File 'lib/oneapi-ruby/objects.rb', line 85 def from_json(value) if ! value return nil end parts = value.split('/') parts[-1] end |
#to_json(value) ⇒ Object
95 96 97 |
# File 'lib/oneapi-ruby/objects.rb', line 95 def to_json(value) value end |