Class: OData::Singleton
- Inherits:
-
Object
- Object
- OData::Singleton
- Defined in:
- lib/odata/singleton.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#type_name ⇒ Object
readonly
Returns the value of attribute type_name.
Instance Method Summary collapse
- #collection? ⇒ Boolean
-
#initialize(options = {}) ⇒ Singleton
constructor
A new instance of Singleton.
- #type ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ Singleton
Returns a new instance of Singleton.
6 7 8 9 10 |
# File 'lib/odata/singleton.rb', line 6 def initialize( = {}) @name = [:name] @type_name = [:type] @service = [:service] end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
3 4 5 |
# File 'lib/odata/singleton.rb', line 3 def name @name end |
#type_name ⇒ Object (readonly)
Returns the value of attribute type_name.
4 5 6 |
# File 'lib/odata/singleton.rb', line 4 def type_name @type_name end |
Instance Method Details
#collection? ⇒ Boolean
12 13 14 |
# File 'lib/odata/singleton.rb', line 12 def collection? false end |
#type ⇒ Object
16 17 18 |
# File 'lib/odata/singleton.rb', line 16 def type @service.get_type_by_name(type_name) end |