Class: Jimmy::Loaders::Ruby
- Includes:
- Macros
- Defined in:
- lib/jimmy/loaders/ruby.rb
Overview
Loads .rb files
Constant Summary
Constants included from Declaration
Declaration::BOOLEANS, Declaration::FORMATS, Declaration::SIMPLE_TYPES
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods included from Macros
Methods included from Declaration
#all_of, #any_of, #array, #boolean, #const, #date, #date_time, #default, #define, #definitions, #description, #email, #enum, #examples, #hostname, #idn_email, #idn_hostname, #if, #integer, #ipv4, #ipv6, #iri, #iri_reference, #json_pointer, #multiple_of, #not, #null, #number, #object, #one_of, #pattern, #range, #read_only, #regex, #relative_json_pointer, #string, #struct, #time, #title, #type, #uri, #uri_reference, #uri_template, #write_only
Methods inherited from Base
Constructor Details
This class inherits a constructor from Jimmy::Loaders::Base
Instance Method Details
#load(file = source) ⇒ Jimmy::Schema
14 15 16 17 18 |
# File 'lib/jimmy/loaders/ruby.rb', line 14 def load(file = source) file = Pathname(file) file = source.parent + file if file.relative? Jimmy::Schema(instance_eval file.read, file.to_s) end |