class SyntaxTree::YARV::CheckKeyword
~~~
evaluate(value: 3)
end
value
def evaluate(value: rand)
~~~ruby
### Usage
given.
a boolean onto the stack indicating whether or not the keyword was
metadata and the index of the keyword within that metadata. It pushes
two arguments: the index of the local variable that stores the keywords
called into the method represented by the instruction sequence. It has
`checkkeyword` checks if a keyword was passed at the callsite that
### Summary
def ==(other)
def ==(other) other.is_a?(CheckKeyword) && other.keyword_bits_index == keyword_bits_index && other.keyword_index == keyword_index end
def call(vm)
def call(vm) vm.push(vm.local_get(keyword_bits_index, 0)[keyword_index]) end
def deconstruct_keys(_keys)
def deconstruct_keys(_keys) { keyword_bits_index: keyword_bits_index, keyword_index: keyword_index } end
def disasm(fmt)
def disasm(fmt) fmt.instruction( "checkkeyword", [fmt.object(keyword_bits_index), fmt.object(keyword_index)] ) end
def initialize(keyword_bits_index, keyword_index)
def initialize(keyword_bits_index, keyword_index) @keyword_bits_index = keyword_bits_index @keyword_index = keyword_index end
def length
def length 3 end
def pushes
def pushes 1 end
def to_a(iseq)
def to_a(iseq) [ :checkkeyword, iseq.local_table.offset(keyword_bits_index), keyword_index ] end