struct Lester::Operation
- Lester::Operation
- Struct
- Value
- Object
Included Modules
- JSON::Serializable
- Lester::Resource
Defined in:
lester/operation.crConstructors
Instance Method Summary
-
#class : Class | Nil
Returns the runtime
Class
of an object. - #created_at : Time | Nil
- #description : String | Nil
- #err : String | Nil
- #id : String | Nil
- #location : String | Nil
- #may_cancel? : Bool | Nil
- #metadata : Metadata | Nil
- #resources : Resources | Nil
- #status : String | Nil
- #status_code : Int32 | Nil
- #success? : Bool | Nil
- #updated_at : Time | Nil
Constructor Detail
Instance Method Detail
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