Class: PuppetGenerator::Importers::Stdin
- Inherits:
-
Object
- Object
- PuppetGenerator::Importers::Stdin
- Defined in:
- lib/puppet_generator/importers/stdin.rb
Instance Attribute Summary collapse
-
#lines ⇒ Object
readonly
Returns the value of attribute lines.
Instance Method Summary collapse
Instance Attribute Details
#lines ⇒ Object (readonly)
Returns the value of attribute lines.
4 5 6 |
# File 'lib/puppet_generator/importers/stdin.rb', line 4 def lines @lines end |
Instance Method Details
#read(input) ⇒ Object
6 7 8 |
# File 'lib/puppet_generator/importers/stdin.rb', line 6 def read( input ) $stdin.readlines.collect { |l| l.strip.chomp } end |
#reads_from?(source) ⇒ Boolean
10 11 12 |
# File 'lib/puppet_generator/importers/stdin.rb', line 10 def reads_from?(source) source == 'stdin' end |