Class: MilkTea::ValueBinding
- Inherits:
-
Data
- Object
- Data
- MilkTea::ValueBinding
- Defined in:
- lib/milk_tea/core/bindings/value_binding.rb
Instance Attribute Summary collapse
-
#const_value ⇒ Object
readonly
Returns the value of attribute const_value.
-
#flow_type ⇒ Object
readonly
Returns the value of attribute flow_type.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#kind ⇒ Object
readonly
Returns the value of attribute kind.
-
#mutable ⇒ Object
readonly
Returns the value of attribute mutable.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#storage_type ⇒ Object
readonly
Returns the value of attribute storage_type.
Instance Method Summary collapse
Instance Attribute Details
#const_value ⇒ Object (readonly)
Returns the value of attribute const_value
4 5 6 |
# File 'lib/milk_tea/core/bindings/value_binding.rb', line 4 def const_value @const_value end |
#flow_type ⇒ Object (readonly)
Returns the value of attribute flow_type
4 5 6 |
# File 'lib/milk_tea/core/bindings/value_binding.rb', line 4 def flow_type @flow_type end |
#id ⇒ Object (readonly)
Returns the value of attribute id
4 5 6 |
# File 'lib/milk_tea/core/bindings/value_binding.rb', line 4 def id @id end |
#kind ⇒ Object (readonly)
Returns the value of attribute kind
4 5 6 |
# File 'lib/milk_tea/core/bindings/value_binding.rb', line 4 def kind @kind end |
#mutable ⇒ Object (readonly)
Returns the value of attribute mutable
4 5 6 |
# File 'lib/milk_tea/core/bindings/value_binding.rb', line 4 def mutable @mutable end |
#name ⇒ Object (readonly)
Returns the value of attribute name
4 5 6 |
# File 'lib/milk_tea/core/bindings/value_binding.rb', line 4 def name @name end |
#storage_type ⇒ Object (readonly)
Returns the value of attribute storage_type
4 5 6 |
# File 'lib/milk_tea/core/bindings/value_binding.rb', line 4 def storage_type @storage_type end |
Instance Method Details
#type ⇒ Object
5 6 7 |
# File 'lib/milk_tea/core/bindings/value_binding.rb', line 5 def type flow_type || storage_type end |
#with_flow_type(refined_type) ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/milk_tea/core/bindings/value_binding.rb', line 9 def with_flow_type(refined_type) ValueBinding.new( id:, name:, storage_type:, flow_type: refined_type == storage_type ? nil : refined_type, mutable:, kind:, const_value:, ) end |