Sha256: 75bb915e1a120188fd71ad4a86de05a00c03a3df768e5aabd2ba344f0c08a4c9
Contents?: true
Size: 617 Bytes
Versions: 3
Compression:
Stored size: 617 Bytes
Contents
class Gemini::XyzRuleScriptSet < Marty::RuleScriptSet def self.node_name "NodeXyz" end def self.body_start "import BaseCode\n#{node_name}: BaseCode::BaseCode\n" end def xyz_code(rule) write_code(rule.computed_guards.select{|k,_|k.starts_with?("xyz_")}) end def guard_code(rule) write_code(rule.computed_guards.reject{|k,_|k.starts_with?("xyz_")}) end def get_code(rule) x = xyz_code(rule) super + (x.blank? ? '' : "XyzNode:\n xyz_param =? nil\n" + self.class.indent(x)) end def code_section_counts(rule) super + { xyz: xyz_code(rule).count("\n") } end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
marty-1.2.3 | spec/dummy/lib/gemini/xyz_rule_script_set.rb |
marty-1.2.2 | spec/dummy/lib/gemini/xyz_rule_script_set.rb |
marty-1.2.1 | spec/dummy/lib/gemini/xyz_rule_script_set.rb |