Class: Dynamicloud::API::Criteria::JoinType
- Inherits:
-
Object
- Object
- Dynamicloud::API::Criteria::JoinType
- Defined in:
- lib/dynamic_criteria.rb
Overview
This enum represents the different Join types
Constant Summary collapse
- LEFT =
JoinType.new 1
- RIGHT =
JoinType.new 2
- INNER =
JoinType.new 3
- LEFT_OUTER =
JoinType.new 4
- RIGHT_OUTER =
JoinType.new 5
Instance Attribute Summary collapse
-
#type ⇒ Object
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(type) ⇒ JoinType
constructor
A new instance of JoinType.
-
#to_string ⇒ Object
This method returns the text according to this Join Type.
Constructor Details
#initialize(type) ⇒ JoinType
Returns a new instance of JoinType.
26 27 28 |
# File 'lib/dynamic_criteria.rb', line 26 def initialize(type) @type = type end |
Instance Attribute Details
#type ⇒ Object
Returns the value of attribute type.
24 25 26 |
# File 'lib/dynamic_criteria.rb', line 24 def type @type end |
Instance Method Details
#to_string ⇒ Object
This method returns the text according to this Join Type.
39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 |
# File 'lib/dynamic_criteria.rb', line 39 def to_string case (@type) when LEFT.type return 'left' when RIGHT.type return 'right' when INNER.type return 'inner' when LEFT_OUTER.type return 'left outer' when RIGHT_OUTER.type return 'right outer' else return 'inner' end end |