Class: OData::NavigationProperty
- Inherits:
-
Object
- Object
- OData::NavigationProperty
- Defined in:
- lib/odata/navigation_property.rb
Instance Attribute Summary collapse
-
#contain_target ⇒ Object
readonly
Returns the value of attribute contain_target.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#nullable ⇒ Object
readonly
Returns the value of attribute nullable.
-
#partner ⇒ Object
readonly
Returns the value of attribute partner.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
- #collection? ⇒ Boolean
- #collection_type_match?(value) ⇒ Boolean
-
#initialize(options = {}) ⇒ NavigationProperty
constructor
A new instance of NavigationProperty.
- #type_match?(value) ⇒ Boolean
Constructor Details
#initialize(options = {}) ⇒ NavigationProperty
9 10 11 12 13 14 15 |
# File 'lib/odata/navigation_property.rb', line 9 def initialize( = {}) @name = [:name] @type = [:type] @nullable = [:nullable].nil? ? true : false @contain_target = [:contain_target] || false @partner = [:partner] end |
Instance Attribute Details
#contain_target ⇒ Object (readonly)
Returns the value of attribute contain_target
6 7 8 |
# File 'lib/odata/navigation_property.rb', line 6 def contain_target @contain_target end |
#name ⇒ Object (readonly)
Returns the value of attribute name
3 4 5 |
# File 'lib/odata/navigation_property.rb', line 3 def name @name end |
#nullable ⇒ Object (readonly)
Returns the value of attribute nullable
5 6 7 |
# File 'lib/odata/navigation_property.rb', line 5 def nullable @nullable end |
#partner ⇒ Object (readonly)
Returns the value of attribute partner
7 8 9 |
# File 'lib/odata/navigation_property.rb', line 7 def partner @partner end |
#type ⇒ Object (readonly)
Returns the value of attribute type
4 5 6 |
# File 'lib/odata/navigation_property.rb', line 4 def type @type end |
Instance Method Details
#collection? ⇒ Boolean
17 18 19 |
# File 'lib/odata/navigation_property.rb', line 17 def collection? OData::CollectionType === type end |
#collection_type_match?(value) ⇒ Boolean
25 26 27 28 |
# File 'lib/odata/navigation_property.rb', line 25 def collection_type_match?(value) collection = type collection.valid_value?(value) end |
#type_match?(value) ⇒ Boolean
21 22 23 |
# File 'lib/odata/navigation_property.rb', line 21 def type_match?(value) type.valid_value?(value) end |