Class: ShareWith::ServiceDataType::Reference

Inherits:
BasicDataType show all
Defined in:
lib/share_with/service_data.rb

Overview

Define a reference type.

Instance Attribute Summary

Attributes inherited from BasicDataType

#label

Instance Method Summary collapse

Methods inherited from BasicDataType

#attr, #reset!

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

#valueObject



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