Class: Taipu::Base
- Inherits:
-
Object
- Object
- Taipu::Base
- Defined in:
- lib/taipu/base.rb
Overview
Abstract class.
Instance Method Summary collapse
Instance Method Details
#constraints ⇒ Object
17 18 19 |
# File 'lib/taipu/base.rb', line 17 def constraints {} end |
#to_h ⇒ Object
7 8 9 10 11 |
# File 'lib/taipu/base.rb', line 7 def to_h { type: to_sym }.merge(constraints) end |
#to_sym ⇒ Object
13 14 15 |
# File 'lib/taipu/base.rb', line 13 def to_sym self.class.name.split('::').last.downcase.to_sym end |