class SBSM::LookandfeelWrapper

Public Class Methods

new(component) click to toggle source
Calls superclass method SBSM::Lookandfeel::new
# File lib/sbsm/lookandfeelwrapper.rb, line 31
def initialize(component)
        @component = component
        super(@component.session)
end

Public Instance Methods

attributes(key) click to toggle source
# File lib/sbsm/lookandfeelwrapper.rb, line 38
def attributes(key)
        self::class::HTML_ATTRIBUTES.fetch(key.to_sym) {
                @component.attributes(key)
        }
end
disabled?(event) click to toggle source
# File lib/sbsm/lookandfeelwrapper.rb, line 43
def disabled?(event)
        self::class::DISABLED.include?(event) \
                || @component.disabled?(event)
end
enabled?(event, default=false) click to toggle source
# File lib/sbsm/lookandfeelwrapper.rb, line 47
def enabled?(event, default=false)
        self::class::ENABLED.include?(event) \
                || @component.enabled?(event, default)
end
languages() click to toggle source
Calls superclass method SBSM::Lookandfeel#languages
# File lib/sbsm/lookandfeelwrapper.rb, line 51
def languages
        unless(@languages)
                super
                if(@languages.empty?) 
                        @languages = @component.languages
                end
        end
        @languages
end
lookup(key, *args, &block) click to toggle source
# File lib/sbsm/lookandfeelwrapper.rb, line 60
def lookup(key, *args, &block)
        _lookup(key, *args) || @component.lookup(key, *args, &block)
end
method_missing(symbol, *args, &block) click to toggle source
# File lib/sbsm/lookandfeelwrapper.rb, line 35
def method_missing(symbol, *args, &block)
        @component.send(symbol, *args, &block)
end
navigation(filter=true) click to toggle source
resource(rname, rstr=nil) click to toggle source
Calls superclass method SBSM::Lookandfeel#resource
# File lib/sbsm/lookandfeelwrapper.rb, line 74
def resource(rname, rstr=nil)
        if(self::class::RESOURCES.include?(rname))
                super
        else
                @component.resource(rname, rstr)
        end
end
resource_global(rname, rstr=nil) click to toggle source
Calls superclass method SBSM::Lookandfeel#resource_global
# File lib/sbsm/lookandfeelwrapper.rb, line 81
def resource_global(rname, rstr=nil)
        if(self::class::RESOURCES.include?(rname))
                super
        else
                @component.resource_global(rname, rstr)
        end
end
zone_navigation(filter=true) click to toggle source
# File lib/sbsm/lookandfeelwrapper.rb, line 88
def zone_navigation(filter=true)
        nav = @component.zone_navigation(false)
        if(filter)
                nav.select { |item| 
                        key = (item.is_a? Symbol) ? item : item.direct_event
                        enabled?(key)
                }
        else
                nav
        end
end
zones(filter=true) click to toggle source
# File lib/sbsm/lookandfeelwrapper.rb, line 99
def zones(filter=true)
        nav = @component.zones(false)
        if(filter)
                nav.select { |item| 
                        key = (item.is_a? Symbol) ? item : item.direct_event
                        enabled?(key)
                }
        else
                nav
        end
end