Module: Keys
- Defined in:
- lib/key_dial.rb
Overview
Defined Under Namespace
Classes: Missing
Constant Summary collapse
- MISSING =
Missing.new.freeze
Class Method Summary collapse
-
.[](first_key) ⇒ Object
Create a new key list (KeyDialler) object using the syntax Keys[…].
-
.index?(key) ⇒ Boolean
Checks if a key is a valid numeric index, i.e.
Class Method Details
.[](first_key) ⇒ Object
Create a new key list (KeyDialler) object using the syntax Keys[…]
131 132 133 |
# File 'lib/key_dial.rb', line 131 def self.[](first_key) return KeyDial::KeyDialler.new(nil, first_key) end |
.index?(key) ⇒ Boolean
Checks if a key is a valid numeric index, i.e. can be used in the syntax object
141 142 143 |
# File 'lib/key_dial.rb', line 141 def self.index?(key) return key.is_a?(Numeric) && key.respond_to?(:to_i) end |