Sha256: bd68fe62dc829c486747e0205a913856b215d05f33d712a98ecbdc8cb7053360

Contents?: true

Size: 366 Bytes

Versions: 28

Compression:

Stored size: 366 Bytes

Contents

class Relevance::Tarantula::Form
  extend Forwardable
  def_delegators("@tag", :search)
  
  def initialize(tag)
    @tag = tag
  end
  
  def action
    @tag['action'].downcase
  end
  
  def method
    (rails_method_hack or @tag['method'] or 'get').downcase
  end
  
  def rails_method_hack
    (tag = @tag.at('input[@name="_method"]')) && tag["value"]
  end

end

Version data entries

28 entries across 28 versions & 3 rubygems

Version Path
relevance-tarantula-0.0.1 lib/relevance/tarantula/form.rb
relevance-tarantula-0.0.2 lib/relevance/tarantula/form.rb
relevance-tarantula-0.0.3 lib/relevance/tarantula/form.rb
relevance-tarantula-0.0.5 lib/relevance/tarantula/form.rb
relevance-tarantula-0.0.6 lib/relevance/tarantula/form.rb
relevance-tarantula-0.0.7.1 lib/relevance/tarantula/form.rb
relevance-tarantula-0.0.7 lib/relevance/tarantula/form.rb
relevance-tarantula-0.0.8.0 lib/relevance/tarantula/form.rb
relevance-tarantula-0.0.8.1 lib/relevance/tarantula/form.rb
relevance-tarantula-0.1.0 lib/relevance/tarantula/form.rb
relevance-tarantula-0.1.1 lib/relevance/tarantula/form.rb
relevance-tarantula-0.1.2 lib/relevance/tarantula/form.rb
relevance-tarantula-0.1.3 lib/relevance/tarantula/form.rb
relevance-tarantula-0.1.4 lib/relevance/tarantula/form.rb
relevance-tarantula-0.1.5 lib/relevance/tarantula/form.rb
relevance-tarantula-0.1.6 lib/relevance/tarantula/form.rb
relevance-tarantula-0.1.7 lib/relevance/tarantula/form.rb
relevance-tarantula-0.1.8 lib/relevance/tarantula/form.rb
relevance-tarantula-0.2.0 lib/relevance/tarantula/form.rb
relevance-tarantula-0.2.1 lib/relevance/tarantula/form.rb