chrislee_test_gem 0.0.3 → 0.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/bin/test_gem CHANGED
@@ -3,11 +3,9 @@ require 'test_gem'
3
3
 
4
4
  case ARGV[0]
5
5
  when "first"
6
- first_line = TestGem::MyFile.new ARGV[1]
7
- puts first_line.first(ARGV[1])
6
+ puts TestGem::MyFile.first(ARGV[1])
8
7
  when "last"
9
- last_line = TestGem::MyFile.new ARGV[1]
10
- puts last_line.last(ARGV[1])
8
+ puts TestGem::MyFile.last(ARGV[1])
11
9
  else
12
10
  puts "test_gem can return the first or last line of a text file"
13
11
  puts "Usage:"
@@ -5,11 +5,11 @@ module TestGem
5
5
  @file_location = file_location
6
6
  end
7
7
 
8
- def first file_location=@file_location
8
+ def self.first file_location=@file_location
9
9
  File.open(file_location, "r"){|f| f.readlines[0].chomp}
10
10
  end
11
11
 
12
- def last file_location=@file_location
12
+ def self.last file_location=@file_location
13
13
  File.open(file_location,"r"){|f| f.readlines.last.chomp}
14
14
  end
15
15
 
@@ -1,6 +1,6 @@
1
1
  module TestGem
2
2
 
3
3
 
4
- VERSION = "0.0.3"
4
+ VERSION = "0.0.4"
5
5
 
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chrislee_test_gem
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: