Class: Buhos::Configuration
- Inherits:
-
Sequel::Model
- Object
- Sequel::Model
- Buhos::Configuration
- Defined in:
- model/models.rb
Class Method Summary collapse
Class Method Details
.get(id) ⇒ Object
41 42 43 44 45 46 47 48 |
# File 'model/models.rb', line 41 def self.get(id) conf=Buhos::Configuration[id] if conf.nil? nil else conf[:valor] end end |
.set(id, valor) ⇒ Object
33 34 35 36 37 38 39 40 |
# File 'model/models.rb', line 33 def self.set(id,valor) conf=Buhos::Configuration[id] if conf.nil? Buhos::Configuration.insert(:id=>id,:valor=>valor) else Buhos::Configuration[id].update(:valor=>valor) end end |