Class: Yaoi::Service

Inherits:
Object
  • Object
show all
Defined in:
lib/yaoi/service.rb

Overview

OData service

Constant Summary collapse

METADATA_NS =
{
  'm' => 'http://schemas.microsoft.com/ado/2007/08/dataservices/metadata',
  'edmx' => 'http://schemas.microsoft.com/ado/2007/06/edmx',
  'ds' => 'http://schemas.microsoft.com/ado/2007/08/dataservices',
  'atom' => 'http://www.w3.org/2005/Atom'
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(url) ⇒ Service

Returns a new instance of Service.



15
16
17
# File 'lib/yaoi/service.rb', line 15

def initialize(url)
  @service_root_url = url.end_with?('/') ? url[0..-2] : url
end

Instance Attribute Details

#service_root_urlObject (readonly)

Returns the value of attribute service_root_url.



13
14
15
# File 'lib/yaoi/service.rb', line 13

def service_root_url
  @service_root_url
end

Instance Method Details

#inspectObject



19
20
21
# File 'lib/yaoi/service.rb', line 19

def inspect
  "#<#{self.class} service_root_url: '#{service_root_url}'>"
end