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-5.1.3 spec/dummy/lib/gemini/xyz_rule_script_set.rb
marty-5.1.2 spec/dummy/lib/gemini/xyz_rule_script_set.rb
marty-5.1.1 spec/dummy/lib/gemini/xyz_rule_script_set.rb
marty-5.1.0 spec/dummy/lib/gemini/xyz_rule_script_set.rb
marty-3.1.0 spec/dummy/lib/gemini/xyz_rule_script_set.rb
marty-3.0.1 spec/dummy/lib/gemini/xyz_rule_script_set.rb
marty-4.0.0.rc2 spec/dummy/lib/gemini/xyz_rule_script_set.rb
marty-3.0.0 spec/dummy/lib/gemini/xyz_rule_script_set.rb
marty-2.9.3 spec/dummy/lib/gemini/xyz_rule_script_set.rb
marty-2.9.2 spec/dummy/lib/gemini/xyz_rule_script_set.rb
marty-2.9.1 spec/dummy/lib/gemini/xyz_rule_script_set.rb
marty-2.8.0 spec/dummy/lib/gemini/xyz_rule_script_set.rb
marty-2.7.3 spec/dummy/lib/gemini/xyz_rule_script_set.rb
marty-2.7.2 spec/dummy/lib/gemini/xyz_rule_script_set.rb
marty-2.7.1 spec/dummy/lib/gemini/xyz_rule_script_set.rb
marty-2.7.0 spec/dummy/lib/gemini/xyz_rule_script_set.rb
marty-2.6.8 spec/dummy/lib/gemini/xyz_rule_script_set.rb
marty-2.6.7 spec/dummy/lib/gemini/xyz_rule_script_set.rb
marty-2.6.6 spec/dummy/lib/gemini/xyz_rule_script_set.rb
marty-2.6.5 spec/dummy/lib/gemini/xyz_rule_script_set.rb