Class: Redpen::Result

Inherits:
Object
  • Object
show all
Defined in:
lib/redpen/result.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(out, _err, _status) ⇒ Result

Returns a new instance of Result.

Parameters:

  • out (String)

    stdout

  • _err (String)

    stderr

  • _status (Process::Status)


8
9
10
# File 'lib/redpen/result.rb', line 8

def initialize(out, _err, _status)
  @messages = out.split("\n")
end

Instance Attribute Details

#messagesObject (readonly)

Returns the value of attribute messages.



3
4
5
# File 'lib/redpen/result.rb', line 3

def messages
  @messages
end

Instance Method Details

#valid?Boolean

Returns:

  • (Boolean)


12
13
14
# File 'lib/redpen/result.rb', line 12

def valid?
  messages.empty?
end