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) ⇒ ScriptItem
constructor
A new instance of ScriptItem.
- #writable? ⇒ Boolean
Constructor Details
#initialize(source) ⇒ ScriptItem
Returns a new instance of ScriptItem.
65 66 67 |
# File 'lib/syntax_tree/cli.rb', line 65 def initialize(source) @source = source end |
Instance Attribute Details
#source ⇒ Object (readonly)
Returns the value of attribute source.
63 64 65 |
# File 'lib/syntax_tree/cli.rb', line 63 def source @source end |
Instance Method Details
#filepath ⇒ Object
73 74 75 |
# File 'lib/syntax_tree/cli.rb', line 73 def filepath :script end |
#handler ⇒ Object
69 70 71 |
# File 'lib/syntax_tree/cli.rb', line 69 def handler HANDLERS[".rb"] end |
#writable? ⇒ Boolean
77 78 79 |
# File 'lib/syntax_tree/cli.rb', line 77 def writable? false end |