Skip to content

Commit

Permalink
Typo corrections.
Browse files Browse the repository at this point in the history
  • Loading branch information
thomthom committed Oct 25, 2019
1 parent 5e92f3f commit 405e126
Show file tree
Hide file tree
Showing 9 changed files with 25 additions and 17 deletions.
10 changes: 9 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,13 @@
"solargraph.diagnostics": true,
"files.exclude": {
"src/modules/**": true
}
},
"cSpell.words": [
"Sketchup",
"boundingbox",
"messagebox",
"polyline",
"rubocop",
"subclassing"
]
}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ end

### Tested

Each module, class and methods should have tests that verify their behaviour.
Each module, class and methods should have tests that verify their behavior.

### [Documented](https://www.rubydoc.info/github/thomthom/tt-lib/master)

Expand Down
4 changes: 2 additions & 2 deletions modules/color.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ class Color < Sketchup::Color
alias a alpha

# @since 3.0.0
def greyscale?
def grayscale?
red == green && green == blue
end

# @return [Integer] Value between 0 - 255
# @since 3.0.0
def luminance
# Colorimetric conversion to greyscale.
# Colorimetric conversion to grayscale.
# Original:
# http://forums.sketchucation.com/viewtopic.php?t=12368#p88865
# (red * 0.3) + (green * 0.59) + (blue * 0.11)
Expand Down
2 changes: 1 addition & 1 deletion modules/command.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

module SkippyLib
# A wrapper on top of `UI::Command` which will automatically pick the
# appropriate vector fileformat alternative for icon resources.
# appropriate vector file format alternative for icon resources.
#
# @since 3.0.0
module Command
Expand Down
4 changes: 2 additions & 2 deletions modules/drawing_cache.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ module SkippyLib
# Caches drawing instructions so complex calculations for generating the
# GL data can be reused.
#
# Redirect all `Skethcup::View` commands to a {DrawingCache} object and call
# Redirect all `Sketchup::View` commands to a {DrawingCache} object and call
# `#render` in a Tool's `#draw` event.
#
# @example
Expand Down Expand Up @@ -63,7 +63,7 @@ def render
view
end

# Cache drawing commands and data. These methods received the finsihed
# Cache drawing commands and data. These methods received the finished
# processed drawing data that will be executed when {#render} is called.
[
:draw,
Expand Down
2 changes: 1 addition & 1 deletion modules/image.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module SkippyLib
# @since 3.0.0
module Image

# This module is deliberatly not a mix-in.
# This module is deliberately not a mix-in.

# @param [Sketchup::Image] image
# @return [Sketchup::Material]
Expand Down
12 changes: 6 additions & 6 deletions tests/TT_Lib/TC_Color.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,19 @@ def test_initialize
end


def test_greyscale_Query_is_greyscale
def test_grayscale_Query_is_grayscale
color = Color.new(64, 64, 64, 255)
assert(color.greyscale?)
assert(color.grayscale?)
end

def test_greyscale_Query_is_transparent_greyscale
def test_grayscale_Query_is_transparent_grayscale
color = Color.new(64, 64, 64, 32)
assert(color.greyscale?)
assert(color.grayscale?)
end

def test_greyscale_Query_is_not_greyscale
def test_grayscale_Query_is_not_grayscale
color = Color.new(64, 128, 192, 255)
refute(color.greyscale?)
refute(color.grayscale?)
end


Expand Down
2 changes: 1 addition & 1 deletion tests/TT_Lib/TC_Line.rb
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def test_direction
def test_direction_array_vector
point = Geom::Point3d.new(10, 20, 30)
vector = Geom::Vector.new(1, 2, 3)
# This case is a little ambigous, as array can substitute both points and
# This case is a little ambiguous, as array can substitute both points and
# vectors. #direction will assume vector.
# TODO: Check how SketchUp deal with this.
line = Line.new(point, [1, 2, 3])
Expand Down
4 changes: 2 additions & 2 deletions tests/TT_Lib/coverage.manifest
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ SkippyLib::CExtensionManager.to_s
SkippyLib::Color.a
SkippyLib::Color.b
SkippyLib::Color.g
SkippyLib::Color.greyscale?
SkippyLib::Color.grayscale?
SkippyLib::Color.luminance
SkippyLib::Color.r
SkippyLib::Command.invoke
Expand Down Expand Up @@ -84,4 +84,4 @@ SkippyLib::UVQ.q
SkippyLib::UVQ.to_s
SkippyLib::UVQ.to_uv
SkippyLib::UVQ.u
SkippyLib::UVQ.v
SkippyLib::UVQ.v

0 comments on commit 405e126

Please sign in to comment.