module Base::ClassMethods

Public Instance Methods

all() click to toggle source
# File lib/models/base.rb, line 15
def all
  load
end
headers_raw() click to toggle source
# File lib/models/base.rb, line 19
def headers_raw
  @headers
end
load(lines = raw_lines) click to toggle source
# File lib/models/base.rb, line 8
def load(lines = raw_lines)
  @headers = lines.first
  @items = lines[1..-1].map do |line|
    create(line)
  end
end
print_table(data) { |item, index| ... } click to toggle source
raw_lines() click to toggle source
# File lib/models/base.rb, line 4
def raw_lines
  hammer.run(command, capture: true).lines
end
run(*cmds) click to toggle source
# File lib/models/base.rb, line 43
def run(*cmds)
  hammer.run(cmds.join(' '))
end