Class: Plasticine::Helpers::PlasticineTagHelper
- Inherits:
-
Object
- Object
- Plasticine::Helpers::PlasticineTagHelper
- Defined in:
- lib/plasticine/helpers.rb
Instance Attribute Summary collapse
-
#rails_helpers ⇒ Object
readonly
Returns the value of attribute rails_helpers.
Instance Method Summary collapse
- #column(options = {}) ⇒ Object
-
#initialize(rails_helpers, id, from, to, step) ⇒ PlasticineTagHelper
constructor
A new instance of PlasticineTagHelper.
- #line(options = {}) ⇒ Object
Constructor Details
#initialize(rails_helpers, id, from, to, step) ⇒ PlasticineTagHelper
Returns a new instance of PlasticineTagHelper.
22 23 24 25 26 27 28 |
# File 'lib/plasticine/helpers.rb', line 22 def initialize(rails_helpers, id, from, to, step) @rails_helpers = rails_helpers @id = id @from = from @to = to @step = step || 'month' end |
Instance Attribute Details
#rails_helpers ⇒ Object (readonly)
Returns the value of attribute rails_helpers.
16 17 18 |
# File 'lib/plasticine/helpers.rb', line 16 def rails_helpers @rails_helpers end |
Instance Method Details
#column(options = {}) ⇒ Object
30 31 32 33 34 35 36 37 38 39 40 41 |
# File 'lib/plasticine/helpers.rb', line 30 def column(={}) .reverse_merge! columns_left_padding: 20, columns_right_padding: 20, columns_margin: 0.2, y_spacing_ratio: 1.10 [:data] = { columns_left_padding: .delete(:columns_left_padding), columns_right_padding: .delete(:columns_right_padding), columns_margin: .delete(:columns_margin), y_spacing_ratio: .delete(:y_spacing_ratio) } visual 'column', end |
#line(options = {}) ⇒ Object
43 44 45 46 47 48 49 50 51 52 53 54 55 |
# File 'lib/plasticine/helpers.rb', line 43 def line(={}) .reverse_merge! lines_left_padding: 20, lines_right_padding: 20, lines_top_padding: 50, lines_margin: 1, y_spacing_ratio: 1.10 [:data] = { lines_left_padding: .delete(:lines_left_padding), lines_right_padding: .delete(:lines_right_padding), lines_top_padding: .delete(:lines_top_padding), lines_margin: .delete(:lines_margin), y_spacing_ratio: .delete(:y_spacing_ratio) } visual 'line', end |