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
romanbsd-tarantula-0.1.8 lib/relevance/tarantula/form.rb
romanbsd-tarantula-0.2.0 lib/relevance/tarantula/form.rb
tarantula-0.0.8.1 lib/relevance/tarantula/form.rb
tarantula-0.0.5 lib/relevance/tarantula/form.rb
tarantula-0.1.8 lib/relevance/tarantula/form.rb
tarantula-0.1.4 lib/relevance/tarantula/form.rb
tarantula-0.2.0 lib/relevance/tarantula/form.rb
tarantula-0.1.5 lib/relevance/tarantula/form.rb