Class: Horatio::Detector::NodePackage
Instance Attribute Summary
Attributes included from IOHandler
#input, #output
Instance Method Summary
collapse
#increment
Methods included from JSONReader
#name, #version
Methods included from IOHandler
#default_output, #detect, included, #initialize, #memo_read
Methods included from Validator
#validate, #validate_name, #validate_version
Instance Method Details
15
16
17
|
# File 'lib/horatio/detector/node_package.rb', line 15
def default_input
'package.json'
end
|
#description ⇒ Object
25
26
27
|
# File 'lib/horatio/detector/node_package.rb', line 25
def description
'Node.js package.json'
end
|
#info ⇒ Object
19
20
21
22
23
|
# File 'lib/horatio/detector/node_package.rb', line 19
def info
memo_read do
File.open(input, 'r') { |f| JSON.parse(f.read) }
end
end
|