Class: Spidy::DefinitionFile
- Inherits:
-
Object
- Object
- Spidy::DefinitionFile
- Defined in:
- lib/spidy/definition_file.rb
Overview
spidy interface binding
Instance Attribute Summary collapse
-
#path ⇒ Object
readonly
Returns the value of attribute path.
-
#spidy ⇒ Object
readonly
Returns the value of attribute spidy.
Class Method Summary collapse
Instance Method Summary collapse
-
#eval_definition ⇒ Object
rubocop:disable Security/Eval.
Instance Attribute Details
#path ⇒ Object (readonly)
Returns the value of attribute path.
7 8 9 |
# File 'lib/spidy/definition_file.rb', line 7 def path @path end |
#spidy ⇒ Object (readonly)
Returns the value of attribute spidy.
8 9 10 |
# File 'lib/spidy/definition_file.rb', line 8 def spidy @spidy end |
Class Method Details
.open(filepath) ⇒ Object
10 11 12 13 14 |
# File 'lib/spidy/definition_file.rb', line 10 def self.open(filepath) object = new(filepath) object.eval_definition object end |
Instance Method Details
#eval_definition ⇒ Object
rubocop:disable Security/Eval
17 18 19 |
# File 'lib/spidy/definition_file.rb', line 17 def eval_definition @spidy = eval(File.open(path).read) if path end |