Class: InplaceEditingHelper::Tag::CSS

Inherits:
Object
  • Object
show all
Defined in:
app/helpers/inplace_editing_helper.rb

Instance Method Summary collapse

Constructor Details

#initialize(css) ⇒ CSS

Returns a new instance of CSS.



157
158
159
160
161
162
163
# File 'app/helpers/inplace_editing_helper.rb', line 157

def initialize(css)
  if css.is_a? String
    @internals = css.split(' ')
  else
    @internals = css.to_a
  end
end

Instance Method Details

#<<(name) ⇒ Object



173
174
175
176
# File 'app/helpers/inplace_editing_helper.rb', line 173

def <<(name)
  @internals << name
  nil
end

#empty?Boolean

Returns:

  • (Boolean)


169
170
171
# File 'app/helpers/inplace_editing_helper.rb', line 169

def empty?
  @internals.empty?
end

#to_sObject



165
166
167
# File 'app/helpers/inplace_editing_helper.rb', line 165

def to_s
  @internals.uniq.join(' ')
end