Class: KRPC::Types::ClassType
Instance Attribute Summary collapse
-
#class_name ⇒ Object
readonly
Returns the value of attribute class_name.
-
#service_name ⇒ Object
readonly
Returns the value of attribute service_name.
Attributes inherited from TypeBase
Instance Method Summary collapse
-
#initialize(type_string) ⇒ ClassType
constructor
A new instance of ClassType.
Constructor Details
#initialize(type_string) ⇒ ClassType
Returns a new instance of ClassType.
161 162 163 164 165 166 |
# File 'lib/krpc/types.rb', line 161 def initialize(type_string) m = /Class\(([^\.]+)\.([^\.]+)\)/.match type_string raise(ValueError, "\"#{type_string}\" is not a valid type string for a class type") unless m @service_name, @class_name = m[1..2] super(type_string, Gen.generate_class(service_name, class_name)) end |
Instance Attribute Details
#class_name ⇒ Object (readonly)
Returns the value of attribute class_name.
160 161 162 |
# File 'lib/krpc/types.rb', line 160 def class_name @class_name end |
#service_name ⇒ Object (readonly)
Returns the value of attribute service_name.
160 161 162 |
# File 'lib/krpc/types.rb', line 160 def service_name @service_name end |