Class: Kaminari::Generators::Template

Inherits:
Struct
  • Object
show all
Defined in:
lib/generators/kaminari/views_generator.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#nameObject

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



82
83
84
# File 'lib/generators/kaminari/views_generator.rb', line 82

def name
  @name
end

#shaObject

Returns the value of attribute sha

Returns:

  • (Object)

    the current value of sha



82
83
84
# File 'lib/generators/kaminari/views_generator.rb', line 82

def sha
  @sha
end

Instance Method Details

#description?Boolean

Returns:

  • (Boolean)


83
84
85
# File 'lib/generators/kaminari/views_generator.rb', line 83

def description?
  name == 'DESCRIPTION'
end

#engineObject

:nodoc:



91
92
93
# File 'lib/generators/kaminari/views_generator.rb', line 91

def engine #:nodoc:
  File.extname(name).sub(/^\./, '')
end

#view?Boolean

Returns:

  • (Boolean)


87
88
89
# File 'lib/generators/kaminari/views_generator.rb', line 87

def view?
  name =~ /^app\/views\//
end