struct Lester::Server::Usb::Interface
- Lester::Server::Usb::Interface
- Struct
- Value
- Object
Included Modules
- JSON::Serializable
- Lester::Resource
Defined in:
lester/server/usb/interface.crConstructors
Instance Method Summary
-
#class : String | Nil
Returns the runtime
Class
of an object. - #class_id : Int32 | Nil
- #driver : String | Nil
- #driver_version : String | Nil
- #number : Int32 | Nil
- #subclass : String | Nil
- #subclass_id : Int32 | Nil
Constructor Detail
Instance Method Detail
def class : String | Nil
#
Description copied from class Object
Returns the runtime Class
of an object.
1.class # => Int32
"hello".class # => String
Compare it with typeof
, which returns the compile-time type of an object:
random_value = rand # => 0.627423
value = random_value < 0.5 ? 1 : "hello"
value # => "hello"
value.class # => String
typeof(value) # => Int32 | String