magicfile 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/magicfile.rb +0 -20
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ec222168eabe89ef31639152cb3b96a2df72715b
4
- data.tar.gz: 607c3b42f32d5d1896239ab68437e8081628039a
3
+ metadata.gz: 02016d64cbb56cd1baafde41f62f3b071719a840
4
+ data.tar.gz: 952890ee6da3036fb6d1961930e49f4b63ed168c
5
5
  SHA512:
6
- metadata.gz: b3fd9e7812ba11363324bcbc7198326b716ee514baebb2798da86af0d9c30a9d9e9992dba99a2d9d67badf6033e6a402e5ca596b68cf44642588714f342c8b53
7
- data.tar.gz: 1dc136d6c557efcc479f42d06b3d511e11b500756c21bdc7fa72def8ff6f5025abd17a8a49b378b4b22e5f4e93ca411d62702353387dbb4f384dec19fae745b9
6
+ metadata.gz: af73cbf801522272d9c9af32125d4b956b20c4d6814a0cee4ffbc54b08575c05afe72f8366b1c66e0f28fec2ebb7dc049cb5e90d34cfba414a072f381d7f498d
7
+ data.tar.gz: 48e9c8cf6b63dd31c5bd8ebb7daed9a8d6870097cfe9def933656ca8eb24d338c3dc3590dae002ec117171a8118192c73f78ca26dd855532ee80f43394128ddf
@@ -48,7 +48,6 @@ class Magicfile
48
48
  def append_string_lines(line_contents)
49
49
  space_num = @current_line_space_num + 2
50
50
  content = line_contents.join("\n" + " " * space_num)
51
- ap content
52
51
  line = MagicLine.new(content, space_num)
53
52
  @lines.insert(@current_line_index + 1, line)
54
53
  end
@@ -65,30 +64,11 @@ class Magicfile
65
64
  @current_line_index += 1
66
65
  end
67
66
 
68
- ap "after start======"
69
- ap @lines
70
- ap @current_line_index
71
- ap @current_line_space_num
72
- ap "end======"
73
-
74
67
  end
75
68
 
76
69
  def to_file(name)
77
70
  infos = @lines.map { |line| " " * line.instance_variable_get("@space_num") + line.instance_variable_get("@content") }
78
- ap infos.join("\n")
79
71
  File.open(name, 'w') { |file| file.write(infos.join("\n")) }
80
72
  end
81
73
 
82
- def display
83
- @lines.each do |line|
84
- ap ' ' * line.instance_variable_get("@space_num") + line.instance_variable_get("@content")
85
- end
86
- end
87
-
88
74
  end
89
-
90
- a = Magicfile.new
91
- a.append_modules(['api', 'v1', 'entities'])
92
- a.append_class('screen', 'Grape::Entity')
93
- a.append_string_lines(['expose :id', 'expose :name'])
94
- a.to_file('tmp.txt')
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: magicfile
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - seaify