class Deface::Environment
Attributes
enabled[RW]
haml_support[RW]
namespaced[RW]
overrides[RW]
slim_support[RW]
Public Class Methods
new()
click to toggle source
# File lib/deface/environment.rb, line 10 def initialize @overrides = Overrides.new @enabled = true @haml_support = false @slim_support = false @actions = [] @sources = [] @namespaced = false Deface::DEFAULT_ACTIONS.each { |action| register_action(action) } Deface::DEFAULT_SOURCES.each { |source| register_source(source) } end
Public Instance Methods
actions()
click to toggle source
# File lib/deface/environment.rb, line 28 def actions @actions.dup end
register_action(action)
click to toggle source
# File lib/deface/environment.rb, line 23 def register_action(action) @actions << action Deface::DSL::Context.define_action_method(action.to_sym) end
register_source(source)
click to toggle source
# File lib/deface/environment.rb, line 32 def register_source(source) @sources << source Deface::DSL::Context.define_source_method(source.to_sym) end
sources()
click to toggle source
# File lib/deface/environment.rb, line 37 def sources @sources.dup end