Class: MODL::Model::ModlPrimitive

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

Overview

A MODL Primitive

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(value) ⇒ ModlPrimitive

Returns a new instance of ModlPrimitive.



86
87
88
# File 'lib/modl/model/model.rb', line 86

def initialize(value)
  @value = value
end

Instance Attribute Details

#valueObject (readonly)

Returns the value of attribute value.



84
85
86
# File 'lib/modl/model/model.rb', line 84

def value
  @value
end

Instance Method Details

#to_mObject



94
95
96
# File 'lib/modl/model/model.rb', line 94

def to_m
  @value.to_s
end

#to_sObject



90
91
92
# File 'lib/modl/model/model.rb', line 90

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