Class: Batali::Origin::Path::Metadata

Inherits:
AttributeStruct
  • Object
show all
Defined in:
lib/batali/origin/path.rb

Overview

Helper class for loading metadata ruby files

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.const_missing(const) ⇒ Constant

Perform constant lookup if required

Returns:

  • (Constant)


14
15
16
17
18
19
20
# File 'lib/batali/origin/path.rb', line 14

def self.const_missing(const)
  [::Object, ::ObjectSpace].map do |root|
    if(root.const_defined?(const))
      root.const_get(const)
    end
  end.compact.first || super
end

Instance Method Details

#depends(*args) ⇒ Object



22
23
24
25
# File 'lib/batali/origin/path.rb', line 22

def depends(*args)
  set!(:depends, args)
  self
end