Sha256: 445023c1e4744e76fea65f3c8074f62a6ee096556b0083ed99f0d6c6e542a6f6

Contents?: true

Size: 747 Bytes

Versions: 48

Compression:

Stored size: 747 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_header
    "XyzNode:\n    xyz_param =? nil\n"
  end
  def xyz_code(ruleh)
    c = write_code(ruleh["computed_guards"].select{|k,_|k.starts_with?("xyz_")})
    c.blank? ? '' : self.class.indent(c)
  end
  def guard_code(ruleh)
    write_code(ruleh["computed_guards"].reject{|k,_|k.starts_with?("xyz_")})
  end
  def get_code(ruleh)
    x = xyz_code(ruleh)
    super +
      xyz_header +
      xyz_code(ruleh)
  end
  def code_section_counts(ruleh)
    super + { xyz_header: xyz_header.count("\n"),
              xyz: xyz_code(ruleh).count("\n") }
  end
end

Version data entries

48 entries across 48 versions & 1 rubygems

Version Path
marty-14.3.0 spec/dummy/lib/gemini/xyz_rule_script_set.rb
marty-14.0.0 spec/dummy/lib/gemini/xyz_rule_script_set.rb
marty-13.0.2 spec/dummy/lib/gemini/xyz_rule_script_set.rb
marty-11.0.0 spec/dummy/lib/gemini/xyz_rule_script_set.rb
marty-10.0.3 spec/dummy/lib/gemini/xyz_rule_script_set.rb
marty-10.0.2 spec/dummy/lib/gemini/xyz_rule_script_set.rb
marty-10.0.0 spec/dummy/lib/gemini/xyz_rule_script_set.rb
marty-9.5.1 spec/dummy/lib/gemini/xyz_rule_script_set.rb
marty-9.5.0 spec/dummy/lib/gemini/xyz_rule_script_set.rb
marty-9.3.3 spec/dummy/lib/gemini/xyz_rule_script_set.rb
marty-9.3.2 spec/dummy/lib/gemini/xyz_rule_script_set.rb
marty-9.3.0 spec/dummy/lib/gemini/xyz_rule_script_set.rb
marty-8.5.0 spec/dummy/lib/gemini/xyz_rule_script_set.rb
marty-8.4.1 spec/dummy/lib/gemini/xyz_rule_script_set.rb
marty-8.3.1 spec/dummy/lib/gemini/xyz_rule_script_set.rb
marty-8.2.0 spec/dummy/lib/gemini/xyz_rule_script_set.rb
marty-8.0.0 spec/dummy/lib/gemini/xyz_rule_script_set.rb
marty-6.1.0 spec/dummy/lib/gemini/xyz_rule_script_set.rb
marty-5.2.0 spec/dummy/lib/gemini/xyz_rule_script_set.rb
marty-5.1.4 spec/dummy/lib/gemini/xyz_rule_script_set.rb