I hereby claim:
- I am stupidecodefactory on github.
- I am yannsilkfred (https://keybase.io/yannsilkfred) on keybase.
- I have a public key ASAGoM5vIca8G8QYzjgfcITF83ansdBiGbvNbpBbg2s6dQo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
### Keybase proof | |
I hereby claim: | |
* I am stupidecodefactory on github. | |
* I am yannsilkfred (https://keybase.io/yannsilkfred) on keybase. | |
* I have a public key ASAGoM5vIca8G8QYzjgfcITF83ansdBiGbvNbpBbg2s6dQo | |
To claim this, I am signing this object: |
I hereby claim:
To claim this, I am signing this object:
module OpenGraphRails | |
class Og | |
include ActiveModel::Model | |
# require metadata | |
attr_accessor :title, :type, :image, :url | |
validates_presence_of :title, :type, :image, :url | |
# optional metadata | |
attr_accessor :audio, :description, :site_name, :video |
# lib/open_graph_rails.rb | |
require 'open_graph_rails/version' | |
require 'activemodel' | |
require 'open_graph_rails/og' | |
module OpenGraphRails | |
# Your code goes here... | |
end |
# lib/open_graph_rails/og.rb | |
module OpenGraphRails | |
class Og | |
include ActiveModel::Model | |
attr_accessor :title, :type, :image, :url | |
validates_presence_of :title, :type, :image, :url | |
end | |
end |
require 'spec_helper' | |
module OpenGraphRails | |
RSpec.describe OpenGraphRails do | |
it 'has a version number' do | |
expect(OpenGraphRails::VERSION).not_to be nil | |
end | |
describe Og, type: :model do |
# coding: utf-8 | |
lib = File.expand_path('../lib', __FILE__) | |
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) | |
require 'open_graph_rails/version' | |
Gem::Specification.new do |spec| | |
spec.name = "open_graph_rails" | |
spec.version = OpenGraphRails::VERSION | |
spec.authors = ["Yann Marquet"] | |
spec.email = ["ymarquet@gmail.com"] |
def dumb_stuff | |
if somethin == true | |
true | |
else | |
false | |
end | |
end |
### R code from vignette source 'Presentation.Rnw' | |
### Encoding: UTF-8 | |
################################################### | |
### code chunk number 1: init | |
################################################### | |
options(width=60) | |
################################################### |