Class: Reflect::KeyList

Inherits:
Object
  • Object
show all
Includes:
Enumerable
Defined in:
lib/reflect/key_list.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(keys, continuation) ⇒ KeyList

Returns a new instance of KeyList.



8
9
10
11
# File 'lib/reflect/key_list.rb', line 8

def initialize(keys, continuation)
  @keys = keys || []
  @next = continuation
end

Instance Attribute Details

#keysObject (readonly)

Returns the value of attribute keys.



5
6
7
# File 'lib/reflect/key_list.rb', line 5

def keys
  @keys
end

#nextObject (readonly)

Returns the value of attribute next.



6
7
8
# File 'lib/reflect/key_list.rb', line 6

def next
  @next
end

Instance Method Details

#each(&blk) ⇒ Object



13
14
15
# File 'lib/reflect/key_list.rb', line 13

def each(&blk)
  keys.each(&blk)
end

#empty?Boolean

Returns:

  • (Boolean)


17
18
19
# File 'lib/reflect/key_list.rb', line 17

def empty?
  keys.count < 1
end