Class: UnicodeRange

Inherits:
Object
  • Object
show all
Defined in:
lib/unicode_range.rb,
lib/unicode_range/version.rb,
lib/unicode_range/collection.rb

Defined Under Namespace

Classes: Collection

Constant Summary collapse

VERSION =
"1.0.0"

Instance Method Summary collapse

Constructor Details

#initialize(from:, to:) ⇒ UnicodeRange

Returns a new instance of UnicodeRange.



5
6
7
8
# File 'lib/unicode_range.rb', line 5

def initialize(from:, to:)
  @from = from.to_i(16)
  @to = to.to_i(16)
end

Instance Method Details

#expand(except: []) ⇒ Object



10
11
12
# File 'lib/unicode_range.rb', line 10

def expand(except: [])
  Collection.new codepoints(except)
end