class Bmg::Same

Summarizes by enforcing that the same dependent is observed for a given determinant, returning the dependent as summarization.

Public Instance Methods

init(v) click to toggle source
# File lib/bmg/operator/autosummarize.rb, line 136
def init(v)
  v
end
inspect() click to toggle source
# File lib/bmg/operator/autosummarize.rb, line 149
def inspect
  ":same"
end
Also aliased as: to_s
sum(v1, v2) click to toggle source
# File lib/bmg/operator/autosummarize.rb, line 140
def sum(v1, v2)
  raise "Same values expected, got `#{v1}` vs. `#{v2}`" unless v1 == v2
  v1
end
term(v) click to toggle source
# File lib/bmg/operator/autosummarize.rb, line 145
def term(v)
  v
end
to_s()
Alias for: inspect