Class: OData::Association
- Inherits:
-
Object
- Object
- OData::Association
- Defined in:
- lib/odata/association.rb,
lib/odata/association/end.rb,
lib/odata/association/proxy.rb
Defined Under Namespace
Instance Attribute Summary collapse
-
#ends ⇒ Object
readonly
Returns the value of attribute ends.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(options) ⇒ Association
constructor
A new instance of Association.
Constructor Details
#initialize(options) ⇒ Association
Returns a new instance of Association.
8 9 10 11 12 13 14 |
# File 'lib/odata/association.rb', line 8 def initialize() @name = [:name] @ends = [:ends] || [] raise ArgumentError, 'name must be provided' if name.nil? || name == '' raise ArgumentError, 'too many association ends' if ends.size > 2 end |
Instance Attribute Details
#ends ⇒ Object (readonly)
Returns the value of attribute ends.
6 7 8 |
# File 'lib/odata/association.rb', line 6 def ends @ends end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
6 7 8 |
# File 'lib/odata/association.rb', line 6 def name @name end |