Class: CompactData::Model::CompactDataQuoted

Inherits:
Object
  • Object
show all
Defined in:
lib/compactdata/model/model.rb

Overview

A CompactData Quoted String

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(value) ⇒ CompactDataQuoted

Returns a new instance of CompactDataQuoted.



195
196
197
# File 'lib/compactdata/model/model.rb', line 195

def initialize(value)
  @value = value
end

Instance Attribute Details

#valueObject (readonly)

Returns the value of attribute value.



193
194
195
# File 'lib/compactdata/model/model.rb', line 193

def value
  @value
end

Instance Method Details

#to_jObject



203
204
205
# File 'lib/compactdata/model/model.rb', line 203

def to_j
  @value
end

#to_mObject



207
208
209
# File 'lib/compactdata/model/model.rb', line 207

def to_m
  UTIL.escape_and_quote @value
end

#to_sObject



199
200
201
# File 'lib/compactdata/model/model.rb', line 199

def to_s
  "CompactDataQuoted: #{@value}"
end