Module: Commandoes::Plugins::VirtusPlugin::ClassMethods
- Defined in:
- lib/commandoes/plugins/virtus_plugin.rb
Class Method Summary collapse
Instance Method Summary collapse
- #bool(value, options = {}) ⇒ Object
- #date(value, options = {}) ⇒ Object
- #datetime(value, options = {}) ⇒ Object
- #decimal(value, options = {}) ⇒ Object
- #float(value, options = {}) ⇒ Object
- #integer(value, options = {}) ⇒ Object
- #string(value, options = {}) ⇒ Object
- #time(value, options = {}) ⇒ Object
Class Method Details
.extended(object) ⇒ Object
6 7 8 |
# File 'lib/commandoes/plugins/virtus_plugin.rb', line 6 def self.extended(object) object.send(:include, Virtus.value_object) end |
Instance Method Details
#bool(value, options = {}) ⇒ Object
10 11 12 |
# File 'lib/commandoes/plugins/virtus_plugin.rb', line 10 def bool(value, ={}) attribute value, Axiom::Types::Boolean, end |
#date(value, options = {}) ⇒ Object
14 15 16 |
# File 'lib/commandoes/plugins/virtus_plugin.rb', line 14 def date(value, ={}) attribute value, Date, end |
#datetime(value, options = {}) ⇒ Object
18 19 20 |
# File 'lib/commandoes/plugins/virtus_plugin.rb', line 18 def datetime(value, ={}) attribute value, DateTime, end |
#decimal(value, options = {}) ⇒ Object
22 23 24 |
# File 'lib/commandoes/plugins/virtus_plugin.rb', line 22 def decimal(value, ={}) attribute value, BigDecimal, end |
#float(value, options = {}) ⇒ Object
26 27 28 |
# File 'lib/commandoes/plugins/virtus_plugin.rb', line 26 def float(value, ={}) attribute value, Float, end |
#integer(value, options = {}) ⇒ Object
30 31 32 |
# File 'lib/commandoes/plugins/virtus_plugin.rb', line 30 def integer(value, ={}) attribute value, Integer, end |
#string(value, options = {}) ⇒ Object
34 35 36 |
# File 'lib/commandoes/plugins/virtus_plugin.rb', line 34 def string(value, ={}) attribute value, String, end |
#time(value, options = {}) ⇒ Object
38 39 40 |
# File 'lib/commandoes/plugins/virtus_plugin.rb', line 38 def time(value, ={}) attribute value, Time, end |