Refactoring and documentation
This commit is contained in:
@@ -54,7 +54,7 @@ module Squib
|
||||
# data = csv file: 'data.csv'
|
||||
# => {'h1' => [1,3], 'h2' => [2,4]}
|
||||
#
|
||||
# Parsing uses Ruby's CSV, options: {headers: true, converters: :numeric}
|
||||
# Parsing uses Ruby's CSV, with options `{headers: true, converters: :numeric}`
|
||||
# http://www.ruby-doc.org/stdlib-2.0/libdoc/csv/rdoc/CSV.html
|
||||
#
|
||||
# @option opts file [String] the CSV-formatted file to open. Opens relative to the current directory.
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
require 'squib/constants'
|
||||
|
||||
module Squib
|
||||
class Deck
|
||||
|
||||
@@ -13,7 +15,6 @@ module Squib
|
||||
@dpi * n.to_f
|
||||
end
|
||||
|
||||
@@INCHES_IN_CM = 0.393700787
|
||||
# Given cm, returns the number of pixels according to the deck's DPI.
|
||||
#
|
||||
# @example
|
||||
@@ -23,7 +24,7 @@ module Squib
|
||||
# @return [Decimal] the number of pixels, according to the deck's DPI
|
||||
# @api public
|
||||
def cm(n)
|
||||
@dpi * @@INCHES_IN_CM * n.to_f
|
||||
@dpi * Squib::INCHES_IN_CM * n.to_f
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user