Class: Jam_Func::Jam

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

Overview

.run ———————–

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data) ⇒ Jam

Returns a new instance of Jam.



190
191
192
193
194
195
196
197
# File 'lib/Jam_Func.rb', line 190

def initialize data
  self.last = nil
  @err_name = nil
  @err      = nil
  @data     = data || {}
  @val      = nil
  @last     = nil
end

Instance Attribute Details

#dataObject (readonly)

Returns the value of attribute data.



188
189
190
# File 'lib/Jam_Func.rb', line 188

def data
  @data
end

#errObject (readonly)

Returns the value of attribute err.



188
189
190
# File 'lib/Jam_Func.rb', line 188

def err
  @err
end

#err_nameObject (readonly)

Returns the value of attribute err_name.



188
189
190
# File 'lib/Jam_Func.rb', line 188

def err_name
  @err_name
end

#lastObject



187
188
189
# File 'lib/Jam_Func.rb', line 187

def last
  @last
end

Instance Method Details

#_last(val) ⇒ Object



204
205
206
# File 'lib/Jam_Func.rb', line 204

def _last val
  @last = val
end

#error(name, val) ⇒ Object



208
209
210
211
212
# File 'lib/Jam_Func.rb', line 208

def error name, val
  @err_name = name
  @err      = val
  throw :jam_error
end

#val(new_val) ⇒ Object



199
200
201
202
# File 'lib/Jam_Func.rb', line 199

def val new_val
  @val        = new_val
  @data[:val] = new_val
end