motion-mastr 0.2.0 → 0.3.0
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 +4 -4
- data/README.md +12 -0
- data/lib/motion-mastr/attributes/foreground_color_attribute.rb +1 -0
- data/lib/motion-mastr/mastr.rb +8 -4
- data/lib/motion-mastr/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 89846c3bcfb9a52fa5060a59d9802902fcc5c912
|
|
4
|
+
data.tar.gz: 236cd9bc61563be1badfdc59b1aff926dc8f45a6
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 16efa29873aeb5425b26d10cfc5e8e74095b02fa6314197199de2860c5932ed04e8e6939cf142fd0d3b8b78bf40a47cf33854bad0bcf7b3354625ff8f4ee6e54
|
|
7
|
+
data.tar.gz: a2e0eeeabe94bc5a2ef04b3a479eea026264189ce6a9f26c2c56ed527a71ea9d2383ebbcf2996385b5718345209defd6fc8f307393dc9d75219e43e269762ec0
|
data/README.md
CHANGED
|
@@ -89,9 +89,11 @@ expansion # :default or Float
|
|
|
89
89
|
first_line_head_indent # 0.0 and up
|
|
90
90
|
font # UIFont
|
|
91
91
|
foreground_color # UIColor
|
|
92
|
+
color # ^
|
|
92
93
|
head_indent # 0.0 and up
|
|
93
94
|
hyphenation_factor # 0.0 up to 1.0
|
|
94
95
|
kern # :default, Float
|
|
96
|
+
kerning # ^
|
|
95
97
|
ligature # :off, :on
|
|
96
98
|
line_break_mode # :word, :char, :clip, :head, :tail, :middle
|
|
97
99
|
line_height_multiple # :default, 0.0 and up
|
|
@@ -124,4 +126,14 @@ For details, check out the NSAttributedString docs. Or just play around.
|
|
|
124
126
|
* Go easy on obliqueness, don't get hurt.
|
|
125
127
|
|
|
126
128
|
|
|
129
|
+
# HISTORY
|
|
130
|
+
|
|
131
|
+
### 0.3.0 | May 3rd, 2015
|
|
132
|
+
* [new] mastr now optional supports being called with _just_ a Hash of styles
|
|
133
|
+
* [new] the style :color is now alias for :foreground_color
|
|
134
|
+
|
|
135
|
+
### 0.2.0 | May 2nd, 2015
|
|
136
|
+
* [feature] first release
|
|
137
|
+
|
|
138
|
+
|
|
127
139
|
|
data/lib/motion-mastr/mastr.rb
CHANGED
|
@@ -1,14 +1,18 @@
|
|
|
1
1
|
module MotionMastr
|
|
2
2
|
|
|
3
3
|
# make a MastrBuilder
|
|
4
|
-
def mastr(text=nil, default_styles=
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
def mastr(text=nil, default_styles=nil)
|
|
5
|
+
styles = {}
|
|
6
|
+
styles.merge!(text) if text.is_a?(Hash)
|
|
7
|
+
styles.merge!(default_styles) if default_styles.is_a? Hash
|
|
8
|
+
|
|
9
|
+
b = MastrBuilder.new styles
|
|
10
|
+
b.add(text) unless text.nil? || text.is_a?(Hash)
|
|
7
11
|
b
|
|
8
12
|
end
|
|
9
13
|
|
|
10
14
|
# make and build a NSMutableAttributedString
|
|
11
|
-
def mastr!(text=nil, default_styles=
|
|
15
|
+
def mastr!(text=nil, default_styles=nil)
|
|
12
16
|
mastr(text, default_styles).build
|
|
13
17
|
end
|
|
14
18
|
|
data/lib/motion-mastr/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: motion-mastr
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.3.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Steve Kellock
|
|
@@ -24,7 +24,7 @@ dependencies:
|
|
|
24
24
|
- - "~>"
|
|
25
25
|
- !ruby/object:Gem::Version
|
|
26
26
|
version: '10.0'
|
|
27
|
-
description: Get your NSMutableAttributedString on!
|
|
27
|
+
description: Get your NSMutableAttributedString on with RubyMotion!
|
|
28
28
|
email:
|
|
29
29
|
- steve@kellock.ca
|
|
30
30
|
executables: []
|