Class: SyntaxTree::CLI::STDINItem
- Inherits:
-
Object
- Object
- SyntaxTree::CLI::STDINItem
- 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
- #filepath ⇒ Object
- #handler ⇒ Object
-
#initialize(extension) ⇒ STDINItem
constructor
A new instance of STDINItem.
- #source ⇒ Object
- #writable? ⇒ Boolean
Constructor Details
#initialize(extension) ⇒ STDINItem
Returns a new instance of STDINItem.
86 87 88 |
# File 'lib/syntax_tree/cli.rb', line 86 def initialize(extension) @extension = extension end |
Instance Method Details
#filepath ⇒ Object
94 95 96 |
# File 'lib/syntax_tree/cli.rb', line 94 def filepath :stdin end |
#handler ⇒ Object
90 91 92 |
# File 'lib/syntax_tree/cli.rb', line 90 def handler HANDLERS[@extension] end |
#source ⇒ Object
98 99 100 |
# File 'lib/syntax_tree/cli.rb', line 98 def source $stdin.read end |
#writable? ⇒ Boolean
102 103 104 |
# File 'lib/syntax_tree/cli.rb', line 102 def writable? false end |