Class: OpenUSD::ListOp
- Inherits:
-
Object
- Object
- OpenUSD::ListOp
- Defined in:
- lib/openusd/value.rb
Overview
Preserves a USDA list-edit operator together with its value.
Instance Attribute Summary collapse
-
#operation ⇒ Object
readonly
Returns the value of attribute operation.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
-
#==(other) ⇒ Object
Compare the list operation and value.
-
#initialize(operation, value) ⇒ ListOp
constructor
A new instance of ListOp.
Constructor Details
#initialize(operation, value) ⇒ ListOp
Returns a new instance of ListOp.
42 43 44 45 46 |
# File 'lib/openusd/value.rb', line 42 def initialize(operation, value) @operation = operation.to_sym @value = value freeze end |
Instance Attribute Details
#operation ⇒ Object (readonly)
Returns the value of attribute operation.
40 41 42 |
# File 'lib/openusd/value.rb', line 40 def operation @operation end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
40 41 42 |
# File 'lib/openusd/value.rb', line 40 def value @value end |
Instance Method Details
#==(other) ⇒ Object
Compare the list operation and value.
49 50 51 |
# File 'lib/openusd/value.rb', line 49 def ==(other) other.is_a?(self.class) && operation == other.operation && value == other.value end |