Class: XCDM::Schema::Loader
- Inherits:
-
Object
- Object
- XCDM::Schema::Loader
- Defined in:
- lib/xcdm/schema.rb
Instance Attribute Summary collapse
-
#schemas ⇒ Object
readonly
Returns the value of attribute schemas.
-
#xcode_version ⇒ Object
readonly
Returns the value of attribute xcode_version.
Instance Method Summary collapse
-
#initialize(xcode_version) ⇒ Loader
constructor
A new instance of Loader.
- #load_file(file) ⇒ Object
- #schema(version, options = {}, &block) ⇒ Object
Constructor Details
#initialize(xcode_version) ⇒ Loader
Returns a new instance of Loader.
66 67 68 69 |
# File 'lib/xcdm/schema.rb', line 66 def initialize(xcode_version) @xcode_version = xcode_version @schemas = [] end |
Instance Attribute Details
#schemas ⇒ Object (readonly)
Returns the value of attribute schemas.
63 64 65 |
# File 'lib/xcdm/schema.rb', line 63 def schemas @schemas end |
#xcode_version ⇒ Object (readonly)
Returns the value of attribute xcode_version.
64 65 66 |
# File 'lib/xcdm/schema.rb', line 64 def xcode_version @xcode_version end |
Instance Method Details
#load_file(file) ⇒ Object
77 78 79 80 81 82 |
# File 'lib/xcdm/schema.rb', line 77 def load_file(file) File.open(file) do |ff| instance_eval(ff.read, file) end @found_schema end |