Class: Ember::ES6Template::Config
- Inherits:
-
Object
- Object
- Ember::ES6Template::Config
- Defined in:
- lib/ember/es6_template/config.rb
Instance Attribute Summary collapse
-
#module_prefix ⇒ Object
Returns the value of attribute module_prefix.
-
#prefix_dirs ⇒ Object
Returns the value of attribute prefix_dirs.
-
#prefix_files ⇒ Object
Returns the value of attribute prefix_files.
Instance Method Summary collapse
Instance Attribute Details
#module_prefix ⇒ Object
Returns the value of attribute module_prefix.
4 5 6 |
# File 'lib/ember/es6_template/config.rb', line 4 def module_prefix @module_prefix end |
#prefix_dirs ⇒ Object
Returns the value of attribute prefix_dirs.
5 6 7 |
# File 'lib/ember/es6_template/config.rb', line 5 def prefix_dirs @prefix_dirs end |
#prefix_files ⇒ Object
Returns the value of attribute prefix_files.
5 6 7 |
# File 'lib/ember/es6_template/config.rb', line 5 def prefix_files @prefix_files end |
Instance Method Details
#prefix_pattern ⇒ Object
19 20 21 22 23 24 25 26 27 |
# File 'lib/ember/es6_template/config.rb', line 19 def prefix_pattern @prefix_pattern ||= begin patterns = [] patterns += Array(prefix_dirs).map {|dir| Regexp.new("^#{dir}/") } patterns += Array(prefix_files).map {|file| Regexp.new("^#{file}$") } patterns.empty? ? // : Regexp.union(patterns) end end |
#to_hash ⇒ Object
29 30 31 32 33 34 35 |
# File 'lib/ember/es6_template/config.rb', line 29 def to_hash { module_prefix: module_prefix, prefix_files: prefix_files, prefix_dirs: prefix_dirs } end |