Class: Marbu::Models::Key

Inherits:
KeyValueBase show all
Defined in:
lib/marbu/models/mrf/base.rb

Instance Attribute Summary collapse

Attributes inherited from KeyValueBase

#function, #name

Instance Method Summary collapse

Methods inherited from KeyValueBase

#blank?, #present?, #serializable_hash, #to_s

Constructor Details

#initialize(ext_options = {}) ⇒ Key

Returns a new instance of Key.



108
109
110
111
112
113
# File 'lib/marbu/models/mrf/base.rb', line 108

def initialize( ext_options = {} )
  options             = default_options.merge( ext_options.delete_if{|k,v|v.nil?} )

  self.exchangeable   = options.delete(:exchangeable)
  super(options)
end

Instance Attribute Details

#exchangeableObject

Returns the value of attribute exchangeable.



106
107
108
# File 'lib/marbu/models/mrf/base.rb', line 106

def exchangeable
  @exchangeable
end

Instance Method Details

#default_optionsObject



115
116
117
118
119
# File 'lib/marbu/models/mrf/base.rb', line 115

def default_options
  {
    :exchangeable        => true
  }
end