Class: OData::ComplexType
Instance Attribute Summary collapse
-
#base_type ⇒ Object
readonly
Returns the value of attribute base_type.
Attributes inherited from Type
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ ComplexType
constructor
A new instance of ComplexType.
- #properties ⇒ Object
- #valid_value?(value) ⇒ Boolean
Methods inherited from Type
Constructor Details
#initialize(options = {}) ⇒ ComplexType
Returns a new instance of ComplexType.
5 6 7 8 9 |
# File 'lib/odata/types/complex_type.rb', line 5 def initialize( = {}) super @base_type = [:base_type] @service = [:service] end |
Instance Attribute Details
#base_type ⇒ Object (readonly)
Returns the value of attribute base_type.
3 4 5 |
# File 'lib/odata/types/complex_type.rb', line 3 def base_type @base_type end |
Instance Method Details
#properties ⇒ Object
11 12 13 |
# File 'lib/odata/types/complex_type.rb', line 11 def properties @properties ||= @service.properties_for_type(name) end |
#valid_value?(value) ⇒ Boolean
15 16 17 |
# File 'lib/odata/types/complex_type.rb', line 15 def valid_value?(value) value.respond_to?(:odata_type) && self.name == value.odata_type end |