Class: ShareWith::ServiceDataType::Reference
- Inherits:
-
BasicDataType
- Object
- BasicDataType
- ShareWith::ServiceDataType::Reference
- Defined in:
- lib/share_with/service_data.rb
Overview
Define a reference type.
Instance Attribute Summary
Attributes inherited from BasicDataType
Instance Method Summary collapse
-
#initialize(data) ⇒ Reference
constructor
A new instance of Reference.
- #value ⇒ Object
- #value=(val) ⇒ Object
Methods inherited from BasicDataType
Constructor Details
#initialize(data) ⇒ Reference
Returns a new instance of Reference.
148 149 150 |
# File 'lib/share_with/service_data.rb', line 148 def initialize(data) super type: :reference, default: data end |
Instance Method Details
#value ⇒ Object
156 157 158 |
# File 'lib/share_with/service_data.rb', line 156 def value "<#{@value.gsub(/[^a-z._]+/, "")}>" end |
#value=(val) ⇒ Object
152 153 154 |
# File 'lib/share_with/service_data.rb', line 152 def value=(val) # No value can be assigned being only a reference end |