rails960gs 0.2.1 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/VERSION +1 -1
- data/lib/rails960gs/view_helper.rb +55 -10
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.2
|
@@ -1,20 +1,55 @@
|
|
1
|
-
|
1
|
+
# The program takes an initial word or phrase from
|
2
|
+
# the command line (or in the absence of a
|
3
|
+
# parameter from the first line of standard
|
4
|
+
# input). In then reads successive words or
|
5
|
+
# phrases from standard input and reports whether
|
6
|
+
# they are angrams of the first word.
|
7
|
+
#
|
8
|
+
# Author:: Luiz Eduardo de Oliveira Fomseca - Agência Orangeweb (mailto:atendimento@orangeweb.com.br)
|
9
|
+
# Copyright:: Copyright (c) 2011 Agência Orangeweb, MEI
|
10
|
+
# License:: MIT
|
2
11
|
|
12
|
+
# This class holds the letters in the original
|
13
|
+
# word or phrase. The is_anagram? method allows us
|
14
|
+
# to test if subsequent words or phrases are
|
15
|
+
# anagrams of the original
|
16
|
+
|
17
|
+
require 'railtie.rb'
|
18
|
+
|
19
|
+
# GEM Rails960gs
|
3
20
|
module Rails960gs
|
21
|
+
|
22
|
+
# Extende os Helpers da Aplicação
|
4
23
|
module ViewHelper
|
5
24
|
|
6
|
-
|
7
25
|
#Consiste a option[:class]
|
8
26
|
@@options_build = lambda do |options|
|
9
27
|
unless options.has_key?(:class) then
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
end
|
28
|
+
options[:class] = String.new
|
29
|
+
else
|
30
|
+
options[:class] = options[:class].to_s.downcase
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
|
35
|
+
# Carrega o CSS necessário para o funcionamento do 960.gs do CDN *cachedcommons.org*
|
36
|
+
def cdn_960gs (options={ :min=>true, :reset => false})
|
37
|
+
|
38
|
+
if options[:min] then
|
39
|
+
@@out = stylesheet_link_tag "http://cachedcommons.org/cache/960/0.0.0/stylesheets/960-min.css"
|
40
|
+
else
|
41
|
+
@@out = stylesheet_link_tag "http://cachedcommons.org/cache/960/0.0.0/stylesheets/960.css"
|
42
|
+
end
|
43
|
+
|
44
|
+
if options[:reset] then
|
45
|
+
@@out = stylesheet_link_tag "http://yui.yahooapis.com/3.3.0/build/cssreset/reset-min.css"
|
46
|
+
end
|
47
|
+
|
48
|
+
@@out
|
49
|
+
end
|
15
50
|
|
16
51
|
|
17
|
-
#Monta o Container principal do 960.gs
|
52
|
+
# Monta o Container principal do 960.gs
|
18
53
|
def gs_container(options={}, &block)
|
19
54
|
@@options_build.call options
|
20
55
|
content_body = capture(&block)
|
@@ -24,7 +59,7 @@ module Rails960gs
|
|
24
59
|
end
|
25
60
|
|
26
61
|
|
27
|
-
#Monta uma Linha inteira com 12 Colunas
|
62
|
+
# Monta uma Linha inteira com 12 Colunas + a classe "clear"
|
28
63
|
def gs_clear
|
29
64
|
@@options_build.call options
|
30
65
|
options[:class].insert(-1, " clear ")
|
@@ -33,7 +68,17 @@ module Rails960gs
|
|
33
68
|
end
|
34
69
|
|
35
70
|
|
36
|
-
#Monta uma coluna com X itens e todas as opcoes do 960.gs
|
71
|
+
# Monta uma coluna com X itens e todas as opcoes do 960.gs
|
72
|
+
# O número de colunas deve ser passado como primeiro parâmetro
|
73
|
+
# Ex: <%= gs_col 12 do %> bla bla bla <% end %>
|
74
|
+
# As opções normais para Tags devem ser passados como segundo parâmetro
|
75
|
+
# Ex: <%= gs_col 4, :id => "sidebar" do %> bla bla bla <% end %>
|
76
|
+
# <b>Outros Parâmetros</b>
|
77
|
+
# * <b>:alpha => (true|false)</b> - Especifica se a coluna é alpha - (Default = false)
|
78
|
+
# * <b>:omega => (true|false)</b> - Especifica se a coluna é omega - (Default = false)
|
79
|
+
# * <b>:prefix => (1-12)</b> - Especifica se a coluna é do tipo prefix - (Default = nil)
|
80
|
+
# * <b>:suffix => (1-12)</b> - Especifica se a coluna é do tipo suffix - (Default = nil)
|
81
|
+
|
37
82
|
def gs_col cols=12, options={}, &block
|
38
83
|
|
39
84
|
|
metadata
CHANGED