Class: SyntaxTree::CLI::STDINItem

Inherits:
Object
  • Object
show all
Defined in:
lib/syntax_tree/cli.rb

Overview

An item of work that correspond to the content passed in via stdin.

Instance Method Summary collapse

Instance Method Details

#filepathObject



89
90
91
# File 'lib/syntax_tree/cli.rb', line 89

def filepath
  :stdin
end

#handlerObject



85
86
87
# File 'lib/syntax_tree/cli.rb', line 85

def handler
  HANDLERS[".rb"]
end

#sourceObject



93
94
95
# File 'lib/syntax_tree/cli.rb', line 93

def source
  $stdin.read
end

#writable?Boolean

Returns:

  • (Boolean)


97
98
99
# File 'lib/syntax_tree/cli.rb', line 97

def writable?
  false
end