Git Product home page Git Product logo

ruby-style-guide's People

Contributors

abotalov avatar aj-acevedo avatar andyw8 avatar arbox avatar bbatsov avatar brushbox avatar colindkelley avatar dalzony avatar deric avatar dreoliv avatar drewda avatar erran avatar etdev avatar ezii-jester-data avatar jonas054 avatar julio73 avatar jvirtanen avatar kalbasit avatar lee-jon avatar marcandre avatar mark-rushakoff avatar markijbema avatar marocchino avatar mitio avatar rrosenblum avatar shockwavenn avatar shpakvel avatar syndbg avatar todb avatar yous avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

ruby-style-guide's Issues

Alignement des blocs inline

Débat entre :

A.

# Customer
let(:customer) { create :customer, :mangopay }
let(:legal_representative_country_of_residence) { 'DE' }

# User
let(:email) { '[email protected]' }
let(:visible) { true }

B.

# Customer
let(:customer)                                  { create :customer, :mangopay }
let(:legal_representative_country_of_residence) { 'DE' }

# User
let(:email)                                     { '[email protected]' }
let(:visible)                                   { true }

C.

# Customer
let(:customer)                                  { create :customer, :mangopay }
let(:legal_representative_country_of_residence) { 'DE' }

# User
let(:email)   { '[email protected]' }
let(:visible) { true }

D.

Autoriser un mélange A et C.

Lambda

Débat entre :

A.

scope :owned_by, ->(user) { where(owner_id:  user.id) }

B.

scope :owned_by, -> (user) { where(owner_id:  user.id) }

C.

scope :owned_by, -> user { where(owner_id:  user.id) }

Alignement des conditions

A :

def test?
  true ||
  true
end

def test2?
  true &&
  true
end

def test3?
  true &&
  true ||
  true
end

B :

def test?
  true ||
    true
end

def test2?
  true &&
    true
end

def test3?
  true &&
    true ||
      true
end

C :

def test?
  true ||
  true
end

def test2?
  true &&
    true
end

def test3?
  true &&
    true ||
    true
end

D :

Comme rubocop le demande par défaut.

def test?
  true ||
    true
end

def test2?
  true &&
    true
end

def test3?
  true &&
    true ||
    true
end

Pour info, la discussion qui a mis le feu aux poudres 💥 😄

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.