Class: SyntaxTree::CLI::ScriptItem
- Inherits:
-
Object
- Object
- SyntaxTree::CLI::ScriptItem
- Defined in:
- lib/syntax_tree/cli.rb
Overview
An item of work that corresponds to a script content passed via the command line.
Instance Attribute Summary collapse
-
#source ⇒ Object
readonly
Returns the value of attribute source.
Instance Method Summary collapse
- #filepath ⇒ Object
- #handler ⇒ Object
-
#initialize(source, extension) ⇒ ScriptItem
constructor
A new instance of ScriptItem.
- #writable? ⇒ Boolean
Constructor Details
#initialize(source, extension) ⇒ ScriptItem
Returns a new instance of ScriptItem.
66 67 68 69 |
# File 'lib/syntax_tree/cli.rb', line 66 def initialize(source, extension) @source = source @extension = extension end |
Instance Attribute Details
#source ⇒ Object (readonly)
Returns the value of attribute source.
64 65 66 |
# File 'lib/syntax_tree/cli.rb', line 64 def source @source end |
Instance Method Details
#filepath ⇒ Object
75 76 77 |
# File 'lib/syntax_tree/cli.rb', line 75 def filepath :script end |
#handler ⇒ Object
71 72 73 |
# File 'lib/syntax_tree/cli.rb', line 71 def handler HANDLERS[@extension] end |
#writable? ⇒ Boolean
79 80 81 |
# File 'lib/syntax_tree/cli.rb', line 79 def writable? false end |