Class: BootstrapPager::Generators::Template

Inherits:
Struct
  • Object
show all
Defined in:
lib/generators/bootstrap_pager/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


65
66
67
# File 'lib/generators/bootstrap_pager/views_generator.rb', line 65

def name
  @name
end

#shaObject

Returns the value of attribute sha

Returns:

  • (Object)

    the current value of sha


65
66
67
# File 'lib/generators/bootstrap_pager/views_generator.rb', line 65

def sha
  @sha
end

Instance Method Details

#description?Boolean

Returns:

  • (Boolean)

66
67
68
# File 'lib/generators/bootstrap_pager/views_generator.rb', line 66

def description?
  name == 'DESCRIPTION'
end

#engineObject

:nodoc:


74
75
76
# File 'lib/generators/bootstrap_pager/views_generator.rb', line 74

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

#view?Boolean

Returns:

  • (Boolean)

70
71
72
# File 'lib/generators/bootstrap_pager/views_generator.rb', line 70

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