Class: ShellTastic::OutputFormatter
- Inherits:
-
Object
- Object
- ShellTastic::OutputFormatter
- Defined in:
- lib/shelltastic/output_formatter.rb
Instance Attribute Summary collapse
-
#command ⇒ Object
Returns the value of attribute command.
-
#error ⇒ Object
Returns the value of attribute error.
-
#exitstatus ⇒ Object
Returns the value of attribute exitstatus.
-
#output ⇒ Object
Returns the value of attribute output.
-
#pid ⇒ Object
Returns the value of attribute pid.
-
#start ⇒ Object
Returns the value of attribute start.
-
#stop ⇒ Object
Returns the value of attribute stop.
-
#total_time ⇒ Object
Returns the value of attribute total_time.
Instance Method Summary collapse
Instance Attribute Details
#command ⇒ Object
Returns the value of attribute command.
3 4 5 |
# File 'lib/shelltastic/output_formatter.rb', line 3 def command @command end |
#error ⇒ Object
Returns the value of attribute error.
3 4 5 |
# File 'lib/shelltastic/output_formatter.rb', line 3 def error @error end |
#exitstatus ⇒ Object
Returns the value of attribute exitstatus.
3 4 5 |
# File 'lib/shelltastic/output_formatter.rb', line 3 def exitstatus @exitstatus end |
#output ⇒ Object
Returns the value of attribute output.
3 4 5 |
# File 'lib/shelltastic/output_formatter.rb', line 3 def output @output end |
#pid ⇒ Object
Returns the value of attribute pid.
3 4 5 |
# File 'lib/shelltastic/output_formatter.rb', line 3 def pid @pid end |
#start ⇒ Object
Returns the value of attribute start.
3 4 5 |
# File 'lib/shelltastic/output_formatter.rb', line 3 def start @start end |
#stop ⇒ Object
Returns the value of attribute stop.
3 4 5 |
# File 'lib/shelltastic/output_formatter.rb', line 3 def stop @stop end |
#total_time ⇒ Object
Returns the value of attribute total_time.
3 4 5 |
# File 'lib/shelltastic/output_formatter.rb', line 3 def total_time @total_time end |
Instance Method Details
#build(args) ⇒ Object
7 8 9 10 11 |
# File 'lib/shelltastic/output_formatter.rb', line 7 def build(args) args.each_pair do |key, value| send("#{key}=",value) end end |
#inspect ⇒ Object
13 14 15 16 17 18 19 20 21 22 |
# File 'lib/shelltastic/output_formatter.rb', line 13 def inspect hsh = {} meths = self.class.instance_methods(false) - [:build, :inspect] meths.each do |meth| if meth !~ /=/ hsh.store(meth.to_sym,self.method(meth).call) end end hsh end |