Class: KRPC::Services::ServiceBase

Inherits:
Object
  • Object
show all
Includes:
Doc::SuffixMethods, KRPC::Streaming::StreamConstructors
Defined in:
lib/krpc/service.rb

Overview

Base class for service objects, created at runtime using information received from the server.

Direct Known Subclasses

Core

Constant Summary

Constants included from KRPC::Streaming::StreamConstructors

KRPC::Streaming::StreamConstructors::STREAM_METHOD_REGEX, KRPC::Streaming::StreamConstructors::STREAM_METHOD_SUFFIX

Constants included from Doc::SuffixMethods

Doc::SuffixMethods::DOCSTRING_SUFFIX, Doc::SuffixMethods::DOCSTRING_SUFFIX_REGEX

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from KRPC::Streaming::StreamConstructors

included, #method_missing, #respond_to_missing?

Methods included from Doc::SuffixMethods

included, #method_missing, #respond_to_missing?

Constructor Details

#initialize(client) ⇒ ServiceBase

Returns a new instance of ServiceBase.



53
54
55
# File 'lib/krpc/service.rb', line 53

def initialize(client)
  @client = client
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class KRPC::Streaming::StreamConstructors

Instance Attribute Details

#clientObject (readonly)

Returns the value of attribute client.



51
52
53
# File 'lib/krpc/service.rb', line 51

def client
  @client
end