Class: Zoom::Profile::Pt

Inherits:
Zoom::Profile show all
Defined in:
lib/zoom/profile/pt.rb

Instance Attribute Summary

Attributes inherited from Zoom::Profile

#format_flags, #pattern, #taggable

Instance Method Summary collapse

Methods inherited from Zoom::Profile

#after, #before, #class_name, #exe, #flags, from_json, #go, #name, #operator, #preprocess, profile_by_name, subclasses, #to_s

Constructor Details

#initialize(n = nil, o = nil, f = nil, b = nil, a = nil) ⇒ Pt

Returns a new instance of Pt.



2
3
4
5
6
7
8
# File 'lib/zoom/profile/pt.rb', line 2

def initialize(n = nil, o = nil, f = nil, b = nil, a = nil)
    f ||= "-S"
    o ||= "pt"
    super(n, o, f, b, a)
    @format_flags = "-e -f --nocolor --nogroup"
    @taggable = true
end

Instance Method Details

#translate(from) ⇒ Object



10
11
12
13
14
15
16
17
18
19
20
21
22
23
# File 'lib/zoom/profile/pt.rb', line 10

def translate(from)
    to = Array.new
    from.each do |flag, value|
        case flag
        when "ignore"
            value.each do |v|
                to.push("--ignore=#{v}")
            end
        when "word-regexp"
            to.push("-w")
        end
    end
    return to.join(" ")
end