Sha256: 32e7648c37430f7aae05b1d6acf687881b12fdae5c8d520c57de9d8f096b67dc

Contents?: true

Size: 392 Bytes

Versions: 2

Compression:

Stored size: 392 Bytes

Contents

module Todoloo
  class Task < Struct.new(:type, :topics, :description, :path, :line, :column)
    def self.from_hash(hash)
      new(
        hash.fetch(:type),
        hash.fetch(:topics),
        hash.fetch(:description),
        hash.fetch(:path),
        hash.fetch(:line),
        hash.fetch(:column)
      )
    end

    def location
      "#{path}:#{line}:#{column}"
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
todoloo-0.0.4 lib/todoloo/task.rb
todoloo-0.0.3 lib/todoloo/task.rb