Class: Atomy::Code::Pattern::Wildcard
- Inherits:
-
Atomy::Code::Pattern
- Object
- Atomy::Code::Pattern
- Atomy::Code::Pattern::Wildcard
- Defined in:
- lib/atomy/code/pattern/wildcard.rb
Instance Attribute Summary
Attributes inherited from Atomy::Code::Pattern
Instance Method Summary collapse
- #assign(gen) ⇒ Object
- #bytecode(gen, mod) ⇒ Object
-
#initialize(name = nil, set = false) ⇒ Wildcard
constructor
A new instance of Wildcard.
Methods inherited from Atomy::Code::Pattern
Constructor Details
#initialize(name = nil, set = false) ⇒ Wildcard
Returns a new instance of Wildcard.
8 9 10 11 |
# File 'lib/atomy/code/pattern/wildcard.rb', line 8 def initialize(name = nil, set = false) @name = name @set = set end |
Instance Method Details
#assign(gen) ⇒ Object
21 22 23 |
# File 'lib/atomy/code/pattern/wildcard.rb', line 21 def assign(gen) assignment_local(gen, @name, @set).set_bytecode(gen) end |
#bytecode(gen, mod) ⇒ Object
13 14 15 16 17 18 19 |
# File 'lib/atomy/code/pattern/wildcard.rb', line 13 def bytecode(gen, mod) gen.push_cpath_top gen.find_const(:Atomy) gen.find_const(:Pattern) gen.find_const(:Wildcard) gen.send(:new, 0) end |