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



72
73
74
# File 'lib/generators/kaminari/views_generator.rb', line 72

def name
  @name
end

#shaObject

Returns the value of attribute sha

Returns:

  • (Object)

    the current value of sha



72
73
74
# File 'lib/generators/kaminari/views_generator.rb', line 72

def sha
  @sha
end

Instance Method Details

#description?Boolean

Returns:

  • (Boolean)


73
74
75
# File 'lib/generators/kaminari/views_generator.rb', line 73

def description?
  name == 'DESCRIPTION'
end

#engineObject

:nodoc:



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

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

#view?Boolean

Returns:

  • (Boolean)


77
78
79
# File 'lib/generators/kaminari/views_generator.rb', line 77

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