Class: Lev::Paramifier
- Includes:
- ActiveAttr::Model, ActiveAttr::Typecasting
- Defined in:
- lib/lev/handler.rb
Class Method Summary collapse
-
.boolean ⇒ Object
Hack to provide ActiveAttr’s Boolean type concisely.
Instance Method Summary collapse
Class Method Details
.boolean ⇒ Object
Hack to provide ActiveAttr’s Boolean type concisely
9 |
# File 'lib/lev/handler.rb', line 9 def self.boolean; ActiveAttr::Typecasting::Boolean; end |
Instance Method Details
#as_hash(*keys) ⇒ Object
11 12 13 14 |
# File 'lib/lev/handler.rb', line 11 def as_hash(*keys) keys = [keys].flatten.compact Hash[keys.collect { |key| [key, self.send(key)] }] end |