Class: TrisulRP::Keys::ASNumber

Inherits:
Object
  • Object
show all
Defined in:
lib/trisulrp/keys.rb

Overview

key and human form are same

Class Method Summary collapse

Class Method Details

.invert_xform(dstring) {|dstring| ... } ⇒ Object

human string to key

Yields:

  • (dstring)


182
183
184
185
# File 'lib/trisulrp/keys.rb', line 182

def self.invert_xform(dstring)
  yield dstring if block_given?
  dstring
end

.is_human_form?(patt) ⇒ Boolean

is_human_pattern?

Returns:

  • (Boolean)


194
195
196
197
# File 'lib/trisulrp/keys.rb', line 194

def self.is_human_form? patt
  return false if patt.nil?
  patt[0..1]=="AS"
end

.is_key_form?(patt) ⇒ Boolean

is_key_pattern?

Returns:

  • (Boolean)


188
189
190
191
# File 'lib/trisulrp/keys.rb', line 188

def self.is_key_form? patt
  return false if patt.nil?
  patt[0..1]=="AS"
end

.xform(kstring) {|kstring| ... } ⇒ Object

key to human string

> key - ASnnn

Yields:

  • (kstring)


176
177
178
179
# File 'lib/trisulrp/keys.rb', line 176

def self.xform(kstring)
  yield kstring if block_given?
  kstring
end