Class: Wandbox::List

Inherits:
Object
  • Object
show all
Includes:
Enumerable, Iolite::Placeholders
Defined in:
lib/wandbox/list.rb

Instance Method Summary collapse

Constructor Details

#initialize(list) ⇒ List

Returns a new instance of List.



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

def initialize list
	@list = list
end

Instance Method Details

#each(&block) ⇒ Object



14
15
16
# File 'lib/wandbox/list.rb', line 14

def each &block
	@list.each &block
end

#empty?Boolean

Returns:

  • (Boolean)


31
32
33
# File 'lib/wandbox/list.rb', line 31

def empty?
	@list.empty?
end

#find_compiler(compiler) ⇒ Object



27
28
29
# File 'lib/wandbox/list.rb', line 27

def find_compiler compiler
	find &arg1["name"] == compiler
end

#languagesObject



18
19
20
# File 'lib/wandbox/list.rb', line 18

def languages
	map(&arg1["language"]).uniq
end

#select_by_language(lang) ⇒ Object



22
23
24
25
# File 'lib/wandbox/list.rb', line 22

def select_by_language lang
	lang = lang.downcase
	select &arg1["language"].downcase == lang
end

#to_aryObject



35
36
37
# File 'lib/wandbox/list.rb', line 35

def to_ary
	@list
end