File tree 5 files changed +12
-12
lines changed 5 files changed +12
-12
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ module Structifier
10
10
module_function
11
11
12
12
def to_struct ( obj , *symbols )
13
- return obj unless obj . is_a? Hash
13
+ return obj unless obj . is_a? ( Hash )
14
14
15
15
struct = Object . new
16
16
symbols . each do |key |
Original file line number Diff line number Diff line change @@ -50,42 +50,42 @@ def initialize(red: nil,
50
50
51
51
# @return [Integer]
52
52
def red
53
- hsl_to_rgb unless defined? @red
53
+ hsl_to_rgb unless defined? ( @red )
54
54
55
55
@red
56
56
end
57
57
58
58
# @return [Integer]
59
59
def green
60
- hsl_to_rgb unless defined? @green
60
+ hsl_to_rgb unless defined? ( @green )
61
61
62
62
@green
63
63
end
64
64
65
65
# @return [Integer]
66
66
def blue
67
- hsl_to_rgb unless defined? @blue
67
+ hsl_to_rgb unless defined? ( @blue )
68
68
69
69
@blue
70
70
end
71
71
72
72
# @return [Numeric]
73
73
def hue
74
- rgb_to_hsl unless defined? @hue
74
+ rgb_to_hsl unless defined? ( @hue )
75
75
76
76
@hue
77
77
end
78
78
79
79
# @return [Numeric]
80
80
def saturation
81
- rgb_to_hsl unless defined? @saturation
81
+ rgb_to_hsl unless defined? ( @saturation )
82
82
83
83
@saturation
84
84
end
85
85
86
86
# @return [Numeric]
87
87
def lightness
88
- rgb_to_hsl unless defined? @lightness
88
+ rgb_to_hsl unless defined? ( @lightness )
89
89
90
90
@lightness
91
91
end
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ def ==(other)
30
30
# @param index [Numeric, Value]
31
31
# @return [List<(Value, Value)>, Value]
32
32
def at ( index )
33
- if index . is_a? Numeric
33
+ if index . is_a? ( Numeric )
34
34
index = index . floor
35
35
index = to_a_length + index if index . negative?
36
36
return nil if index . negative? || index >= to_a_length
Original file line number Diff line number Diff line change @@ -25,12 +25,12 @@ def initialize(value, unit = nil)
25
25
denominator_units = [ ]
26
26
when ::Hash
27
27
numerator_units = unit . fetch ( :numerator_units , [ ] )
28
- unless numerator_units . is_a? Array
28
+ unless numerator_units . is_a? ( Array )
29
29
raise Sass ::ScriptError , "invalid numerator_units #{ numerator_units . inspect } "
30
30
end
31
31
32
32
denominator_units = unit . fetch ( :denominator_units , [ ] )
33
- unless denominator_units . is_a? Array
33
+ unless denominator_units . is_a? ( Array )
34
34
raise Sass ::ScriptError , "invalid denominator_units #{ denominator_units . inspect } "
35
35
end
36
36
else
@@ -75,7 +75,7 @@ def initialize(value, unit = nil)
75
75
76
76
# @return [::Boolean]
77
77
def ==( other )
78
- return false unless other . is_a? Sass ::Value ::Number
78
+ return false unless other . is_a? ( Sass ::Value ::Number )
79
79
80
80
return false if numerator_units . length != other . numerator_units . length ||
81
81
denominator_units . length != other . denominator_units . length
Original file line number Diff line number Diff line change 5
5
RSpec . describe Sass do
6
6
def remote_eq ( lhs , rhs )
7
7
to_host_value = lambda { |value |
8
- if value . is_a? Sass ::Value ::ArgumentList
8
+ if value . is_a? ( Sass ::Value ::ArgumentList )
9
9
value . dup
10
10
else
11
11
value
You can’t perform that action at this time.
0 commit comments