Class: SimplerDB::AttributeParam

Inherits:
Attribute show all
Defined in:
lib/simplerdb/db.rb

Instance Attribute Summary collapse

Attributes inherited from Attribute

#name, #value

Instance Method Summary collapse

Methods inherited from Attribute

#==

Constructor Details

#initialize(name, value, replace = false) ⇒ AttributeParam

Returns a new instance of AttributeParam.



69
70
71
72
# File 'lib/simplerdb/db.rb', line 69

def initialize(name, value, replace = false)
  super(name, value)
  @replace = replace
end

Instance Attribute Details

#replaceObject

Returns the value of attribute replace.



67
68
69
# File 'lib/simplerdb/db.rb', line 67

def replace
  @replace
end

Instance Method Details

#to_attrObject



74
75
76
# File 'lib/simplerdb/db.rb', line 74

def to_attr
  Attribute.new(self.name, self.value)
end