Class: Brujula::YamlInclude

Inherits:
Object
  • Object
show all
Defined in:
lib/brujula/initializers/yaml_include.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#pathObject (readonly)

Returns the value of attribute path.



6
7
8
# File 'lib/brujula/initializers/yaml_include.rb', line 6

def path
  @path
end

Instance Method Details

#init_with(coder) ⇒ Object



8
9
10
# File 'lib/brujula/initializers/yaml_include.rb', line 8

def init_with(coder)
  @path = coder.scalar
end

#load_external_data(base_dir) ⇒ Object



12
13
14
# File 'lib/brujula/initializers/yaml_include.rb', line 12

def load_external_data(base_dir)
  YAML.load external_data_content(base_dir)
end

#parseable?Boolean

Returns:

  • (Boolean)


16
17
18
# File 'lib/brujula/initializers/yaml_include.rb', line 16

def parseable?
  parseable_extensions.include?(path_extension)
end