Skip to content

answer/ans-copyright

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ans::Copyright

copyright の表示を行う

Installation

Add this line to your application's Gemfile:

gem 'ans-copyright'

And then execute:

$ bundle

Or install it yourself as:

$ gem install ans-copyright

Usage

module ApplicationHelper
  include Ans::Copyright
end

# now: 2013
<%= show_copyright "&copy; Answer" %>                         # => &copy; Answer
<%= show_copyright "&copy; Answer", now: 2012 %>              # => &copy; Answer 2012
<%= show_copyright "&copy; Answer", since: 2012 %>            # => &copy; Answer 2012 - 2013
<%= show_copyright "&copy; Answer", since: 2012, now: 2014 %> # => &copy; Answer 2012 - 2014

<%= show_copyright "&copy; Answer", since: 2012, now: 2014, padding: " = ", separator: " < " %>
# => &copy; Answer = 2012 < 2014

<%= show_copyright "&copy; Answer", file: "path/to/now" %>
# => file で指定したファイルの mtime から now を指定する

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

run rspec

  1. bundle install --path=path/to/bundle
  2. add feature
  3. run spec (bundle exec rspec)

About

copyright を表示します

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages