Class: Glimmer::DSL::Web::InlineStyleDataBindingExpression

Inherits:
Expression
  • Object
show all
Defined in:
lib/glimmer/dsl/web/inline_style_data_binding_expression.rb

Instance Method Summary collapse

Instance Method Details

#can_interpret?(parent, keyword, *args, &block) ⇒ Boolean

Returns:

  • (Boolean)


7
8
9
10
11
12
# File 'lib/glimmer/dsl/web/inline_style_data_binding_expression.rb', line 7

def can_interpret?(parent, keyword, *args, &block)
  keyword == 'style' &&
    block.nil? &&
    args.size == 1 &&
    textual?(args.first)
end

#interpret(parent, keyword, *args, &block) ⇒ Object



14
15
16
17
# File 'lib/glimmer/dsl/web/inline_style_data_binding_expression.rb', line 14

def interpret(parent, keyword, *args, &block)
  parent_attribute = "#{keyword}_#{args.first.to_s.underscore}"
  Glimmer::DataBinding::Shine.new(parent, parent_attribute)
end