kiss_shot 0.1.0 → 0.1.1

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 44b2489d4d45dea07eaffeb16de0fb17a91c100d
4
- data.tar.gz: 0ec65bc9504fba2f7c16848b717099804cf406fe
3
+ metadata.gz: eae02ee83869338765cc43bc5e06dc5f213173a0
4
+ data.tar.gz: e3b6c7603fcc20f5dafe5d12b8cd0134138406a1
5
5
  SHA512:
6
- metadata.gz: e7a6c8790d8ffb2020789749f9394ade219d32c02dead271b1dbb5eac9d6371dffb1e3c8ffa7a703d6d791115d132eef3d6c46b7ae16a352700342c7c9b66b75
7
- data.tar.gz: 0fe7e2c0d91053ed855850419300a9d952c2f3e30494a01398fa9c0381180548ba35991ad4bd78110a8e46d830c21b731989d4229acd4e92db5fc4747f77d752
6
+ metadata.gz: c5d6e130b8438a74d3715c6a32a2ab9ae3044fdb65f9ae56348b9bed2fbe9f6718d645abe3c4036d78c6c28bab602530f0435a54f709eac10ba609f5cf9e337b
7
+ data.tar.gz: a1cda9939541feab4def44e49a73e4d49285c74c650b2a5883747e2a2a7530d7fd3ef66d7708806e7d98c5342090dc6d100f948baa857ace5198d6ad6f7542cc
data/lib/kiss_shot.rb CHANGED
@@ -1,5 +1,8 @@
1
1
  #encoding: utf-8
2
2
 
3
+ require 'rubygems'
4
+ require 'bundler/setup'
5
+
3
6
  require 'active_support/core_ext/array'
4
7
 
5
8
  class KissShot
@@ -13,7 +13,7 @@ module KissShot::ObjC::Macro
13
13
  # Add /**/ comment
14
14
  # @return self
15
15
  def objc_block_comment
16
- line "/*"
16
+ line "/**"
17
17
  push_line_prefix " * "
18
18
  yield if block_given?
19
19
  pop_line_prefix " * "
@@ -6,7 +6,6 @@ module KissShot::ObjC::Protocol
6
6
  # Add line for @required
7
7
  # @return self
8
8
  def objc_protocol_required
9
- line
10
9
  line "@required"
11
10
  self
12
11
  end
@@ -14,7 +13,6 @@ module KissShot::ObjC::Protocol
14
13
  # Add line for @optional
15
14
  # @return self
16
15
  def objc_protocol_optional
17
- line
18
16
  line "@optional"
19
17
  self
20
18
  end
@@ -24,8 +22,6 @@ module KissShot::ObjC::Protocol
24
22
  # @param supers [Array, String] super protocols, default to ['NSObject']
25
23
  # @return self
26
24
  def objc_protocol(name, supers = ["NSObject"])
27
- # Add new line
28
- line
29
25
  # Declare
30
26
  raw "@protocol #{name}"
31
27
  if block_given?
@@ -92,7 +92,13 @@ class KissShot::Spec
92
92
  # @param input [String] content to append
93
93
  # @return [KissShot::Spec] self
94
94
  def line(input = "")
95
- raw input, true
96
- raw "\n"
95
+ if input.length > 0
96
+ self.content += self.line_prefix
97
+ else
98
+ self.content += self.line_prefix.rstrip
99
+ end
100
+ self.content += input.to_s
101
+ self.content += "\n"
102
+ self
97
103
  end
98
104
  end
@@ -1,5 +1,5 @@
1
1
  #encoding: utf-8
2
2
 
3
3
  module KissShot
4
- VERSION= "0.1.0"
4
+ VERSION= "0.1.1"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kiss_shot
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yanke Guo