Sha256: 8a59fe634af7801817e0b6a6e715dfd5945945de4c85db1f1f085594eef2afb9
Contents?: true
Size: 804 Bytes
Versions: 1
Compression:
Stored size: 804 Bytes
Contents
module LatoView class Component::Button::Cell < Cell @@colors = %w(normal yellow green red) @@sizes = %w(normal small) attr_accessor :title, :url, :color, :size, :custom_class, :method def initialize(title: '', url: '', color: 'normal', size: 'normal', custom_class: '', method: 'get') # save params @title = title @url = url @color = color @size = size @method = method @custom_class = custom_class # check params check_params end def show render 'show.html' end # check params private def check_params raise 'Button Cell: color value in not correct' unless @@colors.include? @color.to_s raise 'Button Cell: size value in not correct' unless @@sizes.include? @size.to_s end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
lato_view-1.1.5 | app/cells/lato_view/component/button/cell.rb |