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.
7 8 9 |
# File 'lib/spidy/definition_file.rb', line 7 def spidy @spidy end |
Class Method Details
.open(filepath) ⇒ Object
9 10 11 12 13 |
# File 'lib/spidy/definition_file.rb', line 9 def self.open(filepath) object = new(filepath) object.eval_definition object end |
Instance Method Details
#eval_definition ⇒ Object
rubocop:disable Security/Eval
16 17 18 |
# File 'lib/spidy/definition_file.rb', line 16 def eval_definition @spidy = eval(File.read(path)) if path end |