Module: Bake::Types::Input

Extended by:
Type
Defined in:
lib/bake/types/input.rb

Class Method Summary collapse

Methods included from Type

|

Class Method Details

.composite?Boolean

Returns:



13
14
15
# File 'lib/bake/types/input.rb', line 13

def self.composite?
	false
end

.parse(input) ⇒ Object



17
18
19
20
21
22
23
24
25
26
# File 'lib/bake/types/input.rb', line 17

def self.parse(input)
	case input
	when '-'
		return $stdin
	when IO, StringIO
		return input
	else
		File.open(input)
	end
end