Sha256: 6d02e94c9bc891aaffd944ad3fe732fef5eb94b5625ce652085a03c31edb1d5b

Contents?: true

Size: 311 Bytes

Versions: 6

Compression:

Stored size: 311 Bytes

Contents

module HumanPower
  class Rule
    attr_reader :type, :path

    def initialize(type, path)
      @type = type
      @path = path
    end

    def render
      "#{type.to_s.capitalize}: #{path}"
    end

    alias :to_s :render

    def ==(other)
      other.type == type && other.path == path
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
human_power-0.1.0 lib/human_power/rule.rb
human_power-0.0.6 lib/human_power/rule.rb
human_power-0.0.4 lib/human_power/rule.rb
human_power-0.0.3 lib/human_power/rule.rb
human_power-0.0.2 lib/human_power/rule.rb
human_power-0.0.1 lib/human_power/rule.rb