class OData::AbstractSchema::SchemaObject
Attributes
name[RW]
schema[R]
Public Class Methods
new(schema, name)
click to toggle source
# File lib/o_data/abstract_schema/schema_object.rb, line 7 def initialize(schema, name) @schema = schema @name = name end
Public Instance Methods
<=>(other)
click to toggle source
# File lib/o_data/abstract_schema/schema_object.rb, line 18 def <=>(other) return qualified_name <=> other.qualified_name if other.is_a?(OData::SchemaObject) return -1 if other.blank? 1 end
inspect()
click to toggle source
# File lib/o_data/abstract_schema/schema_object.rb, line 32 def inspect "#<< #{@schema.namespace}(<< #{@name.inspect}: #{self.class.name.to_s} >>) >>" end
plural_name()
click to toggle source
# File lib/o_data/abstract_schema/schema_object.rb, line 28 def plural_name name.to_s.pluralize end
qualified_name()
click to toggle source
# File lib/o_data/abstract_schema/schema_object.rb, line 12 def qualified_name @schema.qualify(@name) end
singular_name()
click to toggle source
# File lib/o_data/abstract_schema/schema_object.rb, line 24 def singular_name name.to_s.singularize end