Sha256: 91a6a7a4cbb5fe75f4cdd6a70c15f24ddcbec6178d0dc1bf444f9efca4cf1e06

Contents?: true

Size: 408 Bytes

Versions: 22

Compression:

Stored size: 408 Bytes

Contents

# Concept from dm-core
class Operator
  attr_reader :target, :operator, :prefix
  
  def initialize(target, operator, prefix=false)
    @target   = target.to_ga
    @operator = operator
    @prefix = prefix
  end
  
  def to_ga
    @prefix ? "#{operator}#{target}" : "#{target}#{operator}"
  end
  
  def ==(rhs)
    target == rhs.target &&
    operator == rhs.operator &&
    prefix == rhs.prefix
  end
end

Version data entries

22 entries across 22 versions & 4 rubygems

Version Path
jonuts-garb-0.2.3 lib/extensions/operator.rb
jonuts-garb-0.2.4 lib/extensions/operator.rb
jonuts-garb-0.2.6 lib/extensions/operator.rb
macros-garb-0.2.6 lib/extensions/operator.rb
vigetlabs-garb-0.1.2 lib/extensions/operator.rb
vigetlabs-garb-0.2.0 lib/extensions/operator.rb
vigetlabs-garb-0.2.1 lib/extensions/operator.rb
vigetlabs-garb-0.2.2 lib/extensions/operator.rb
vigetlabs-garb-0.2.3 lib/extensions/operator.rb
vigetlabs-garb-0.2.4 lib/extensions/operator.rb
vigetlabs-garb-0.2.5 lib/extensions/operator.rb
vigetlabs-garb-0.2.6 lib/extensions/operator.rb
garb-0.4.0 lib/extensions/operator.rb
garb-0.3.2 lib/extensions/operator.rb
garb-0.3.1 lib/extensions/operator.rb
garb-0.3.0 lib/extensions/operator.rb
garb-0.2.9 lib/extensions/operator.rb
garb-0.2.8 lib/extensions/operator.rb
garb-0.2.4 lib/extensions/operator.rb
garb-0.2.6 lib/extensions/operator.rb