Sha256: 5c944be3d970050f6007294ea08218fd38297dc13babde300ef4fc9145dbf5b6

Contents?: true

Size: 451 Bytes

Versions: 4

Compression:

Stored size: 451 Bytes

Contents

require 'i18n'
require 'capybara/dsl'

module Formulaic
  module Inputs
    class Input
      include Capybara::DSL

      def initialize(model_name, field, value)
        @model_name = model_name
        @field = field
        @value = value
      end

      private

      def input(model_name, field, action = :create)
        Label.new(model_name, field, action).to_str
      end

      attr_accessor :model_name, :field, :value
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
formulaic-0.0.6 lib/formulaic/inputs/input.rb
formulaic-0.0.5 lib/formulaic/inputs/input.rb
formulaic-0.0.4 lib/formulaic/inputs/input.rb
formulaic-0.0.3 lib/formulaic/inputs/input.rb