Class: RedShift::Component::ContVarDescriptor
- Defined in:
- lib/redshift/target/c/component-gen.rb
Overview
one per variable, shared by subclasses which inherit it not a run-time object, except for introspection
Instance Attribute Summary collapse
-
#kind ⇒ Object
readonly
Returns the value of attribute kind.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
- #index ⇒ Object
-
#initialize(name, index_delta, cont_state, kind) ⇒ ContVarDescriptor
constructor
A new instance of ContVarDescriptor.
- #strict? ⇒ Boolean
Constructor Details
#initialize(name, index_delta, cont_state, kind) ⇒ ContVarDescriptor
Returns a new instance of ContVarDescriptor.
177 178 179 180 181 182 |
# File 'lib/redshift/target/c/component-gen.rb', line 177 def initialize name, index_delta, cont_state, kind @name = name @index_delta = index_delta @cont_state = cont_state @kind = kind end |
Instance Attribute Details
#kind ⇒ Object (readonly)
Returns the value of attribute kind.
176 177 178 |
# File 'lib/redshift/target/c/component-gen.rb', line 176 def kind @kind end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
176 177 178 |
# File 'lib/redshift/target/c/component-gen.rb', line 176 def name @name end |
Instance Method Details
#index ⇒ Object
184 185 186 |
# File 'lib/redshift/target/c/component-gen.rb', line 184 def index @cont_state.inherited_var_count + @index_delta end |
#strict? ⇒ Boolean
183 |
# File 'lib/redshift/target/c/component-gen.rb', line 183 def strict?; @kind == :strict; end |