Class: Jam_Func::Jam
- Inherits:
-
Object
- Object
- Jam_Func::Jam
- Defined in:
- lib/Jam_Func.rb
Overview
.run ———————–
Instance Attribute Summary collapse
-
#data ⇒ Object
readonly
Returns the value of attribute data.
-
#err ⇒ Object
readonly
Returns the value of attribute err.
-
#err_name ⇒ Object
readonly
Returns the value of attribute err_name.
-
#last ⇒ Object
.
Instance Method Summary collapse
- #_last(val) ⇒ Object
- #error(name, val) ⇒ Object
-
#initialize(data) ⇒ Jam
constructor
A new instance of Jam.
- #val(new_val) ⇒ Object
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
#data ⇒ Object (readonly)
Returns the value of attribute data.
188 189 190 |
# File 'lib/Jam_Func.rb', line 188 def data @data end |
#err ⇒ Object (readonly)
Returns the value of attribute err.
188 189 190 |
# File 'lib/Jam_Func.rb', line 188 def err @err end |
#err_name ⇒ Object (readonly)
Returns the value of attribute err_name.
188 189 190 |
# File 'lib/Jam_Func.rb', line 188 def err_name @err_name end |
#last ⇒ Object
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 |