Class: UniString::PropSearch

Inherits:
Object
  • Object
show all
Defined in:
lib/uniprop/unistring.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(codepoint) ⇒ PropSearch

Returns a new instance of PropSearch.

Parameters:

  • codepoint (Integer)


6
7
8
# File 'lib/uniprop/unistring.rb', line 6

def initialize(codepoint)
  @codepoint = codepoint
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method, *args, &block) ⇒ Object



10
11
12
13
14
# File 'lib/uniprop/unistring.rb', line 10

def method_missing(method, *args, &block)
  property = method.to_s
  version = args[0] || latest_version
  UniProp::version(version).values_of(property, codepoint)
end

Instance Attribute Details

#codepointObject (readonly)

Returns the value of attribute codepoint.



3
4
5
# File 'lib/uniprop/unistring.rb', line 3

def codepoint
  @codepoint
end