Class: Functional::Save

Inherits:
Base show all
Defined in:
lib/functional.rb

Instance Attribute Summary collapse

Attributes inherited from Base

#caller, #exe, #next

Instance Method Summary collapse

Methods inherited from Base

#base_fun, #clean, #end, #to_proc

Constructor Details

#initialize(db) ⇒ Save

Returns a new instance of Save.



453
454
455
# File 'lib/functional.rb', line 453

def initialize db
	@db = db
end

Instance Attribute Details

#dbObject (readonly)

Returns the value of attribute db.



451
452
453
# File 'lib/functional.rb', line 451

def db
  @db
end

Instance Method Details

#call(k, *v) ⇒ Object



457
458
459
# File 'lib/functional.rb', line 457

def call k, *v
	@db[ k] = v.length == 1 ? v.first : v
end