Class: SyntaxTree::CLI::ScriptItem

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

Overview

An item of work that corresponds to a script content passed via the command line.

Constant Summary collapse

FILEPATH =
:script

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(source) ⇒ ScriptItem

Returns a new instance of ScriptItem.



63
64
65
# File 'lib/syntax_tree/cli.rb', line 63

def initialize(source)
  @source = source
end

Instance Attribute Details

#sourceObject (readonly)

Returns the value of attribute source.



61
62
63
# File 'lib/syntax_tree/cli.rb', line 61

def source
  @source
end

Instance Method Details

#filepathObject



71
72
73
# File 'lib/syntax_tree/cli.rb', line 71

def filepath
  FILEPATH
end

#handlerObject



67
68
69
# File 'lib/syntax_tree/cli.rb', line 67

def handler
  HANDLERS[".rb"]
end